*
The moose likes JForum and the fly likes problem with redeploying in JBOSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "problem with redeploying in JBOSS" Watch "problem with redeploying in JBOSS" New topic
Author

problem with redeploying in JBOSS

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hey guys!

I'm running JForum on Jboss-4.2.2.GA with MySql, and i have a couple of issues:

1. i'm unable to deploy the WAR file at all, but if i copy the binary package under a directory named "JForum.war" Jboss
is perfectly deploy it. any guess why?

2. Since i can't deploy a WAR with JBOSS, i've set the ANT "deploy-dev" task to copy the compiled classes and the
the resources to the right place in the "JForum.war" directory in JBoss deploy.
each time i do that , i get the next errors in JBoss



and from that point i cant access the jforum on my Jboss anymore, because i get the next error (in the client)


and the following message in the JBoss



the weird part is , that if i shutdown and restart JBoss , everything is deployed just fine!
can i please get some help with that?



[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
anyone?! it is very annoying to shut and restart jboss!!!
[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
After you copy in your updated or new files, just "touch" the jforum web.xml and jboss will redeploy the app without having to stop/start jboss.

[originally posted on jforum.net by GatorBait3]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
GatorBait3 wrote:After you copy in your updated or new files, just "touch" the jforum web.xml and jboss will redeploy the app without having to stop/start jboss.


what do you mean by "touching"? open and resave it ? delete it and copy a fresh one? double click it?
cause what i'm doing is

1. delete the old web.xml
2. copy the classes
3. copy the templates and other resources
4. copy a fresh web.xml file into WEB-INF folder..

and that gives me the above errors!
[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The "touch" command I was referring is in Linux/UNIX type OS (that is the command: touch filename). My JBoss experience is in the Linux world and I don't know if re-saving the web.xml file would be enough to change the date/time and kick off a redeploy in JBoss under Windows.

What happens in Linux is that JBoss will often start deploying your files before the copy has completed. So, not all of the files get deployed. Refreshing the date/time stamp on the web.xml file will trigger a new deploy in JBoss, getting the files the 1st deploy may have missed.

This may or may not work in your situation since you are running JBoss under Windows ... but it is worth a try!

After you do step #4 in your list, I would open the web.xml file from the WEB-INF dir and re-save it to see it that kicks off a new deployment.
[originally posted on jforum.net by GatorBait3]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
ok Gator, i'll give it a try and post the ruslt tommorow!
thanks in advance..
[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hey, well i've debugged the code a little bit,
the problem seems to be with JForum and jboss...


once it was deployed , when i redeployed it , init() (in JForum.java) is being called.
this method will call contains the following line



who calls the init() method (in the C3P0PooledConnection.java)


and that's where the problem is.. somewhy when jboss is executing the


line , it gets the following exception :


[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael, Monroe , Gator? maybe you guys can help?
[originally posted on jforum.net by pavel_twr]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Well, I don't use JBoss so I'm just guessing here...

From the stacktrace, it seems like the problem is that JBoss is trying to use one of it's own classes (org.jboss.mx.util.JMXExceptionDecoder) and not finding it. Or maybe there are multiple versions available and the security rules are causing this.

You might look for duplicate JBoss libraries at the system and webapp level. Then remove them from the webapp level.

Also, this seems to be related to c3p0 trying to load a Java Management Bean. You might look c3p0 docs at:
http://sourceforge.net/projects/c3p0 to see if there's a way to disable this.

Does JBoss have a way to just reload a single webapp? I know that Tomcat can do this via it's manager/html webapp. Maybe you need to redeploy, then reload the webapp to get it to work. This would be have less impact than restarting the entire JBoss engine.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
And you are getting this error even if you stop and restart JBoss?

Do you have any other applications running under this JBoss instance? If so, any issues with them?

And after looking at your old post, I never had to do step #2 ... I just made a JForum.war directory in the JBoss web app directory and copied the extracted files from the JForum.war file into that directory. Then either bouncing JBoss or touching the web.xml file deploys the app in JBoss.
[originally posted on jforum.net by GatorBait3]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
i've downloaded the jforum again , reinstall it
and now everything is working well with JBOSS and Tomcat 5.5

Thank everybody for the help!!
[originally posted on jforum.net by pavel_twr]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with redeploying in JBOSS
 
Similar Threads
a database question on deploying jforum
Trouble in setting up JFORUM with Eclipse as a Tomcat Project
Binded Name throwing Name Not Found Exception
The First Steps.. you start here
Convert phpbb/mysql to jforum/hsqldb