aspose file tools*
The moose likes Java in General and the fly likes Strange issue..I think java class is not getting build, not able to print simple SOP on console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Strange issue..I think java class is not getting build, not able to print simple SOP on console" Watch "Strange issue..I think java class is not getting build, not able to print simple SOP on console" New topic
Author

Strange issue..I think java class is not getting build, not able to print simple SOP on console

Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

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...




[Thumbnail for Eclipse build settings.GIF]

[Thumbnail for screen 1.GIF]

[Thumbnail for screen 2.GIF]


Vinod Vijay Nair
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 973
    
    5

Have you redeployed your application to the server? The build automatically option in eclipse will not do this step for you.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

James Boswell wrote:Have you redeployed your application to the server? The build automatically option in eclipse will not do this step for you.


I'm sorry, I didn't get you. Just for your information, I'm trying to run this application on jboss server on my local machine only.
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 973
    
    5

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.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

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.




How can I reload or redeploy on Jboss?
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 973
    
    5

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.
Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 119

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.


I'm using jboss-4.0.3SP1
Carlo Moore
Greenhorn

Joined: Aug 02, 2005
Posts: 27
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange issue..I think java class is not getting build, not able to print simple SOP on console
 
Similar Threads
System.out.println not showing output in Netbeans 7
Understanding Nested For Loops
JSP Basics query
Special characters parsing in Java
Unable to print out (system.out.println()) on eclipse's console.