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

Claus Ibsen commented on CAMEL-8071:
------------------------------------

On your system is there a file path for this
{code}
/opt/jboss-eap/current/standalone/deployments/bindy-ear.ear/bindy-ws-0.0.1-SNAPSHOT.war/WEB-INF/lib/
{code}

And in that lib directory there is the JAR files (but they are not expanded) ?

If so the trick would be to know this from the url above which is just a 
string. And then add some logic that tries to list the dir for .jar files and 
then use a jar url loader to scan inside those JARs. All extra work needed to 
do so, which with some hard-work may be possible to add in camel-core.

You can welcome to experiment with this as you got an EAP app server on your 
system and use bindy.


> DefaultPackageScanClassResolver unable to handle JAR-Files located at 
> WEB-INF/lib
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-8071
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8071
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-core
>    Affects Versions: 2.13.2, 2.13.3
>         Environment: Ubuntu 14.04 (64bit)
> JBoss EAP 6.3
> Oracle JDK 1.6.0_45
>            Reporter: Michael Feichtegger
>            Priority: Minor
>
> We are creating a WebApplication which also provides camel endpoints.
> One of the endpoints triggers a bindy action to read records from a 
> fixed-length-record input file. For this purpose we are using camel bindy.
> I this conjuction we discovered that there is an issue when trying to locate 
> those classes which are annotated with {{@FixedLengthRecord}} since the are 
> located in a JAR-File.
> The project structure looks like this:
> - project-ear
> -- project-war
> --- WEB-INF/lib/project-jar
> If we locate the classes directly at WEB-INF/classes/my/package camel is able 
> to discover the annotated classes.
> After some debugging we have found out, that 
> {{DefaultPackageScanClassResolver}} is trying to open an InputStream like 
> this:
> /opt/jboss-eap/current/standalone/deployments/bindy-ear.ear/bindy-ws-0.0.1-SNAPSHOT.war/WEB-INF/lib/bindy-core-0.0.1-SNAPSHOT.jar/my/package/
> which of of course does not exist.
> If you remove in those cases "/my/package" from the File the resolver works 
> perfectly well since {{loadImplementationsInJar}} will be called correctly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to