[JBoss-user] [EJB/JBoss] - Re: Calling a remote ejb interface in app1.ear from a servle
Does this mean that no one has two enterprise applications where the webapp of one of the ears is calling the other ears sessionbean?? As far as I can see Jboss doesn't support this when you use isolated classpaths for the ears (which btw should be used as default..). At least not in a standard j2ee way where you have all related jar-files inside the ears..?? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3939170#3939170 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3939170 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
asack wrote : andber wrote : asack wrote : | | | For example this is what I have in my current project: | | | | | | EAR isolation turned on (java2Parent delegation is on as well) | | | | | | deploy: | | | my-lib.jar (has global scope across deployments) | | | my-module-1.ear | | | my1.jar (MANIFEST.MF has Class-Path: lib/optional-lib.jar) | | | lib/optional-lib.jar | | | my-module-2.ear | | | my2.jar (MANIFEST.MF has Class-Path: lib/optional-lib1.jar) | | | my3.war (libraries are picked up from WEB-INF/lib according to Servlet spec, I could put a MANIFEST.MF entry here as well if optional-lib1.jar was needed by the WAR and was NOT in WEB-INF/lib) | | | lib/optional-lib1.jar | | | | | | Works like a champ for me. I'm using local interfaces since remoting seems like overkill to me within the same VM (not to mention dirt slow). | | | | | | | I would prefer not having to deploy separate jar-files since that is not a standard J2EE option. | | | | When you are referring to lib/optional-lib.jar are you then referring to the lib of the jboss server? I guess so since my-module-2.ear doesn't have a lib/ but the my2.jar is referring to lib/ in the class-path..? | | | | | | If you have to deploy separate jar-files to make the case with two ears (where one of the ears is calling the other ears session beans) work then I am beginning to consider this to be a BUG in JBOSS. | | Note that it seems to be related to using the isolated classpath for ears, when not using isolation it works but I can't run without isolation (and can't think of why anyone would like to..). | | | | | | (Another note not related to this problem but more a note on what I think is a bug in JBOSS; even if you use isolation you are not allowed to have your own instance of commons-logging in the application..!!) | | Since commons-logging is part of the platform (like dom4j) it is certainly not a bug according to J2EE 1.4 Seciton 8.2. | | HAving a separate jar-file is better since you don't have dupliate classes all over the place. Moreover, it has nothing to do with J2EE per say. | | If you want to include the same jar file and remote that's fine. Make sure your objects are serializable when you pass them back and forth. I believe you can't have one jar file packaged in an EAR with isolation on and expect the other EAR to pick it up. Either share them by yanking them out like so: | | http://wiki.jboss.org/wiki/Wiki.jsp?page=HotDeployClassCastExceptions | | or including them with both EARs and remoting between them (slower but can avoid some of the classloading issues). | | I may not be understanding your use case exactly but I believe the Class-Path strategy, remoting, or the library jar shared globally by sticking in deploy will just work (it does for me). Hi, it is possible that the global jar in deploy could work but I don't want that solution because it is not supported by any other application server and is not the standard way to package j2ee-applications. My problem is that app2 which has a webapp that calls a sessionbean in app1 gets a classcastexception when doing the call. Both ears have the jar-file with app1 interfaces included.. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3939229#3939229 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3939229 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
asack wrote : | For example this is what I have in my current project: | | EAR isolation turned on (java2Parent delegation is on as well) | | deploy: | my-lib.jar (has global scope across deployments) | my-module-1.ear | my1.jar (MANIFEST.MF has Class-Path: lib/optional-lib.jar) | lib/optional-lib.jar | my-module-2.ear | my2.jar (MANIFEST.MF has Class-Path: lib/optional-lib1.jar) | my3.war (libraries are picked up from WEB-INF/lib according to Servlet spec, I could put a MANIFEST.MF entry here as well if optional-lib1.jar was needed by the WAR and was NOT in WEB-INF/lib) | lib/optional-lib1.jar | | Works like a champ for me. I'm using local interfaces since remoting seems like overkill to me within the same VM (not to mention dirt slow). | I would prefer not having to deploy separate jar-files since that is not a standard J2EE option. When you are referring to lib/optional-lib.jar are you then referring to the lib of the jboss server? I guess so since my-module-2.ear doesn't have a lib/ but the my2.jar is referring to lib/ in the class-path..? If you have to deploy separate jar-files to make the case with two ears (where one of the ears is calling the other ears session beans) work then I am beginning to consider this to be a BUG in JBOSS. Note that it seems to be related to using the isolated classpath for ears, when not using isolation it works but I can't run without isolation (and can't think of why anyone would like to..). (Another note not related to this problem but more a note on what I think is a bug in JBOSS; even if you use isolation you are not allowed to have your own instance of commons-logging in the application..!!) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938862#3938862 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938862 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Calling a remote ejb interface in app1.ear from a servle
Anyone that understands my question/problem and can give me a hint? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938821#3938821 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938821 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
asack wrote : andber wrote : I now see that all other jars than the app1-ejb.jar is shown in the loader-repository for app2.ear.. Why is this? | | Is EAR isolation turned on or off via the EAR deployer? | | java2Parent delegation effects if a JAR is first seen (cached) in the UCL, not whether EARs are isolated - that's part of your ear-service.xml in the deploy directory. | | If its turned on then everything in app1 will not be seen via app2. If you are trying to share some interface across EARs, you should package those specific interfaces as a JAR, drop it in the deploy directory so now it has global scope across EARs. | | If EAR isolation is turned off, than app1-ejb.jar should be visible to app2 (at least my understanding of JBoss classloading). | | Please take a look at the following WIKIs if you haven't already: | | http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases | http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingOverview | | And Chapter 8 of the J2EE spec. Hi, ear isolation is turned off (as default) in the ear-deployer.xml. I am not trying to use the jar file in app1 from app2, the ejb-jar-file in app1 is included in both app1.ear (as an ejb-module) and in app2.ear (as a simple jar to get the remote interfaces from app1 in the app2 classpath. Should work, shouldn't it? I have checked the pages you linked to. Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938583#3938583 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938583 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
In this thread: http://www.jboss.com/index.html?module=bbop=viewtopict=66651 I see why I get the classcastexception if I put the remote interface in app2.ear/webapp/WEB-INF/lib. But I still can't understand why it doesn't work if I put the jar with the remote interface of app1 in the root of app2.ear.. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938591#3938591 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938591 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Calling a remote ejb interface in app1.ear from a servlet in
As topic says, I want to call a session bean which is deployed in an ejb-jar inside app1.ear, I am calling it from a servlet which is deployed in a war-file inside app2.ear. Since I have problems with dom4j/jaxen classloading colliding with the jboss jars I have isolated both ear classloading by using this in jboss-app.xml for both app1 and app2: loader-repository appname:loader=appname.ear loader-repository-config java2ParentDelegation=false /loader-repository-config But with this configuration I can't make it work. :( App1.ear works 100% but I can't call it from app2.ear.. I have tried all kinds of configurations, my main attempt (which I still think should work) is to put the ejb-jar.jar from app1.ear in the root of app2.ear and thereby get it in the classpath of app2. But this doesn't work, I check in jmx-console for the loader-repository of app2 and the ejb-jar.jar is not loaded even if it is in the root of app2.ear. This results in a NoClassDefFoundException when trying to call app1 from the servlet in app2. There is one way to get the ejb-jar.jar loaded in app2 classloader. That is if I put a reference to the ejb-jar.jar in the Class-Path attribute of the manifest.mf for the war-file in app2.ear. Then I can see it in the loader-repository for app2.ear, but now I get a ClassCastException on portableobject.narrow when calling app1 session bean from the servlet in app2.ear/war. I guess the classcastexception is related to what is said in this thread: http://www.jboss.com/index.html?module=bbop=viewtopict=66651 which says that I can't put interface classes in web-inf/lib of the war. I guess that even if I haven't put the ejb-jar.jar in web-inf/lib (it's in the root of app2.ear) I get this error because it is loaded by the war-classloader which gives the same effect as if I would have put it in web-inf/lib..? So, how can I get the ejb-jar.jar loaded in app2.ear without putting a class-path reference in the manifest.mf of the war-file? There is no other ejb or web-module in app2.ear. Any other suggestion on how to package these applications on JBoss would be appreciated to. It works without problems on Websphere and Weblogic.. Would really appreciate some help. :) (In this thread I wrote some more about my problem but then I was not really sure about what was happening: http://www.jboss.com/index.html?module=bbop=viewtopict=81466) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938649#3938649 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938649 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Calling a remote ejb interface in app1.ear from a servle
I am using Jboss 4.0.4 CR2 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938654#3938654 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938654 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
Hi, and many thanks for your reply! I have tried to turn on ear isolation in ear-deployer.xml but according to my experience this has the same effect as specifying the loader-repository in jboss-app.xml as per above. And I agree, isolated class-loading between the apps should be default. Why I have turned off java2parentDelegation is because I have had problems with dom4j and jaxen libraries in my app as they collided with jboss shipped jars. Please check http://www.jboss.com/index.html?module=bbop=viewtopict=81514 where I managed to give a better description of my current findings and problems. My current question is why I can't get the ejb-jar.jar (from app1.ear) to be loaded in app2.ear, I put it in the root of app2.ear but it is not loaded unless I put it in the manifest.mf of the war in app2.ear. But then I get a ClassCastException instead.. Don't know if that is related to what I read about not being allowed to put interfaces in web-inf/lib since jboss 4.0.2..? Maybe loading the ejb-jar.jar from the war-file manifest has the same effect as putting the ejb-jar.jar in web-inf/lib == bad..? Thanks again! :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938658#3938658 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938658 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
Just to clarify; turning on ear-isolation in ear-deployer.xml didn't help me, I have tried it. It made exactly the same to me as putting loader-repository in jboss-app.xml. I use remote interfaces because in some situations these ears are deployed on separate servers. And I use jboss 4.0.4. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938661#3938661 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938661 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - packaging and deployment of ear-files (classcastexception, n
Hi, I have this: app1.ear app1-ejb.jar app2.ear app2.war web-inf lib app2 contains a servlet which connects through a remote ejb interface included in app1-ejb.jar, so app2.ear needs to have app1-ejb.jar (or really a subset of it but let's say it is the same jar) in its classpath. Both applications use the isolation in jboss-app.xml loader-repository myapp1:loader=myapp1.ear loader-repository-configjava2ParentDelegation=false/loader-repository-config /loader-repository I have tried to put app1-ejb.jar directly under the ear (noclassdeffounderror) and in the war/web-inf/lib (classcastexception). If I check in jmx-console (displayClassInfo) for the repository myapp1 I can see all the jars and I can search for a classname and get which jar it is in. But here is the strange part, if I check in jmx-console for myapp2 the jars that are included in the ear are not listed and if I search for the remote interface class it is not found in the repository. What decides if a jar is listed in the jmx-console? Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938476#3938476 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938476 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
To clarify: app2.ear contains a war-file which calls a remote session bean interface in app1.ear, therefore app2 needs app1-ejb.jar in its classpath. When app1-ejb.jar is included in app2.ear it is not found in the list when viewing the loader-repositories in jmx-console. I think this is why it doesn't work but why isn't it shown in the loader-repositories list for app2.ear? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938516#3938516 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938516 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation, Configuration Deployment] - Re: packaging and deployment of ear-files (classcastexceptio
I now see that all other jars than the app1-ejb.jar is shown in the loader-repository for app2.ear.. Why is this? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3938521#3938521 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938521 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user