Solved

Java NoClassDefFoundError

Posted on 2004-08-17
14
1,930 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IBM AIX Cannot Install AIX ToolKit Applications for Linux 11 142
sed -- search an replace multiple pattern 11 69
Best way to handle awk return value 6 66
unix in java example 9 53
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now