Hi All,

I am creating a huge dojo widget which needs to access some data on the
server side as objects and I am trying to use DWR for remoting some of my
calls. Pardon my ignorance, but I am not sure whether this is allowed in the
tapestry world. So I set forth to try to integrate DWR into my tapestry app.

My need is to have access to the visit object and other application state
objects from within the DWR created objects. So I extended the tapestry
ApplicationServlet in order to get access to the hivemind Registry and
stored it into the servlet context. Next I wrote a separate DWR creator for
hivemind and within the creator I am accessing the registry to get to the
hivemind service. Everything works well until here. I get the service from
the registry and the ApplicationStateManager is set into the service. Now
within the service when I try to access the visit object using
(Visit)appStateManager.get("visit"); - I get the following exception.

java.lang.NullPointerException: Property 'webRequest' of <OuterProxy for
tapestry.globals.RequestGlobals(org.apache.tapestry.services.RequestGlobals)>
is null.
    at
$WebRequest_11aa1b3d84b._targetServiceProperty($WebRequest_11aa1b3d84b.java)
    at $WebRequest_11aa1b3d84b.getSession($WebRequest_11aa1b3d84b.java)
    at $WebRequest_11aa1b3d82f.getSession($WebRequest_11aa1b3d82f.java)
    at
org.apache.tapestry.engine.state.SessionScopeManager.getSession(SessionScopeManager.java:48)
    at
org.apache.tapestry.engine.state.SessionScopeManager.get(SessionScopeManager.java:64)
    at
$StateObjectPersistenceManager_11aa1b3d845.get($StateObjectPersistenceManager_11aa1b3d845.java)
    at
org.apache.tapestry.engine.state.StateObjectManagerImpl.get(StateObjectManagerImpl.java:50)
    at
org.apache.tapestry.engine.state.ApplicationStateManagerImpl.get(ApplicationStateManagerImpl.java:60)
    at
$ApplicationStateManager_11aa1b3d807.get($ApplicationStateManager_11aa1b3d807.java)
    at
$ApplicationStateManager_11aa1b3d808.get($ApplicationStateManager_11aa1b3d808.java)
    at
com.eureka.engine.dwrtest.DWRTestService.getVisitObject(DWRTestService.java:24)
    at
com.eureka.engine.dwrtest.DWRTestService.doSomething(DWRTestService.java:28)

I guess the reason may be that the tapestry servlet doesnot get to bless the
request and create tapestry specific webrequest, but I am at a loss of what
I should do going forward. Any light on this would be greatly appreciated.

Regards,
Srini.

Reply via email to