LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-31-2005, 02:51 AM   #1
r_debussy
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
Tomcat 5.5.7 War file deployment failure


Tomcat appears to be running faithfully by the evidence of its JSP examples.

I have Netbeans 4.1 which also uses Tomcat 5.5.7 as its testbed.

I start a new project on Netbeans that uses the JSP examples (from its repetoire of example JSP projects) and I build and run it with equal results.

Then I FTP that build TomcatJSPExample.war to the webapps directory, where Tomcat automatically constructs a TomcatJSPExample folder.

When I visit this folder with a browser, the html pages appear, exactly like those already in the tomcat distribution.

However, when I choose ANY JSP to execute, Tomcat throws an exception:
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause

java.io.FileNotFoundException: /opt/jakarta-tomcat-5.5.7/work/Catalina/localhost/TomcatJSPExample/org/apache/jsp/jsp2/el/implicit_002dobjects_jsp.java
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.<init>(FileOutputStream.java:179)
java.io.FileOutputStream.<init>(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:131)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

When I visit /opt/jakarta-tomcat-5.5.7/work/Catalina/localhost/TomcatJSPExample/
there is only one entry:
tldCache.ser
in contrast to where in the Netbeans /work/Catalina...
There are compiled class files (in a larger directory tree) for those pages I had visited in the Netbeans run project session.

Tomcat seems to even resist a simple Hello World JSP deployment with the same exception cast (with an obviously different filename).
 
Old 05-31-2005, 04:01 AM   #2
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
check your classpath...

if on linux...
echo $CLASSPATH..

and it should have the following paths (taking for granted CATALINA_HOME=/somepath/to/jakarta)
#> export CLASSPATH=$CLASSPATH;$CATALINA_HOME/server/lib:$CATALINA_HOME/common/lib:$CATALINA_HOME/shared/lib


offcourse restart the tomcat...
and preserve the above in .bash_profile ...
 
Old 06-01-2005, 07:58 PM   #3
r_debussy
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanx,

But careful maintenance of pathings, stored in /etc/profiles.local (per SuSe) such as:
JAVA_HOME=/opt/j2sdk1.4.2_07
export JAVA_HOME
CATALINA_HOME=/opt/jakarta-tomcat-5.5.7
export CATALINA_HOME
CLASSPATH=/opt/jakarta-tomcat-5.5.7/server/lib:/opt/jakarta-tomcat-5.5.7/common/lib:/opt/jakarta-tomcat-5.5.7/shared/lib
export CLASSPATH
PATH=$PATH:/opt/jakarta-tomcat-5.5.7/bin
export PATH

does not seem to resolve the original error. Even though this profile seems to be tied to my account as root, I cannot find useful documentation for its application in a dedicated server that establishes these environmental settins from boot. Needless to say, when they are established at my SSH logon, nothing improves from the original complaint.

Another oddity is that variable expansions, like when I invoke
linux:/opt/jakarta-tomcat-5.5.7/bin # ./shutdown.sh

another exception is cast:

Using CATALINA_BASE: /opt/jakarta-tomcat-5.5.7
Using CATALINA_HOME: /opt/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.5.7/temp
Using JRE_HOME: /opt/j2sdk1.4.2_07
Jun 1, 2005 4:51:35 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:320)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:411)
 
Old 06-02-2005, 12:29 AM   #4
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
The error you are reporting could be that the tomcat is not starting properly...
post the output from catalina.out, when you try to start the server. Also check the status after some time if tomcat is running...
 
Old 06-02-2005, 02:45 AM   #5
r_debussy
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanx,

The file dump is quite copious. 83KB of class loading announcements (not reported here) from a 0 byte file at reboot through:

Jun 1, 2005 10:40:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 1, 2005 10:40:45 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 6687 ms
...
Jun 1, 2005 10:40:46 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
...
Jun 1, 2005 10:40:46 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
...
Jun 1, 2005 10:40:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 1, 2005 10:40:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
...
Jun 1, 2005 10:40:54 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
...
Jun 1, 2005 10:40:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 1, 2005 10:40:55 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
...
Jun 1, 2005 10:40:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 1, 2005 10:40:55 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
...
Jun 1, 2005 10:40:56 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
...
Jun 1, 2005 10:40:57 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
...
Jun 1, 2005 10:40:57 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/310 config=null
...
Jun 1, 2005 10:40:57 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
...
Jun 1, 2005 10:40:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 12553 ms

Following some several minutes, and an attempt to execute the Netbeans TomcatJSPExample.war sample:

java.io.FileNotFoundException: /opt/jakarta-tomcat-5.5.7/work/Catalina/localhost/TomcatJSPExample/org/apache/jsp/jsp2/tagfiles/hello_jsp.java
at java.io.FileOutputStream.open(Native Method)
and blah, blah, blah as before...
[Loaded org.apache.jasper.compiler.Localizer]
Jun 1, 2005 10:42:50 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.io.FileNotFoundException: /opt/jakarta-tomcat-5.5.7/work/Catalina/localhost/TomcatJSPExample/org/apache/jsp/jsp2/tagfiles/hello_jsp.java
at java.io.FileOutputStream.open(Native Method)
and blah, blah, blah as before...

**** I would point out again, that Tomcat is faithfully executing its sample JSPs that are part of its distribution ****

No doubt this is a very simple problem....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network file deployment. unreal128 Linux - Software 2 09-10-2005 03:58 PM
Tomcat - Web App Deployment JohnCotter Linux - Networking 2 11-09-2003 07:27 AM
Using Tomcat to run a .jar file davee Linux - Software 1 08-15-2003 05:47 AM
war has begun, why does US want a war? doublefailure General 200 03-28-2003 11:43 AM
shell file with tomcat Mikoreli Linux - General 3 07-16-2001 02:13 PM


All times are GMT -5. The time now is 07:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration