aspose file tools*
The moose likes JBoss/WildFly and the fly likes Error While Starting JBoss 5.1.0 GA!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Error While Starting JBoss 5.1.0 GA!!!" Watch "Error While Starting JBoss 5.1.0 GA!!!" New topic
Author

Error While Starting JBoss 5.1.0 GA!!!

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hi Everyone,

I have written a JSP/Servlet code and when i try to deploy it to the JBoss server using Eclipse. When clicked "Run On Server", i get an error like this and the server never starts at all and this error keeps on coming in an infinite loop:



Although i don't think this and the JSP/Servlet code is related. Please help in solving the problem.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168



I don't see the queue/examples/OurSampleQueue being shipped in JBoss AS. Looks like it belongs to your application. Please post the configuration file of this queue.

[My Blog] [JavaRanch Journal]
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Sorry, I am very new to JBoss. Could you please tell me where to find the configuration file for the Queue?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

That file is not actually part of JBoss. I think its from your application. See if you can find it within any of your project files (probably named *-service.xml). You can even do a "Find in files" search through some text editor to search for that OurSampleQueue string.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Nope! Couldn't find it anywhere in my JBoss directory or in my Eclipse projects as well. Would removing that entry help? If yes, please tell me how to get rid of the problem!
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I am in deep trouble now!

I deleted the installation directory and deleted all the Env Variables. Then i extracted the JBoss again from the zip file and and configured the Env variables. And when i run the "run.bat" file, it doesn't work.

My extarcted directory is: E:\Softwares\Servers\JBoss\JBoss 5.1.0. GA
I have set JBOSS_HOME as: E:\Softwares\Servers\JBoss\JBoss 5.1.0. GA

But when i run "run.bat" i get no output! could you help me out with this?

I have attached a screen shot of my dos window.



[Thumbnail for Command Prompt.JPG]

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

You probably have not set JAVA_HOME to point to the correct JDK path.

What does



return? And you don't have to set JBOSS_HOME.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477


Should that ";" be there?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

No, the semi-colon must be removed. Also its always recommended to install java in a folder which does not have a space in its path name. Ex: C:\Java\jre1.6.0_07
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I removed the ";". Now its:





I ran the "run.bat" command now and i get the following error! I can see what that the path its picking up for the "run.jar" is incorrect but how do i correct it?

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

I think you set the JBOSS_HOME incorrectly. As i said in my earlier reply:

Jaikiran Pai wrote:And you don't have to set JBOSS_HOME.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I tried with JBOSS_HOME removed and it still gave that error!

Looks like the path E:\Softwares\Servers\JBoss\JBoss 5.1.0. GA\bin is fixed.

My JBoss folder was named JBoss GA 5.1.0. So i changed it to JBoss 5.1.0. GA and now the run.bat is working fine!

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
So finally i am back to sqaure one. I tried deploying the my servlet code and I get this error, when the browser in Eclipse starts!



Could you please tell me what's the problem?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

Looks like there is no application, whose context is /HealthCheck deployed. Is there a HealthCheck.war in the deploy directory, or within an EAR in the deploy directory, or is /HealthCheck defined somewhere (application.xml or jboss-web.xml) as the context for any WAR?


JBoss In Action
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I checked my JBOSS_HOME\server\all\deploy directory and i found no HealthCheck.war and also I found no EAR also in my deploy deirectory and HealthCheck has no entry in either application.xml or jboss-web.xml!!

What could be the issue here? Do i have to do it manually?
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I did them manually. I exported the project into an EAR file and added the resource using the JBoss admin page. And now there is HealthCheck.war file in the JBOSS_BOSS\server\all\deploy\HealthCheckEAR.ear directory.
But now when i enter http://localhost:8080/HealthCheck/ in my browser I get the same error!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

You had the war in all/deploy folder? In your earlier posts you have been starting the default profile. So the war should be in JBOSS_HOME/server/default/deploy folder. What exact command and parameters are you using to start the server?
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I am starting my server through eclipse...
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Let's leave out IDEs, till we will get it working from the command prompt. So start the server from the command prompt and see if that works fine.
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well i went to the bin folder and executed the run.bat command and the server didn't start! All i saw was:



So you can say my server is not working properly!

Just check the path from where i am running the run.bat and its strange its looking for run.jar in a different location! How on earth is that happening???

I have removed the classpath variable "JBOSS_HOME" as you said from Windows! But when i run the command echo %JBOSS_HOME% from command prompt I get this:

Which is exactly the same path that JBoss is searching for run.jar as mentioned in the error above!!!
Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
The answer is in your post sir :

Check the paths :

E:\Softwares\Servers\JBoss\JBoss 5.1.0. GA\bin\run.conf.bat
Could not locate "E:\Softwares\Servers\JBoss\JBoss GA 5.1.0\bin\run.jar".

You need to cross check all the paths that you have set up !


Vikram
SCJP 5 , SCBCD [Prep Started ] , WLS 8.1 Server Admin
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I know that the paths that JBoss is looking for is different from the path that it is installed in!

All i am doing is going to the path E:\Softwares\Servers\JBoss\JBoss 5.1.0. GA\bin and executing the run.bat command. If that path didn't exist then windows would have shown an error message, path does not exist or something!
Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
I guess you still have the JBOSS_HOME env variable.

Can you please remove it ? Check the attachement on how you do it .
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Which attachment?
Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
I have added the attachment ! , but cannot see it here
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Copy paste the attachment contents!!
Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
, that was smart !

But, it is a picture shoeing the path to the PATH env variable.

Anyway,
Ricght Click on My Computer > properties > Select advanced tab > click Environment Variables and check for JBOSS_HOME variable.

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
That's the problem!!! I don't have JBOSS_HOME value set in "Environment Variables", deleted it long back!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Somnath Mallick wrote:
I have removed the classpath variable "JBOSS_HOME" as you said from Windows! But when i run the command echo %JBOSS_HOME% from command prompt I get this:



As Vikram already mentioned, you have JBOSS_HOME set in your environment. I guess you will have to check either in the System Environment or User Environment in the Windows Environment Settings.

If JBOSS_HOME was not set that you wouldn't have seen that output for echo.


One other thing - do not install JBoss or Java in a folder containing spaces. You might run into weird issues. Better move the JBoss installation to a different location which does not have the space in its path (example: E:/Softwares/Servers/JBoss/JBoss-5.1.0)
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well finally I'm able to get rid of the JBOSS_HOME variable and my JBOSS server is starting from command prompt. But I got an error while starting it. Checked the log and here it is:



Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

2009-08-17 12:00:30,919 ERROR [org.jboss.naming.Naming] (main) Could not start on port 1099
java.net.BindException: Address already in use: JVM_Bind


See this http://www.jboss.org/community/wiki/DebugBindException
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Finally started the server without any errors:



So where do I go from here?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

So where do I go from here?

I don't know, what is it that you want to do?
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well I was trying to run a JSP-Servlet code and it seems that the problem is machine specific! Only my JBoss is causing problems! My friend developed a working JSP-Servlet code. I tried to run it in my JBoss server it didn't work. Also refer this thread...

http://www.coderanch.com/t/458623/JSP/java/org-apache-jasper-JasperException-Unable
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well none of the Servlet-JSP code seems to work!! The exception is gone, but the Servlet-JSP project still doesnt work! All i see is this:



I am using the URL as http://localhost:8080/HealthCheck/ and i get this error!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

You have take this one step at a time. We are just going in circles here. Read my reply in this post date 08/14/2009 11:40:55 AM. And tell us the answer to that. From the latest logs that you posted, i don't see the HealthCheck application being deployed. If it was available in the default/deploy folder then we would have seen a log like this:

2009-08-17 12:49:58,926 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/HealthCheck


Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Well you are right about the "all" folder and the "default" folder. There's none in the default folder. HealthCheck.ear is in the "all" folder.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

So did you move it to default/deploy and start the server? Or if you want it to be in all/deploy then you can start the "all" server configuration by using the -c parameter to the run.bat:

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
I think you are talking about starting the server from the dos all the time! And i am tying to start the server from my IDE all the time! I deleted the server from Eclipse and created a new Server with the default profile. And then ran the JSP-Servlet project on the server, and this time i saw a folder named HealthCheck.war in the default directory! But alas, still it didn't work!

And i ran your command from command prompt and i got huge number of errors! These are some of the error, and there are a lot more:






Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

I think you are talking about starting the server from the dos all the time! And i am tying to start the server from my IDE all the time!


And did i not mention that earlier in my post:
Jaikiran wrote:
Let's leave out IDEs, till we will get it working from the command prompt. So start the server from the command prompt and see if that works fine.


and then all of your other posts after that talking about running from the command prompt?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error While Starting JBoss 5.1.0 GA!!!