[ 
https://issues.apache.org/jira/browse/WICKET-5282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13715304#comment-13715304
 ] 

Hendy Irawan commented on WICKET-5282:
--------------------------------------

Seems that HttpsMapper is the culprit. Without HttpsMapper I never see this 
error.
                
> o.a.w.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl throws 
> NPE when posting EventBus inside Atmosphere request
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5282
>                 URL: https://issues.apache.org/jira/browse/WICKET-5282
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-atmosphere
>    Affects Versions: 6.9.1
>         Environment: wicket-atmosphere 0.11, Tomcat 7.0
>            Reporter: Hendy Irawan
>            Assignee: Emond Papegaaij
>
> Sometimes happens when during an Wicket-Atmosphere request, i.e. inside an 
> Atmosphere's @Subscribe handler, we post an object to Wicket-Atmosphere's 
> EventBus.
> {code}
> 08:17:46.460 | ERROR | oryBean_Worker-9 | c.g.c.e.E.default                | 
> .google.common.eventbus.EventBus  316 | Could not dispatch event: Job 
> DEFAULT.loadToArchive execution complete at  08:17:46 07/22/2013 and reports: 
> exitCode=COMPLETED;exitDescription=Loaded 1 CSVs to Archive as 
> archived/2013-07-22T08:17:46.098-04:00.csv, 1 point times made stale: 
> [2013-07-22T12:15:00.000Z] to handler [wrapper public void 
> org.soluvas.web.site.AtmosphereApplication.bridgeToAtmosphere(java.lang.Object)]
> java.lang.reflect.InvocationTargetException: null
>         at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) 
> ~[na:na]
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.7.0_15]
>         at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
>         at 
> com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 
> ~[guava-14.0.1.jar:na]
>         at 
> com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
>  ~[guava-14.0.1.jar:na]
>         at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) 
> [guava-14.0.1.jar:na]
>         at 
> com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 
> [guava-14.0.1.jar:na]
>         at com.google.common.eventbus.EventBus.post(EventBus.java:267) 
> [guava-14.0.1.jar:na]
>         at 
> com.quikdo.freq.job.EventBusJobListener.jobWasExecuted(EventBusJobListener.java:54)
>  [EventBusJobListener.class:na]
>         at 
> org.quartz.core.QuartzScheduler.notifyJobListenersWasExecuted(QuartzScheduler.java:2020)
>  [quartz-2.2.0.jar:na]
>         at 
> org.quartz.core.JobRunShell.notifyJobListenersComplete(JobRunShell.java:355) 
> [quartz-2.2.0.jar:na]
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:229) 
> [quartz-2.2.0.jar:na]
>         at 
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) 
> [quartz-2.2.0.jar:na]
> Caused by: java.lang.NullPointerException: null
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:194)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:113)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:83)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.WebApplication.newWebRequest(WebApplication.java:448)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:337) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at 
> org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:317) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:292) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at 
> org.soluvas.web.site.AtmosphereApplication.bridgeToAtmosphere(AtmosphereApplication.java:53)
>  ~[org.soluvas.web.site-2.1.0-SNAPSHOT.jar:na]
>         ... 13 common frames omitted
> 08:17:46.465 | ERROR | ryBean_Worker-10 | c.g.c.e.E.default                | 
> .google.common.eventbus.EventBus  316 | Could not dispatch event: Job 
> DEFAULT.locationVisitorAggregator fired (by trigger DEFAULT.MT_3jn71esi0mkgo) 
> at:  08:17:46 07/22/2013 to handler [wrapper public void 
> org.soluvas.web.site.AtmosphereApplication.bridgeToAtmosphere(java.lang.Object)]
> java.lang.reflect.InvocationTargetException: null
>         at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source) 
> ~[na:na]
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.7.0_15]
>         at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_15]
>         at 
> com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 
> ~[guava-14.0.1.jar:na]
>         at 
> com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
>  ~[guava-14.0.1.jar:na]
>         at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) 
> [guava-14.0.1.jar:na]
>         at 
> com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 
> [guava-14.0.1.jar:na]
>         at com.google.common.eventbus.EventBus.post(EventBus.java:267) 
> [guava-14.0.1.jar:na]
>         at 
> com.quikdo.freq.job.EventBusJobListener.jobToBeExecuted(EventBusJobListener.java:37)
>  [EventBusJobListener.class:na]
>         at 
> org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1980)
>  [quartz-2.2.0.jar:na]
>         at 
> org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:339) 
> [quartz-2.2.0.jar:na]
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:174) 
> [quartz-2.2.0.jar:na]
>         at 
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) 
> [quartz-2.2.0.jar:na]
> Caused by: java.lang.NullPointerException: null
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:194)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:113)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.<init>(ServletWebRequest.java:83)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at 
> org.apache.wicket.protocol.http.WebApplication.newWebRequest(WebApplication.java:448)
>  ~[wicket-core-6.9.1.jar:6.9.1]
>         at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:337) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at 
> org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:317) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:292) 
> ~[wicket-atmosphere-0.11.jar:0.11]
>         at 
> org.soluvas.web.site.AtmosphereApplication.bridgeToAtmosphere(AtmosphereApplication.java:53)
>  ~[org.soluvas.web.site-2.1.0-SNAPSHOT.jar:na]
>         ... 13 common frames omitted
> {code}
> The NPE happens inside wicket-core, so hopefully wicket-core can give more 
> detailed exception why it's doing so.
> And {{org.apache.wicket.atmosphere.EventBus.post}} should probably check its 
> arguments that may cause NPE on wicket-core's part.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to