aspose file tools*
The moose likes JBoss/WildFly and the fly likes NullPointerException while establishing the JBOSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "NullPointerException while establishing the JBOSS" Watch "NullPointerException while establishing the JBOSS" New topic
Author

NullPointerException while establishing the JBOSS

vinoth subramaniam
Ranch Hand

Joined: Jul 05, 2008
Posts: 47
Hi all,
I am new to web development. Please spend some of your valuable time, to clear my problem.

1. I already installed eclipse in my system (ObjectWeb Lomboz for JavaEE DevelopmentVersion: 3.3)

2. Then i downloaded the jboss-4.2.3.GA.zip file from the www.jboss.org

3. I extracted the files and put it in to my ECLIPSE folder.

4. In the eclipse i added a new server --> jboss V4.2

5. Then i created a dynamic web project with some jsp

6. I added that project in to the server

7. When i tried to start the server, i am getting the following message

" Publishing Falied

Could Not publish to the server

java.lang.NullPointerException "

So, Please help me to configure the jboss in eclipse. What are the steps to be followed while configuring. Please help me, I already searched in the existing topics.

Thanks for your time and effort..!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

Wow, it has been ages since I used Lomboz. I have been working with JBoss Tools recently, so I might be able to help (no guarantees, though).

First: where, exactly, did you install JBossAS? Full path, please. (I hope that your step 3 did not mean what I think it does - I would not install JBossAS into the Eclipse directory.)

Second, when you configured the JBoss4.2 server entry in Eclipse, what were the settings that you used.

Third, after setting up the server, did you try running it without having any projects associated with it yet? If so, does it run?

Fourth, was there a stack trace provided with the null pointer exception? Could you post it. If none was shown to you, look in the workspace/.metadata/.log file - the full stack trace might be there.


JBoss In Action
vinoth subramaniam
Ranch Hand

Joined: Jul 05, 2008
Posts: 47
Hi Peter, thanks for your reply.

First: where, exactly, did you install JBossAS? Full path, please. (I hope that your step 3 did not mean what I think it does - I would not install JBossAS into the Eclipse directory.)



I didnt put the files in the eclipse foler

A.1. This is the Jboss full path D:/softwares/jboss-4.2.3.GA.
A.2. Eclipse is in C:\new software\eclipse




Second, when you configured the JBoss4.2 server entry in Eclipse, what were the settings that you used.



B.1. Windows --> preference --> server --> installed runtimes --> Add --> Jboss 4.2

B.2 in the New server Runtime window i choose,

JRE -->Default JRE (Another option is eclipse),

Application Server Directory --> D:/softwares/jboss-4.2.3.GA.


Third, after setting up the server, did you try running it without having any projects associated with it yet? If so, does it run?



C.1 YES i can run the Jboss without adding any projects.
C.2 I created an enterprise application project, i can run it without any proble.
C.3 But When i tried to run a dynamic web project, i am getting an alert message saying "Cuold Not publish to the server, Java.lang.NulpointerException "
C.4 But No stack trace messages in console




Fourth, was there a stack trace provided with the null pointer exception? Could you post it. If none was shown to you, look in the workspace/.metadata/.log file - the full stack trace might be there.



This is the Entry in the log file



What should i do?
vinoth subramaniam
Ranch Hand

Joined: Jul 05, 2008
Posts: 47
i am using jdk 1.6 version
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

Based on the stack trace, my guess is that the dynamic web project is not correctly configured, and thus cannot be deployed. I base this on the assumption that the URI it is attempting to get it the URI of the deploy directory.

But I have one other thought. I googled dynamic web project and in every case saw that Tomcat was used as the server. I have a hunch that Eclipse modifies the Tomcat configuration (or supplies extra configuration information) so that the web app runs from the WebContent directory within the project. With JBossAS, this would be problematic. Try using a Static Web Project (make a quick hello world project) and see if that works.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5837
    
    7

I created a dynamic web project, added a hello jsp, and ran it. Worked fine - no null pointer exceptions. In addition, the project was packaged into a WAR file and copied to the deploy directory, as expected. So having the project be a "dynamic web project" is not the problem.

The only other thing I can think of is that there is some incompatibility within Eclipse somewhere. I have found that if I get into such a situation, the only remedy is to reinstall Eclipse. You could either go with Eclipse 3.4 for Java EE Developers, or you could use Eclipse 3.3 for Java EE Developers and update it with JBoss Tools. (There is also a version of JBoss Tools for Eclipse 3.4, but it is a beta.) I used Eclipse 3.4 without JBoss Tools to test out the dynamic web project.
A Dadfa
Greenhorn

Joined: Nov 20, 2008
Posts: 1
I solve this error installing ganymede eclipse version, I hope this message help you. regards.
Himanshu bisht bebo
Greenhorn

Joined: Jun 12, 2012
Posts: 16
I also same problem and these works for me may be its help you.

There are few solution for this

1. you can try your application with eclipse another version may me updated version.
2. you can go eclipse help >software update and update your eclipse from there
3. or you can download jboss tool zip file from the jboss site unzip it .
it will cantain two folders features and plugin .Copy the files in these two folder to Your eclipse folders names features and plugin
than restart your eclpise and your jboss will work


all the best
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NullPointerException while establishing the JBOSS