|
From: <php...@li...> - 2009-11-18 17:23:56
|
Hello, I came across a class loading issue which I have been able to reproduce with a small example (see attachment). It seems the __autoload function in php 5.X does not seem to be invokedwhenever a class has not been loaded. In turn, it causes a lot of"Class 'XX' not Found" exceptions in our test application. The example has been run against: tomcat 6.0.X (classes failed to load) glassfish 2.1.X (classes failed to load) apache 2.2.X (classes loaded as expected) The following is the test environment setup: Apache: v2.2.12 PHP: v5.2.10 Tomcat: 6.0.20 Glassfish: v2.1 (9.1.1) (build b60e-fcs) Using your release: JavaBridgeTemplate554.war The example follows a minimal directory staging as of our application, and it was tested as follows: mkdir stage cp <attachement_home>loader_test.tar stage/ cp <java_bridge_home>JavaBridgeTemplate554.war stage/ cd stage/ mkdir extract/ cd extract/ jar xvf ../JavaBridgeTemplate554.war tar xvf ../loader_test.tar jar cvf loader.war * Deploy the loader.war onto Tomcat/Glassfish and access the server URL (ex. http://<server>:<port>/loader) if the classes loaded successfully there should be a couple of hello message from 2 different classes (Base & Level1). If the classes did not load successfully, then a message indicating the fact for each class is displayed. I searched your site to find anyone having similar problems, but wasnot able to find any. I also checked your FAQ's and there was nomention of __autoload. Hope this info helps. Thanks for your time, G |