|
From: <php...@li...> - 2010-04-05 18:33:30
|
Hi Jost.
Following your instructions this is the result of
try {
$prepago = new java("prepago");
} catch (Exception $e) {
echo $e;
}
IS:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------------------
[[o:Exception]:"java.lang.Exception: CreateInstance failed: new prepago.
Cause: java.lang.ClassNotFoundException: prepago VM:
1.6.0_18@http://java.sun.com/" at: #-10
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1516) #-9
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1361) #-8 java.lang.Class.forName0(Native Method) #-7
java.lang.Class.forName(Unknown Source) #-6
php.java.bridge.Util.classForName(Util.java:1536) #-5
php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:391) #-4
php.java.bridge.Request.handleRequest(Request.java:453) #-3
php.java.bridge.Request.handleRequests(Request.java:491) #-2
php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) #-1
php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0 C:\Apache
Software Foundation\Tomcat 6.0\webapps\JavaBridge\java\Java.inc(223):
java_ThrowExceptionProxyFactory->getProxy(1, NULL, 'T', false) #1 C:\Apache
Software Foundation\Tomcat 6.0\webapps\JavaBridge\java\Java.inc(349):
java_Arg->getResult(false) #2 C:\Apache Software Foundation\Tomcat
6.0\webapps\JavaBridge\java\Java.inc(352):
java_Client->getWrappedResult(false) #3 C:\Apache Software Foundation\Tomcat
6.0\webapps\JavaBridge\java\Java.inc(522): java_Client->getInternalResult()
#4 C:\Apache Software Foundation\Tomcat
6.0\webapps\JavaBridge\java\Java.inc(1881):
java_Client->createObject('prepago', Array) #5 C:\Apache Software
Foundation\Tomcat 6.0\webapps\JavaBridge\prepagoice.php(24):
Java->Java('prepago') #6 {main}]
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------------------
If you need the jar file, please give an email to send it you.
Thank you very much for all you help
Regards J
Berlington Barnett
Hi,
> PHP Fatal error: Uncaught [...]
I was asking for the result of this code:
try {
$prepago = new java("prepago");
} catch (Exception $e) {
echo $e;
}
Anyway, the error message contains enough information this time.
> [[o:Exception]:"java.lang.Exception: CreateInstance failed: new
prepago. Cause: java.lang.ClassNotFoundException: prepago VM:
1.6.0_18@ href="http://java.sun.com/" target="_new">http://java.sun.com/"
[...]
Please see our FAQ entry "Why do I get a ClassNotFoundException?".
> The problem with the jar file is that I dont know how to open it,
You can open java archives with "winzip" on Windows. On Linux or Solaris
you can right-click on the jar and select "Open with ArchiveManager ..."
If you mean that you don't know how to use it, well, please see the API
documentation which you should have received with the library.
Assuming your class name is "foo.bar.baz.Prepago" and it contains a
public method called "something", you can call the method with:
$p = new java("foo.bar.baz.Prepago");
$p->something();
But I am sure you already know this, if you have read the PHP/Java Bridge
API documentation.
Regards,
Jost Bökemeier
|