php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20608 phpsrvlt.jar without servlet.class
Submitted: 2002-11-24 07:05 UTC Modified: 2003-03-27 05:33 UTC
Votes:7
Avg. Score:4.7 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:6 (85.7%)
Same OS:6 (85.7%)
From: gusmail at gmx dot net Assigned:
Status: Closed Package: Servlet related
PHP Version: 4.2.3 OS: Win32
Private report: No CVE-ID: None
 [2002-11-24 07:05 UTC] gusmail at gmx dot net
The classes servlet.class and formatter.class are missing in phpsrvlt.jar of the Win32 binaries.

I assume this is because the failed during compilation.
The compile.log on 
http://ftp.proventum.net/pub/php/win32-snapshots/compile.log
shows this:

Performing Custom Build Step on .\servlet.java
formatter.java:23: Package javax.servlet not found in import.
import javax.servlet.*;
       ^
formatter.java:24: Package javax.servlet.http not found in import.
import javax.servlet.http.*;
       ^
servlet.java:26: Package javax.servlet not found in import.
import javax.servlet.*;
       ^
servlet.java:27: Package javax.servlet.http not found in import.
import javax.servlet.http.*;
       ^
servlet.java:31: Superclass net.php.HttpServlet of class net.php.servlet not found.
public class servlet extends HttpServlet {
                             ^
formatter.java:27: Class net.php.ServletException not found in class net.php.servlet.
  public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException {
              ^

Regards
  gus

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-01 02:37 UTC] schmuklers at attbi dot com
When building a batch file to fix this bug I found out that servlet.java requires the JDK 1.4.x version of 'URLEncoder.encode'. 

I have not seen that JDK 1.4.x is required.

Stuart

PS: I can not run JDK 1.4.x on my XP box, there is a bug.
So, I need a JDK 1.3.x version.
 [2002-12-01 02:41 UTC] schmuklers at attbi dot com
The same bug is in the new PHP 4.3.0RC2 binary and source releases.

Stuart
 [2002-12-31 16:34 UTC] pmiotti at ubicomp dot ch
PHP tomcat servlet integration (W2K): 
I compiled my own servlet.jar (including formatting.java, reflect.java, servlet.java) (J2SDKEE1.4). 
While running tomcat and querying http://localhost:8080/test.php I still got 
javax.servlet.ServletException: Error allocating a servlet instance
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:662)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
...
root cause 

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
	at java.lang.ClassLoader.findBootstrapClass(Native Method)
	at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:730)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:874)
... 

What instance (class) is missing?
 [2003-01-02 17:47 UTC] brady at dontspam_me_moritzdesigns dot com
I noticed the missing java libraries as well and retrieved the ones from cvs to use. now Im getting a problem with the JNI call to the servlet dll and it causes tomcat to crash. I did this same thing in the RC2 and it seemed to all work correctly, the full version bombs bad.
 [2003-01-02 17:50 UTC] brady at dontspam_me_moritzdesigns dot com
a little more detail- the DLL call failing is 'php_module_startup', perhaps the call is failing due to the error in the compile shown below. 

...
servlet.c
c:\php4build\snap\sapi\servlet\servlet.c(261) : warning C4047: 'function' : 'struct _zend_module_entry *' differs in levels of indirection from 'struct _zend_module_entry *[1]'
c:\php4build\snap\sapi\servlet\servlet.c(261) : warning C4024: 'php_module_startup' : different types for formal and actual parameter 2
Linking...
   Creating library ..\..\Release_TS/phpsrvlt.lib and object ..\..\Release_TS/phpsrvlt.exp

phpsrvlt.dll - 0 error(s), 2 warning(s)
 [2003-03-27 05:33 UTC] edink@php.net
This should be fixed now. Please check latest stable build from snaps.php.net in approx. 6 hours.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 01:01:25 2019 UTC