16. marts 2006 - 11:12Der er
5 kommentarer og 1 løsning
What is the correct dir-structure for a ejbapp?
Hello!
I got one webapp and a ejbapp. (The full scenario is that the webapp puts jmsmessages on a queue, the ejbapp resides outside the webapp and is a subscriber on that queue (ejbapp=a message driven bean)).
How ever our ejbapp imports a specific package, but during runtime I get a NoClassDefFoundError saying that classes in that package we import is not found by the ejbapp. My guess is that we have not a correct file structute.
So now is my question: How should the filestructure look like for a ejb-app so it will find *.jars to import?
Our file structure looks like: project (application.xml) project\classes (All our *.class) project\classes\META-INF (ejb-jar.xml, weblogic-ejb-jar.xml) project\dist (a jar consists of all *.class and META_INF) project\lib (All our *jar)
I'm not sure that the dist-dir must exist but I'm not sure??
We are using Weblogic 8.13, but I do not think that matters.
Hope this is all info you need to give me a hint!!
Perhaps this is a clue, in weblogic, the path to the deployed ejbapp looks like: (Path: D:\Fredrik\project\classes The location of the EJB JAR file or exploded JAR directory.)
This perhaps looks like that the lib-dir is invisible???
web apps (a war) has: *.jsp WEB-INF/web.xml WEB-INF/lib/utility.jar WEB-INF/lib/min-ejb.jar WEB-INF/classes/minpakke/MinServlet.class where all code can use everything in WEB-INF/lib and WEB-INF/classes (including EJB jars !)
EJB jars are different
minpakke/MinKlasse.class
it does not have anything similar for utility.jar
you can use a good old fashioned Class-Path directive in the manifest
you can put the utility.jar in a place where it will be in CLASSPATH
you can use a classloader model where it can be taken from another app
Hello! Thanks for your reply we solved it like your no. 1 with 2 different servers inside weblogic! I guess this means we now got one classloader for each app, correct me if I am wrong.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.