don't know how to make public on web application in netbeans(visualWebPack
My netbeans(VisualWebPack) JSF application works fine in netbeans
but when I try to run it on a tomcat server(version 5.5.20) i'm getting the folowing error:
Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
Exception Details: java.lang.NullPointerException
null
Possible Source of Error:
Class Name: javax.faces.webapp.FacesServlet
File Name: FacesServlet.java
Method Name: init
Line Number: 165
Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
Stack Trace:
javax.faces.webapp.FacesServlet.init(FacesServlet.java:165)
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run( Unknown Source )
Are there any settings needed to be done to the tomcat server?
.....or to use a different version?
Ps: i'm putting the MyApplication.war file in the webapps directory of the installed tomcat server(I thought this one is needed)
# 1
I too have had the same problem and have tried every trick in the book, this solution work and makes sence for me.
If you wish to deploy to a server that is not the the bundled server, make sure that there are no spaces in the path to your source code or your tomcat server.
C:\Documents and settings\Fred Brooks\My Documents\MyApplication
Bad
C:\env\MyApplication
Good
C:\Program files\Appache Software Foundation\Tomcat 5.5\
Bad
C:\Tomcat55\
Good
this seemed to allow me to both deploy strait to the server from netbeans as well as using the tomcat admin web page to deploy the .war file.
I remember reading someware, or hearing someware that ant doesn't like spaces in file or directory names, in fact had a general dislike for spaces in general.
If you find this solution doesn't work try some of the following.
- set the <faces severlet> <load on startup> to false (0) in the project web.xml.
- copy the jars from your build web-inf / lib folder of your project to tomcat\server\lib
- removing the any content in the tomcat\temp folder
- copy the jars from your build web-inf / lib folder of your project to any folder
in tomcat that contains jars or you might think would like some (yes i know
im flayaling wildly at the problem here this is realy a last ditch effort)
these are some of the solutions i have found elseware on the internet, you have by now proberbley seen them and tried them yourself, they work sometimes apparently, but they seem a little random.
Hope this helps
Message was edited by:
JonPen
Message was edited by:
JonPen
Message was edited by:
JonPen
# 2
I found the solution!!! I let SUN correct the bug!
If you deploy a Netbeans war file in a tomcat 5.5 web server which installation folder name contains at least a space the deploy wont work!
If you deploy a Netbeans war file in a tomcat 5.5 web server which installation folder name contains no spaces the deploy will work!
The problem is the file tldCache.ser contained in this folder:
tomcat_installation_directory/work/Catalina/localhost/myWebApp
This file seems to be created only the first time myWebApp is deployed.
If you cant change the path of your tomcat installation follow these steps:
1) deploy your web application
2) If your application doesn't work locate folder netbeans-5.5\enterprise3\apache-tomcat-5.5.17\work\Catalina\localhost\myWebApp
3) Copy netbeans generated tldCache.ser to tomcat_installation_directory/work/Catalina/localhost/myWebApp
IT WORKS!!!!
Message was edited by:
fabio.biscaro