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.
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.
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: 471
posted
0
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: 471
posted
0
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?
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: 471
posted
0
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?
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?
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: 471
posted
0
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!
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?
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: 471
posted
0
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
posted
0
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: 471
posted
0
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
posted
0
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: 471
posted
0
Which attachment?
Vikram Saxena
Ranch Hand
Joined: Dec 16, 2008
Posts: 53
posted
0
I have added the attachment ! , but cannot see it here
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
posted
0
Copy paste the attachment contents!!
Vikram Saxena
Ranch Hand
Joined: Dec 16, 2008
Posts: 53
posted
0
, 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: 471
posted
0
That's the problem!!! I don't have JBOSS_HOME value set in "Environment Variables", deleted it long back!
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: 471
posted
0
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:
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...
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: 471
posted
0
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.
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: 471
posted
0
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:
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.