Need help on Java server configuration

  • Follow


Hi,

I am trying to configure java server program in the pathway where in
which cobol program interact with java, i.e. Cobol calling Java
program.

Steps we followed to configure Java class in Pathway server:
1.      Complied and generated the sa.Jar files in Tandem/OSS
2.      The Java class "ABC" configured in Tandem/Guardian Pathway
3.      Run the below pathway server configuration.( Configuration
steps listed below marked bold)

Problem is if one starts the  START SERVER order, it shows the status
of the Server as running and immediately
within a second the server stops and gives the below error. The server
Cobol program has not even called the Java program.

We added the following config in test pathway and we received the
error in viewpoint.

"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
ext/util/DataConversionException".

I am not able to understand what could be the problem.
0
Reply saurabhkhera75 (2) 11/20/2009 4:19:31 PM

PM wrote:
> Hi,
>
> I am trying to configure java server program in the pathway where in
> which cobol program interact with java, i.e. Cobol calling Java
> program.
>
> Steps we followed to configure Java class in Pathway server:
> 1.      Complied and generated the sa.Jar files in Tandem/OSS
> 2.      The Java class "ABC" configured in Tandem/Guardian Pathway
> 3.      Run the below pathway server configuration.( Configuration
> steps listed below marked bold)
>
> Problem is if one starts the  START SERVER order, it shows the status
> of the Server as running and immediately
> within a second the server stops and gives the below error. The server
> Cobol program has not even called the Java program.
>
> We added the following config in test pathway and we received the
> error in viewpoint.
>
> "Exception in thread "main" java.lang.NoClassDefFoundError:
> com/tandem/ ext/util/DataConversionException".
> I am not able to understand what could be the problem.

I thina a NoClassDefFoundError means that CLASSPATH isn't setup properly, so 
java can't find all the cass files it needs.

Bye, Jojo


0
Reply Joachim 11/20/2009 4:36:03 PM


Please post the config, once you understand the oddities of the CWD,
ARGLIST and the ENV parameters it becomes clear. If the jar file is
runnable (that is, it has a manifest file with a classpath and a main
class specified), you simply have to put something like this into the
ARGLIST:

"-jar,sa.jar"

Note that any options like -server -Xmm, etc, that are normally
separated by spaces should be separated by a comma instead, and they
are typically put in before the -jar, option.

You spelled the jar file name with a capital J so make sure the name
matches case exactly.  Also verify that the CWD paramter points to the
fully qualified path where the jar file is.  You won't need a
CLASSPATH parameter; but the class path in the manifest should be
correct; any relative path names are based on CWD. 

If you don't want to use the -jar option, the ARLIST becomes:

"Classname"

Assumes that the Classname class in the jar file contains a static
main() function as an entry point.Then you need to set server ENV
CLASSPATH=a;b;c;d

where a,b,c,d refer to the entities in the claspath.  At least one of
these must be the relative or absolute pathname of the sa.jar file
itself.

Hope that helps.
On Fri, 20 Nov 2009 08:19:31 -0800 (PST), PM
<saurabhkhera75@gmail.com> wrote:

>Hi,
>
>I am trying to configure java server program in the pathway where in
>which cobol program interact with java, i.e. Cobol calling Java
>program.
>
>Steps we followed to configure Java class in Pathway server:
>1.      Complied and generated the sa.Jar files in Tandem/OSS
>2.      The Java class "ABC" configured in Tandem/Guardian Pathway
>3.      Run the below pathway server configuration.( Configuration
>steps listed below marked bold)
>
>Problem is if one starts the  START SERVER order, it shows the status
>of the Server as running and immediately
>within a second the server stops and gives the below error. The server
>Cobol program has not even called the Java program.
>
>We added the following config in test pathway and we received the
>error in viewpoint.
>
>"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
>ext/util/DataConversionException".
>
>I am not able to understand what could be the problem.
0
Reply Bill 11/21/2009 1:09:53 AM

On Nov 21, 6:09=A0am, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> Please post the config, once you understand the oddities of the CWD,
> ARGLIST and the ENV parameters it becomes clear. If the jar file is
> runnable (that is, it has a manifest file with a classpath and a main
> class specified), you simply have to put something like this into the
> ARGLIST:
>
> "-jar,sa.jar"
>
> Note that any options like -server -Xmm, etc, that are normally
> separated by spaces should be separated by a comma instead, and they
> are typically put in before the -jar, option.
>
> You spelled the jar file name with a capital J so make sure the name
> matches case exactly. =A0Also verify that the CWD paramter points to the
> fully qualified path where the jar file is. =A0You won't need a
> CLASSPATH parameter; but the class path in the manifest should be
> correct; any relative path names are based on CWD.
>
> If you don't want to use the -jar option, the ARLIST becomes:
>
> "Classname"
>
> Assumes that the Classname class in the jar file contains a static
> main() function as an entry point.Then you need to set server ENV
> CLASSPATH=3Da;b;c;d
>
> where a,b,c,d refer to the entities in the claspath. =A0At least one of
> these must be the relative or absolute pathname of the sa.jar file
> itself.
>
> Hope that helps.
> On Fri, 20 Nov 2009 08:19:31 -0800 (PST), PM
>
>
>
> <saurabhkher...@gmail.com> wrote:
> >Hi,
>
> >I am trying to configure java server program in the pathway where in
> >which cobol program interact with java, i.e. Cobol calling Java
> >program.
>
> >Steps we followed to configure Java class in Pathway server:
> >1. =A0 =A0 =A0Complied and generated the sa.Jar files in Tandem/OSS
> >2. =A0 =A0 =A0The Java class "ABC" configured in Tandem/Guardian Pathway
> >3. =A0 =A0 =A0Run the below pathway server configuration.( Configuration
> >steps listed below marked bold)
>
> >Problem is if one starts the =A0START SERVER order, it shows the status
> >of the Server as running and immediately
> >within a second the server stops and gives the below error. The server
> >Cobol program has not even called the Java program.
>
> >We added the following config in test pathway and we received the
> >error in viewpoint.
>
> >"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
> >ext/util/DataConversionException".
>
> >I am not able to understand what could be the problem.- Hide quoted text=
 -
>
> - Show quoted text -

Thanks for the reply. However Iam sending you the ENV ad arglist
settings in Pathway.Let me know if these are correct.

SET SERVER ENV JAVA_HOME=3D/usr/tandem/java
SET SERVER ENV JRE_HOME=3D/usr/tandem/java/jre
SET SERVER arglist -Xabend,-cp, /user/demoSA/exe/sa.jar,&/usr/tandem/
javaextv20/lib/tdmext.jar,&-Dupper.debug=3Dtrue,ABC
0
Reply PM 11/21/2009 5:28:56 AM

PM wrote:
> On Nov 21, 6:09 am, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> 
>>Please post the config, once you understand the oddities of the CWD,
>>ARGLIST and the ENV parameters it becomes clear. If the jar file is
>>runnable (that is, it has a manifest file with a classpath and a main
>>class specified), you simply have to put something like this into the
>>ARGLIST:
>>
>>"-jar,sa.jar"
>>
>>Note that any options like -server -Xmm, etc, that are normally
>>separated by spaces should be separated by a comma instead, and they
>>are typically put in before the -jar, option.
>>
>>You spelled the jar file name with a capital J so make sure the name
>>matches case exactly.  Also verify that the CWD paramter points to the
>>fully qualified path where the jar file is.  You won't need a
>>CLASSPATH parameter; but the class path in the manifest should be
>>correct; any relative path names are based on CWD.
>>
>>If you don't want to use the -jar option, the ARLIST becomes:
>>
>>"Classname"
>>
>>Assumes that the Classname class in the jar file contains a static
>>main() function as an entry point.Then you need to set server ENV
>>CLASSPATH=a;b;c;d
>>
>>where a,b,c,d refer to the entities in the claspath.  At least one of
>>these must be the relative or absolute pathname of the sa.jar file
>>itself.
>>
>>Hope that helps.
>>On Fri, 20 Nov 2009 08:19:31 -0800 (PST), PM
>>
>>
>>
>><saurabhkher...@gmail.com> wrote:
>>
>>>Hi,
>>
>>>I am trying to configure java server program in the pathway where in
>>>which cobol program interact with java, i.e. Cobol calling Java
>>>program.
>>
>>>Steps we followed to configure Java class in Pathway server:
>>>1.      Complied and generated the sa.Jar files in Tandem/OSS
>>>2.      The Java class "ABC" configured in Tandem/Guardian Pathway
>>>3.      Run the below pathway server configuration.( Configuration
>>>steps listed below marked bold)
>>
>>>Problem is if one starts the  START SERVER order, it shows the status
>>>of the Server as running and immediately
>>>within a second the server stops and gives the below error. The server
>>>Cobol program has not even called the Java program.
>>
>>>We added the following config in test pathway and we received the
>>>error in viewpoint.
>>
>>>"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
>>>ext/util/DataConversionException".
>>
>>>I am not able to understand what could be the problem.- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
> Thanks for the reply. However Iam sending you the ENV ad arglist
> settings in Pathway.Let me know if these are correct.
> 
> SET SERVER ENV JAVA_HOME=/usr/tandem/java
> SET SERVER ENV JRE_HOME=/usr/tandem/java/jre
> SET SERVER arglist -Xabend,-cp, /user/demoSA/exe/sa.jar,&/usr/tandem/
> javaextv20/lib/tdmext.jar,&-Dupper.debug=true,ABC

I have never used a Java program as a Pathway server (and I've done very little with Java at all), so all I can go from is the documentation I could find.  The documentation seems to be rather sparse, or else I don't know where to look.  What documentation I could find leaves a lot to the imagination, so I might be interpreting it incorrectly, but here are my thoughts:

1.  I think JRE_HOME should be JREHOME.  It appears that JRE_HOME is used with Tomcat, but JREHOME is used other places.  

2.  I'm going to assume the several & characters that appear in the arglist are PATHCOM line continuations and that the line breaks in your post did not appear in the same place as in your PATHCOM commands.

3.  From what I can tell from the documentation, the class path given for -cp is supposed to use : not , to separate the entries in the list.  Actually, I think the comma would make PATHCOM break the class path turn into two arguments, causing it to be misinterpreted.  If it really needs comma to separate the entries in the classpath, I think you would need to enclose the whole class path within quotes.  Or you could specify the class path in the CLASSPATH environment variable rather than in the arglist.

4.  You might find it easier to experiment with these things by trying to run your class from the shell prompt.  Make sure the directory containing the java program launcher (the program named java) is in your PATH environment variable, then set the JAVA_HOME and JREHOME environment variables, then type java followed by the string you give for the arglist, substituting spaces for the commas.  I don't know that this will make it any easier to figure out what the right settings and formats are, but it might help.

5.  I couldn't find any documentation describing the -Dupper.debug=true option, so I have no idea whether that is being entered correctly.

6.  I do not know whether the entries in your class path, for JAVA_HOME, or for JREHOME are correct.  They depend on how things were installed in your system.  The values for JAVA_HOME and JREHOME seem to match what I saw in some of the documentation, so I imagine they are the standard locations.  If your system has a nonstandard installation, they may not be correct for you.

7.  Just to make my suggestions completely clear, here are some possibilities that I have a feeling are closer to what you need:

 SET SERVER ENV JAVA_HOME=/usr/tandem/java
 SET SERVER ENV JREHOME=/usr/tandem/java/jre
 SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/javaextv20/lib/tdmext.jar,-Dupper.debug=true,ABC

or

 SET SERVER ENV JAVA_HOME=/usr/tandem/java
 SET SERVER ENV JREHOME=/usr/tandem/java/jre
 SET SERVER ENV CLASSPATH=/user/demoSA/exe/sa.jar:/usr/tandem/javaextv20/lib/tdmext.jar
 SET SERVER arglist -Xabend,-Dupper.debug=true,ABC


Let me close by repeating that these suggestions are my best guesses from looking at what documentation I could find, not from any experience actually using the stuff.  I hope I'm not giving incorrect advice, but I could easily be mistaken about any or all of this.

Good luck.
0
Reply Keith 11/21/2009 10:43:33 AM

On Nov 20, 9:09=A0pm, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> Please post the config, once you understand the oddities of the CWD,
> ARGLIST and the ENV parameters it becomes clear. If the jar file is
> runnable (that is, it has a manifest file with a classpath and a main
> class specified), you simply have to put something like this into the
> ARGLIST:
>
> "-jar,sa.jar"
>
> Note that any options like -server -Xmm, etc, that are normally
> separated by spaces should be separated by a comma instead, and they
> are typically put in before the -jar, option.
>
> You spelled the jar file name with a capital J so make sure the name
> matches case exactly. =A0Also verify that the CWD paramter points to the
> fully qualified path where the jar file is. =A0You won't need a
> CLASSPATH parameter; but the class path in the manifest should be
> correct; any relative path names are based on CWD.
>
> If you don't want to use the -jar option, the ARLIST becomes:
>
> "Classname"
>
> Assumes that the Classname class in the jar file contains a static
> main() function as an entry point.Then you need to set server ENV
> CLASSPATH=3Da;b;c;d
>
> where a,b,c,d refer to the entities in the claspath. =A0At least one of
> these must be the relative or absolute pathname of the sa.jar file
> itself.
>
> Hope that helps.
> On Fri, 20 Nov 2009 08:19:31 -0800 (PST), PM
>
> <saurabhkher...@gmail.com> wrote:
> >Hi,
>
> >I am trying to configure java server program in the pathway where in
> >which cobol program interact with java, i.e. Cobol calling Java
> >program.
>
> >Steps we followed to configure Java class in Pathway server:
> >1. =A0 =A0 =A0Complied and generated the sa.Jar files in Tandem/OSS
> >2. =A0 =A0 =A0The Java class "ABC" configured in Tandem/Guardian Pathway
> >3. =A0 =A0 =A0Run the below pathway server configuration.( Configuration
> >steps listed below marked bold)
>
> >Problem is if one starts the =A0START SERVER order, it shows the status
> >of the Server as running and immediately
> >within a second the server stops and gives the below error. The server
> >Cobol program has not even called the Java program.
>
> >We added the following config in test pathway and we received the
> >error in viewpoint.
>
> >"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
> >ext/util/DataConversionException".
>
> >I am not able to understand what could be the problem.

Bill,

Thanks for your excellent reply!

I'm involved with a Spring implementation that has a CLASSPATH length
out to wazoo :-)
If I create an executable jar of the application then I can optimize
the Pathway server config.

Thanks!
-Larry
0
Reply lyates 11/21/2009 3:01:03 PM

Make sure you have;

SET PROGRAM /usr/tandem/java/java
SET PROGRAMTYPE OSS

Keith made excellent suggestions; note that when continuing a line in
the ARG you must not put spaces before or after the &, and you also
must not put spaces at the beginning of the line continuation.  Also,
running from the command line could be very enlightening

I assume from your example that the class in ht Jar file is AAA (all
uppercase) and that it does not contain a package statement.  If it
does you need to qualify the classname fully on the command line.
..  
You should also make sure the STDIN, STDOUT and STDERR parameters are
set to reasonable values.

Good luck!

On Fri, 20 Nov 2009 21:28:56 -0800 (PST), PM
<saurabhkhera75@gmail.com> wrote:

>On Nov 21, 6:09�am, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
>> Please post the config, once you understand the oddities of the CWD,
>> ARGLIST and the ENV parameters it becomes clear. If the jar file is
>> runnable (that is, it has a manifest file with a classpath and a main
>> class specified), you simply have to put something like this into the
>> ARGLIST:
>>
>> "-jar,sa.jar"
>>
>> Note that any options like -server -Xmm, etc, that are normally
>> separated by spaces should be separated by a comma instead, and they
>> are typically put in before the -jar, option.
>>
>> You spelled the jar file name with a capital J so make sure the name
>> matches case exactly. �Also verify that the CWD paramter points to the
>> fully qualified path where the jar file is. �You won't need a
>> CLASSPATH parameter; but the class path in the manifest should be
>> correct; any relative path names are based on CWD.
>>
>> If you don't want to use the -jar option, the ARLIST becomes:
>>
>> "Classname"
>>
>> Assumes that the Classname class in the jar file contains a static
>> main() function as an entry point.Then you need to set server ENV
>> CLASSPATH=a;b;c;d
>>
>> where a,b,c,d refer to the entities in the claspath. �At least one of
>> these must be the relative or absolute pathname of the sa.jar file
>> itself.
>>
>> Hope that helps.
>> On Fri, 20 Nov 2009 08:19:31 -0800 (PST), PM
>>
>>
>>
>> <saurabhkher...@gmail.com> wrote:
>> >Hi,
>>
>> >I am trying to configure java server program in the pathway where in
>> >which cobol program interact with java, i.e. Cobol calling Java
>> >program.
>>
>> >Steps we followed to configure Java class in Pathway server:
>> >1. � � �Complied and generated the sa.Jar files in Tandem/OSS
>> >2. � � �The Java class "ABC" configured in Tandem/Guardian Pathway
>> >3. � � �Run the below pathway server configuration.( Configuration
>> >steps listed below marked bold)
>>
>> >Problem is if one starts the �START SERVER order, it shows the status
>> >of the Server as running and immediately
>> >within a second the server stops and gives the below error. The server
>> >Cobol program has not even called the Java program.
>>
>> >We added the following config in test pathway and we received the
>> >error in viewpoint.
>>
>> >"Exception in thread "main" java.lang.NoClassDefFoundError: com/tandem/
>> >ext/util/DataConversionException".
>>
>> >I am not able to understand what could be the problem.- Hide quoted text -
>>
>> - Show quoted text -
>
>Thanks for the reply. However Iam sending you the ENV ad arglist
>settings in Pathway.Let me know if these are correct.
>
>SET SERVER ENV JAVA_HOME=/usr/tandem/java
>SET SERVER ENV JRE_HOME=/usr/tandem/java/jre
>SET SERVER arglist -Xabend,-cp, /user/demoSA/exe/sa.jar,&/usr/tandem/
>javaextv20/lib/tdmext.jar,&-Dupper.debug=true,ABC
0
Reply Bill 11/21/2009 7:25:36 PM

You should see what happens when you add Hibernate and Spring
together!  The CP length is a problem whether it's a Pathway
configuration on  NonStop, a shell script on Linux or Unix, or a bat
or cmd file in Windows.

I found the -jar option and an executable jar to be an elegant
solution.  I suggest that you let ANT or your IDE help you create the
Manifest file, the syntax of the Class-Path: element in the manifest
is actually more stringent than the Pathcom syntax!
Bill

<clip>

>Bill,
>
>Thanks for your excellent reply!
>
>I'm involved with a Spring implementation that has a CLASSPATH length
>out to wazoo :-)
>If I create an executable jar of the application then I can optimize
>the Pathway server config.
>
>Thanks!
>-Larry
0
Reply Bill 11/21/2009 7:29:39 PM

On Nov 21, 11:29=A0am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
wrote:
> You should see what happens when you add Hibernate and Spring
> together! =A0The CP length is a problem whether it's a Pathway
> configuration on =A0NonStop, a shell script on Linux or Unix, or a bat
> or cmd file in Windows.
>
> I found the -jar option and an executable jar to be an elegant
> solution. =A0I suggest that you let ANT or your IDE help you create the
> Manifest file, the syntax of the Class-Path: element in the manifest
> is actually more stringent than the Pathcom syntax!
> Bill
>
> <clip>
>
>
>
> >Bill,
>
> >Thanks for your excellent reply!
>
> >I'm involved with a Spring implementation that has a CLASSPATH length
> >out to wazoo :-)
> >If I create an executable jar of the application then I can optimize
> >the Pathway server config.
>
> >Thanks!
> >-Larry- Hide quoted text -
>
> - Show quoted text -


Thanks for your replies. I have tried with the options and checkd my
classpath settings. However this time I got different error.
I am sending you my server config details
SET SERVER PROCESSTYPE OSS

SET SERVER AUTORESTART 3

SET SERVER CPUS (1:2)

SET SERVER CREATEDELAY 1 SECS

SET SERVER DEBUG OFF

SET SERVER DELETEDELAY 70 MINS

SET SERVER HIGHPIN ON

SET SERVER ENV JAVA_HOME=3D/usr/tandem/java

SET SERVER ENV JREHOME=3D/usr/tandem/java/jre

SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/
javaextv20/lib/tdmext.jar,-Dupper.debug=3Dtrue,ABC

SET SERVER LINKDEPTH 1

SET SERVER MAXSERVERS 10

SET SERVER NUMSTATIC 1

SET SERVER PRI 128

SET SERVER TMF ON

SET SERVER STDERR /user/demoSA/logs/ABC.err

SET SERVER STDOUT /user/demoSA/logs/ABC.log

SET SERVER PROGRAM /usr/tandem/java/bin/java

SET SERVER TIMEOUT 90 SECS

SET SERVER SECURITY "N"

SET SERVER CWD /user/demoSA/exe

Ther server got started however I got the erorr 1121 and it gets
stopped. 1121(Autorestart disabled). Then I open the error log and
found that

Exception in thread "main" java.lang.UnsatisfiedLinkError: openReceive

        at com.tandem.ext.guardian.Receive.openReceive(Native Method)

        at com.tandem.ext.guardian.Receive.open(Receive.java:686)

        at ABC.main(ABC.java:26)

It seems that JAVA server is not able to communicate thru pathway.




0
Reply PM 11/23/2009 8:56:52 AM

On Nov 21, 3:29=A0pm, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> You should see what happens when you add Hibernate and Spring
> together! =A0The CP length is a problem whether it's a Pathway
> configuration on =A0NonStop, a shell script on Linux or Unix, or a bat
> or cmd file in Windows.
>
> I found the -jar option and an executable jar to be an elegant
> solution. =A0I suggest that you let ANT or your IDE help you create the
> Manifest file, the syntax of the Class-Path: element in the manifest
> is actually more stringent than the Pathcom syntax!
> Bill
>
> <clip>
>
> >Bill,
>
> >Thanks for your excellent reply!
>
> >I'm involved with a Spring implementation that has a CLASSPATH length
> >out to wazoo :-)
> >If I create an executable jar of the application then I can optimize
> >the Pathway server config.
>
> >Thanks!
> >-Larry

Bill,

I'm assuming that your classpath includes nested jars within the
executable main jar.
I've looked at One-Jar and other solutions, but how are you handling
classloader issues?

Thanks!
-Larry
0
Reply lyates 11/23/2009 3:00:24 PM

That routine is JNI (Native code).  The code in the Receive class in
tdmext.jar is attempting to call the Native code that calls the
FILE_OPEN_ API.   The resolution depends on which platform you are
running Java.

If it's on G-series, you need to make sure that Java got installed
correctly; part of the installation process links 'optional' packages
such as JToolkit with the JVM.

If it's on H-series, you need to provide the dynamic link Path used to
resolve the DLL.  Check the API manual for your version of Java to
find out the name of the ENV variable and a description of its
contents.

Bill

On Mon, 23 Nov 2009 00:56:52 -0800 (PST), PM
<saurabhkhera75@gmail.com> wrote:

>/usr/tandem/
>javaextv20/lib/
0
Reply Bill 11/23/2009 3:13:12 PM

It may sound like I'm being flippant but I'm not; I don't handle them.
I resolve them in a development environment using the JDB debugger
interface along with plenty of try/catch logic..

Each customer I work with has their own 'preferred' set of development
tools, the current one uses Eclipse and ANT.  the <manifest> task in
Ant does a good job of building the class path from a <fileset>
element.

Hope that answers your question.


On Mon, 23 Nov 2009 07:00:24 -0800 (PST), lyates
<laptoplarry@gmail.com> wrote:

>Bill,
>
>I'm assuming that your classpath includes nested jars within the
>executable main jar.
>I've looked at One-Jar and other solutions, but how are you handling
>classloader issues?
>
>Thanks!
>-Larry
0
Reply Bill 11/23/2009 3:16:47 PM

PM wrote:
> On Nov 21, 11:29 am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
> wrote:
> 
>>You should see what happens when you add Hibernate and Spring
>>together!  The CP length is a problem whether it's a Pathway
>>configuration on  NonStop, a shell script on Linux or Unix, or a bat
>>or cmd file in Windows.
>>
>>I found the -jar option and an executable jar to be an elegant
>>solution.  I suggest that you let ANT or your IDE help you create the
>>Manifest file, the syntax of the Class-Path: element in the manifest
>>is actually more stringent than the Pathcom syntax!
>>Bill
>>
>><clip>
>>
>>
>>
>>>Bill,
>>
>>>Thanks for your excellent reply!
>>
>>>I'm involved with a Spring implementation that has a CLASSPATH length
>>>out to wazoo :-)
>>>If I create an executable jar of the application then I can optimize
>>>the Pathway server config.
>>
>>>Thanks!
>>>-Larry- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
> 
> Thanks for your replies. I have tried with the options and checkd my
> classpath settings. However this time I got different error.
> I am sending you my server config details
> SET SERVER PROCESSTYPE OSS
> 
> SET SERVER AUTORESTART 3
> 
> SET SERVER CPUS (1:2)
> 
> SET SERVER CREATEDELAY 1 SECS
> 
> SET SERVER DEBUG OFF
> 
> SET SERVER DELETEDELAY 70 MINS
> 
> SET SERVER HIGHPIN ON
> 
> SET SERVER ENV JAVA_HOME=/usr/tandem/java
> 
> SET SERVER ENV JREHOME=/usr/tandem/java/jre
> 
> SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/
> javaextv20/lib/tdmext.jar,-Dupper.debug=true,ABC
> 
> SET SERVER LINKDEPTH 1
> 
> SET SERVER MAXSERVERS 10
> 
> SET SERVER NUMSTATIC 1
> 
> SET SERVER PRI 128
> 
> SET SERVER TMF ON
> 
> SET SERVER STDERR /user/demoSA/logs/ABC.err
> 
> SET SERVER STDOUT /user/demoSA/logs/ABC.log
> 
> SET SERVER PROGRAM /usr/tandem/java/bin/java
> 
> SET SERVER TIMEOUT 90 SECS
> 
> SET SERVER SECURITY "N"
> 
> SET SERVER CWD /user/demoSA/exe
> 
> Ther server got started however I got the erorr 1121 and it gets
> stopped. 1121(Autorestart disabled). Then I open the error log and
> found that
> 
> Exception in thread "main" java.lang.UnsatisfiedLinkError: openReceive
> 
>         at com.tandem.ext.guardian.Receive.openReceive(Native Method)
> 
>         at com.tandem.ext.guardian.Receive.open(Receive.java:686)
> 
>         at ABC.main(ABC.java:26)
> 
> It seems that JAVA server is not able to communicate thru pathway.
> 

This error message indicates that, when you tried to call the method to open $RECEIVE, the Java Virtual Machine was unable to find the code that implements the Java Toolkit.  The Java Toolkit is what contains the classes you are using to access the $RECEIVE file.  I think the cause is that either the Java Toolkit was not properly installed or you missed a step in setting up your program to use the Java Toolkit.

The documentation I could find online about the Java Toolkit is frustratingly incomplete as far as how to install the Java Toolkit and make those classes accessible to your program, so I'm not certain what you must do to correct the problem.  Perhaps someone else who has set up a program using Java Toolkit will be able to give a more reliable answer.  But I will tell you what I think is correct, and that may let you solve the problem.  If you can find the softdoc for the Java Toolkit (I was not able to find it online), that might contain the information I was unable to locate.  I believe the product number for the Java Toolkit is T2716.  Whoever manages the NonStop system you are using may be able to tell you where to find the softdoc.  Perhaps it will give you the precise directions and you won't have to try to guess from the clues I give below.

I believe that the code that implements a native method, such as the ones in the Java Toolkit, may either be linked into the Java Virtual Machine or it may be accessed via a library linked to at run time.  I believe the normal way for accessing the Java Toolkit code is by linking at run time, but that might have changed since I last heard about this.  If it is linked to at run time, that means that the directory containing the code must be in your PATH environment variable.  There is a possibility that rather than the PATH environment variable, it should be in the _RLD_LIB_PATH environment variable.  The _RLD_LIB_PATH environment variable is described in the section of the NonStop Server for Java Programmer's Reference that discusses the Java Native Interface, but it is unclear to me whether that environment variable is intended for finding HP-supplied Java Native Interface classes or only user-developed Java Native Interface classes.  I seem to remember that the PATH enviro
nment variable is the correct one, but I mention the other, just in case I'm remembering wrong.  If the Java Toolkit is to be linked into the Java Virtual Machine, then you probably don't have to point to any library when setting up your server, but then, I wouldn't expect to see the error you got.

I also could not find what is the name of the actual directory in which the library containing the native code for the Java Toolkit is installed.  It might be in /usr/tandem/java/bin, or it might be in /usr/tandem/java/jre, or it might be in /usr/tandem/java/lib, or it might be in /usr/tandem/<something-else>, or if it was installed in a nonstandard way on your system, it might be anywhere.  I believe the file is named libtdmext.so.  So perhaps if you look around on your system (or use the find command), you will be able to determine which is the correct directory to use.  If you find it, try adding the name of the directory that contains it to either the PATH or the _RLD_LIB_PATH environment variable.  If you cannot find libtdmext, then that suggests either that the Java Toolkit was not correctly installed on your system, or your system is set up with the Java Toolkit linked into the Java Virtual Machine, though if it is linked into the JVM, I doubt you would have gotten th
e error that you did.
0
Reply Keith 11/23/2009 4:13:23 PM

On Nov 23, 10:16=A0am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
wrote:
> It may sound like I'm being flippant but I'm not; I don't handle them.
> I resolve them in a development environment using the JDB debugger
> interface along with plenty of try/catch logic..
>
> Each customer I work with has their own 'preferred' set of development
> tools, the current one uses Eclipse and ANT. =A0the <manifest> task in
> Ant does a good job of building the class path from a <fileset>
> element.
>
> Hope that answers your question.
>
> On Mon, 23 Nov 2009 07:00:24 -0800 (PST), lyates
>
> <laptopla...@gmail.com> wrote:
> >Bill,
>
> >I'm assuming that your classpath includes nested jars within the
> >executable main jar.
> >I've looked at One-Jar and other solutions, but how are you handling
> >classloader issues?
>
> >Thanks!
> >-Larry

Bill,

I've been successful running a jar file with the server configuration
as you suggested earlier.
Using the Ant jar task including:

<zipgroupfileset dir=3D"${librarydir}">
                <include name=3D"**/*.jar" />
</zipgroupfileset>

All the jars I use in my "lib" folder are expanded and my classpath
thereby shrinks to <attribute name=3D"Class-Path" value=3D".:./" />

I have been lucky in that there are no conflicts and the Pathway
server runs successfully.

However, I'd rather the manifest include the jar names in the
classpath and embed the actual jar files within the main jar and so
I'll try'n use One-Jar.

Thanks, Bill

-Larry
0
Reply lyates 11/23/2009 4:36:54 PM

On Nov 23, 8:13=A0pm, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> That routine is JNI (Native code). =A0The code in the Receive class in
> tdmext.jar is attempting to call the Native code that calls the
> FILE_OPEN_ API. =A0 The resolution depends on which platform you are
> running Java.
>
> If it's on G-series, you need to make sure that Java got installed
> correctly; part of the installation process links 'optional' packages
> such as JToolkit with the JVM.
>
> If it's on H-series, you need to provide the dynamic link Path used to
> resolve the DLL. =A0Check the API manual for your version of Java to
> find out the name of the ENV variable and a description of its
> contents.
>
> Bill
>
> On Mon, 23 Nov 2009 00:56:52 -0800 (PST), PM
>
>
>
> <saurabhkher...@gmail.com> wrote:
> >/usr/tandem/
> >javaextv20/lib/- Hide quoted text -
>
> - Show quoted text -

We are running on G-series. However there are only usr/java/tandem
from where I can see the JVM. Since $RECEIVE is not opening, I would
believe that something if I can implement in JAVA code
0
Reply PM 11/23/2009 5:02:45 PM

PM wrote:
> On Nov 23, 8:13 pm, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> 
>>That routine is JNI (Native code).  The code in the Receive class in
>>tdmext.jar is attempting to call the Native code that calls the
>>FILE_OPEN_ API.   The resolution depends on which platform you are
>>running Java.
>>
>>If it's on G-series, you need to make sure that Java got installed
>>correctly; part of the installation process links 'optional' packages
>>such as JToolkit with the JVM.
>>
>>If it's on H-series, you need to provide the dynamic link Path used to
>>resolve the DLL.  Check the API manual for your version of Java to
>>find out the name of the ENV variable and a description of its
>>contents.
>>
>>Bill
>>
>>On Mon, 23 Nov 2009 00:56:52 -0800 (PST), PM
>>
>>
>>
>><saurabhkher...@gmail.com> wrote:
>>
>>>/usr/tandem/
>>>javaextv20/lib/- Hide quoted text -
>>
>>- Show quoted text -
> 
> 
> We are running on G-series. However there are only usr/java/tandem
> from where I can see the JVM. Since $RECEIVE is not opening, I would
> believe that something if I can implement in JAVA code

Given what I read earlier and what Bill said, I think the most likely explanation for the error you are getting is that the Java Toolkit did not get installed properly, or perhaps whoever installed it put the relinked Java Virtual Machine into a different location than where your server config expects it to be.  Find the person who installed the Java Toolkit on your system and ask where the updated Java Virtual Machine is located.  If he or she thinks the relinked Java Virtual Machine is in the standard location, ask him or her to check how the Java Toolkit installation was done and whether it was successful, or ask hime or her to install it again.
0
Reply Keith 11/23/2009 5:37:32 PM

The G-series supports only the 4.2 JVM version; all Native libraries
must be linked into the JVM.  This is handled by the systems group of
your installation.  In the /usr/tandem/java/install directory is a
Makefile.  The procedures are described here:

http://docs.hp.com/en/526238-002/526238-002.pdf

Look on page 50 of the pdf file.  You can edit Makefile and see what's
in the CUSTLIB_DIRS.  Depending on your installed options, you might
have the JToolKit, the SQL/MP and/or SQL/MX JDBC drivers.  Your own
site might also have native code installed (an example of a useful
utility is the log4j appenders that allow you to write to $EMS).

If you don't see any reference to the /usr/tandem/javaextv20/lib
directory (where the jToolKit static library is located) then the
JToolkit installation script didn't get run corrrectly.

As an aside, for 'newer' systems I find that it is better to reference
the version-specific java directories in pathway servers, so for
example if you were running the 5.0 version of Java, and installed
6.0, you could test your applications under the newer environment in
an orderly fashion instead of as a 'big bang'.

In other words, point your ENV JAVA_HOME and PROGRAM configurations to
usr/tandem/nssjava/<version> instead of /user/tandem/java (which is
just a link to the last version directory that got installed!),

Just my $.02US

Bill
On Mon, 23 Nov 2009 08:13:23 -0800, Keith Dick
<KeithDick@earthlink.net> wrote:

>PM wrote:
>> On Nov 21, 11:29 am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
>> wrote:
>> 
>>>You should see what happens when you add Hibernate and Spring
>>>together!  The CP length is a problem whether it's a Pathway
>>>configuration on  NonStop, a shell script on Linux or Unix, or a bat
>>>or cmd file in Windows.
>>>
>>>I found the -jar option and an executable jar to be an elegant
>>>solution.  I suggest that you let ANT or your IDE help you create the
>>>Manifest file, the syntax of the Class-Path: element in the manifest
>>>is actually more stringent than the Pathcom syntax!
>>>Bill
>>>
>>><clip>
>>>
>>>
>>>
>>>>Bill,
>>>
>>>>Thanks for your excellent reply!
>>>
>>>>I'm involved with a Spring implementation that has a CLASSPATH length
>>>>out to wazoo :-)
>>>>If I create an executable jar of the application then I can optimize
>>>>the Pathway server config.
>>>
>>>>Thanks!
>>>>-Larry- Hide quoted text -
>>>
>>>- Show quoted text -
>> 
>> 
>> 
>> Thanks for your replies. I have tried with the options and checkd my
>> classpath settings. However this time I got different error.
>> I am sending you my server config details
>> SET SERVER PROCESSTYPE OSS
>> 
>> SET SERVER AUTORESTART 3
>> 
>> SET SERVER CPUS (1:2)
>> 
>> SET SERVER CREATEDELAY 1 SECS
>> 
>> SET SERVER DEBUG OFF
>> 
>> SET SERVER DELETEDELAY 70 MINS
>> 
>> SET SERVER HIGHPIN ON
>> 
>> SET SERVER ENV JAVA_HOME=/usr/tandem/java
>> 
>> SET SERVER ENV JREHOME=/usr/tandem/java/jre
>> 
>> SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/
>> javaextv20/lib/tdmext.jar,-Dupper.debug=true,ABC
>> 
>> SET SERVER LINKDEPTH 1
>> 
>> SET SERVER MAXSERVERS 10
>> 
>> SET SERVER NUMSTATIC 1
>> 
>> SET SERVER PRI 128
>> 
>> SET SERVER TMF ON
>> 
>> SET SERVER STDERR /user/demoSA/logs/ABC.err
>> 
>> SET SERVER STDOUT /user/demoSA/logs/ABC.log
>> 
>> SET SERVER PROGRAM /usr/tandem/java/bin/java
>> 
>> SET SERVER TIMEOUT 90 SECS
>> 
>> SET SERVER SECURITY "N"
>> 
>> SET SERVER CWD /user/demoSA/exe
>> 
>> Ther server got started however I got the erorr 1121 and it gets
>> stopped. 1121(Autorestart disabled). Then I open the error log and
>> found that
>> 
>> Exception in thread "main" java.lang.UnsatisfiedLinkError: openReceive
>> 
>>         at com.tandem.ext.guardian.Receive.openReceive(Native Method)
>> 
>>         at com.tandem.ext.guardian.Receive.open(Receive.java:686)
>> 
>>         at ABC.main(ABC.java:26)
>> 
>> It seems that JAVA server is not able to communicate thru pathway.
>> 
>
>This error message indicates that, when you tried to call the method to open $RECEIVE, the Java Virtual Machine was unable to find the code that implements the Java Toolkit.  The Java Toolkit is what contains the classes you are using to access the $RECEIVE file.  I think the cause is that either the Java Toolkit was not properly installed or you missed a step in setting up your program to use the Java Toolkit.
>
>The documentation I could find online about the Java Toolkit is frustratingly incomplete as far as how to install the Java Toolkit and make those classes accessible to your program, so I'm not certain what you must do to correct the problem.  Perhaps someone else who has set up a program using Java Toolkit will be able to give a more reliable answer.  But I will tell you what I think is correct, and that may let you solve the problem.  If you can find the softdoc for the Java Toolkit (I was not able to find it online), that might contain the information I was unable to locate.  I believe the product number for the Java Toolkit is T2716.  Whoever manages the NonStop system you are using may be able to tell you where to find the softdoc.  Perhaps it will give you the precise directions and you won't have to try to guess from the clues I give below.
>
>I believe that the code that implements a native method, such as the ones in the Java Toolkit, may either be linked into the Java Virtual Machine or it may be accessed via a library linked to at run time.  I believe the normal way for accessing the Java Toolkit code is by linking at run time, but that might have changed since I last heard about this.  If it is linked to at run time, that means that the directory containing the code must be in your PATH environment variable.  There is a possibility that rather than the PATH environment variable, it should be in the _RLD_LIB_PATH environment variable.  The _RLD_LIB_PATH environment variable is described in the section of the NonStop Server for Java Programmer's Reference that discusses the Java Native Interface, but it is unclear to me whether that environment variable is intended for finding HP-supplied Java Native Interface classes or only user-developed Java Native Interface classes.  I seem to remember that the PATH enviro
>nment variable is the correct one, but I mention the other, just in case I'm remembering wrong.  If the Java Toolkit is to be linked into the Java Virtual Machine, then you probably don't have to point to any library when setting up your server, but then, I wouldn't expect to see the error you got.
>
>I also could not find what is the name of the actual directory in which the library containing the native code for the Java Toolkit is installed.  It might be in /usr/tandem/java/bin, or it might be in /usr/tandem/java/jre, or it might be in /usr/tandem/java/lib, or it might be in /usr/tandem/<something-else>, or if it was installed in a nonstandard way on your system, it might be anywhere.  I believe the file is named libtdmext.so.  So perhaps if you look around on your system (or use the find command), you will be able to determine which is the correct directory to use.  If you find it, try adding the name of the directory that contains it to either the PATH or the _RLD_LIB_PATH environment variable.  If you cannot find libtdmext, then that suggests either that the Java Toolkit was not correctly installed on your system, or your system is set up with the Java Toolkit linked into the Java Virtual Machine, though if it is linked into the JVM, I doubt you would have gotten th
>e error that you did.
0
Reply Bill 11/24/2009 1:40:39 AM

Larry, you can create a fileset that contains seperate file elements.
I can't send you the customer's files but as memory serves its
something like

<fileset name="myfileset">

  <file dir="${librarydir}/first.jar"/>
  <file dir="${librarydir}/second.jar"/>
  <file dir="${librarydir}/third.jar"/>
  ...
<f/ileset>

Then <attribute name="Class-Path" ref="myfileset"/>

(I may be confusing my spring and ANT XML syntax, it might be value=
as you showed below).

Bill


On Mon, 23 Nov 2009 08:36:54 -0800 (PST), lyates
<laptoplarry@gmail.com> wrote:
>
>Bill,
>
>I've been successful running a jar file with the server configuration
>as you suggested earlier.
>Using the Ant jar task including:
>
><zipgroupfileset dir="${librarydir}">
>                <include name="**/*.jar" />
></zipgroupfileset>
>
>All the jars I use in my "lib" folder are expanded and my classpath
>thereby shrinks to <attribute name="Class-Path" value=".:./" />
>
>I have been lucky in that there are no conflicts and the Pathway
>server runs successfully.
>
>However, I'd rather the manifest include the jar names in the
>classpath and embed the actual jar files within the main jar and so
>I'll try'n use One-Jar.
>
>Thanks, Bill
>
>-Larry
0
Reply Bill 11/24/2009 1:44:29 AM

Bill,

Thanks for the explanations.  I understand how things fit together much better now.  I hope the guy with the original problem has also benefited as much.

   - Keith

Bill Honaker wrote:
> The G-series supports only the 4.2 JVM version; all Native libraries
> must be linked into the JVM.  This is handled by the systems group of
> your installation.  In the /usr/tandem/java/install directory is a
> Makefile.  The procedures are described here:
> 
> http://docs.hp.com/en/526238-002/526238-002.pdf
> 
> Look on page 50 of the pdf file.  You can edit Makefile and see what's
> in the CUSTLIB_DIRS.  Depending on your installed options, you might
> have the JToolKit, the SQL/MP and/or SQL/MX JDBC drivers.  Your own
> site might also have native code installed (an example of a useful
> utility is the log4j appenders that allow you to write to $EMS).
> 
> If you don't see any reference to the /usr/tandem/javaextv20/lib
> directory (where the jToolKit static library is located) then the
> JToolkit installation script didn't get run corrrectly.
> 
> As an aside, for 'newer' systems I find that it is better to reference
> the version-specific java directories in pathway servers, so for
> example if you were running the 5.0 version of Java, and installed
> 6.0, you could test your applications under the newer environment in
> an orderly fashion instead of as a 'big bang'.
> 
> In other words, point your ENV JAVA_HOME and PROGRAM configurations to
> usr/tandem/nssjava/<version> instead of /user/tandem/java (which is
> just a link to the last version directory that got installed!),
> 
> Just my $.02US
> 
> Bill
> On Mon, 23 Nov 2009 08:13:23 -0800, Keith Dick
> <KeithDick@earthlink.net> wrote:
> 
> 
>>PM wrote:
>>
>>>On Nov 21, 11:29 am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
>>>wrote:
>>>
>>>
>>>>You should see what happens when you add Hibernate and Spring
>>>>together!  The CP length is a problem whether it's a Pathway
>>>>configuration on  NonStop, a shell script on Linux or Unix, or a bat
>>>>or cmd file in Windows.
>>>>
>>>>I found the -jar option and an executable jar to be an elegant
>>>>solution.  I suggest that you let ANT or your IDE help you create the
>>>>Manifest file, the syntax of the Class-Path: element in the manifest
>>>>is actually more stringent than the Pathcom syntax!
>>>>Bill
>>>>
>>>><clip>
>>>>
>>>>
>>>>
>>>>>Bill,
>>>>
>>>>>Thanks for your excellent reply!
>>>>
>>>>>I'm involved with a Spring implementation that has a CLASSPATH length
>>>>>out to wazoo :-)
>>>>>If I create an executable jar of the application then I can optimize
>>>>>the Pathway server config.
>>>>
>>>>>Thanks!
>>>>>-Larry- Hide quoted text -
>>>>
>>>>- Show quoted text -
>>>
>>>
>>>
>>>Thanks for your replies. I have tried with the options and checkd my
>>>classpath settings. However this time I got different error.
>>>I am sending you my server config details
>>>SET SERVER PROCESSTYPE OSS
>>>
>>>SET SERVER AUTORESTART 3
>>>
>>>SET SERVER CPUS (1:2)
>>>
>>>SET SERVER CREATEDELAY 1 SECS
>>>
>>>SET SERVER DEBUG OFF
>>>
>>>SET SERVER DELETEDELAY 70 MINS
>>>
>>>SET SERVER HIGHPIN ON
>>>
>>>SET SERVER ENV JAVA_HOME=/usr/tandem/java
>>>
>>>SET SERVER ENV JREHOME=/usr/tandem/java/jre
>>>
>>>SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/
>>>javaextv20/lib/tdmext.jar,-Dupper.debug=true,ABC
>>>
>>>SET SERVER LINKDEPTH 1
>>>
>>>SET SERVER MAXSERVERS 10
>>>
>>>SET SERVER NUMSTATIC 1
>>>
>>>SET SERVER PRI 128
>>>
>>>SET SERVER TMF ON
>>>
>>>SET SERVER STDERR /user/demoSA/logs/ABC.err
>>>
>>>SET SERVER STDOUT /user/demoSA/logs/ABC.log
>>>
>>>SET SERVER PROGRAM /usr/tandem/java/bin/java
>>>
>>>SET SERVER TIMEOUT 90 SECS
>>>
>>>SET SERVER SECURITY "N"
>>>
>>>SET SERVER CWD /user/demoSA/exe
>>>
>>>Ther server got started however I got the erorr 1121 and it gets
>>>stopped. 1121(Autorestart disabled). Then I open the error log and
>>>found that
>>>
>>>Exception in thread "main" java.lang.UnsatisfiedLinkError: openReceive
>>>
>>>        at com.tandem.ext.guardian.Receive.openReceive(Native Method)
>>>
>>>        at com.tandem.ext.guardian.Receive.open(Receive.java:686)
>>>
>>>        at ABC.main(ABC.java:26)
>>>
>>>It seems that JAVA server is not able to communicate thru pathway.
>>>
>>
>>This error message indicates that, when you tried to call the method to open $RECEIVE, the Java Virtual Machine was unable to find the code that implements the Java Toolkit.  The Java Toolkit is what contains the classes you are using to access the $RECEIVE file.  I think the cause is that either the Java Toolkit was not properly installed or you missed a step in setting up your program to use the Java Toolkit.
>>
>>The documentation I could find online about the Java Toolkit is frustratingly incomplete as far as how to install the Java Toolkit and make those classes accessible to your program, so I'm not certain what you must do to correct the problem.  Perhaps someone else who has set up a program using Java Toolkit will be able to give a more reliable answer.  But I will tell you what I think is correct, and that may let you solve the problem.  If you can find the softdoc for the Java Toolkit (I was not able to find it online), that might contain the information I was unable to locate.  I believe the product number for the Java Toolkit is T2716.  Whoever manages the NonStop system you are using may be able to tell you where to find the softdoc.  Perhaps it will give you the precise directions and you won't have to try to guess from the clues I give below.
>>
>>I believe that the code that implements a native method, such as the ones in the Java Toolkit, may either be linked into the Java Virtual Machine or it may be accessed via a library linked to at run time.  I believe the normal way for accessing the Java Toolkit code is by linking at run time, but that might have changed since I last heard about this.  If it is linked to at run time, that means that the directory containing the code must be in your PATH environment variable.  There is a possibility that rather than the PATH environment variable, it should be in the _RLD_LIB_PATH environment variable.  The _RLD_LIB_PATH environment variable is described in the section of the NonStop Server for Java Programmer's Reference that discusses the Java Native Interface, but it is unclear to me whether that environment variable is intended for finding HP-supplied Java Native Interface classes or only user-developed Java Native Interface classes.  I seem to remember that the PATH envi
ro
>>nment variable is the correct one, but I mention the other, just in case I'm remembering wrong.  If the Java Toolkit is to be linked into the Java Virtual Machine, then you probably don't have to point to any library when setting up your server, but then, I wouldn't expect to see the error you got.
>>
>>I also could not find what is the name of the actual directory in which the library containing the native code for the Java Toolkit is installed.  It might be in /usr/tandem/java/bin, or it might be in /usr/tandem/java/jre, or it might be in /usr/tandem/java/lib, or it might be in /usr/tandem/<something-else>, or if it was installed in a nonstandard way on your system, it might be anywhere.  I believe the file is named libtdmext.so.  So perhaps if you look around on your system (or use the find command), you will be able to determine which is the correct directory to use.  If you find it, try adding the name of the directory that contains it to either the PATH or the _RLD_LIB_PATH environment variable.  If you cannot find libtdmext, then that suggests either that the Java Toolkit was not correctly installed on your system, or your system is set up with the Java Toolkit linked into the Java Virtual Machine, though if it is linked into the JVM, I doubt you would have gotten 
th
>>e error that you did.
0
Reply Keith 11/24/2009 3:17:07 AM

On Nov 24, 8:17=A0am, Keith Dick <KeithD...@earthlink.net> wrote:
> Bill,
>
> Thanks for the explanations. =A0I understand how things fit together much=
 better now. =A0I hope the guy with the original problem has also benefited=
 as much.
>
> =A0 =A0- Keith
>
>
>
>
>
> Bill Honaker wrote:
> > The G-series supports only the 4.2 JVM version; all Native libraries
> > must be linked into the JVM. =A0This is handled by the systems group of
> > your installation. =A0In the /usr/tandem/java/install directory is a
> > Makefile. =A0The procedures are described here:
>
> >http://docs.hp.com/en/526238-002/526238-002.pdf
>
> > Look on page 50 of the pdf file. =A0You can edit Makefile and see what'=
s
> > in the CUSTLIB_DIRS. =A0Depending on your installed options, you might
> > have the JToolKit, the SQL/MP and/or SQL/MX JDBC drivers. =A0Your own
> > site might also have native code installed (an example of a useful
> > utility is the log4j appenders that allow you to write to $EMS).
>
> > If you don't see any reference to the /usr/tandem/javaextv20/lib
> > directory (where the jToolKit static library is located) then the
> > JToolkit installation script didn't get run corrrectly.
>
> > As an aside, for 'newer' systems I find that it is better to reference
> > the version-specific java directories in pathway servers, so for
> > example if you were running the 5.0 version of Java, and installed
> > 6.0, you could test your applications under the newer environment in
> > an orderly fashion instead of as a 'big bang'.
>
> > In other words, point your ENV JAVA_HOME and PROGRAM configurations to
> > usr/tandem/nssjava/<version> instead of /user/tandem/java (which is
> > just a link to the last version directory that got installed!),
>
> > Just my $.02US
>
> > Bill
> > On Mon, 23 Nov 2009 08:13:23 -0800, Keith Dick
> > <KeithD...@earthlink.net> wrote:
>
> >>PM wrote:
>
> >>>On Nov 21, 11:29 am, Bill Honaker <no_spam_bhonaker__@x_i_d.com>
> >>>wrote:
>
> >>>>You should see what happens when you add Hibernate and Spring
> >>>>together! =A0The CP length is a problem whether it's a Pathway
> >>>>configuration on =A0NonStop, a shell script on Linux or Unix, or a ba=
t
> >>>>or cmd file in Windows.
>
> >>>>I found the -jar option and an executable jar to be an elegant
> >>>>solution. =A0I suggest that you let ANT or your IDE help you create t=
he
> >>>>Manifest file, the syntax of the Class-Path: element in the manifest
> >>>>is actually more stringent than the Pathcom syntax!
> >>>>Bill
>
> >>>><clip>
>
> >>>>>Bill,
>
> >>>>>Thanks for your excellent reply!
>
> >>>>>I'm involved with a Spring implementation that has a CLASSPATH lengt=
h
> >>>>>out to wazoo :-)
> >>>>>If I create an executable jar of the application then I can optimize
> >>>>>the Pathway server config.
>
> >>>>>Thanks!
> >>>>>-Larry- Hide quoted text -
>
> >>>>- Show quoted text -
>
> >>>Thanks for your replies. I have tried with the options and checkd my
> >>>classpath settings. However this time I got different error.
> >>>I am sending you my server config details
> >>>SET SERVER PROCESSTYPE OSS
>
> >>>SET SERVER AUTORESTART 3
>
> >>>SET SERVER CPUS (1:2)
>
> >>>SET SERVER CREATEDELAY 1 SECS
>
> >>>SET SERVER DEBUG OFF
>
> >>>SET SERVER DELETEDELAY 70 MINS
>
> >>>SET SERVER HIGHPIN ON
>
> >>>SET SERVER ENV JAVA_HOME=3D/usr/tandem/java
>
> >>>SET SERVER ENV JREHOME=3D/usr/tandem/java/jre
>
> >>>SET SERVER arglist -Xabend,-cp,/user/demoSA/exe/sa.jar:/usr/tandem/
> >>>javaextv20/lib/tdmext.jar,-Dupper.debug=3Dtrue,ABC
>
> >>>SET SERVER LINKDEPTH 1
>
> >>>SET SERVER MAXSERVERS 10
>
> >>>SET SERVER NUMSTATIC 1
>
> >>>SET SERVER PRI 128
>
> >>>SET SERVER TMF ON
>
> >>>SET SERVER STDERR /user/demoSA/logs/ABC.err
>
> >>>SET SERVER STDOUT /user/demoSA/logs/ABC.log
>
> >>>SET SERVER PROGRAM /usr/tandem/java/bin/java
>
> >>>SET SERVER TIMEOUT 90 SECS
>
> >>>SET SERVER SECURITY "N"
>
> >>>SET SERVER CWD /user/demoSA/exe
>
> >>>Ther server got started however I got the erorr 1121 and it gets
> >>>stopped. 1121(Autorestart disabled). Then I open the error log and
> >>>found that
>
> >>>Exception in thread "main" java.lang.UnsatisfiedLinkError: openReceive
>
> >>> =A0 =A0 =A0 =A0at com.tandem.ext.guardian.Receive.openReceive(Native =
Method)
>
> >>> =A0 =A0 =A0 =A0at com.tandem.ext.guardian.Receive.open(Receive.java:6=
86)
>
> >>> =A0 =A0 =A0 =A0at ABC.main(ABC.java:26)
>
> >>>It seems that JAVA server is not able to communicate thru pathway.
>
> >>This error message indicates that, when you tried to call the method to=
 open $RECEIVE, the Java Virtual Machine was unable to find the code that i=
mplements the Java Toolkit. =A0The Java Toolkit is what contains the classe=
s you are using to access the $RECEIVE file. =A0I think the cause is that e=
ither the Java Toolkit was not properly installed or you missed a step in s=
etting up your program to use the Java Toolkit.
>
> >>The documentation I could find online about the Java Toolkit is frustra=
tingly incomplete as far as how to install the Java Toolkit and make those =
classes accessible to your program, so I'm not certain what you must do to =
correct the problem. =A0Perhaps someone else who has set up a program using=
 Java Toolkit will be able to give a more reliable answer. =A0But I will te=
ll you what I think is correct, and that may let you solve the problem. =A0=
If you can find the softdoc for the Java Toolkit (I was not able to find it=
 online), that might contain the information I was unable to locate. =A0I b=
elieve the product number for the Java Toolkit is T2716. =A0Whoever manages=
 the NonStop system you are using may be able to tell you where to find the=
 softdoc. =A0Perhaps it will give you the precise directions and you won't =
have to try to guess from the clues I give below.
>
> >>I believe that the code that implements a native method, such as the on=
es in the Java Toolkit, may either be linked into the Java Virtual Machine =
or it may be accessed via a library linked to at run time. =A0I believe the=
 normal way for accessing the Java Toolkit code is by linking at run time, =
but that might have changed since I last heard about this. =A0If it is link=
ed to at run time, that means that the directory containing the code must b=
e in your PATH environment variable. =A0There is a possibility that rather =
than the PATH environment variable, it should be in the _RLD_LIB_PATH envir=
onment variable. =A0The _RLD_LIB_PATH environment variable is described in =
the section of the NonStop Server for Java Programmer's Reference that disc=
usses the Java Native Interface, but it is unclear to me whether that envir=
onment variable is intended for finding HP-supplied Java Native Interface c=
lasses or only user-developed Java Native Interface classes. =A0I seem to r=
emember that the PATH envi
> ro
> >>nment variable is the correct one, but I mention the other, just in cas=
e I'm remembering wrong. =A0If the Java Toolkit is to be linked into the Ja=
va Virtual Machine, then you probably don't have to point to any library wh=
en setting up your server, but then, I wouldn't expect to see the error you=
 got.
>
> >>I also could not find what is the name of the actual directory in which=
 the library containing the native code for the Java Toolkit is installed. =
=A0It might be in /usr/tandem/java/bin, or it might be in /usr/tandem/java/=
jre, or it might be in /usr/tandem/java/lib, or it might be in /usr/tandem/=
<something-else>, or if it was installed in a nonstandard way on your syste=
m, it might be anywhere. =A0I believe the file is named libtdmext.so. =A0So=
 perhaps if you look around on your system (or use the find command), you w=
ill be able to determine which is the correct directory to use. =A0If you f=
ind it, try adding the name of the directory that contains it to either the=
 PATH or the _RLD_LIB_PATH environment variable. =A0If you cannot find libt=
dmext, then that suggests either that the Java Toolkit was not correctly in=
stalled on your system, or your system is set up with the Java Toolkit link=
ed into the Java Virtual Machine, though if it is linked into the JVM, I do=
ubt you would have gotten
> th
> >>e error that you did.- Hide quoted text -
>
> - Show quoted text -

Thanks everyone for your replies. The problem is solved. The problem
was with the usr/java/tandem/java directory. We use nssjava and and
store all the jar files there. Now the server is running fine.

Thanks once again. Really this is a learning for me as one of my old
JAVA server is still using usr/tandem/java directory and running fine,.
0
Reply PM 11/24/2009 6:11:50 PM

On Nov 23, 8:44=A0pm, Bill Honaker <no_spam_bhonaker__@x_i_d.com> wrote:
> Larry, you can create a fileset that contains seperate file elements.
> I can't send you the customer's files but as memory serves its
> something like
>
> <fileset name=3D"myfileset">
>
> =A0 <file dir=3D"${librarydir}/first.jar"/>
> =A0 <file dir=3D"${librarydir}/second.jar"/>
> =A0 <file dir=3D"${librarydir}/third.jar"/>
> =A0 ...
> <f/ileset>
>
> Then <attribute name=3D"Class-Path" ref=3D"myfileset"/>
>
> (I may be confusing my spring and ANT XML syntax, it might be value=3D
> as you showed below).
>
> Bill
>
> On Mon, 23 Nov 2009 08:36:54 -0800 (PST), lyates
>
> <laptopla...@gmail.com> wrote:
>
> >Bill,
>
> >I've been successful running a jar file with the server configuration
> >as you suggested earlier.
> >Using the Ant jar task including:
>
> ><zipgroupfileset dir=3D"${librarydir}">
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<include name=3D"**/*.jar" />
> ></zipgroupfileset>
>
> >All the jars I use in my "lib" folder are expanded and my classpath
> >thereby shrinks to <attribute name=3D"Class-Path" value=3D".:./" />
>
> >I have been lucky in that there are no conflicts and the Pathway
> >server runs successfully.
>
> >However, I'd rather the manifest include the jar names in the
> >classpath and embed the actual jar files within the main jar and so
> >I'll try'n use One-Jar.
>
> >Thanks, Bill
>
> >-Larry

Bill,
I've implemented ONE-JAR and the Pathway server runs perfectly!

BTW, there are ANT tasks, manifest and manifestclasspath, that handle
everything!
Manifestclasspath will transform the <classpath refid>'s fully
qualified filenames to relative paths.

Thanks, again, for the ARGSLIST info.
I have completely eliminated the server CLASSPATH parameter.

-Larry
0
Reply lyates 11/25/2009 5:00:07 PM

20 Replies
4093 Views

(page loaded in 0.546 seconds)

Similiar Articles:


















7/21/2012 8:23:03 PM


Reply: