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)

[2272 byte] By [stirbu_mariana] at [2007-11-26 22:22:30]
# 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

JonPena at 2007-7-10 11:21:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 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

fabio.biscaroa at 2007-7-10 11:21:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

I experienced the same problem.

Eliminating spaces from my CATALINA_HOME & CATALINA_BASE variables using FAT32 short names (c:\Progra~1\Apache~1\...) did not solve it, but both actually moving the home & base directories to c:\ then removing the app's work dir and redeploying worked. So did copying the tldCache.ser file from the NetBeans deployment. What is the tldCache.ser and why isn't it being generated correctly for paths with spaces in the name?

DerekPa at 2007-7-10 11:21:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

so is the bug, due to ant or is it tomcat not exploeding it properly, or does it not mater so long as it can be fixed, just curious.

As net beans keeps a local copy of tomcat and ant in it .netbeans folder so they ant or tomcat can reference each other using a relative path, this is proberbly why netbeans is able to compile the war correctly.

Message was edited by:

JonPen

Message was edited by:

JonPen

JonPena at 2007-7-10 11:21:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...