Steve Jones wrote:
On Tuesday 02 October 2007 18:38, Jean-Sebastien Delfino wrote:
Steve Jones wrote:
Hi,

I'm having problems with the online store example:

http://incubator.apache.org/tuscany/sca-java-10-incubating-release-su
mmary.data/getting-started-1.0.pdf

The example builds and starts up OK and the console list the correct
servlet mapping.

When I point my browser at:

http://localhost:8080/ufs/store.html

The store page is displayed OK but the Apple,Orange,Pear rows and
check boxes are missing.

The firefox error console shows:

  Error: uncaught exception: JSONRpcClientException: Not Found

By inserting a few alerts in store.js the offending js line is:

        //Reference
        catalog = (new JSONRpcClient("../Catalog")).Catalog;

This is on jdk1.5.0_11 using the Tuscany 0.99 distribution.

Any suggestions on what may be wrone or how to resolve this
would be much appreciated.

Thanks, Steve.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If I remember correctly, with Tuscany 0.99 we needed to write:

        catalog = (new JSONRpcClient("../Catalog/")).Catalog;
instead of:

        catalog = (new JSONRpcClient("../Catalog")).Catalog;


If you're still using 0.99 could you please try to change "../Catalog"
to "../Catalog/"?

Let me know if it helps. Thanks.

Adding a slash to the end "../Catalog" and "../ShoppingCart" in store.js fixes the problem - thanks.

Good :)
I used the Tuscany 0.99 as that is the one shown in the example.

The screen caps in getting-started-1.0.pdf are a little outdated, we need to refresh them to show 1.0 instead of 0.99 and Tomcat instead of Jetty.

If I switch libraries and use the Tuscany 1.0 distribution the example starts an instance of Tomcat 6.0.10 and not Jetty.

Yes the default changed from Jetty to Tomcat, but externally it should work the same way.

I get an error due to a missing style.css. I can fix this by creating a dummy css in ufservices/

The missing CSS file is now in the Tuscany trunk, but if you just ignore the message about the missing CSS, the sample should just work. Or are you seeing more errors?

If I then start the example again I get the following:

Starting ...
03-Oct-2007 10:27:01 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
03-Oct-2007 10:27:02 org.apache.catalina.startup.ContextConfig defaultWebConfig
INFO: No default web.xml
03-Oct-2007 10:27:02 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
03-Oct-2007 10:27:02 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
03-Oct-2007 10:27:02 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
03-Oct-2007 10:27:02 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
03-Oct-2007 10:27:02 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xsd
03-Oct-2007 10:27:03 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
03-Oct-2007 10:27:03 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
03-Oct-2007 10:27:03 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
INFO: Added Servlet mapping: http://localhost:8080/ufs/*
03-Oct-2007 10:27:03 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
INFO: Added Servlet mapping: http://localhost:8080/Catalog
03-Oct-2007 10:27:03 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
INFO: Added Servlet mapping: http://localhost:8080/SCADomain/scaDomain.js
03-Oct-2007 10:27:03 org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
INFO: Added Servlet mapping: http://localhost:8080/ShoppingCart/*
store.composite ready for big business !!!

Pointing firefox at:

 http://localhost:8080/ufs/store.html

I get the js error:

  uncaught exception: JSONRpcClientException:/Catalog/

The trailing slash makes no difference.

Should this example work with 1.0?

Yes, but without the trailing /.

To summarize:

- on 0.99, add a trailing /, as described in the 0.99 doc [1].

- on 1.0, no trailing / as shown in the 1.0 doc [2]. You will see a message about the missing CSS and can ignore it as it doesn't seem to break the sample logic.

Hope this helps.

[1] http://incubator.apache.org/tuscany/sca-java-099-incubating-release-summary.data/getting_started_Rest_099_07.pdf [2] http://incubator.apache.org/tuscany/sca-java-10-incubating-release-summary.data/getting-started-1.0.pdf

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to