|
From: <php...@li...> - 2009-09-06 23:10:40
|
You are calling a static method on an object, which you should not do,
as the method/procedure belongs to the class and not the object.
have you tried $PA = new Java("Pa.runme"); or something like this?
On Fri, Sep 4, 2009 at 5:59 PM,
<php...@li...> wrote:
> Hi Jost,
>
> i did as you said and changed the java_require call to:
> require_once ("http://localhost:8080/JavaBridgeTemplate551/java/Java.inc");
>
> I then copied my library into the WEB-INF/lib folder of the JavaBridgeTemplate
> file and then add my index.php to the folder.
> However, the exact same thing happens. I can declare the instance of the
> object, but when i try to call the method/procedure/feature it is a no-can-do.
>
> It tells me:
> javax.servlet.ServletException: java.lang.RuntimeException:
> [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:PA]]->runme. Cause:
> java.lang.NoSuchMethodException: runme(). Candidates: []
>
> So the same thing is going on.
>
> What am i doing wrong? This time i am using tomcat straight (as opposed to
> using it through apache2).
>
>
> thanks
> matt
>
>
>
> On Friday 04 September 2009, you wrote:
>> Hi Matt,
>>
>> Did you report the missing function yesterday?
>>
>> If so, you're likely communicating with the wrong back end; it defaults to
>> /JavaBridge/.phpjavabridge.
>>
>> Please either fetch Java.inc through
>> http://localhost:8080/JavaBridgeTemplateXXX/java/Java.inc or adjust
>> JAVA_SERVLET accordingly.
>>
>> Regards,
>> Jost Boekemeier
>>
>> 4. Sep 2009 1:39 vorm. schrieb am <
>> php...@li...>:
>>
>> Hi,
>>
>> my setup is such that i declare an object in a class called PA which is
>> stored
>> in a .jar file in the WEB-INF/lib folder. The PA class has a method called
>> runme declared as such:
>> public static void runme() {
>> }
>>
>> I am creating a instance of the PA object in my index.php file as:
>> $PA = new java("PA");
>>
>> No problems so far.
>>
>> Now, when i try to call the method/feature runme as:
>> $PA->runme();
>>
>> i get the folowing error:
>> Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
>> [[o:PA]]->runme. Cause: java.lang.NoSuchMethodException: runme().
>> Candidates:
>> [] VM: 1.6.0_14@http://java.sun.com/" at: #-6
>> php.java.bridge.JavaBridge.checkM(JavaBridge.java:1119) #-5
>> php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1057) #-4
>> php.java.bridge.Request.handleRequest(Request.java:414) #-3
>> php.java.bridge.Request.handleRequests(Request.java:490) #-2
>> php.java.bridge.http.ContextRunner.run(ContextRunner.java:146) #-1
>> php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) #0
>> /usr/local/tomcat/webapps/sandbox/java/Java.inc(248):
>> java_ThrowExceptionProxyFactory->getProxy(3, 'PA', 'runme(). Candid...',
>> true)
>> #1 /usr/local/tomcat/webapps/sandbox/java/Java.inc(388): java_Arg-
>>
>> >getResult(true) #2 /usr/local/tomcat/webapps/sandbox/java/Java.inc(394):
>>
>> java_Client->getWrappedResult(true) #3
>> /usr/local/tomcat/webapps/sandbox/java/Java.inc(594):
>> java_Client->getResult()
>> #4 /usr/local/tomcat/webapps/sandbox/java/Java.inc(1731):
>> java_Client->invoke
>> in /usr/local/tomcat/webapps/sandbox/java/Java.inc on line 215
>>
>> I can't really see what i am doing wrong especially since i swear this call
>> used to work. Can anyone shed light on this?
>>
>> thanks
>> matt
>> ---------------------------------------------------------------------------
>>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> php-java-bridge-users mailing list
>> php...@li...
>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>> ---------------------------------------------------------------------------
>>--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment - and
>> focus on what you do best, core application coding. Discover what's new
>> with Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> php-java-bridge-users mailing list
>> php...@li...
>> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|