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

Jim Newsham commented on CAMEL-4026:
------------------------------------

Claus, I'm not aware of any way to start a webstart app programmatically from 
Java.  I've been doing a full deployment for my testing.  This involves:  (1) 
building your code into a jar; (2) signing *all* jars (your jar and third party 
jars) with the *same* certificate; you can use a self-generated certificate for 
this; (3) creating a webstart descriptor file (*.jnlp) which points to your 
jars and main class; (4) configuring/deploying the JnlpDownloadServlet on a 
servlet container such as tomcat (this servlet is needed to support the 
version-based download protocol [1]); (5) deploying your jars and jnlp on the 
servlet container; (6) using a browser to request the jnlp file.

More info can be found in the webstart dev guide:
http://download.oracle.com/javase/1,5.0/docs/guide/javaws/developersguide/contents.html

Obviously this is a lot of work.  We have ant scripts that automate most of 
this for us, but they are tied to our build process (using ivy for pulling in 
dependencies, for example), so I can't just send that to you.

[1] Note that the problem I reproduced was with the version-based protocol.  I 
have not tried without the version-based protocol, but I suspect the problem 
might not exist without.


> Camel does not work out of the box in Java webstart, due classpath scanning 
> is not possible
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4026
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4026
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.7.1
>         Environment: Windows 7
>            Reporter: Jim Newsham
>            Priority: Minor
>              Labels: webstart
>             Fix For: 2.9.0, Future
>
>         Attachments: camel webstart trace.txt
>
>
> This is a regression.  Worked fine for us in Camel 2.5.0, fails in Camel 
> 2.7.1.  
> Easy to reproduce.  Run the following code in a webstart-deployed application:
> CamelContext context = new DefaultCamelContext();
> context.getTypeConverterRegistry(); 
> Which produces the following exception:
> 2011-05-26 16:52:57,550 [javawsApplicationMain] ERROR test.TestCamelContext - 
> Failed
> org.apache.camel.RuntimeCamelException: 
> org.apache.camel.TypeConverterLoaderException: Failed to load type converters 
> because of: Cannot find any type converter classes from the following 
> packages: [org.apache.camel.component.file, org.apache.camel.component.bean, 
> org.apache.camel.converter]
>     at 
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
>     at 
> org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:986)
>     at 
> org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:1001)
>     at test.TestCamelContext.test(TestCamelContext.java:54)
>     at test.TestCamelContext.main(TestCamelContext.java:48)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at com.sun.javaws.Launcher.executeApplication(Unknown Source)
>     at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
>     at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
>     at com.sun.javaws.Launcher.run(Unknown Source)
>     at java.lang.Thread.run(Unknown Source)
> Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type 
> converters because of: Cannot find any type converter classes from the 
> following packages: [org.apache.camel.component.file, 
> org.apache.camel.component.bean, org.apache.camel.converter]
>     at 
> org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:79)
>     at 
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:395)
>     at 
> org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:41)
>     at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
>     at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
>     at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
>     at 
> org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1613)
>     at 
> org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:899)
>     at 
> org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:984)
>     ... 12 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to