[Beginners Corner] - Re: Linkage Error While returning the OrderedMap from EJB
by jaikiran
anonymous wrote : Nops, There is only one jar file common-collections.jar in ....default\lib\.
I meant, do you have multiple copies of the same jar file on the server?
anonymous wrote :
| And it is there in build path of both EJB as well as Web app.
|
You mean that the deployed ejb jar and the web app each have a copy of the common-collections.jar file? If yes, then that might be the cause of the LinkageError. The OrderedMap might be loaded by 2 different classloader (one from the ejb and the other from the web app). Are the ejb jar and the web app part of the same application? If yes, then you could deploy them as an ear file and have only one commons-collections.jar in the ear instead of at 2 places.
Also, did you try the jmx-console method mentioned in the link that i posted earlier? That's going to tell you whether the OrderedMap is being loaded from 2 different commons-collections.jar file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065547#4065547
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065547
18Â years, 11Â months
[Beginners Corner] - Re: Classloader issues: Need to share libraries across web a
by jaikiran
anonymous wrote : So, I need to move these to the EAR level (WAR and SAR applications are deployed as part of this EAR). How can I do that and what are the steps involved?
|
You will have to create an ear file containing the war file and the sar file. Additionally, you will require a application.xml file and a jboss-app.xml file (both in the META-INF folder of the ear). The application.xml will contain something like:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
| <application>
| <display-name>My Application</display-name>
|
| <module>
| <web>
| <web-uri>myApp.war</web-uri>
| <context-root>/myApp</context-root>
| </web>
| </module>
| </application>
Then the jboss-app.xml will contain:
| <jboss-app>
| <loader-repository>
| tap:loader=myApp.ear
| <loader-repository-config>
| java2ParentDelegation=false
| </loader-repository-config>
| </loader-repository>
|
| <module>
| <service>myAppSar.sar</service>
| </module>
|
|
| </jboss-app>
|
Replace myApp.war, myApp.ear and myAppSar.sar without appropriate names of your archives.
The loader-repository in jboss-app.xml is optional in the jboss-app.xml, retain it if you want classloader isolation for the ear file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065546#4065546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065546
18Â years, 11Â months
[Installation, Configuration & DEPLOYMENT] - Re: Problems with log4j in jboss
by jaikiran
How about this:
|
| # initialise root logger with level INFO and call it
| log4j.rootLogger=INFO, stdout
|
| #set your application to use the BLAH appender
| log4j.logger.org.myapp=INFO, BLAH
|
| #configure the Console appender
| log4j.appender.stdout=org.apache.log4j.ConsoleAppender
| log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
| log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
|
| # add a Appender to the logger BLAH
| log4j.appender.BLAH=org.apache.log4j.RollingFileAppender
| # set the layout
| log4j.appender.BLAH.layout=org.apache.log4j.PatternLayout
| log4j.appender.BLAH.layout.ConversionPattern=%d{dd-MMM-yyyy HH:mm:ss:SSS}: %m%n
| log4j.appender.BLAH.File=c:/testing.log
|
| log4j.appender.BLAH.MaxFileSize=10000KB
| # Keep one backup file
| log4j.appender.BLAH.MaxBackupIndex=10
Note that i have used log4j.logger.org.myapp, replace org.myapp with whatever is the package hierarchy in your application.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065541#4065541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065541
18Â years, 11Â months