|
From: <php...@li...> - 2009-04-02 15:13:10
|
Hi, please take a look at the exception again. It is a NoSuchProcedureException, not a NoSuchMethodException. This means that a Java procedure with that name doesnt exist. The other failure is caused by a missing context listener class from some other web app. Regards, Jost Boekemeier Apr 2, 2009 4:43 nachm. schrieb am < php...@li...>: Hi Jost, Thank you for the swift reply. Both apache and tomcat servers are definitely up and running, I'm actually running it on my local machine. I have checked my tomcat server.xml config file and it seems as tho I'm not using AJP at all. That section is commented out. I did try to telnet to the webserver and it was accepting empty PUT commands for the resource /HelloWorldWebApp/ , but not for the .phpjavabridge resource. For this I code the status code 403. That's when I remembered I didn't put the servlet definitions in my web.xml. So I changed my web.xml to look like; <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="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"> <display-name>HelloWorldWebApp</display-name> <!-- PHP Servlet: back-end for Apache or IIS --> <servlet> <servlet-name>PhpJavaServlet</servlet-name> <servlet-class>php.java.servlet.PhpJavaServlet</servlet-class> <!-- Allow non-local PHP clients. Default is Off. --> <!-- Leave this off if your server is connected to the internet. --> <!-- <init-param> <param-name>promiscuous</param-name> <param-value>On</param-value> </init-param> --> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>PhpJavaServlet</servlet-name> <url-pattern>*.phpjavabridge</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app> However in my catalina.out log file I get the following error on startup; ERROR - Exception sending context initialized event to listener instance of class php.java.servlet.ContextLoaderListener java.lang.NoClassDefFoundError: javax/script/ScriptException Even with this however I can get JVM system info from my php scripts; $SystemClazz = Java("java.lang.System"); echo $SystemClazz->getProperties(); But calling my own defined classes I get the following error; Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[c:HelloWorld]]->getMessage. Cause: php.java.bridge.NoSuchProcedureException: static getMessage() The method and class are definitely there, contained in the WEB-INF/classes directory of my webapp. One last thing. Looking at the javabridge template I also added the following to my web.xml; <!-- support for J2EE cluster --> <distributable/> <!-- Override the define ("JAVA_HOSTS", "127.0.0.1:8080"); --> <!-- setting from your PHP script, Config.inc or Java.inc or --> <!-- JavaProxy.php, so that PHP connects back to the current VM. --> <context-param> <param-name>override_hosts</param-name> <param-value>On</param-value> </context-param> <!-- Attach the JSR223 script factory to the servlet context --> <listener> <listener-class>php.java.servlet.ContextLoaderListener</listener-class> </listener> However when I do this, the application simply fails to load and I cannot even retrieve system info. I get the following error message; [2009-04-02 15:05:59,978] ERROR - Error listenerStart [2009-04-02 15:05:59,978] ERROR - Context [/JavaBridge] startup failed due to previous errors [2009-04-02 15:05:59,979] ERROR - Exception sending context destroyed event to listener instance of class php.java.servlet.ContextLoaderListener java.lang.NoClassDefFoundError: javax/script/ScriptException ... Incidentally when I attempt to simply place the JavaBridgeTemplate.war into my webapps directory I have the same issue. Any ideas? I am running tomcat 5.5.25. Thank You On 2/4/09 13:03, "php...@li..." <php...@li...> wrote: > Hi, > > the php-servlet.jar is missing in t... > ***** This Email has been scanned for Viruses and SPAM by Blackspider > Mailcontrol. ***** > Click > https://www.mailcontrol.com/sr/7WmkR8Jsg7XTndxI!oX7UpRUG+IHZ5e6oz7AiS!Lx!8sRuw > rsLuNdtdxow7SW0jL2j!a2kADeZ62eN6FcXjHgg== to report this email as spam. -- Jaz Chana Integration Specialist Lean Practitioner Direct Dial: 0151 290 5917 Email: jaz.chana@cdm... ------------------------------------------------------------------------------ _____________________... |