From: <php...@li...> - 2015-03-27 07:25:03
|
Hi Jar file is compiled with the wrong Java version - meaning a newer version than the one that your Tomcat is running on. Hermod -----Opprinnelig melding----- Fra: php...@li... [mailto:php...@li...] Sendt: 26. mars 2015 19:04 Til: php...@li... Emne: [Php-java-bridge-users] Problem running with Ubuntu Hi, I'm using Tomcat private instance on Ubuntu. I have set up the bridge and can run the index and test programs. I then insert a simple java jar program in the WEB-INF/lib as I step through a simple program when I call in php require_once("java/Java.inc"); $session = java_session(); if(java_is_null($instName = $session->get("bean"))) { $session->put("bean", $instName=new Java("DoSimple")); }else { $session->put("bean", $instName=new Java("testString", "Test of Bridge")); } $rawInstNameA = java_values($instName->testAnArray($yrqtr)); against the simple java program: public class DoSimple { public DoSimple(){ } public void testString(String s3){ System.out.println(s3); } } The Bridge fails in the call to the constructor: The error output is: Cause: [[o:UnsupportedClassVersionError]:"java.lang.UnsupportedClassVersionError: DoSimple : Unsupported major.minor version 52.0 (unable to load class DoSimple)" at: #-12 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2948) #-11 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208) #-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) #-9 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) #-8 java.lang.Class.forName0(Native Method) #-7 java.lang.Class.forName(Class.java:274) #-6 php.java.bridge.Util.classForName(Util.java:1518) #-5 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:445) #-4 php.java.bridge.Request.handleRequest(Request.java:458) #-3 php.java.bridge.Request.handleRequests(Request.java:500) #-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145) #-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 /home/don/donTomcat/webapps/Financials2/java/Java.inc(232): java_ExceptionProxyFactory->getProxy(4, 'java.lang.Unsup...', 'T', true) #1 /home/don/donTomcat/webapps/Financials2/java/Java.inc(360): java_Arg->getResult(true) #2 /home/don/donTomcat/webapps/Financials2/java/Java.inc(366): java_Client->getWrappedResult(true) #3 /home/don/donTomcat/webapps/Financials2/java/Java.inc(560): java_Client->getResult() #4 /home/don/donTomcat/webapps/Financials2/java/Java.inc(1752): java_Client->invokeMethod(3, 'getCause', Array) #5 /home/don/donTomcat/webapps/Financials2/java/Java.inc(2062): java_JavaProxy->__call('getCause', Array) #6 /home/don/donTomcat/webapps/Financials2/CallJava.php(26): java_exception->__call('getCause', Array) #7 /home/don/donTomcat/webapps/Financials2/CallJava.php(26): java_InternalException->getCause() #8 {main}] It can't load the class. I can't see why. Can anyone help? If there is any other information that will help, I will gladly send it. Thanks Don ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ________________________________ This email with attachments may be confidential and intended solely for the use of the individual or entity to whom it is addressed. The email may contain legally protected information. If you have received this communication in error, be aware that making use of the information, forwarding it, copying it, or disclosing its content to other persons, is strictly prohibited and may be punishable by law. Please inform the sender about the error in transmission immediately. ________________________________ |