aspose file tools*
The moose likes JBoss/WildFly and the fly likes Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5" Watch "Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5" New topic
Author

Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5

Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
I am moving several projects to MyEclipse. What I did was to strip out all the ibm specific mapping files (as recommended by the vendor) and created new projects within MyEclipse. I ported over only the source code into the new projects and re-created all the settings for the specific projects. I was able to get the projects to compile properly with the exception of the Web Services project, but we know why that won't work with MyEclipse (X-Fire vs AXIS issue). Next, we installed the latest production ready version of JBOSS (4.0.5) and ran its windows installer. I was able to get the server to come up with the basic installation with no errors. From here, I started tweaking the server to add JMS and JDBC functionality, then I deployed the J2EE project to JBOSS with no problems. The last step was to bring up JBOSS with the new settings and project. What happen next I can not fully explain. When I started the server, an error displayed involving the JBOSS log4j component. I have not changed the log4j.xml settings, so I am confused why this error would even happen:



I checked to ensure I had the log4j-boot.jar within the server area. I found the log4j-boot.jar in <JBOSS_DIR>/lib. Also the log4j.xml file is the only place where the class OnlyOnceErrorHandler is specifically mentioned. I am at a lost to explain why there is an issue.

Can someone shed some light on this for me? Is this a version issue with log4j?

Thanks for reading my post.

Russ
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

Have you packaged the log4j jar in your application and deployed it on JBoss. If yes, then remove it since JBoss already the relevant log4j jar in its lib folder.


[My Blog] [JavaRanch Journal]
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
Please excused my igornace...for thou does not know better...

I am developing the projects in the work environment and compile the classes which use log4j.jar, so I have one jar file used by all projects.

What you are saying is once I have it compiling, remove all the log4j.jar reference in the projects for log4j because the server has its own log4j.jar... While I suspect this will work, it is not a clean solution for having developers changing their environments every time one has to deploy and test their work....

Is there someone here who has faced this problem who can direct me toward a clean solution?

Thank you as always for reading my post.

Russ
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

From your earlier post,
then I deployed the J2EE project to JBOSS


You meant you placed your application in the deploy directory, right? This application i guess is either a jar, war or ear. I was trying to figure out whether this package that you deployed in JBoss had any log4j jars inside it. Including the log4j jar in the application deployed in JBoss leads to all sorts of weird issues and has been frequently discussed. The easiest solution to this is to remove the log4j jar file and commons-logging.jar file(if at all you have that) from the application's package *when you deploy it in JBoss*.

Is there someone here who has faced this problem who can direct me toward a clean solution?

I havent encountered this myself, but have seen this being reported many times before and apparently the cleaner solution that you are looking for appears to be enabling classloader isolation for your application. More details about classloading isolation can be found at ClassLoadingConfiguration on JBoss
[ November 16, 2006: Message edited by: Jaikiran Pai ]
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
Jaikiran:

Thank you for your fast reply. Yes, I am using an IDE--MyEclipse. When I deploy the application, the tool is moving the application over to JBoss' <JBOSS>/server/default/deploy/ directory. It is an exploded type of deployment and not al all in one ear file.

Also, yes the projects are using log4j.jar and commons-logging.jar. This is because the souce code will not compile within the tool with the jar files (well at least the log4j.jar for sure).

We have a log4j.properties file located in the bin directory for JBoss. What I am hearing is I need to create my own appenders inside the log4j.xml from JBoss for this to work.


I glanced at the link you provided (thnak you very much) and will do more reading shortly as it may help me...

Thank you for taking the time to read and answer my post.

Russ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Porting WSAD 5.1.1 to MyEclipse 5.1 with JBOSS 4.0.5