• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JBoss 4.2.2 Server Starting Issue

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have downloaded the JBoss 4.2.2 GA server and changed the port no to 8082 in the following server.xml file.
jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\server.xml


When I stared the JBoss server by running the run.bat in bin folder, I am getting the following error messages in the console and get the server started message also.
But when I tired to hit the server with http:\\localhost:8082, I am getting the page not found exception. I have tries with port 8080, suspecting the port number changes are not reflected, but that too is not working.
Whether the server is not started due to the below exception? but why am getting the server started message. See the last section showing server started.

I am using Windows Vista Home Edition, JBoss Server 4.2.2 GA and java 1.5.



 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike, this does not look right at all. 10 minutes to start up JBoss AS??? Could you post the entire command prompt window output, starting from the command you entered up to, and including the "started in xxx seconds" log entry?

Also, please give us some idea of you network topography. It looks like there are several network timeouts.
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is the log. I have downloaded JBoss 4.0.0 and started it, but i am getting the same error message like "Connection timeout". I have disabled the firewall and tried, then also I am getting the same. Can anyone help on this?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The "connection refused" errors could indicate either a problem opening a socket, or a network issue, but the error text that you identify the problem is not included in what you posted. Apparently the console log is scrolling off of the console window. You need to either increase the buffer size for the console window, or redirect both stdout and stderr to a file. I need to see the full console output, starting with the command you entered.
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,

Actually, I am running the run.bat file in the bin folder. Why I didn't copy the entire log is, the "connection refused" error log is keep up on coming again and again and the file size is huge? That's why I didn't send the log. If you want the first part of the log, I will send you shortly.

My Env:
Windows Vista Home Basic
JDK 1.5
JBoss Server 4.2.2.GA
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you make any changes other than the port setting in server.xml?

Is there anything running on port 3700? You can check by using TCPView (from sysinternals) or by using netstat.

Also, I notice that your JDK is installed in Program Files. Installing Java-related things in a path that contains spaces is always risky - there are Java libraries that fail under those circumstances. I installed my JDK at c:\apps\java\jdk1.5.0_16. Try moving the JDK and resetting JAVA_HOME to the new location (you do not have to reinstall - moving, or copying, the directory is sufficient). (I admit this is a long shot, but you would be surprised about the number of issues that this simple step has solved.)
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,
What is this..??? You are right, I just moved the jdk from the program files to C:\jdk... and then started jboss, it is started smoothly.
Thank you so much. I have downloaded TCPView and there is no services running in port 3700.

I have deployed my ear file. But when I try to access the url (http://localhost:8082/hello), I am getting 404 status.
I have written a simple session bean and the servlet is calling the session bean. I am using JBoss Eclipse IDE and following the steps given by the tutorial. I have created HelloEJB.jar and HelloWeb.war and HelloApp.ear using XDoclet and packaging. While deployed the application, I haven't received any error messages.


[ December 27, 2008: Message edited by: Mike Thomson ]
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can see from this line:

22:29:25,168 INFO [TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deploy/tmp52314HellpApp.ear-contents/HelloWeb-exp.war/

that the web app was deployed. Did you declare a welcome-file in your web.xml? If not, you will need to provide a file name, or a servlet url mapping, in the URL (example: http://localhost:8080/hello/some.jsp.

If this does not help, post your web.xml.
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have missed out the index.jsp in the HelloApp.ear file. Now I can able to bring up the application. But now I am facing problem with getting the home object from the JNDI.
I am getting the following error:


Below is my web.xml:


My jboss-web.xml:


My servlet getting the home object from the JNDI lookup:


Is it possible to see what are the enviornment variables are registered with JNDI in JBoss with web console. For example, If we are registering the datasource in the websphere application server, we can able to test it out with test connection. Like that how can we do it in JBoss server.

After googled, I have got the below thing from jmx-console.

[ December 28, 2008: Message edited by: Mike Thomson ]
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help on this?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You jboss-web.xml file is incorrect, the opening ejb-ref is missing.


[ December 29, 2008: Message edited by: Peter Johnson ]
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter, Thanks again for pointing out the missed one. I will correct it and give a try.
I am wondering how the autogenerated xml has errors. I have used xdoclet for all the xml generation. Thanks for your help.

Between, I have a query if I am having an application which is using EJB 2.1. If I want it to replace it with EJB 3.0, whether there will be having major impact?
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Atualy while copying I have missed that line. Please see the below jboss-web.xml file witout edited. Still I am getting the same error.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post edited by Jaikiran - Ram, i am going to remove this post from this thread since its a totally different issue than what is being discussed here. Please open a separate topic to discuss the issue you are running into. Thanks
[ January 01, 2009: Message edited by: Jaikiran Pai ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ram,

You should have opened a separate thread describing your problem. Please do not hijack topics.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,

Based on the jmx-console output you posted:


I believe, you should have been able to lookup the ejb using java:comp/env/ejb/Hello jndi-name from the ComputeServlet(assuming the servlet belongs to HelloWeb.war).

However, you are running into this exception:



12:26:16,220 ERROR [STDERR] javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: ejb not bound]
12:26:16,236 ERROR [STDERR] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1215)
12:26:16,236 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:758)
12:26:16,236 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:774)
12:26:16,251 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
12:26:16,251 ERROR [STDERR] at javax.naming.InitialContext.lookup(Unknown Source)
12:26:16,251 ERROR [STDERR] at com.web.ComputeServlet.init(ComputeServlet.java:47)
12:26:16,251 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)



Can you try moving the lookup code from the init() method of the servlet to maybe doGet or doPost? From the web.xml you posted, i don't see that this is a startup servlet, so I believe you should have been able to look it up from the init too, but let's see if it works from the other methods.
 
Mike Thomson
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have fixed this issue. I have missed the ejb.jar.xml and jboss.xml file in the HelloEJB.jar. I have once again checked all the steps given in the below url and found it and then deployed the application. It's working.

I have one doubt:
I am following the step by step procedures given in the following site:
http://docs.jboss.org/jbosside/tutorial/build/en/html/index.html

In the Packaging Chapter 9, they are creating the following:
1. EJB Jar
2. EJB Client Jar
3. Web application War
4. J2EE application Ear

However, they have given the warning saying that "if you are using JBoss 4.0 or above, then skip the EJB Client jar, as it will have ClassLoaderException if we are attempt to package our EJB interfaces in both WAR and EJB Jar because of the new Tomcat scoped classloading".

I am using JBoss 4.2.2.GA, so I have skipped the EJB Client Jar creation. I have a doubt, while deployment the container will implement the interfaces and stub for both home and remote interfaces (EJBObject class, EJBObject stub class, Home class and Home stub class)and it will be in jar file, which will be used by the client application.

As I am not creating the EJB Client jar, how the client will get the EJB client jar. Where can client/I find the ejb client jar?

Between, many thanks to Peter Johnson and Jaikiran pai for helping out to resolve the issue.
 
It means our mission is in jeapordy! Quick, read this tiny ad!
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic