[jira] Created: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

[jira] Created: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.4.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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

Good work Andreas.

Could be an idea to look how Spring does loading jars. I know Juergen has done tremendous work to get Spring to work with all kind of strange behaviors in various version of WebSphere, WebLogic, JBoss, and even AFIAR on the AS400 platform maybe also from webstart.



> 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.4.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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Andreas Kuhtz commented on CAMEL-522:
-------------------------------------

While searching for a solution I stumbled over the following pages (http://jdevelopment.nl/java/jdk6-web-start-cache-location/ and http://java.sun.com/javase/6/docs/technotes/guides/javaws/enhancements6.html) and now I'm not sure if the behaviour is different on JDK5 and JDK6 because I've tested only with JDK6 (I forgot to list that in the environment...).

> 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.4.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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

See CAMEL-537 for an example of log errors

> 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.4.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.


[jira] Updated: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-522:
------------------------------

    Fix Version/s: 1.5.0
                       (was: 1.4.0)

> 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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

We need a patch that is not dependent on spring-core. The current attached patch uses spring.

> 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.


[jira] Assigned: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-522:
---------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

Okay I think I got it without dependency to spring .jars

> 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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

Andreas do you mind posting some parts of the .vm template you use for creating the output .jnlp file?

I would like to add a wiki page how to get Camel working with webstart and how to generate the jnlp using maven.
Maybe if you have the ideas how such a wiki page could be please feel free to post it here.

I will test the patch a bit more before commiting.

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

Andreas can you resubmit the patch with the ASF license granted. There is a bullet in the attach file wizard to grant license.

And can you load .jars over the HTTPS protocol as well? If so I think we should also test for "https:" as well.

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Updated: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Kuhtz updated CAMEL-522:
--------------------------------

    Attachment: ResolverUtil.patch

Updated patch with AFS license

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Updated: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Kuhtz updated CAMEL-522:
--------------------------------

    Attachment:     (was: ResolverUtil.patch)

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Andreas Kuhtz commented on CAMEL-522:
-------------------------------------

Claus, a good description is under http://mojo.codehaus.org/webstart/webstart-maven-plugin/ (and a copy under http://coffeebreaks.org/tmp/maven-staging/webstart/site/).

This is almost the default jnlpTemplate.vm.
{code:xml|title=jnlpTemplate.vm|borderStyle=solid}
$explicitTimestamp
<?xml version="1.0" encoding="utf-8"?>
<jnlp
    spec="$jnlpspec"
    codebase="$$codebase"
    context="$$context"
    href="$$name">
  <information>
    <title>$project.Name $project.Version</title>
    <vendor>$project.Organization.Name</vendor>
    <description>$project.Description</description>
        <icon href="images/mylogo.gif" width="64" height="64"/>
        <icon kind="splash" href="images/mysplash.gif"/>
#if($offlineAllowed)
    <offline-allowed/>
#end
  </information>
#if($allPermissions)
  <security>
     <all-permissions/>
  </security>
#end
  <resources>
    <j2se version="$j2seVersion" max-heap-size="448m" />
        <property name="remoteSite" value="https://$$hostname:32463"/>
        <property name="amq.broker.url" value="failover:tcp://$$hostname:32935"/>
    $dependencies
  </resources>
  <application-desc main-class="$mainClass"/>
</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
>            Assignee: Claus Ibsen
>             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.


[jira] Issue Comment Edited: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

akuhtz edited comment on CAMEL-522 at 7/30/08 1:04 AM:
--------------------------------------------------------------

Claus, a good description is under http://mojo.codehaus.org/webstart/webstart-maven-plugin/ (and a copy under http://coffeebreaks.org/tmp/maven-staging/webstart/site/).

This is almost the default jnlpTemplate.vm. The properties in the resources tag are not required, they just show how to set properties that can be used in the spring configuration....

{code:xml|title=jnlpTemplate.vm|borderStyle=solid}
$explicitTimestamp
<?xml version="1.0" encoding="utf-8"?>
<jnlp
    spec="$jnlpspec"
    codebase="$$codebase"
    context="$$context"
    href="$$name">
  <information>
    <title>$project.Name $project.Version</title>
    <vendor>$project.Organization.Name</vendor>
    <description>$project.Description</description>
        <icon href="images/mylogo.gif" width="64" height="64"/>
        <icon kind="splash" href="images/mysplash.gif"/>
#if($offlineAllowed)
    <offline-allowed/>
#end
  </information>
#if($allPermissions)
  <security>
     <all-permissions/>
  </security>
#end
  <resources>
    <j2se version="$j2seVersion" max-heap-size="448m" />
    <property name="remoteSite" value="https://$$hostname:32463"/>
    <property name="amq.broker.url" value="failover:tcp://$$hostname:32935"/>
    $dependencies
  </resources>
  <application-desc main-class="$mainClass"/>
</jnlp>
{code}

      was (Author: akuhtz):
    Claus, a good description is under http://mojo.codehaus.org/webstart/webstart-maven-plugin/ (and a copy under http://coffeebreaks.org/tmp/maven-staging/webstart/site/).

This is almost the default jnlpTemplate.vm.
{code:xml|title=jnlpTemplate.vm|borderStyle=solid}
$explicitTimestamp
<?xml version="1.0" encoding="utf-8"?>
<jnlp
    spec="$jnlpspec"
    codebase="$$codebase"
    context="$$context"
    href="$$name">
  <information>
    <title>$project.Name $project.Version</title>
    <vendor>$project.Organization.Name</vendor>
    <description>$project.Description</description>
        <icon href="images/mylogo.gif" width="64" height="64"/>
        <icon kind="splash" href="images/mysplash.gif"/>
#if($offlineAllowed)
    <offline-allowed/>
#end
  </information>
#if($allPermissions)
  <security>
     <all-permissions/>
  </security>
#end
  <resources>
    <j2se version="$j2seVersion" max-heap-size="448m" />
        <property name="remoteSite" value="https://$$hostname:32463"/>
        <property name="amq.broker.url" value="failover:tcp://$$hostname:32935"/>
    $dependencies
  </resources>
  <application-desc main-class="$mainClass"/>
</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
>            Assignee: Claus Ibsen
>             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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

*TODO*: Update wiki with how to use Camel with webstart

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Work started: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-522 started by Claus Ibsen.

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Resolved: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-522.
-------------------------------

    Resolution: Fixed

Thanks Andreas a lot for the help.

I added the webstart to the FAQ:
http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+run+Camel+using+Java+WebStart

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Reopened: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/activemq/browse/CAMEL-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sameer Gajanan Apte reopened CAMEL-522:
---------------------------------------

    Regression: [Regression]

I am using camel 2.0.0 and the application works ok when  the codebase attribute starts with "http://..."
However it fails when codebase attribute value starts with "https...."
In the resources section I am putting jar names along with version. e.g.

      <jar href="camel-core-2.0.0.jar"/>
      <jar href="camel-csv-2.0.0.jar"/>
      <jar href="camel-ftp-2.0.0.jar"/>
      <jar href="camel-mvel-2.0.0.jar"/>
      <jar href="camel-quartz-2.0.0.jar"/>
      <jar href="camel-spring-2.0.0.jar"/>

As said earlier with "https" I can see following exception in log file.
2009-11-03 12:00:36,406 [ApplicationMain] WARN  efaultPackageScanClassResolver - Could not read entries in url: jar:https://localhost:8443/tabernus/despatchnotegenerator/camel-ftp-2.0.0.jar!/org/apache/camel/component/file/remote
java.io.FileNotFoundException: https:\localhost:8443\tabernus\despatchnotegenerator\camel-ftp-2.0.0.jar (The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:250)
        at org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:178)
        at org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:98)
        at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:62)
        at org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:359)
        at org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:153)
        at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:113)
        at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:107)
        at org.apache.camel.util.IntrospectionSupport.convert(IntrospectionSupport.java:270)
        at org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:226)
        at org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:193)
        at org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:151)
        at org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:213)
        at org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:65)
        at org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:35)
        at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:79)
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:394)
        at org.apache.camel.spring.CamelEndpointFactoryBean.createEndpoint(CamelEndpointFactoryBean.java:108)
        at org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:54)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)
        at org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:41)
        at org.apache.camel.impl.DefaultRouteContext.lookup(DefaultRouteContext.java:124)
        at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:111)
        at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
        at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:74)
        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:432)
        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:126)
        at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:569)
        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:924)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:901)
        at org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
        at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:816)
        at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:99)
        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:119)
        at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:469)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at com.thehutgroup.despatchnotegenerator.GuernseyDespatchNoteGenerator.main(Unknown Source)
        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)


Any help is welcome!

Regards,
Sameer

> 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
>            Assignee: Claus Ibsen
>             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.


[jira] Commented: (CAMEL-522) Problem with scanning Jar files for Converters if application is loaded with webstart

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-522:
-----------------------------------

Sameer please do *not* reopen old tickets.

Create a new ticket and link to this one.

Reopening old tickets messes with the changelogs and release notes.
And you issue is just a sub issue of this.

> 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
>            Assignee: Claus Ibsen
>             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.

< Prev | 1 - 2 | Next >
Need professional support or training for Apache Camel? Graphic Design by Hiram and the Nabble Forum configured by James