This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi, I'm working on enterprise level java project in my company. I'm using eclipse here and my project is developed upon EJB, thousands of Core Java classes, JSP/Servlets, PL SQL.
I'm facing a very strange problem. I have written a very small piece of java code and to test that i have placed a simple SOP also to print the output but unfortunately that simple code not even my SOP is getting reflecting on eclipse's server console and accordingly my logic is not working. Then i used logger class also(logutils) to capture the output but still hard luck
Here is my code:-
I have checked my eclipse settings, its 'build automatically' only. I deliberately refreshed project, then cleaned, closed and opened eclipse again and again & finally once again manually build all project but still hard luck. I ran server on debugging mode. I can clearly see that the control is passing over my written code but why it is not printing anything even a simple System.out.println() on server's console.
Any idea. I'm stuck. Tried alot..Googled but no help...
When you changed the code and rebuilt the application (into an ear or war file), did you reload (redeploy) the application on JBoss.
The point I am trying to make is that changes you have made through eclipse (regardless of whether the build automatically option is on or not) will not be reflected on the application server (in your case, JBoss) until the application has been redeployed.
James Boswell wrote:When you changed the code and rebuilt the application (into an ear or war file), did you reload (redeploy) the application on JBoss.
The point I am trying to make is that changes you have made through eclipse (regardless of whether the build automatically option is on or not) will not be reflected on the application server (in your case, JBoss) until the application has been redeployed.
Once you have built your application, you should have a WAR file (or perhaps an EAR depending on your requirements).
Copy this file into <JBOSS_HOME>/server/<SERVER_INSTANCE>/deploy
where:
<JBOSS_HOME> - directory where JBoss is installed
<SERVER_INSTANCE> - the server instance you are using. For a basic setup, this will be called 'default'
What version of JBoss are you using?
Copying the file into the deploy folder effectively redeploys the application. The server log should show this happening.
James Boswell wrote:Once you have built your application, you should have a WAR file (or perhaps an EAR depending on your requirements).
Copy this file into <JBOSS_HOME>/server/<SERVER_INSTANCE>/deploy
where:
<JBOSS_HOME> - directory where JBoss is installed
<SERVER_INSTANCE> - the server instance you are using. For a basic setup, this will be called 'default'
What version of JBoss are you using?
Copying the file into the deploy folder effectively redeploys the application. The server log should show this happening.
You can set up your eclipse to auto publish / deploy for you if you want.
You'll have to configure that within eclipse. There is a server view where you can add your jboss instance. That way you can debug from within eclipse. With this method you can make hot fixes without restarting your jboss instance. Although, when you add or remove method signitures you'll have to restart your jboss.
Either that or you'll have to use ant / maven to build and package your app. Stop your jboss instance then copy it to your deploy directory and start jboss again.
It can take longer to start jboss within eclipse but sometimes the extra debugging power is worth it.