|
From: <php...@li...> - 2008-05-09 20:41:06
|
Hi,
I have the problem to create an instance of my class ProjectFactory which constructor has the argument of the type org.openrdf.sesame.repository.local.LocalRepository.
I'm always gets an error when trying to create this class with the following code:
$projectFact=new Java("depths.moodle.ProjectsFactory",$sesame);
The error implies that I have provided illegal argument:
Exception occured; mixed trace: java.lang.Exception: CreateInstance failed: new depths.moodle.ProjectsFactory((o:LocalRepository)[o:LocalRepository]). Cause: java.lang.IllegalArgumentException: argument type mismatch VM: 1.6.0_04@http://java.sun.com/ java stack trace: java.lang.Exception: CreateInstance failed: new depths.moodle.ProjectsFactory((o:LocalRepository)[o:LocalRepository]). Cause: java.lang.IllegalArgumentException: argument type mismatch VM: 1.6.0_04@http://java.sun.com/ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:487) at php.java.bridge.Request.handleRequest(Request.java:447) at
php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.lang.IllegalArgumentException: argument type mismatch ... 9 more Exception occured; mixed trace: java.lang.Exception: Invoke failed: [[o:Request$PhpNull]]->getAllProjects. Cause: java.lang.NullPointerException: call object is null, check the server log file(s). VM: 1.6.0_04@http://java.sun.com/ java stack trace: java.lang.Exception: Invoke failed: [[o:Request$PhpNull]]->getAllProjects. Cause: java.lang.NullPointerException: call object is null, check the server log file(s). VM: 1.6.0_04@http://java.sun.com/ at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1016) at php.java.bridge.Request.handleRequest(Request.java:409) at php.java.bridge.Request.handleRequests(Request.java:485) at php.java.bridge.http.ContextRunner.run(ContextRunner.java:140) at
php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.lang.NullPointerException: call object is null, check the server log file(s). ... 5 more
Variable $sesame is an instance of this class that I have also get from Java. When I check it with $sesame->getClass() I get the class
org.openrdf.sesame.repository.local.LocalRepository, but if I check it with
$SesameClass=java("org.openrdf.sesame.repository.local.LocalRepository");
if (java_instanceof($sesame, $SesameClass)){
...
it seems that this is not an instance of this class.
Can you give me any suggestions?
Thanks
Zoran
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
|