On Tue, Feb 16, 2010 at 12:39 PM, kelvin goodson <k...@thegoodsons.org.uk> 
wrote:
> I'm seeing changed behaviour in the sample-store project after
> startup. If I fire up the launcher and point Firefox with Firebird at
> http://localhost:8080/store/, the first time I run it I see Firebird
> "Break on Error"
>
> tuscany is not defined
>
> Line 29
>
> which is ...
>  var catalog = new tuscany.sca.Reference("catalog");
>
> and the console contains  ....
> store.composite ready for big business !!!
> 16-Feb-2010 20:17:38 org.apache.tuscany.sca.http.jetty.JettyLogger warn
> WARNING: /store/store.js
> java.lang.NullPointerException
>        at 
> org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.initInvocationChains(RuntimeEndpointReferenceImpl.java:274)
>        at 
> org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.getInvocationChains(RuntimeEndpointReferenceImpl.java:186)
>        at 
> org.apache.tuscany.sca.implementation.widget.dojo.DojoJavaScriptComponentGeneratorImpl.generateJavaScriptCode(DojoJavaScriptComponentGen
> eratorImpl.java:73)
>        at 
> org.apache.tuscany.sca.implementation.widget.provider.WidgetComponentScriptServlet.doGet(WidgetComponentScriptServlet.java:60)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>        at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>        at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
>        at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>        at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>        at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>        at org.mortbay.jetty.Server.handle(Server.java:326)
>        at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
>        at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>        at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>        at org.apache.tuscany.sca.core.work.impl.Work.run(Work.java:63)
>        at 
> org.apache.tuscany.sca.core.work.impl.ThreadPoolWorkManager$DecoratingWork.run(ThreadPoolWorkManager.java:214)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
> Source)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>        at java.lang.Thread.run(Unknown Source)
>
>
> If I allow the execution to proceed, Firebird tells me catalog is not defined
> allowing the execution to proceed further gives a popup "catalog is
> not defined"
>
> If I continue refreshing the browser, this behaviour repeats for a
> further 2 occasions,  If I then refresh one more time I see the
> store's catalog perfectly well and can add items to the cart.
>
>
> does anyone have any clues as to what's changed or why this is happening?
>

I see the same behavior, and it seems related to recent changes in how
the runtime is handling EP/EPR. I guess Widget and Implementation Web
have a slight different behavior and this wasn't taken in
consideration and we probably need two things here : a) at least
workaround similar to the one introduced in  revision #887662 and a
test case that will identify breakage on the store scenario (this is
available in tutorials in 1.x)

-- 
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to