Apache Tomcat 4 error - cant fine a servlet
Hi,
I have a web.xml file that defines classes and url patterns fine. For some reason though, which I cant work out, even when I add the following to web.xml, Tomcat says it cant find the requested resourse.
http://localhost:8080/servlet/SimpleShoppingBasket
<servlet>
<servlet-name>SimpleShoppingBasket</servlet-name>
<servlet-class>SimpleShoppingBasket</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SimpleShoppingBasket</servlet-name>
<url-pattern>/servlet/SimpleShoppingBasket</url-pattern>
</servlet-mapping>
The error displayed is:
HTTP Status 404 - /servlet/SimpleShoppingBasket
type Status report
message /servlet/SimpleShoppingBasket
description The requested resource (/servlet/SimpleShoppingBasket) is not available.
Apache Tomcat/5.5.17
Every other servlet I have runs fine except this one. I have checked the spelling of the class and it is correct. I am nearing my wits end!
Please help! What could be wrong? Is there a cache that I can delete somewhere maybe?
Try putting the servlet class into a package. There could be access problems with it being in the "unnamed" package
Check the tomcat logs for any errors that servlet may be creating ([TOMCAT]/logs directory)
Also is your web app installed in the ROOT directory or in its own context?
If in its own context then the url would be http://localhost:8080/mycontext/servlet/SimpleShoppingBasket
What do the other (working) servlet definitions look like?
How are they different from this one?
Similar Messages
-
HTTP Status 500 Apache/Tomcat error
Hi !
I'm having trouble getting my Java Plumtree Portal (5.02) to work correctly due to Apache/Tomcat HTTP Status 500 errors that come up when I try to perform certain actions on Content Server objects (PCS v 5.0.2).
E.g., when I try to preview the 'Main Page' content item from a Content Server Portlet based on a Communauty Directory Portlet Template in Content Server Explorer, I get the following statement :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536)
root cause
javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536) at org.apache.jsp.navigate_jsp._jspService(navigate_jsp.java:226) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536)
Apache Tomcat/4.1.27-LE-jdk14
And when I try to "Create a folder" on the front part of a Communauty Directory Content Portlet I have added to a communauty page, I get the following :
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this
request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error: [javac] Compiling 1 source file
The system is out of resources.Consult the following stack trace for details.java.lang.OutOfMemoryError
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
ava:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.jav
a:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536)
I understand the problem seems to come from Jasper, the jsp engine used by Tomcat and that some jsp files seem to never be found...
I know that two jar files might be the source of this problem (not existing in a particular directory, or not being refered in a classpath) : "jasper-compiler.jar" and "jasper-runtime.jar"
I've tried to add these to the CLASSPATH environment variable but it didn't work.
I've tried to resolve by copying jasper-runtime.jar and jasper-compile to \jakarta-tomcat-4.1.27-LE-j2sdk1.4.1_05\j2sdk1.4.1_05\lib directory but didn't work either.
Moreover I don't understand because some errors seem to never come up again after having uninstalled the Tomcat Service (we created a special Tomcat Service installation script to launch Tomcat with an added -Djava.endorsed.dirs option to enable the XML Source Portlet to run correctly) and reinstalled another one with the default installation script (the same script but without the -Djava.endorsed.dirs option) This might be because the process calling the jsp files and compiling them to java files, which are then compiled to class files, only happens when the portal needs to request a particular jsp. So it might be that some files would have allready been compiled with Tomcat (based on the original installation script) running and it is only when the portal tries to reach class files that would never have been compiled because never been requested that the error statement comes up...
Thanks for those who couragesly read this entire Topic.
I deeply thank those who would have encoutered a similar problem or would know a possible solution and could give me a clue. I'm statring to get desperate...
Sebastien, Groupe i3m, France.The exception is throwing when u r trying to convert null value into integer/float or double..
Check for this -
Apache Tomcat error re: port 8080
Hello.
Our environment:
RoboHelp Server 8.0
Apache Tomcat 6.0.26
Windows Server 2008 enterprise without Hyper-V SP2 (32-bit virtual machine)
RoboHelp 8.0.2.208
Our help system is periodically non-responsive. The Apache logs (extract below) indicate that there is an application using port 8080. We (my IT support and I) discovered that RDP (Windows Remote Desktop) had been changed from port 3389 (its default) to port 8080. The server is dedicated to our help system; there isn't anyone touching it so we were a bit confused. We reset the RDP port back to 3389 and restarted the server (full server restart) and everything worked as it should. A couple of days later...the same thing...and then a few times in one day. Research indicates there may be some Windows or Apache bug related to ports being reset to 8080, but not a lot of detail or suggestion for resolution or work around.
Has anyone experienced this port issue?
I am not familiar with Apache...is there another port that it can use and still run the RoboServer?
Any thoughts or suggestions re: how to proceed?
TIA,
Michelle
From Catalina log:
Sep 13, 2010 9:42:34 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\W indows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
Sep 13, 2010 9:42:34 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind <null>:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFac tory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
... 12 more
Sep 13, 2010 9:42:34 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 13, 2010 9:42:34 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 606 ms
Sep 13, 2010 9:42:34 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 13, 2010 9:42:34 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26The default port with RH Server is 8080 as this is the standard port for all web services. Having said that, I suspect you can change the port to another. I've never used anything other than the default. it sounds like if you have another web services accessing the same port that either it or RH Server needs to be changed.
The RoboColum(n)
@robocolumn
Colum McAndrew -
Apache Tomcat error report when trying to link to websites from Talk Talk webmail
Using Talk Talk webmail, can't access web links from there, but get error report. Status 404. Apache Tomcat 5.5.27.
Unfortunately cannot read rest of forum, due to an error on your page, but presume others have had this problem, both on IE and Mozilla. I only had a result by forwarding the offending email and its ("greyed out Apache Tomcat") attachment to my other email address (Hotmail) and was able to read it there.
Just WHAT is going on with TalkTalk??? -
Apache Tomcat error on common services (Device Update)
I have installed lms 3.2 on server 2008 , and when I click on device update in software center I recieve an error
which I inserted down here ;
I have to mention that I also have installed Common services patch .
please some one help me this out .
which IHi,
Kindly check if you have CSCtj20850-0.info at location CSCOpx\setup\patch
Try this workaround too as it look like rme map files got corrupted :-
Navigate to -->
CSCOpx/www/classpath/com/cisco/nm/xms/psu/maps
Backup these two files (rme*.map) at another location and finally delete them from this location. You need to stop the daemon manager to be able to delete this files with the command net stop crmdmgtd.
Now, run the following command two command, rememer they are one line command :-
1>
set NMSROOT=%CWMIBDIR%\..\..\..
2>
%NMSROOT%\lib\jre\bin\java -classpath %NMSROOT%\lib\jre\lib;%NMSROOT%\lib\classpath;%NMSROOT%\objects\log4j\1.1.3\log4j.jar;%NMSROOT%\MDC\tomcat\shared\lib\MICE.jar;%NMSROOT%\MDC\tomcat\shared\lib\NATIVE.jar;%NMSROOT%\MDC\tomcat\shared\lib\jdom.jar;%NMSROOT%\www\classpath;%NMSROOT%\lib\classpath\servlet.jar;%NMSROOT%\MDC\tomcat\webapps\cwhp\WEB-INF\classes com.cisco.nm.xms.psu.packagemgmt.map.CreateMaps %NMSROOT%\www\classpath\com\cisco\nm\xms\psu\pkgs\rme
The above workaround should generate the rme*.map files again and then it should work fine.
Now, start the daemon manager and wait for 20 minutes before logging back to CiscoWorks.
Note :- Its important to backup (rme*.map) before deleting them.
Many Thanks,
Gaganjeet Singh -
Apache Tomcat/4.0.6 - HTTP Status 500 Help!!!
When I requst a simple jsp page, I got error:
(I have set my env as:
----CLASSPATH as C:\Program Files\Apache Tomcat 4.0\common\lib\servlet.jar;C:\j2sdk1.4.2_01\lib\tools.jar;C:\j2sdk1.4.2_01\lib\dt.jar
----JAVA_HOME as C:\j2sdk1.4.2_01
----path as C:\j2sdk1.4.2_01\bin;c:\JBuilder4\jdk1.3
Is it something wrong?
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSPerror: Invalid class file format in C:\j2sdk1.4.2_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\test\jsp\check$jsp.java:0: Class java.lang.Object not found in class javax.servlet.GenericServlet.
package org.apache.jsp;
^
2 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)Why nobody reply????? Because noone cares.
At a guess, you have upgraded from a previous version of java?
And you installed Tomcat with the previous version?
Check which version of Java the Tomcat engine is actually using:
System.getProperty("java.version")
Probably it still has some remnants of 1.3 around that it is using.
Just a guess... -
Apache Tomcat 7.0.4 can't recognize the classpath for .jar files
Hiii Everybody,
I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: jxl/Workbook
CopyExcel.copy(CopyExcel.java:39)
CopyExcel.copyMain(CopyExcel.java:81)
ServicePage.processRequest(ServicePage.java:28)
ServicePage.doPost(ServicePage.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: jxl.Workbook
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
CopyExcel.copy(CopyExcel.java:39)
CopyExcel.copyMain(CopyExcel.java:81)
ServicePage.processRequest(ServicePage.java:28)
ServicePage.doPost(ServicePage.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
--------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
* To change this template, choose Tools | Templates
* and open the template in the editor.
* @author Administrator
* To change this template, choose Tools | Templates
* and open the template in the editor.
import java.io.File;
import java.io.IOException;
import jxl.Cell;
//import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import jxl.write.WritableWorkbook;
public class CopyExcel {
private String inputFile;
public void setInputFile(String inputFile) {
this.inputFile = inputFile;
public void copy() throws IOException {
File inputWorkbook = new File(inputFile);
Workbook w;
try{
System.out.println("Before w= Workbook.getWorkbook(inputWorkbook); ");
w= Workbook.getWorkbook(inputWorkbook);
System.out.println("After w= Workbook.getWorkbook(inputWorkbook); ");
WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
copy.write();
copy.close();
}catch(Exception e){}
/* try {
w = Workbook.getWorkbook(inputWorkbook);
// Get the first sheet
Sheet sheet = w.getSheet(0);
// Loop over first 10 column and lines
for (int i = 1; i < 6; i++) {
Cell cell = sheet.getCell(0, i);
//CellType type = cell.getType();
//if (cell.getType() == CellType.LABEL) {
//System.out.println("I got a label "
// + cell.getContents());
//if (cell.getType() == CellType.NUMBER) {
//System.out.println("I got a number "
//+ cell.getContents());
System.out.println(cell.getContents());
} catch (BiffException e) {
e.printStackTrace();
public static String copyMain(String args) throws IOException {
String str=args;
CopyExcel test = new CopyExcel();
test.setInputFile(args);
test.copy();
return "Success";
}I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses thi..........But the problem remained...........
Plz. help me.
Thank u in advance for any help.Hiii Everybody,
I have a weird problem. I am trying to develop a simple application where I am trying to pass an excel file name as an argument to a method and the method creates a copy of the specified file. I have used jxl.jar for excel file manipulation. During this I have faced two problems.......
1) I tried to compile the file CopyExcel.java in the command prompt(windows), sometimes the file is not compiled and the error shown indicates that it can't recognize the package jxl. But if I close the command prompt window and open it again.... I could compile the CopyExcel.java succesfully with no error.
2) Even if I have compiled the CopyExcell.java file successfully, whenever I am tryiyng to call a method copyMain() inside it, browser shows....
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: jxl/Workbook
CopyExcel.copy(CopyExcel.java:39)
CopyExcel.copyMain(CopyExcel.java:81)
ServicePage.processRequest(ServicePage.java:28)
ServicePage.doPost(ServicePage.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.ClassNotFoundException: jxl.Workbook
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1672)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1517)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
CopyExcel.copy(CopyExcel.java:39)
CopyExcel.copyMain(CopyExcel.java:81)
ServicePage.processRequest(ServicePage.java:28)
ServicePage.doPost(ServicePage.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
--------------------------------------------------------------------------------The code for CopyExcel.java is as folows.............
* To change this template, choose Tools | Templates
* and open the template in the editor.
* @author Administrator
* To change this template, choose Tools | Templates
* and open the template in the editor.
import java.io.File;
import java.io.IOException;
import jxl.Cell;
//import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import jxl.write.WritableWorkbook;
public class CopyExcel {
private String inputFile;
public void setInputFile(String inputFile) {
this.inputFile = inputFile;
public void copy() throws IOException {
File inputWorkbook = new File(inputFile);
Workbook w;
try{
System.out.println("Before w= Workbook.getWorkbook(inputWorkbook); ");
w= Workbook.getWorkbook(inputWorkbook);
System.out.println("After w= Workbook.getWorkbook(inputWorkbook); ");
WritableWorkbook copy=Workbook.createWorkbook(new File("CopyPan.xls"), w);
copy.write();
copy.close();
}catch(Exception e){}
/* try {
w = Workbook.getWorkbook(inputWorkbook);
// Get the first sheet
Sheet sheet = w.getSheet(0);
// Loop over first 10 column and lines
for (int i = 1; i < 6; i++) {
Cell cell = sheet.getCell(0, i);
//CellType type = cell.getType();
//if (cell.getType() == CellType.LABEL) {
//System.out.println("I got a label "
// + cell.getContents());
//if (cell.getType() == CellType.NUMBER) {
//System.out.println("I got a number "
//+ cell.getContents());
System.out.println(cell.getContents());
} catch (BiffException e) {
e.printStackTrace();
public static String copyMain(String args) throws IOException {
String str=args;
CopyExcel test = new CopyExcel();
test.setInputFile(args);
test.copy();
return "Success";
}I have set the "CLASSPATH" environment variables in "user variables for administrator" as follows,
.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar Also I have tried editing the startup MS-dos batch file as folows....
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
set CLASSPATH=.;%SYSTEM%;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\bin;C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.4\lib\servlet-api.jar;C:\Program Files\Java\jdk1.6.0_11\lib\jxl-2.6.jar
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses thi..........But the problem remained...........
Plz. help me.
Thank u in advance for any help. -
Problem accessing exception object in jsp error page - Apache Tomcat 5.0.25
Hi all,
I'm thoroughly confused and need some help. I've deployed a very simple web application in Apache Tomcat 5.0.25 to test exception handling - errortest.jsp and error.jsp. errortest.jsp throws a divide by zero exception if executed with default values in text fields.
When I put the directive IsErrorPage="true" in error.jsp i get a HTTP 500 error when error.jsp is accessed. If I remove it error.jsp is displayed but I cant access the exception object - if I try to I get an exception below:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 5 in the jsp file: /error.jsp
Generated servlet error:
[javac] Compiling 1 source file
E:\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\mywebapp\org\apache\jsp\error_jsp.java:46: cannot resolve symbol
symbol : variable exception
location: class org.apache.jsp.error_jsp
out.print(exception.getMessage());
^
1 error
Below is the code for the two jsp pages:
errortest.jsp:
<%@ page errorPage="error.jsp" %>
<html>
<head><title>Error test</title></head>
<body>
<form action="errortest.jsp" method="post">
Enter first number:<input type="text" name="first" value="5"/><br>
Enter second number:<input type="text" name="second" value="0"/><br>
<input type="submit"/>
</form>
<%
if (request.getMethod().equals("POST")) {
int first = Integer.parseInt( request.getParameter( "first" ) );
int second = Integer.parseInt( request.getParameter( "second" ) );
int answer = first/second;
%>
</body>
</html>
NB: I am able to catch and display the exception if I use a try/catch block around the division as shown below.
try {
int answer = first/second;
} catch( Exception e) {
e.printStackTrace( new PrintWriter(out) );
error.jsp (first draft)
NB: HTTP 500 error occurs when directive "isErrorPage" is added:
<%@ page isErrorPage="true" %>
<html>
<head><title>Error Page</title></head>
<body>
</body>
</html>
error.jsp (second draft)
NB: directive is removed but exception thrown when implicit exception object is accessed. error.jsp displays if exception object is not accessed:
<%@ page %>
<html>
<head><title>Error Page</title></head>
<body>
<%=exception.getMessage()%>
</body>
</html>
Web server specs:
Apache Tomcat 5.0.25
Machine specs:
Windows XP Pro
Java environments:
j2sdk1.4.2_03
J2EE 1.4This works for me:
throwError.jsp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" errorPage="/error.jsp"
contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>Throw Exception</title>
</head>
<body>
Throwing exception....
<%
// throw ArithmeticException
int badInt = 12/0;
%>
</body>
</html>
error.jsp
<%@ page language="java" isErrorPage="true" %>
<head><title>Doh!</title></head>
An Error has occurred in this application.
<% if (exception != null) { %>
<pre><% exception.printStackTrace(new java.io.PrintWriter(out)); %></pre>
<% } else { %>
Please check your log files for further information.
<% } %> -
I don't understand the following error on apache tomcat
Good afternoon!
I am using tomcat 6.0.13.When i try to perform my servlet, the following exception is gone off :
exception
javax.servlet.ServletException: Error allocating a servlet instance
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NoClassDefFoundError: mypackage/Transportadora (wrong name: Transportadora)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:595)
Would be this a problem in the definition of the class?
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Transportadora </display-name>
<description>
Projeto Transportadora
</description>
<servlet>
<servlet-name>Transportadora</servlet-name>
<servlet-class>mypackage.Transportadora</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Transportadora</servlet-name>
<url-pattern>/transp</url-pattern>
</servlet-mapping>
</web-app>
A great one I hug and grateful for the attention!
Message was edited by:
tarssa
Message was edited by:
tarssa
Message was edited by:
tarssajava.lang.NoClassDefFoundError: mypackage/Transportadora (wrong name: Transportadora) You need to make sure all your classes are in the classpath and/or you need to make sure you're calling the class by its correct name.
-
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error
Can someone give my a hand with this problem because the unix administrator of my website don't know how to fixes.
When I try to run a servlet name SimpleServer or other servlet from my website I received the following error:
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/SimpleServlet
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:484)
root cause
java.lang.ClassFormatError: SimpleServlet (Illegal constant pool type)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1643)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:937)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1372)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:867)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:400)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:484)
Thanks in advance,
JoseHi,
ClassFormatError is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
So check whether you have properly configured servlet and whether class file is VALID and is in right place or not.
Sandesh -
Servlet mapping with Apache + Tomcat
I'm trying to set up my servlet with apache + Tomcat(3.2.3), and i'm using mod_jk as the Tomcat-Apache plug-in.
The HelloWorld servlet that comes with the examples app worked fine at: http://localhost/examples/servlet/HelloWorldExample,
but how do I change the configurations, so that it can be invoked at:
http://localhost/examples/HelloWorldExample ?
It appears to me that '/servlet/' is the default prefix for Tomcat's RequestInterceptor, there is no way to get around that.
Any insights will be greatly appreciated, thanks!
Elainehi
Try this:
add below code in web.xml file in examples/WEB-INF
F directory
<servlet-mapping>
<servlet-name>
HelloWorldExample
</servlet-name>
<url-pattern>
/HelloWorldExample
</url-pattern>
</servlet-mapping>
Thanks for the reply, the web.xml is already set up this way, in fact, I'm able to invoke the servlet through tomcat(running on port 8080): http://localhost:8080/examples/HelloWorldExample,
tomcat reads the web.xml without any problems.
The problem comes from Apache(port 80), http://localhost:80/examples/HelloWorldExample wouldn't work, only http://localhost:80/examples/servlet/HelloWorldExample works.
It appears to me that when requests are relayed from Apache to tomcat, you need to tell tomcat that you intend to invoke a servlet by prefixing '/servlet/', if you look in the server.xml, it has
<RequestInterceptor
className="org.apache.tomcat.request.InvokerInterceptor"
debug="0" prefix="/servlet/" />
I've tried to change this to something else, it didn't seem to make any difference. -
Apache Tomcat goes down on starting Java application, Oracle error
Hello all
I am running a Java application on Apache Tomcat 5.5. I use Oracle 10g Express Edition as the back-end for my application. I deploy my application using theTomcat manager and it works fine.
However, when I try to access the home page of the application, my Tomcat server goes down. The stdout logs of Apache Tomcat display the following message:
Exception message: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified.
What could the possible reasons be for this to happen? And how can I workaround or fix this?
Thanks
SwethaThis looks like a problem that XE has with some recently altered locales, i.e. Russian. You can work around the problem by making sure that the Java locale (Locale.setDefault()) is supported by XE before the JDBC connect call. For example, use Locale.setDefault( Locale.US ). After connect, you may explicitly set session NLS parameters using ALTER SESSION. You can also restore the Java locale.
-- Sergiusz -
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
Hi all,
I am using JBulider 8.0 and developing a web application in JSP and Access. When I run the application, i get the following error while going from an HTML page to a JSP page:
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Errortype Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:394)
at java.lang.Integer.parseInt(Integer.java:476)
at org.apache.jsp.addJob$jsp._jspService(addJob$jsp.java:150)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
Can anyone tell me what can possibly be wrong? Reply quickly as deadline of my project is not far away :(
Regards,The exception is throwing when u r trying to convert null value into integer/float or double..
Check for this -
Apache Tomcat/4.1.30-LE-jdk14 error in version 5.5
I have been using FuegoBPM Studio 5.5 for the past 18 months. All my projects have worked as expected until now. For whatever reason, I can no longer launch the Work Portal from Studio. I have been getting the error:
"HTTP Status 404 - /testProcess
type Status report
message /testProcess
description The requested resource (/testProcess) is not available.
Apache Tomcat/4.1.30-LE-jdk14"
"Tomcat error: 'ContextConfig[CustomerSetup] Exception processing JAR at resource path /WEB-INF/lib/fuegoblock-web-net.jar
javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/fuegoblock-web-net.jar at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868"
"----- Root Cause -----
java.util.zip.ZipException: The process cannot access the file because it is being used by another process
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:111)
at java.util.jar.JarFile.<init>(JarFile.java:127)"
I am not sure what's causing the problem.
Please help!
Thanks,
Edited by gman at 07/01/2008 1:45 PMI am providing the info below..just to add to your knowledge.
You can also administer your Tomcat using the URL
http://localhost:8080/admin
Here you will be prompted for a username and password.
To have the right to administer cd to %CATALINA_HOME%\conf
Look for tomcat-user.xml file.
Modify it as below:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<role rolename="user"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat,admin"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
</tomcat-users>
After doing that. Restart tomcat.
Your user name is :tomcat
password :tomcat (from line 7 in the file above)
Now u can administer your server without having to worry about tweaking your server.xml file.
The interface allows an easy to use mechanism for you to administer your server and it is more enjoyable than digging the server.xml file.
And ..any luck so far with the soution to your problem? -
Error with JSP, Apache Tomcat and SQL
Hi,
I was trying to do some user suthentication script.
This was my code..
<html>
<body>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.util.*" %>
<%
String Username1 = "";
String Password1 = "";
String Username2 = "";
String Password2 = "";
String qry = "";
Username2 = request.getParameter("uname");
Password2 = request.getParameter("pass");
qry = "select * from tbl_Users where Username="+Username2;
ResultSet Rs;
PreparedStatement pstmt=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:BankDSN");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from tbl_Users");
while (rs.next())
Username1 = rs.getString("Username");
Password1 = rs.getString("Password");
if (Password1 == Password2)
response.sendRedirect("home.jsp");
else
response.sendRedirect("sorry.jsp");
rs.close();
stmt.close();
con.close();
%>
</table>
</body>
</html>
When I tried to invoke the JSP page, I got the following error
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
java.lang.IllegalStateException
at org.apache.catalina.connector.HttpResponseFacade.sendRedirect(HttpResponseFacade.java:173)
at org.apache.jsp.validate$jsp._jspService(validate$jsp.java:99)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:595)
Any help would be appreciated.....
Regards,
RamprasadDear vraptor,
I had seen ur jsp page , can i tell u one thing , never write a connection in the jsp page, why becoz the code can be seen.
ok here the problem is ur getting the username and password and putting an if condition inside the while loop so this throws an error.
anyway ur getting the values like
while (rs.next())
Username1 = rs.getString("Username");
Password1 = rs.getString("Password");
now the username and password are already retrived from server side, just do the check now outside the loop.
if (Password1 == Password2)
response.sendRedirect("home.jsp");
else
response.sendRedirect("sorry.jsp");
one more thing is check whether the page forwarding to correct page like response.sendRedirect("home.jsp");
see for the "/<directory Name>"/home.jsp if u keep all the jsp at one directory.
i mean this response.sendRedirect("/jspdirectory/home.jsp");
try this
regards
haribabu
Maybe you are looking for
-
Macbook pro 13 doesn't turn on
I have a macbook pro 13, 2 weeks old. I was working with it while plugged in to the power cord then I turned it off and kept the battery charging. After the battery was almost fully charged I unplugged it and when I tried to turn it on I see the powe
-
Dear All I having a problem in posting MBRL. While posting 122 Movement through MBRL for Doc. No 5002810451 the system gives following ERROR message Inconsistency between a document field and the prof. segment number Message no. KE396 Can u anyb
-
Flashing Question Mark Folder Everything I Am Trying is Not Working!
A few days ago my iMac gave me the "pinwheel of death" so I cold shutdown and rebooted. I heard the chime and then I got this flashing folder with a question mark on it. I quickly jumped on my Macbook pro and researched what it meant. I tried booting
-
hello friends!! I have iprotect pro and I can't remember my password.I forgotten it ! can you help me?
-
hi all, i am using dbconnectionbroker from the site http://www.javaexchange.com/ it works very fine but i have one issue i want to connect db with 2 different users. how in this class i can keep 2 different users connection or connection with 2 diffe