Solved

Java NoClassDefFoundError

Posted on 2004-08-17
14
1,937 Views
Last Modified: 2013-12-27
Hi,

I am trying to install an application setup_vbis.bin on a Solaris machine. This app needs the Java virtual machine and heres where I am hving trouble. There was no classpath set so I did the fwg:

1. export $CLASSPATH= /usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.

2. tested a simple Hello World program now and it executed fine.

3. When I launch the installer the fwg happens:

Initializing InstallShield Wizard...

Preparing Java (tm) Virtual Machine.....
.........................................................
Exception in thread "main" java.lang.NoClassDefFoundError: run

I figure the problem is with the classpath but not sure.. can anyone pl help me out ??

thnx,
sg
0
Comment
Question by:sands76
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 11820683
What version of java?
Usually jave is in /usr/java, but that's not in your CLASSPATH?
Assuming you are using ksh, you don't want the $, and is the space between the = and /usr really there, or is it just a typo?  There shouldn't be a space.
export CLASSPATH=/usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.
0
 
LVL 1

Author Comment

by:sands76
ID: 11821008
hi,

The Java version is 1.4.2_04-b05 and it is located in /usr/local/java.

There was no classpath so I had to generate one. about the space, it was a typo.

In anycase with or without the $ the problem continues to be the same but as I said, executing a simple hello world pgm works fine..

Is there anything else that needs to be configured ??

thnx
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11826029
Does PATH list /usr/local/java/bin before the Sun copy of java (/usr/java/bin)?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Author Comment

by:sands76
ID: 11829191
No. The path lists only :

/usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.

and nothing else.. /tmp is where I hv the bin to be installed.
0
 
LVL 18

Expert Comment

by:liddler
ID: 11829253
jlevie is asking for PATH, not CLASSPATH

Type:
which java
to see which java you are running
0
 
LVL 1

Author Comment

by:sands76
ID: 11831115
Hi,

echo $path doenst show anything.

which java returns -> /usr/bin/java

But there is no dir as /usr/bin/java. But there are some links in /usr/bin as:

lrwxrwxrwx   1 root     other         16 May 25 14:38 java -> ../java/bin/java
lrwxrwxrwx   1 root     other         17 May 25 15:04 javac -> ../java/bin/javac

So I figure it means /usr/java/bin

I reconfigured the classpath as follows:

 export CLASSPATH=/usr/java:/usr/java/bin:/usr/java/lib/tools.jar:/tmp:.

but the same problem continues.

0
 
LVL 40

Expert Comment

by:jlevie
ID: 11831374
I thought athat's what you'd see from 'which java'. Sun installs a copy of Java in /usr/java and creates a symlink from /usr/java/bin/java to /usr/bin/java. Since you PATH doesn't list /usr/local/java/bin before /usr/bin simply executing "java some-prog" (like install shield is doing) will use the copy in /usr/bin, not /usr/local/java/bin.

If you prepend /usr/local/java/bin to your PATH you should have better luck. For ksh, bash, or sh that can be done with:

PATH=/usr/local/java/bin:$PATH; export PATH

for csh or tcsh you could do:

set path = (/usr/local/java bin $path)
0
 
LVL 1

Author Comment

by:sands76
ID: 11832230
Nope.. the problem continues.. I tried on a diff Solaris machine and nothings changed.. heres what I hv done:

bash-2.05$  echo $CLASSPATH

bash-2.05$  export CLASSPATH=/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java:/opt/vignette/proVCM73/java/lib/tools.jar:/tmp:.
bash-2.05$  echo $CLASSPATH
/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java:/opt/vignette/proVCM73/java/lib/tools.jar:/tmp:.
bash-2.05$  PATH=/opt/vignette/proVCM73/java/bin:$PATH; export PATH
bash-2.05$  echo $PATH
/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java/bin:/usr/bin:/bin:/usr/sbin:/sbin

bash-2.05$  ./setup_vbis_sol.bin -is:tempdir /tmp
InstallShield Wizard

Initializing InstallShield Wizard...

Preparing Java(tm) Virtual Machine...
...................................
...................................
..........................Exception in thread "main" java.lang.NoClassDefFoundError: run

any more suggestions !?
thnx
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11832415
Earlier you said that "The Java version is 1.4.2_04-b05 and it is located in /usr/local/java.", but above you are setting the CLASSPATH and PATH to point to /opt/vignette/proVCM73. Does that directory contain a Java distribution?
0
 
LVL 1

Author Comment

by:sands76
ID: 11832535
This is a diff machine i am trying on.. and Yes, There exists the same version 1.4.2_04-b05 in this dir /opt/vignette/proVCM73 too.

And as I said before, I hv no problem executing a simple hello world program in either of these 2 machines once the classpath is set as described above.. the problem starts when trying to install this app. :(
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11832732
The Vignette docs that I can find talk only about installing the run-time services on Solaris, and they indicate that you'd be executing setup_vbis_sol.bin. Are you certain that you are trying to do the install correctly?
0
 
LVL 1

Author Comment

by:sands76
ID: 11832902
I hv their dev guide and its actually looks pretty simple..I hv  mailed their support too but am betting on obtaining a faster soln here !

They hv indicate a cmd :  ./setup_vbis_sol.bin -is:tempdir /tmp to be executed and thats it.. but the prob appears to be with the env..

0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12211274
PAQed, with points refunded (125)

CetusMOD
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question