running Java on VMS issues (393 Views)
Reply
Regular Advisor
SAMI AHMAD
Posts: 164
Registered: ‎06-19-2008
Message 1 of 10 (393 Views)
Accepted Solution

running Java on VMS issues

hi !

I am getting error invoking java as follows, can someone tell me whats wrong ?

$java -Doracle.jdbc.Trace=false -classpath ".;bin;%JCE_DIR%\IngrianNAE.jar;%JCE_DIR%\log4j-1.2.9.jar;%ORACLE_JAR%;l
ib\postgresql-8.1-405.jdbc3.jar;lib\sqljdbc.jar" com.ingrian.migrot.MigrateRotate

Unrecognized option: -doracle.jdbc.trace=false
Could not create the Java virtual machine.
$!
Regular Advisor
SAMI AHMAD
Posts: 164
Registered: ‎06-19-2008
Message 2 of 10 (393 Views)

Re: running Java on VMS issues

sorry the actual command and error was :

$java -classpath ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]IngrianNAE.jar:ORACLE:[ORACLE9I.INGRIAN.ON
LINE.INGRIAN_MIGROTATION.LIB]log4j-1.2.9.jar:ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]postgresql-8.1
-405.jdbc3.jar:ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]sqljdbc.jar com.ingrian.migrot.MigrateRotate

Exception in thread "main" java.lang.NoClassDefFoundError: com/ingrian/migrot/migraterotate
Honored Contributor
Craig A Berry
Posts: 495
Registered: ‎05-06-2003
Message 3 of 10 (393 Views)

Re: running Java on VMS issues

You cannot separate the members of the classpath with a colon and also use VMS syntax filenames since those path specs include colons as device name separators. Try setting up your environment with the following commands first, then run your command after converting the names of the paths in your classpath to Unix syntax.

$ SET PROCESS/PARSE_STYLE=EXTENDED
$ DEFINE/NOLOG/JOB DECC$ARGV_PARSE_STYLE TRUE
$ DEFINE/NOLOG/JOB DECC$EFS_CASE_PRESERVE TRUE
$ DEFINE/NOLOG/JOB DECC$EFS_CASE_SPECIAL TRUE
$ DEFINE/NOLOG/JOB DECC$EFS_CHARSET TRUE
$ DEFINE/NOLOG/JOB DECC$ENABLE_GETENV_CACHE TRUE
$ DEFINE/NOLOG/JOB JAVA$FILENAME_CONTROLS 8 ! only enable the mixed UNIX/VMS filespec mapping
$ DEFINE/NOLOG/JOB JAVA$READDIR_CASE_DISABLE TRUE ! turns off auto. class/source case-sensitive name extraction

Regular Advisor
SAMI AHMAD
Posts: 164
Registered: ‎06-19-2008
Message 4 of 10 (393 Views)

Re: running Java on VMS issues

hi Craig!

I defined all the logicals that you mentioned but Iam still getting the same error. Also the jar utility can't find the jar file where as the dir command can find the file :

QATST$ jar tvf ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]IngrianMigrot.jar
----_JAVA_LAUNCHER_DEBUG----
JRE path is /sys$common/java$131/jre
jvm.cfg[0] = ->-classic<-
1 micro seconds to parse jvm.cfg
Does `java$jvm_shr' exist ... yes.
JVM path is java$jvm_shr
JavaVM args:
version 0x00010002, ignoreUnrecognized is JNI_FALSE, nOptions is 4
option[ 0] = '-Denv.class.path=/oracle/oracle9i/ingrian/online/ingrian_migrotation/lib/IngrianNAE.jar:/oracle/oracle9i/ingrian/o
nline/ingrian_migrotation/lib/IngrianMigrot.jar:/oracle/oracle9i/ingrian/online/ingrian_migrotation/lib/log4j-1_2_13.jar:/oracle/ora
cle9i/ingrian/online/ingrian_migrotation/lib/postgresql-8.1-405_jdbc3.jar:/oracle/oracle9i/ingrian/online/ingrian_migrotation/lib/sq
ljdbc.jar:/oracle/oracle9i/ingrian/online/ingrian_migrotation/lib/ojdbc14.jar:/oracle/oracle9i/ingrian/online/ingrian_migrotation/bi
n'
option[ 1] = '-Dapplication.home=/sys$common/java$131'
option[ 2] = '-Djava.class.path=/sys$common/java$131/lib/tools.jar:/sys$common/java$131/classes'
option[ 3] = '-Xms8m'
1 micro seconds to InitializeJVM
Main-Class is 'sun.tools.jar.Main'
Apps' argc is 2
argv[ 0] = 'tvf'
argv[ 1] = 'ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]IngrianMigrot.jar'
1 micro seconds to load main class
----_JAVA_LAUNCHER_DEBUG----
java.io.FileNotFoundException: ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]IngrianMigrot.jar (no such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java, Compiled Code)
at sun.tools.jar.Main.run(Main.java, Compiled Code)
at sun.tools.jar.Main.main(Main.java, Compiled Code)
QATST$ dir ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]IngrianMigrot.jar

Directory ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]

IngrianMigrot.jar;1

Total of 1 file.
Honored Contributor
Craig A Berry
Posts: 495
Registered: ‎05-06-2003
Message 5 of 10 (393 Views)

Re: running Java on VMS issues

I don't know exactly what the problem is but it looks like you are running Java 1.3.1, which is really quite old -- make sure the (apparently) Oracle-supplied classes you are using support that version.

What happens if you simply do:

$ jar tvf IngrianMigrot.jar

and let the classpath settings determine where to look?

Make sure you treat multiple dots consistently. If the classpath is log4j-1.2.9.jar, then the file had better be on an ODS-5 disk and named log4j-1^.2^.9.jar. If the classpath is log4j-1_2_9.jar, then the actual filename should match that (underscores, not escaped dots).


Honored Contributor
Willem Grooters
Posts: 2,038
Registered: ‎05-21-2003
Message 6 of 10 (393 Views)

Re: running Java on VMS issues

Java is (fairly extremely) case sensitive. VMS isn't at all unless explicitly set that way.
Could that be the cause?
Willem Grooters
OpenVMS Developer & System Manager
Regular Advisor
SAMI AHMAD
Posts: 164
Registered: ‎06-19-2008
Message 7 of 10 (393 Views)

Re: running Java on VMS issues

I am now getting this error can you tell whats wrong?

[Loaded java.security.cert.Certificate from /sys$common/java$142/jre/lib/rt.jar]
[Loaded [Ljava.security.cert.Certificate;]
Exception in thread "main" java.lang.NoClassDefFoundError: MigrateRotate (wrong name: com/ingrian/migrot/MigrateRotate)
Honored Contributor
Duncan Morris
Posts: 666
Registered: ‎08-07-2003
Message 8 of 10 (393 Views)

Re: running Java on VMS issues

Hi, Sami Ahmad

from your Forum Profile:


I have assigned points to 0 of 17 responses to my questions.


Maybe you can find some time to do some assigning?

http://forums1.itrc.hp.com/service/forums/helptips.do?#33

Mind, I do NOT say you necessarily need to give lots of points. It is fully up to _YOU_ to decide how many. If you consider an answer is not deserving any points, you can also assign 0 ( = zero ) points, and then that answer will no longer be counted as unassigned.
Consider, that every poster took at least the trouble of posting for you!

To easily find your streams with unassigned points, click your own name somewhere.
This will bring up your profile.
Near the bottom of that page, under the caption "My Question(s)" you will find "questions or topics with unassigned points " Clicking that will give all, and only, your questions that still have unassigned postings.

Thanks on behalf of your Forum colleagues.

PS. nothing personal in this. I try to post it to everyone with this kind of assignment ratio in this forum. If you have received a posting like this before please do not take offence none is intended!

Honored Contributor
Willem Grooters
Posts: 2,038
Registered: ‎05-21-2003
Message 9 of 10 (393 Views)

Re: running Java on VMS issues

You stated before:

ORACLE:[ORACLE9I.INGRIAN.ONLINE.INGRIAN_MIGROTATION.LIB]

in all uppercase.
As stated: Java is extremely sensitive to case.
By renaming each of these directories to lowercase:

$ rename UPPER.DIR "lower.DIR"

or have the right case used in the any of your path declarations.
Willem Grooters
OpenVMS Developer & System Manager
Regular Advisor
SAMI AHMAD
Posts: 164
Registered: ‎06-19-2008
Message 10 of 10 (393 Views)

Re: running Java on VMS issues

I resolved the issue by following the advise in this msg trail plus adding few things like defining JAVA$CLASSPATH variable and using st proces/case=sensitive while unziping the class files.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.