04-11-2018 02:43 PM - edited 03-01-2019 04:08 AM
I am trying to use eclipse to write mapping code. the JVM stops once i run the main() method in NCSJVMLauncher class. that means I can't see outputs on console whenever services callback happens (when services created). currently am just tailing the log out put of the ncs-jvm file to see outputs of my mapping class (***RFS ) class. I did edit the ncs.conf file to modify the new-session, query-timeout and connect-timeout configs with value=PT1000S. Please let me know.
thanks,
Kerim
04-11-2018 06:24 PM
Hi Kerim,
I typically don't use Eclipse and usually just tail the log to debug mapping logic. Is there a reason using the log is not sufficient?
-Dan
04-11-2018 06:39 PM
Hi Dan,
debugging with breakpoints on eclipse is best way of troubleshooting and also best of way teaching oneself about the different java classes and associated methods. If your gets more involved, no doubt you gonna need it. At this point I just don't know how involved it is going to be. More importantly, we don't set a limit to what is sufficient and not sufficient . we all have different expectations.
thanks,
Kerim
04-12-2018 02:43 AM
I suppose the development style varies between people; many of us never use debuggers regardless of complexity. In many cases it is practically impossible to use a debugger. Anyway, how to connect Eclipse as a debugger to your NSO package code is described in the NSO Development Guide, "Debugging the Service and Using Eclipse IDE".
04-12-2018 10:40 AM
I have done this successfully some time ago - prior to moving to python development which is much more convenient.
In addition to what is presented in the Development Guide, I found that setting the java-vm service-transaction-timeout to a much bigger number was helpful:
—> JavaVM - Set NCS JavaVM to start with capability to get connected to remotely from Eclipse (start-command "ncs-start-java -d"
—> JavaVM - Bump service-transaction-timeout = (120 (default) -> 600)
admin@ncs% set java-vm service-transaction-timeout 600
admin@ncs% set java-vm start-command "ncs-start-java-vm -d"
[ok][2014-11-13 12:59:01]
[edit]
admin@ncs% commit
Commit complete.
[ok][2014-11-13 12:59:03]
[edit]
admin@ncs% show java-vm | details
auto-start true;
auto-restart true;
start-command "ncs-start-java-vm -d";
run-in-terminal {
disabled;
terminal-command "xterm -title ncs-java-vm -e";
}
stdout-capture {
enabled;
file ./logs/ncs-java-vm.log;
}
connect-time 60;
initialization-time 60;
synchronization-timeout-action log-stop;
service-transaction-timeout 600;
jmx {
jndi-address 127.0.0.1;
jndi-port 9902;
jmx-address 127.0.0.1;
jmx-port 9901;
}
04-12-2018 12:02 PM
Hi Larry,
Thanks for the detailed reply. May be i should migrate to Python though I know nothing about it.
Kerim
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide