cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Thenot <andre-li...@thenot.org>
Subject EJB jar dependencies
Date Wed, 06 Aug 2008 17:33:27 GMT
Hi!

My cocoon webapp connects to a JBoss application running in a  
different JVM and calls the remote interfaces of SessionBeans via a  
JNDI lookup. I kept getting ClassNotFoundExceptions on my business  
objects as well as standard JBoss objects.

This made sense since the objects returned by the app were unknown to  
my cocoon block. So I tried to set up the dependencies[1] in my POM  
but I could not make it work. I noticed that when I started the app  
with `mvn jetty:run` that there was no mention of my jars nor those of  
JBoss being added to WEB-INF/lib.

As a hack I copied all the jars from:

   ${JBOSS_HOME}/lib/*.jar
   ${JBOSS_HOME}/server/default/lib/*.jar
   ${JBOSS_HOME}/server/default/deploy/**.jar
   my-biz-ejb-app/build/biz-logic.jar

to:

   my-block/target/rcl/webapp/WEB-INF/lib

and it worked. But isn't there a cleaner way to do this with  
dependencies? How do I tell the cocoon-maven-plugin about other jar  
files I want to add to WEB-INF/lib?

Thanks in advance.

Andre.


PS: I'm using:
  - cocoon-core 2.2.0-RC2
  - maven-jetty-plugin 6.1.5
  - cocoon-maven-plugin 1.0.0-M2
  - maven-jar-plugin 2.1
  - JBoss 4.2.2.GA



[1] My attempt at getting the dependencies right:
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jetty-naming</artifactId>
       <version>6.1.5</version>
     </dependency>
     <dependency>
         <groupId>jboss</groupId>
         <artifactId>jbossall-client</artifactId>
         <version>3.2.3</version>
     </dependency>
     <dependency>
       <groupId>my.biz.app</groupId>
       <artifactId>biz-app</artifactId>
       <version>1.0-SNAPSHOT</version>
       <scope>runtime</scope>
     </dependency>
   </dependencies>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message