Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error staring up Java server (java.lang.NoClassDefFoundError: com/tandem/ext/guardian/GuardianException)

206 views
Skip to first unread message

Ciro Figaro

unread,
Jun 21, 2016, 10:26:26 AM6/21/16
to
Hi All,

I'm trying to configure java server program in the pathway but unfortunately when the server starts I'm facing the following issue:

Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/ext/guardian/GuardianException


=STATUS SERVER *

SERVER #RUNNING ERROR INFO
MYSVC 0 1121

The Server has been configured with the following parameters:

= info server *
SERVER MYSVC
PROCESSTYPE OSS
ARGLIST -Xabend,RServer,4
AUTORESTART 3
CREATEDELAY 10 SECS
CWD /home/payx/ciro/java_server_client
DEBUG OFF
DELETEDELAY 10 MINS
ENV CLASSPATH=/home/payx/ciro/java_server_client:/usr/tandem/javaexth11/lib:
ENV JREHOME=/usr/tandem/java/jre
ENV _RLD_LIB_PATH=/usr/tandem/javaexth11/lib/libtdmext_32.so
HIGHPIN ON
HOMETERM $ZTN0.#PT3TTH2
LINKDEPTH 16
MAXLINKS 16
MAXSERVERS 2
NUMSTATIC 1
OWNER \CGNAC1.56,6
PRI 170
PROGRAM /usr/tandem/java/bin/java
SECURITY "N"
STDERR /home/payx/ciro/java_server_client/rerrlog
STDOUT /home/payx/ciro/java_server_client/routlog
TMF ON

And STDERR and STDOUT reports:

From routlog
[Tue Jun 21 07:12:22 PDT 2016] Starting server
[Tue Jun 21 07:12:22 PDT 2016] Starting ReceiveHandler
[Tue Jun 21 07:12:22 PDT 2016] Starting server
[Tue Jun 21 07:12:22 PDT 2016] Starting ReceiveHandler
[Tue Jun 21 07:12:22 PDT 2016] Starting server
[Tue Jun 21 07:12:22 PDT 2016] Starting ReceiveHandler
[Tue Jun 21 07:12:22 PDT 2016] Starting server
[Tue Jun 21 07:12:22 PDT 2016] Starting ReceiveHandler

From rerrlog

Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/ext/guardian/GuardianException
at RServer.<init>(RServer.java:97)
at RServer.main(RServer.java:66)
Caused by: java.lang.ClassNotFoundException: com.tandem.ext.guardian.GuardianException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:309)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 2 more


I'm still trying to figure this out, and even if I have been reading an old post (2009) where the same issue was faced....I still need to fix this!

Just to be clear, all the path parameters present in the server configuration are correct according to the system that I'm working on.

If someone can help me out with that will be grate!

Many thanks in advance.

Cheers,
Ciro.

Bill Honaker

unread,
Jun 21, 2016, 12:35:23 PM6/21/16
to
Ciro,

It would help to know which version(s) you are running, but at first glance your _RLD_LIB_PATH is incorrect. It is not pointing to a path, but to a specific (single) DLL.

See what happens when you end the variable at the 'lib' part of the pathname:

ENV _RLD_LIB_PATH=/usr/tandem/javaexth11/lib

Also, the CLASSPATH pointing to the 'JToolkit' information (the last entry in that variable) points to a directory, but it probably should point to the specific jar:

ENV CLASSPATH=/home/payx/ciro/java_server_client:/usr/tandem/javaexth11/lib/tdmext.jar

Not sure if either of these will help, but if the don't please post more information about your Java and RVU versions.
Bill

Ciro Figaro

unread,
Jun 21, 2016, 3:10:25 PM6/21/16
to
Hi Bill,

First of all many thanks for your response.

Unfortunately I had already tried your suggestions (I play around with the server configuration for a while) and in case I'm going to set the ENV CLASSPATH to the specific tdmext.jar file I get a syntax error ($Y866: ERROR - *2013* ILLEGAL SYNTAX).

Setting ENV _RLD_LIB_PATH as follows is still returning me back the same error

SET SERVER ENV _RLD_LIB_PATH=/usr/tandem/javaexth11/lib
or
SET SERVER ENV _RLD_LIB_PATH=/usr/tandem/javaexth11/lib/libtdmext_32.so
or
SET SERVER ENV _RLD_LIB_PATH=/usr/tandem/javaexth11/lib/libtdmext_64.so

Basically, I was trying to find out a method for NSK-OSS processes intercommunication (I have a C program running on Guardian as Server that has to call Java methods) so I ended up having a look to the JToolkit documentation. Within the JToolkit documents I found an advanced demonstration program that combines the Pathsend API for Java and the Pathway API for Java into one example(You can find the advanced demo in the demo/advanced_demo directory wherever the HP JToolkit for NonStop Servers product is installed, in my case was present at /usr/tandem/javaexth11/demo/advanced_demo).


I have been following all the instruction provided from within the README file in order to create/configure the Java Server but I ended up with the error mentioned before.

Again many thanks for you response and if you have any other suggestions (or questions) please let me know.

Thanks,
Ciro.

Keith Dick

unread,
Jun 21, 2016, 5:58:17 PM6/21/16
to
When you ask for help with a syntax error, it is customary to include the input for which the syntax error was reported. It is pretty hard for us to diagnose what we cannot see. If you are sure the syntax error complaint is on the line defining the CLASSPATH, showing just that line might be enough, but if you are not sure which line the syntax error is on, show us the whole set of lines that set up the serverclass. You did that in your initial post, but it seems that you have changed some things during your experiments, so we need to see what the current lines are that create that syntax error.

I am pretty sure that Bill's suggestions both are correct: you need to name the jar file for as one of the entries in the CLASSPATH, and the value of _RLD_LIB_PATH should be a list of paths, not a list of files. I am not sure that the exact lines Bill suggested are correct. Of course, you probably need to have SET SERVER before the part that Bill showed, unless you are trying to give all the attributes in the ADD SERVER command. But beyond that, without doing a few ls commands on your system, I cannot confirm that the files are exactly where Bill suggested. But pointing the wrong place would not cause a syntax error when you are trying to create the serverclass.

The traceback from the error seems to me to say that it could not find the class com.tandem.ext.guardian.GuardianException, which was referenced at line 97 of RServer.java. I'm pretty sure com.tandem.ext.guardian.GuardianException is in JToolkit, so Bill's point about getting the jar file name into CLASSPATH is probably what will take care of that problem.

The reason that changing _RLD_LIB_PATH did not affect the error is that you have not yet gotten to the point where it tries to load the DLL. It won't do that until it has entered the JToolkit code, and you were having trouble getting CLASSPATH changed to include the tdmext.jar file. Once you fix the CLASSPATH and try to execute any of the methods in JToolkit that use something in the DLL, it will fail at that point (with a different error) if _RLD_LIB_PATH is not set properly.

I am a bit suspicious of your LINKDEPTH 16. Unless the code reading the requests from $RECEIVE reads the next request before replying to the previous request, LINKDEPTH should always be 1. That won't cause the error you are asking about, but it could cause performance to be a little lower than if it were set correctly.

Is $ZTN0.#PT3TTH2 a dynamic telnet window, or is it a permanent window that won't go away when you logoff your session? If it is dynamic, it probably would be safest to change it to a name that will always exist. This also would not be the cause of the error you have, but I believe that Pathway will get an error when it tries to start the JVM if the HOMETERM does not exist at that time.

Bill Honaker

unread,
Jun 21, 2016, 6:14:58 PM6/21/16
to
The only thing I can think of off the top of my head is that you ahven't set the PROCESSTYPE yet so it's assuming GUARDIAN, and ENV is not valid. I see no syntax errors in any of the SET SERVER statements above.

SET SERVER PROCESSTYPE OSS

Must be entered prior to a SET SERVER ENV command.
Hope that helps
Bill

Ciro Figaro

unread,
Jun 21, 2016, 6:22:07 PM6/21/16
to
Hi Keith,

Many thanks for your input. I had two errors within the Server configuration, I corrected them and now the server is up and running.

1- ENV CLASSPATH was to long, getting the jar file name into CLASSPATH caused the syntax error that I mentioned before. Bill's suggestions were both correct the issues was relating the total length of the whole CLASSPATH. Renaming the name of the directory "java_server_client" to "java" allowed me to include the .jar within the path without generating the syntax error.

2-Even if the path of the SERVER PROGRAM was correct (it does exist), I had to change it from "/usr/tandem/java/bin/java" to "/usr/tandem/nssjava/jdk170_l70/bin/java"

I applied the above changes and I have been able to start successfully the Server.

Many thanks to you both, I really appreciated all your input....many thanks guys.

Have a good evening.
Ciro.

Keith Dick

unread,
Jun 21, 2016, 6:49:11 PM6/21/16
to
Good! I'm glad you got it working.

The maximum total length of the ARGLIST and all the ENV variables is supposedly 24,000 characters, so you must have encountered the limit on individual line lengths that PATHCOM has. Using PATHCOM's command continuation would let you continue your values to more than one line, if you run into that problem again.

Don't forget what I mentioned about LINKDEPTH and HOMETERM.

Ciro Figaro

unread,
Jun 22, 2016, 6:34:34 AM6/22/16
to
Hi Keith,

One more time many thanks.

Regarding LINKDEPTH and HOMETERM:

1- The LINKDEPTH was set to 16 (but anyway I will decrees this value) just because yes, in my programs the messages that Servers exchanges are asynchronous, therefore I need a depth grater then 1 because the Java Server reads the requests coming from the other Servers on $RECEIVE and could be that the next request come in before having replying to the previous request.

2- Yes, the HOMETERM was a dynamic telnet window, in fact I changed it to $VHS that will always exists.

Thanks a lot for all your inputs, appreciate that :)

Cheers,
Ciro.

Keith Dick

unread,
Jun 22, 2016, 3:03:19 PM6/22/16
to
I was assuming that your server program was a typical simple non-threading server when I mentioned that the value for LINKDEPTH probably should be 1. If you know what you are doing with having the program juggle multiple requests at once, then a larger value for LINKDEPTH is appropriate, and you seem to know how to decide the appropriate value.
Message has been deleted

Bill Honaker

unread,
Jun 28, 2016, 12:02:05 PM6/28/16
to
On Tue, 28 Jun 2016 06:54:59 -0700 (PDT), Raj Vanjara <rajva...@gmail.com> wrote:

>Ciro,
>
>I think name of Jar file for your server is missing in server configuration:
>ENV CLASSPATH=/home/payx/ciro/java_server_client:/usr/tandem/javaexth11/lib:
>
>In CLASSPATH you need to provide locations for jar files.
>Lets say jar file name for your server is RServer.jar then your CLASSPATH would look like as given below:
>
>ENV CLASSPATH=/home/payx/ciro/java_server_client/RServer.jar:/usr/tandem/javaexth11/lib/tdmext.jar
>
>And RLD path should be something as shown below:
> ENV_RLD_LIB_PATH=/usr/tandem/javaexth11/lib:/usr/tandem/java/jre/lib (Check for correct location for Java jre lib in your system).
>
>RLD path should include locations for Java Jre as well as tandem jre (Tandem jre is javaexth11)
>
>Cheers,
>Raj Vanjara

Raj,

It's also possible that the directory 'home/payx/ciro/java_server_client' can contain compiled .class files, or be the root of the workspaces within a project, if they are not in a .jar file. Without knowing how Ciro deployed his application, it's not
possible to tell.

Bill
0 new messages