I need to run java threads in my Java VUuser, program. I had made a java program through Netbeans, it has two threads :- 1. Receiver 2. Sender Receiver listens for a message from sender, once it receive the messsage, it terminates. This is working fine in Netbeans but when i tried to run in VuGen, it is showing nothing. Please tell me what configuration i need to do in VuGEN to make it run. I need it ASAP as this is a production issue.
I am using simple java with threads, the code is working fine in Netbeans IDE. But when i m trying to run in VuGEN using Java VUSer, it is not behaving properly. In logs it sbows *************************** Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. Error (-17998): Failed to get [param not passed in call] thread TLS entry. Error (-17998): Failed to get [param not passed in call] thread TLS entry. Error: Thread Context: Call to service of the driver failed, reason - thread context wasn't initialized on this thread. ************************* Please tell me is there some configuration to be done to run a threaded program in VuGEN.
Also please let me know, can i run a batch file from VuGEN and in which protocol.
Thanks Mario for quick response. I tried in VuGEN run time settings. There in miscellaneous menu, we have multithreading radio buttons. i selected "Run Vuser as threads" but still it is in the same state. Please tell me apart from this if another setting required or correct me the way to do those setting.
Can I know how this problem was solved? I also run a Java program with SmartSockets. I have a sender and a receiver. It is ok in Eclipse and when ran by itself. But when it is ran by Vugen, the receiver does not get the data. I believe this is just a configuration issue.
Recently I had the same type of issues. Note that when you run a java thread in VuGen it will use for all LR-based classes/functions the C-libraries via JNI. Also stdout and stderr are redirected. It looks like LR is using TLS for this. Your own created thread does not have access to LR's internal TLS which is also in native code.
So creating your own threads work fine as long as you do not use stderr/stdout (use your own logging or use a queue to hand it over to an LR-thread started by LR itself) and do not use any LR functions like lr.* and web.* etc from your own thread.