reflect.InvocationTargetException

53 views
Skip to first unread message

spd...@gmail.com

unread,
May 31, 2016, 8:31:59 AM5/31/16
to DukeScript
Hi ,
i'm creating a wind controle software with the LeafLet4j API , i get an issue with the creation of shapes (Polyline,Circle) and even the modification of arguments , actually i can do it in the Run bloc of the method like shown in the example , but if i want to set the Args in an external class , i have an java.lang.reflect.InvocationTargetException Caused by: java.lang.IllegalStateException: No presenter active. Use BrwsrCtx.execute!. i'm stuck in this issue during days , it would be nice someone have an idea about this , or met this problem.
thank's

Jaroslav Tulach

unread,
May 31, 2016, 1:25:00 PM5/31/16
to spd...@gmail.com, DukeScript
Great to hear you are using Leaflet4j API!

2016-05-31 14:31 GMT+02:00 <spd...@gmail.com>:
Hi ,
i'm creating a wind controle software with the LeafLet4j API , i get an issue with the creation of shapes (Polyline,Circle) and even the modification of arguments , actually i can do it in the Run bloc of the method like shown in the example , but if i want to set the Args in an external class , i have an java.lang.reflect.InvocationTargetException Caused by: java.lang.IllegalStateException: No presenter active. Use BrwsrCtx.execute!. i'm stuck in this issue during days , it would be nice someone have an idea about this , or met this problem.

The error message says "Use BrwsrCtx.execute!" - tell me: have you tried to use BrwsrCtx.execute? Have you tried to read Javadoc of that method? If not, do it and report here whether reading the Javadoc give you an idea how to fix your problem.

Thanks. I am looking forward to your reply and confirmation the Javadoc of the method explains everything.
-jt


 
 

--
You received this message because you are subscribed to the Google Groups "DukeScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dukescript+...@googlegroups.com.
Visit this group at https://groups.google.com/group/dukescript.
To view this discussion on the web visit https://groups.google.com/d/msgid/dukescript/29d2c103-95ac-42b6-8939-d579d0746cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Anton Epple

unread,
Jun 2, 2016, 6:09:35 AM6/2/16
to spd...@gmail.com, DukeScript
Hi Speedy,


You can get hold of the BrwsrCtx you need in the onPageLoad method like this:

ctx = BrwsrCtx.findDefault(getClass());

Then you can use it to execute your code. Hope that helps :-).

Cheers

Toni

Von: <dukes...@googlegroups.com> on behalf of <spd...@gmail.com>
Datum: KW 22,Mittwoch, 1. Juni 2016 um 14:00
An: DukeScript <dukes...@googlegroups.com>
Cc: <spd...@gmail.com>
Betreff: Re: reflect.InvocationTargetException

Hi Jaroslav,
Thank's for your quick answer, first of all i want to congratulate you for your good job, i tried to use the BrwsrCtx.execute , i don't know if i did it right but i had the same exception. i used it like : BrwsrCtx.EMPTY.execute(myMethod) , also i didn't find an info about the BrwsrCtx in javadoc.
thank's for your help

Jaroslav Tulach

unread,
Jun 3, 2016, 1:56:50 AM6/3/16
to spdy, DukeScript

Don't give up (yet)!

Have U seen the sample at the end of http://bits.netbeans.org/html+java/1.3/net/java/html/BrwsrCtx.html#execute(java.lang.Runnable) ?

It is using "findDefault". Try that. It works.
-jt

Dne 1. 6. 2016 14:00 napsal uživatel <spd...@gmail.com>:
Hi Jaroslav,
Thank's for your quick answer, first of all i want to congratulate you for your good job, i tried to use the BrwsrCtx.execute , i don't know if i did it right but i had the same exception. i used it like : BrwsrCtx.EMPTY.execute(myMethod) , also i didn't find an info about the BrwsrCtx in javadoc.
thank's for your help

Le mardi 31 mai 2016 19:25:00 UTC+2, Jaroslav Tulach a écrit :
Message has been deleted

spd...@gmail.com

unread,
Jun 3, 2016, 6:37:39 AM6/3/16
to DukeScript, spd...@gmail.com
Hi Toni,
Thank you for your support , i read the javadoc of the BrwsrCtx and i fixed my problem , it was very helpful , thank's again !

spd...@gmail.com

unread,
Jun 3, 2016, 6:39:26 AM6/3/16
to DukeScript, spd...@gmail.com
Hi Jaroslav ,
Thank you for your help , i was using BrwsrCtx with a wrong way , after reading the javadoc i understood how it works and problem fixed , thank's again for your support !
Reply all
Reply to author
Forward
0 new messages