[jboss-user] [JBoss Microcontainer] - Re: How to use external jars not contained in JBoss

Hubert Felber do-not-reply at jboss.com
Wed Sep 29 07:35:41 EDT 2010

Hubert Felber [http://community.jboss.org/people/hugbert] created the discussion

"Re: How to use external jars not contained in JBoss"

To view the discussion, visit: http://community.jboss.org/message/563798#563798


Thank you, I tried this before, not via jboss-service.xml but by adding the classpath on the command line.
This way I get different errors. For external jars any dependent Jar is loaded also from the external repository, instead from the JBoss installation. If not found external, it throws an error. For example it loads commons-fileupload.jar from the external directory because this is also contained there. I then get NoClassDefFoundError or ClassNotFound because other jars needed in my app are not in the external directory but in my JBoss installation.
>  java.lang.NoClassDefFoundError: javax/portlet/ActionRequest
>         at org.apache.commons.fileupload.portlet.PortletRequestContext.getContentType(PortletRequestContext.java:73)
>         at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:882)
>         ...
portlet.jar and  commons-fileupload.jar are contained in server\default\lib, but JBoss does not find portlet.jar because commons-fileupload.jar is loaded from the external jar repository. Any dependent jar specified on the command line must also be in the external repository. I need a way that JBoss looks for dependent jars in the JBoss installation first, if there is a dependency.

Thank you


And this way I will probably get in trouble if I have (what I do) wars of other vendors which contain different versions of the jars that I currently use.

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100929/dce4062f/attachment.html 

More information about the jboss-user mailing list