[
https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44501#action_44501
]
Andreas Kuhtz commented on CAMEL-522:
-------------------------------------
The patch resolves the issue with url based JAR locations.
I use the webstart-maven-plugin to generate the jnlp and I had to specify the
JARs that contain the converters as jarResources with a specific version number
because in this case the JAR is referenced in the url with the version number
added and not in a separate version attribute. Specified this way the location
of the jar returned by the classloader is correct and the scan proceeds.
{code:xml|title=pom.xml|borderStyle=solid}
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
.....
<configuration>
.....
<jnlpFiles>
<jnlpFile>
<templateFilename>jnlpTemplate.vm</templateFilename>
<outputFilename>appl.jnlp</outputFilename>
<jarResources>
<jarResource>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
<!-- set the outputJarVersion to false appends the version to the
jar filename in the href -->
<outputJarVersion>false</outputJarVersion>
</jarResource>
<jarResource>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
<outputJarVersion>false</outputJarVersion>
</jarResource>
.....
</jarResources>
<jnlpFile>
<jnlpFiles>
.....
<configuration>
<plugin>
{code}
{code:xml|title=appl.jnlp|borderStyle=solid}
<jnlp .....>
.......
<resources>
.......
<jar href="camel-core-1.4.01.jar"/>
<jar href="activemq-core-5.2-SNAPSHOT.jar"/>
.......
<jar href="spring-core.jar" version="2.5.5"/>
</resources>
</jnlp>
{code}
> Problem with scanning Jar files for Converters if application is loaded with
> webstart
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-522
> URL: https://issues.apache.org/activemq/browse/CAMEL-522
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.3.0, 1.4.0
> Environment: Windows XP
> Reporter: Andreas Kuhtz
> Fix For: 1.5.0
>
> Attachments: ResolverUtil.patch
>
>
> I've encountered a problem with the scanning of jar files with the @Converter
> annotation if the Jars are loaded with the webstart classloader. Because the
> URL starts with _http:_ the conversion to a file fails in ResolverUtil.
> I've attached a patch that uses an UrlResource if the url starts with _http:_
> and this works if the jar-resource has the version information added to the
> jar file in the JNLP-file (like <jar href="camel-core-1.4-SNAPSHOT.jar"/>).
> But if the version is added separately (like <jar href="activemq-core.jar"
> version="5.1.0"/>) it fails because the classloader returns the name of the
> jar-file without the version information (like
> http://....../activemq-core.jar) and this file does not exist.
> I'm currently trying if it is possible to check whether the application is
> started via webstart (there is a class Tool that should only exist in the
> webstart classloader) and in this case I'll check if the filename of the
> jar-file is returned correctly. If yes maybe we can provide another patch to
> get rid of the problem described above.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.