RE: [JBoss-user] Linkage error
Thanks Scott, I'll look there next time I have a problem like this... Regards, Oisin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott M Stark Sent: 09 July 2003 18:15 To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Linkage error 3.2 allows for control of the class loading behavior at the ejb-jar, war, sar and ear levels and this is defined in the various dtds in the dist under docs/dtds. The META-INF/jboss.xml config for the ejb-jar would be something like: ?xml version='1.0' encoding='UTF-8' ? !DOCTYPE jboss PUBLIC -//JBoss//DTD JBOSS 3.2//EN http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd; jboss loader-repository jboss.test:ejb-jar=log4j113-ejb.jar /loader-repository /jboss -- Scott Stark Chief Technology Officer JBoss Group, LLC --- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing more. Download eval WebKing and get a free book. www.parasoft.com/bulletproofapps ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Linkage error
Hi, By default, JBoss uses a slightly confusing concept called the UnifiedClassLoader. Package your JAR file inside an EAR file and then add a line to your jboss-app.xml to create a private classloader and get the behaviour you are expecting. The line to add is: loader-repositorysome-unique-jmx-name-here/loader-repository for example: loader-repositorycom.company.project:loader=earfile.ear/loader-repository Note that the loader repository has to be unique for each of your EAR files, but since you obviously have slightly different build processes in order to capture different descriptors, this should not be a problem for you. In my (humble, personal, not work-sponsored) opinion, this default classloading behaviour is very confusing, especially if you run a shared J2EE server for different teams, and they all wish to build with different versions of Struts, Cocoon, log4j, Xerces, Xalan, etc. It rather defeats the purpose of the EAR file being a completely standalone deployable unit. That said, it doesn't break the spec! Rgds, Dan. -- Danny Yates -Original Message- From: Oisin Kim [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 15:23 To: [EMAIL PROTECTED] Subject: [JBoss-user] Linkage error Hello all, I have the same ejb-jar file deployed at different jndi locations: context_test1 and context_test2. Bascially the ejb jar files contain the same classes but have modified xml descriptors and separate databases. They deploy fine and I can see both applications using the web-console, I see no exceptions at all and database tables are created perfectly. However when I start to allow clients to connect and call methods on either applications façade methods I get : java.lang.LinkageError: duplicate class definition: net/aurium/util/UUIDv4 thrown. or java.lang.LinkageError: duplicate class definition: net/aurium/mis/services/ContextModelEvents thrown. These are classes used to generate uuids and record events, other classes used by both ejb jar files throw similar exceptions, but not all. I can't find why this is! Is there a reason why it wouldn't throw this same exception when the ejb class files are the same? Why is it ok to have the same ejb classes but not others? I was under the impression that each ejb jar would search its own class loader which would find files in the jar and not bother with the other jar, so each ejb application would be self contained. Is there something I'm doing wrong here or is the only solution to put all classes which are shared in to a lib jar? Thanks in advance for any help - we're putting together a small doc which describes what you need to do to deply multiple versions of the same ejb aplication on the same jboss instance, Oisin The server stack trace is : 15:57:45,319 WARN [ClassLoadingTask] Duplicate class found: net.aurium.mis.services.ContextModelEvents Current CS: (file:/usr/local/install/jboss-3.2.2RC1/server/default/tmp/deploy/tmp626 39context_test1.jar no certificates) Duplicate CS: (file:/usr/local/install/jboss-3.2.2RC1/server/default/tmp/deploy/tmp626 38context_test2.jar no certificates) 15:57:45,320 ERROR [LogInterceptor] Unexpected Error: java.lang.LinkageError: duplicate class definition: net/aurium/mis/services/ContextModelEvents at net.aurium.context.facades.ejb.ContextModelEJB.getAssociationWithSubject PredicateAndObject(ContextModelEJB.java:587) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Stat elessSessionContainer.java:646) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke( CachedConnectionInterceptor.java:186) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Statele ssSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterce ptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptor CMT.java:243) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.jav a:117) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryF inderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionC ontainer.java:323) at org.jboss.ejb.Container.invoke(Container.java:673) at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25)
RE: [JBoss-user] Linkage error
Thanks Danny and Janardhan, I totally agree with you (Danny) regarding how this may seem confusing to mere mortals ;-) Is there a way to change either the behaviour of the classloader or do this same setting for the deployment of ejb-jars and other j2ee components - it seems very silly to add a perfectly deployable ejb-jar to an empty ear just to define the classloader used. You saved me hours of toil guys, thanks, Thanks in advance for any more advice on this! Oisin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 09 July 2003 15:45 To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Linkage error Hi, By default, JBoss uses a slightly confusing concept called the UnifiedClassLoader. Package your JAR file inside an EAR file and then add a line to your jboss-app.xml to create a private classloader and get the behaviour you are expecting. The line to add is: loader-repositorysome-unique-jmx-name-here/loader-repository for example: loader-repositorycom.company.project:loader=earfile.ear/loader-reposi tory Note that the loader repository has to be unique for each of your EAR files, but since you obviously have slightly different build processes in order to capture different descriptors, this should not be a problem for you. In my (humble, personal, not work-sponsored) opinion, this default classloading behaviour is very confusing, especially if you run a shared J2EE server for different teams, and they all wish to build with different versions of Struts, Cocoon, log4j, Xerces, Xalan, etc. It rather defeats the purpose of the EAR file being a completely standalone deployable unit. That said, it doesn't break the spec! Rgds, Dan. -- Danny Yates --- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing more. Download eval WebKing and get a free book. www.parasoft.com/bulletproofapps ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage error
3.2 allows for control of the class loading behavior at the ejb-jar, war, sar and ear levels and this is defined in the various dtds in the dist under docs/dtds. The META-INF/jboss.xml config for the ejb-jar would be something like: ?xml version='1.0' encoding='UTF-8' ? !DOCTYPE jboss PUBLIC -//JBoss//DTD JBOSS 3.2//EN http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd; jboss loader-repository jboss.test:ejb-jar=log4j113-ejb.jar /loader-repository /jboss -- Scott Stark Chief Technology Officer JBoss Group, LLC Oisin Kim wrote: Thanks Danny and Janardhan, I totally agree with you (Danny) regarding how this may seem confusing to mere mortals ;-) Is there a way to change either the behaviour of the classloader or do this same setting for the deployment of ejb-jars and other j2ee components - it seems very silly to add a perfectly deployable ejb-jar to an empty ear just to define the classloader used. You saved me hours of toil guys, thanks, Thanks in advance for any more advice on this! Oisin --- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing more. Download eval WebKing and get a free book. www.parasoft.com/bulletproofapps ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage Error on Redeploy
Its due to duplicate commons-logging.jar from tomcat and your app. See the class loading doc on sourceforge to see ways to address this and if you have a simple example submit a bug report to sourceforge. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Christian Nelson [EMAIL PROTECTED] To: JBoss User [EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:12 PM Subject: [JBoss-user] Linkage Error on Redeploy Greetings, We're have an issue with Linkage exceptions when we redeploy our application. The exception does *not* happen when we deploy for the first time (since Jboss was started). This happens with both jboss-3.0.4_tomcat-4.1.12 and jboss-3.0.5_tomcat-4.1.18, running under either Windows Xp and Linux 2.4.x. The exact exception is as follows: java.lang.LinkageError: loader constraints violated when linking org/apache/commons/digester/ObjectCreationFactory class Here is a scenario: 1) start up jboss (vanilla, no .ear file in deploy) 2) everything is fine. 3) deploy aaw.ear. 4) aaw.ear deploys a-okay, everything is fine. 5) recopy the aaw.ear file (with a newer timestamp) into deploy. 6) old aaw.ear is undeployed, this works fine. 7) on deploy of new aaw.ear, the above exception happens. I think it has to do with the default/tmp directory that caches jar files that have been deployed (or somesuch). Maybe there's a conflict wrt versions of jars that both jboss and my app depend on? I am pretty certain this is something we're doing dumb, not a bug with jboss I just don't know how best to diagnose what exactly is the cause. Any clues? Thanks, Christian --- Christian 'xian' Nelson [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Don't ask yourself what the world needs. Ask yourself what makes you come alive, and go do that, because what the world needs is people who have come alive. -- Howard Thurman --- --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Linkage Error on Redeploy
Title: RE: [JBoss-user] Linkage Error on Redeploy We had a similar error calling System.loadLibrary(). Worked the first time, but not on subsequent redeploys. In our case it turns out you can't load the same library twice into the same VM, so we moved that code out of our EJB jar and just put it in the JBoss server/lib directory. Maybe a similar fix will work for you. Good luck! JD -Original Message- From: Christian Nelson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 10, 2003 1:13 PM To: JBoss User Subject: [JBoss-user] Linkage Error on Redeploy Greetings, We're have an issue with Linkage exceptions when we redeploy our application. The exception does *not* happen when we deploy for the first time (since Jboss was started). This happens with both jboss-3.0.4_tomcat-4.1.12 and jboss-3.0.5_tomcat-4.1.18, running under either Windows Xp and Linux 2.4.x. The exact exception is as follows: java.lang.LinkageError: loader constraints violated when linking org/apache/commons/digester/ObjectCreationFactory class Here is a scenario: 1) start up jboss (vanilla, no .ear file in deploy) 2) everything is fine. 3) deploy aaw.ear. 4) aaw.ear deploys a-okay, everything is fine. 5) recopy the aaw.ear file (with a newer timestamp) into deploy. 6) old aaw.ear is undeployed, this works fine. 7) on deploy of new aaw.ear, the above exception happens. I think it has to do with the default/tmp directory that caches jar files that have been deployed (or somesuch). Maybe there's a conflict wrt versions of jars that both jboss and my app depend on? I am pretty certain this is something we're doing dumb, not a bug with jboss I just don't know how best to diagnose what exactly is the cause. Any clues? Thanks, Christian --- Christian 'xian' Nelson [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Don't ask yourself what the world needs. Ask yourself what makes you come alive, and go do that, because what the world needs is people who have come alive. -- Howard Thurman --- --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage Error on Redeploy
This same thing just started happening to my application a few weeks ago. Same versions as you. I went to JBoss 3.0.6/Tomcat and it works fine. Don't know if that is an option for you or not and I just didn't have the time to figure out why it started happening as just don't have that kinda time right now. gary. Christian Nelson wrote: Greetings, We're have an issue with Linkage exceptions when we redeploy our application. The exception does *not* happen when we deploy for the first time (since Jboss was started). This happens with both jboss-3.0.4_tomcat-4.1.12 and jboss-3.0.5_tomcat-4.1.18, running under either Windows Xp and Linux 2.4.x. The exact exception is as follows: java.lang.LinkageError: loader constraints violated when linking org/apache/commons/digester/ObjectCreationFactory class Here is a scenario: 1) start up jboss (vanilla, no .ear file in deploy) 2) everything is fine. 3) deploy aaw.ear. 4) aaw.ear deploys a-okay, everything is fine. 5) recopy the aaw.ear file (with a newer timestamp) into deploy. 6) old aaw.ear is undeployed, this works fine. 7) on deploy of new aaw.ear, the above exception happens. I think it has to do with the default/tmp directory that caches jar files that have been deployed (or somesuch). Maybe there's a conflict wrt versions of jars that both jboss and my app depend on? I am pretty certain this is something we're doing dumb, not a bug with jboss I just don't know how best to diagnose what exactly is the cause. Any clues? Thanks, Christian --- Christian 'xian' Nelson [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Don't ask yourself what the world needs. Ask yourself what makes you come alive, and go do that, because what the world needs is people who have come alive. -- Howard Thurman --- --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage error 3.0.1 final...
Do your mbeans implement the jboss service lifecycle? Exactly when do they need the ejb? If you access it in your mbean constructor, you will have to do something like nesting packages or prefixing a number to the file names to force the ejb's to load first. If you access the ejb in the start or startService method you should be able to use the depends mechanism. You didn't say if you are already packing everything in an .ear. david jencks On 2002.08.22 01:48:05 -0400 Brian Macy wrote: Nope... AlertGroupLocal is an entity bean in my ejb.jar :( There has got to be someone writing MBeans using Entity/Session Beans that aren't contained in the same sar file... so I'm assuming I've just got the classes organized improperly. Brian Macy David Jencks wrote: There is some code that makes mbeans wait for their classes, but it only works in jboss 4 (and something like 3.0RC1, I should have written a testcase when I wrote the code) I'm not sure if the missing class is the mbean class: if not, this feature may not work too well for you. I'd recommend deploying in an .ear since all classes from anywhere in the .ear are loaded before anything starts getting created. david jenck On 2002.08.22 01:00:22 -0400 Brian Macy wrote: Actually I'm totally confused here... maybe I'm deploying this stuff entirely wrong. I can't see how the MBean is going to load without knowing about all the classes... well, let's just say it doesn't :) 21:49:20,339 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: none Incompletely deployed packages: [org.jboss.deployment.DeploymentInfo@ee199cbf { url=file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar } deployer: org.jboss.deployment.SARDeployer@edc073 status: Deployment FAILED reason: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal; - nested throwable: (RuntimeErrorException: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal Cause: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal) state: FAILED watch: file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar lastDeployed: 1029991746191 lastModified: 1029991746000 mbeans: ]MBeans waiting for classes: none MBeans waiting for other MBeans: none The interfaces include: - EJB Data classes - EJB PK classes - EJB Local/Remote interfaces - EJB Local/Remote Home interfaces - A couple misc non-EJB classes What if any should be in the sar? Also, if it matters, the MBean will eventually be deployed in an entirely seperate JBoss instance on a seperate machine (there are some reasons). Should the common non-ejb classes be put in a seperate jar file... and then put either in the lib directory or have absolute pathname dependencies created? Should the common ejb classes also be put in such a jar? Brian Macy Scott M Stark wrote: You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
Re: [JBoss-user] Linkage error 3.0.1 final...
You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage error 3.0.1 final...
Thanks for the info. Unfortunately it can't find my AlertGroupData class now. I assume I need to still include those interfaces in the sar? Brian Macy Scott M Stark wrote: You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage error 3.0.1 final...
Actually I'm totally confused here... maybe I'm deploying this stuff entirely wrong. I can't see how the MBean is going to load without knowing about all the classes... well, let's just say it doesn't :) 21:49:20,339 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: none Incompletely deployed packages: [org.jboss.deployment.DeploymentInfo@ee199cbf { url=file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar } deployer: org.jboss.deployment.SARDeployer@edc073 status: Deployment FAILED reason: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal; - nested throwable: (RuntimeErrorException: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal Cause: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal) state: FAILED watch: file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar lastDeployed: 1029991746191 lastModified: 1029991746000 mbeans: ]MBeans waiting for classes: none MBeans waiting for other MBeans: none The interfaces include: - EJB Data classes - EJB PK classes - EJB Local/Remote interfaces - EJB Local/Remote Home interfaces - A couple misc non-EJB classes What if any should be in the sar? Also, if it matters, the MBean will eventually be deployed in an entirely seperate JBoss instance on a seperate machine (there are some reasons). Should the common non-ejb classes be put in a seperate jar file... and then put either in the lib directory or have absolute pathname dependencies created? Should the common ejb classes also be put in such a jar? Brian Macy Scott M Stark wrote: You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Linkage error 3.0.1 final...
There is some code that makes mbeans wait for their classes, but it only works in jboss 4 (and something like 3.0RC1, I should have written a testcase when I wrote the code) I'm not sure if the missing class is the mbean class: if not, this feature may not work too well for you. I'd recommend deploying in an .ear since all classes from anywhere in the .ear are loaded before anything starts getting created. david jencks On 2002.08.22 01:00:22 -0400 Brian Macy wrote: Actually I'm totally confused here... maybe I'm deploying this stuff entirely wrong. I can't see how the MBean is going to load without knowing about all the classes... well, let's just say it doesn't :) 21:49:20,339 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: none Incompletely deployed packages: [org.jboss.deployment.DeploymentInfo@ee199cbf { url=file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar } deployer: org.jboss.deployment.SARDeployer@edc073 status: Deployment FAILED reason: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal; - nested throwable: (RuntimeErrorException: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal Cause: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal) state: FAILED watch: file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar lastDeployed: 1029991746191 lastModified: 1029991746000 mbeans: ]MBeans waiting for classes: none MBeans waiting for other MBeans: none The interfaces include: - EJB Data classes - EJB PK classes - EJB Local/Remote interfaces - EJB Local/Remote Home interfaces - A couple misc non-EJB classes What if any should be in the sar? Also, if it matters, the MBean will eventually be deployed in an entirely seperate JBoss instance on a seperate machine (there are some reasons). Should the common non-ejb classes be put in a seperate jar file... and then put either in the lib directory or have absolute pathname dependencies created? Should the common ejb classes also be put in such a jar? Brian Macy Scott M Stark wrote: You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
Re: [JBoss-user] Linkage error 3.0.1 final...
Nope... AlertGroupLocal is an entity bean in my ejb.jar :( There has got to be someone writing MBeans using Entity/Session Beans that aren't contained in the same sar file... so I'm assuming I've just got the classes organized improperly. Brian Macy David Jencks wrote: There is some code that makes mbeans wait for their classes, but it only works in jboss 4 (and something like 3.0RC1, I should have written a testcase when I wrote the code) I'm not sure if the missing class is the mbean class: if not, this feature may not work too well for you. I'd recommend deploying in an .ear since all classes from anywhere in the .ear are loaded before anything starts getting created. david jenck On 2002.08.22 01:00:22 -0400 Brian Macy wrote: Actually I'm totally confused here... maybe I'm deploying this stuff entirely wrong. I can't see how the MBean is going to load without knowing about all the classes... well, let's just say it doesn't :) 21:49:20,339 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: none Incompletely deployed packages: [org.jboss.deployment.DeploymentInfo@ee199cbf { url=file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar } deployer: org.jboss.deployment.SARDeployer@edc073 status: Deployment FAILED reason: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal; - nested throwable: (RuntimeErrorException: instantiating com.pany.aggregator.AlertAggregator failed: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal Cause: java.lang.NoClassDefFoundError: com/pany/interfaces/AlertGroupLocal) state: FAILED watch: file:/opt/jboss-3.0.1/server/default/deploy/aa-service.sar lastDeployed: 1029991746191 lastModified: 1029991746000 mbeans: ]MBeans waiting for classes: none MBeans waiting for other MBeans: none The interfaces include: - EJB Data classes - EJB PK classes - EJB Local/Remote interfaces - EJB Local/Remote Home interfaces - A couple misc non-EJB classes What if any should be in the sar? Also, if it matters, the MBean will eventually be deployed in an entirely seperate JBoss instance on a seperate machine (there are some reasons). Should the common non-ejb classes be put in a seperate jar file... and then put either in the lib directory or have absolute pathname dependencies created? Should the common ejb classes also be put in such a jar? Brian Macy Scott M Stark wrote: You can't have dependent classes in indepdent deployment units with the same classes in both. If you remove the ejb interfaces from the sar you will be able to redeploy the ejb as well as the sar. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Brian Macy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 10:01 PM Subject: [JBoss-user] Linkage error 3.0.1 final... I've been getting this for a while so I figured I'd ask. I have an MBean in service.sar and my EJBs in ejb.jar. ejb.jar contains all my EJB classes, EJB interfaces, and misc non-EJB classes. service.sar contains only the MBean, the EJB interfaces, and misc non-EJB classes. If I simply touch service.sar while JBoss is running I get a linkage error: 2002-08-21 18:52:50,006 ERROR [com.pany.aggregator.AlertAggregator] findByName really screwed: java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,007 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking com/pany/interfaces/AlertGroupLocal class 2002-08-21 18:52:50,012 ERROR [STDERR] at com.pany.aggregator.AlertAggregator.startService(AlertAggregator.java:85) 2002-08-21 18:52:50,013 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164) 2002-08-21 18:52:50,013 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by: