Jump to content

Wrong URL Crashes Apache Tomcat


Interstella5555

Recommended Posts

I am having an issue with my Apache Tomcat server and PHP. Basically, if I have a project such as "http://localhost:8080/phpprojects/test/PhpProject1/index.php" that works, and I edit the path to be incorrect, such as "http://localhost:8080/phpprojects/wrongpath/PhpProject1/index.php" and try requesting that path, Tomcat goes down and the user gets a message saying:

 

type Exception report

 

message

 

description The server encountered an internal error () that prevented it from fulfilling this request.

 

exception

 

java.io.IOException:

net.php.servlet.send(Native Method)

net.php.servlet.service(servlet.java:190)

net.php.servlet.service(servlet.java:214)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

 

This only happens when it tries finding a resource that doesn't exist inside the root PHP project folder (the one with META-INF and WEB-INF). So if the typo is with "phpprojects" in the path, then the error message will simply be that the requested resource is not available and it will not crash the server.

 

If anyone has any idea of how to fix it or simply prevent apache from crashing, that would be great. Any input would be a great help. Thanks.

Link to comment
Share on other sites

Thanks for the response. I checked my stack trace and this is what I found.

 

Here is the full log for this exception:

Sep 2, 2009 9:36:08 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet php threw exception

java.io.IOException:

at net.php.servlet.send(Native Method)

at net.php.servlet.service(servlet.java:190)

at net.php.servlet.service(servlet.java:214)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)

at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)

at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)

at java.lang.Thread.run(Unknown Source)

SEVERE: Servlet.service() for servlet php threw exception

What would I have to do to prevent this exception from being thrown, or to have something handle this exception? Again, thanks for the reply.

Link to comment
Share on other sites

at net.php.servlet.send(Native Method)

 

 

Well, what happened was an exception was thrown during a call to what was probably an OS level function.

 

 

I've had that happen before in Java applications I've written when I haven't handled correctly checking if the end client has severed the connection.  (Lots of other things can cause it too though.)

 

 

Unfortunately I'm not much help though because to be honest, I have no idea how to fix it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.