[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Re: [Tcl Java] java::bind questions
The problem you describe sounds like the "bind freezes my app" mystery bug that a few people seem to have run into. There are some detailed problems reports in the CVS. Check out the tcljava CVS and look at these files in the tcljava/bugs directory. eventbug1 eventbug2 eventbug3 jbindbug.txt There seems to enough info to track down the bug but I have not found the time to find the cause. If you can find the root of the problem, I would be happy to add a patch to 1.2.6. Mo Dejong Cygnus Solutions On Thu, 9 Dec 1999, Randolph S. Kahle wrote: > Mo, > > The problem was mine. The collection object that held listeners was null > (never initialized). That was the null pointer problem. > > java::bind seems fine. I'm using it to do queries, etc. and it seems > reasonable. I will be working over Jacl in the next couple of days as our > team completes a prototype of a client-side architecture for building a new > generation of applications. Jacl is really helping us pull this together. > > I am running into another block... Now that I can do this --> > > java::bind $l processLogin login > > where > > proc login {} { > ... > } > > When the event is fired from Java, it never returns from the method call on > processLogin on the listener (the link to the tcl script). > > Any suggestions on how I can trace down where my thread went? Can any > thread fire the event into Tcl? (I remember reading through the source code > and seeing something about the event system keeps track of the > interpreter's primary thread...) > > (Do I need to have a thread spinning on the interpreter?) > > Randy > > >Was it a bug in the tcljava code or your code? Could the java::bind > >command be improved in some way to avoid this type of problem in > >the future? > > > >Mo Dejong > >Cygnus Solutions > > > >On Thu, 9 Dec 1999, Randolph S. Kahle wrote: > > > > > Mo, > > > > > > Problem solved in very short order because of your help. > > > > > > Thank you *very* much for the prompt reply to my email. > > > > > > Regards, > > > > > > Randy Kahle > > > > > > > > > > > > > > > > > >The TclJava mailing list is sponsored by Scriptics Corporation. > >To subscribe:send mail to [EMAIL PROTECTED] > > with the word SUBSCRIBE as the subject. > >To unsubscribe: send mail to [EMAIL PROTECTED] > > with the word UNSUBSCRIBE as the subject. > >To send to the list, send email to '[EMAIL PROTECTED]'. > > The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] Re: [Tcl Java] java::bind questions
Mo, The problem was mine. The collection object that held listeners was null (never initialized). That was the null pointer problem. java::bind seems fine. I'm using it to do queries, etc. and it seems reasonable. I will be working over Jacl in the next couple of days as our team completes a prototype of a client-side architecture for building a new generation of applications. Jacl is really helping us pull this together. I am running into another block... Now that I can do this --> java::bind $l processLogin login where proc login {} { ... } When the event is fired from Java, it never returns from the method call on processLogin on the listener (the link to the tcl script). Any suggestions on how I can trace down where my thread went? Can any thread fire the event into Tcl? (I remember reading through the source code and seeing something about the event system keeps track of the interpreter's primary thread...) (Do I need to have a thread spinning on the interpreter?) Randy >Was it a bug in the tcljava code or your code? Could the java::bind >command be improved in some way to avoid this type of problem in >the future? > >Mo Dejong >Cygnus Solutions > >On Thu, 9 Dec 1999, Randolph S. Kahle wrote: > > > Mo, > > > > Problem solved in very short order because of your help. > > > > Thank you *very* much for the prompt reply to my email. > > > > Regards, > > > > Randy Kahle > > > > > > > > > > >The TclJava mailing list is sponsored by Scriptics Corporation. >To subscribe:send mail to [EMAIL PROTECTED] > with the word SUBSCRIBE as the subject. >To unsubscribe: send mail to [EMAIL PROTECTED] > with the word UNSUBSCRIBE as the subject. >To send to the list, send email to '[EMAIL PROTECTED]'. The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] java::bind questions
Was it a bug in the tcljava code or your code? Could the java::bind command be improved in some way to avoid this type of problem in the future? Mo Dejong Cygnus Solutions On Thu, 9 Dec 1999, Randolph S. Kahle wrote: > Mo, > > Problem solved in very short order because of your help. > > Thank you *very* much for the prompt reply to my email. > > Regards, > > Randy Kahle > > > > The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] Re: [Tcl Java] Re: [Tcl Java] java::bind questions
Mo, Problem solved in very short order because of your help. Thank you *very* much for the prompt reply to my email. Regards, Randy Kahle The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] Re: [Tcl Java] java::bind questions
Mo, Thanks for the tip. the failure seems to be when a registration is invoked. Again, thanks for the tip. I'll keep researching. java.lang.NullPointerException: at com..application.LoginController.addLoginListener(LoginController.java:37) at java.lnag.reflect.Method.invoke(Native Method) at tcl.lang.EventAdapter.init(EventAdapter.java:131) ... Randy >You might want to try this to get a stack trace. That might really >help track down the problem. > >java::try { > java::bind $l processLogin login >} catch {NullPointerException e} { > $e printStactTrace >} > >Mo Dejong >Cygnus Solutions > > > > * set l [Login getObject] works, I get a ref that supports things like > $l show > > > > * when I execute java::bind $l processLogin login I get a > > java.lang.NullPointerException > > > > where: > > > > proc login {} { > >do stuff > > } > > > > I am going to work my way through this, but if anyone has any helpful > > pointers I would appreciate hearing from you. > > > > Thanks -- Randy Kahle The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] Re: [Tcl Java] java::bind questions
You might want to try this to get a stack trace. That might really help track down the problem. java::try { java::bind $l processLogin login } catch {NullPointerException e} { $e printStactTrace } Mo Dejong Cygnus Solutions > * set l [Login getObject] works, I get a ref that supports things like $l show > > * when I execute java::bind $l processLogin login I get a > java.lang.NullPointerException > > where: > > proc login {} { >do stuff > } > > I am going to work my way through this, but if anyone has any helpful > pointers I would appreciate hearing from you. > > Thanks -- Randy Kahle The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.
[Tcl Java] java::bind questions
I am trying to get java::bind to work in the following situation: * I am developing services for my application as represented by Java interfaces * The interface has add and remove method signatures. * Access to the service is managed through TclCmd classes (so the Tcl script is *not* referencing objects) * The Service has a method getObject which returns a ReflectObject wrapping the interface's implementation. * set l [Login getObject] works, I get a ref that supports things like $l show * when I execute java::bind $l processLogin login I get a java.lang.NullPointerException where: proc login {} { do stuff } I am going to work my way through this, but if anyone has any helpful pointers I would appreciate hearing from you. Thanks -- Randy Kahle The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'.