facebook

External libraries in EJB projects for jboss

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #239931 Reply

    kosl
    Member

    Dear All!

    I’m trying to write a Session Bean in which one of the business methods is giving as result a class from an external jar (external = not included in the jboss lib). When I try to deploy it I get something like this:

    **********

    java.lang.NoClassDefFoundError: org/apache/myfaces/custom/tree2/TreeNodeBase
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
    at java.lang.Class.privateGetPublicMethods(Class.java:2488)
    at java.lang.Class.privateGetPublicMethods(Class.java:2504)
    at java.lang.Class.getMethods(Class.java:1406)
    at org.jboss.verifier.strategy.AbstractVerifier.hasEJBCreateMethod(AbstractVerifier.java:664)
    at org.jboss.verifier.strategy.EJBVerifier20.verifySessionBean(EJBVerifier20.java:834)
    at org.jboss.verifier.strategy.EJBVerifier20.checkSession(EJBVerifier20.java:64)
    at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:166)

    **************

    I’m using jboss 4.0.3 and myeclipse. When I check the export checkbox it doesn’t help and the resulting ear still doesn’t contain the required jar.

    In other words the question is:

    What’s the proper way of deploying external libraries that are to be used by EJB project? Putting them in /lib directory of JBoss seems to work but I suppose this is not the way to go. So how to include external jars in EAR deployment so that they are visible by JBoss classloader (for validating purposes)? (using JBoss and myeclipse)

    Thank you in advance for all help.

    Kind regards

    Karol

    #239951 Reply

    Scott Anderson
    Participant

    What’s the proper way of deploying external libraries that are to be used by EJB project?

    That’s covered specifically in the Advanced section of the EJB Development quickstart that is located in the portal’s Documentation section.

    So how to include external jars in EAR deployment so that they are visible by JBoss classloader (for validating purposes)? (using JBoss and myeclipse)

    And doing the same thing using an EAR to wrap your EJB project is covered in the Advanced section of the Enterprise Applicaton Projects quickstart. Between the two tutorials you should be able to find the information you’re looking for.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: External libraries in EJB projects for jboss

You must be logged in to post in the forum log in