Java.lang.NoClassDefFoundError: Exception in thread "main"
Hello People,
I am aware that this topic has been raised before. I have browsed through all the postings of this particular question, but i have not found the solution.
While compilign i get no errors but this is what i get when i run the java program.
java.lang.NoClassDefFoundError: Exception in thread "main"
Tool completed with exit code 1
The following is my path and classpath files under autoexec.bat
SET PATH=%PATH%;C:\j2sdk1.4.0_03\bin
SET CLASSPATH=.;%CLASSPATH%;C:\j2sdk1.4.0_03\bin
These are the settings i have in MY COMPUTER properties/environments
SYSTEM VARIABLES
Variable - classpath
Value - C:\Program Files\TextPad 4
USER VARIABLES
Variable - PATH
Value - C:\j2sdk1.4.0_03\bin
SYSTEM VARIABLES
Variable - path
Value - C:\PROGRA~1\PVCS\VM\win32\bin;C:\WINNT4\system32;C:\WINNT4;C:\WINNT4\system32\nls\ENGLISH;C:\WINNT4\system32\nls;C:\Program Files\Rational\common
USER VARIABLES
Variable - PATH
Value - C:\j2sdk1.4.0_03\bin
I hope this infromation will help.
Thanks
Regards,
Shah
SET PATH=%PATH%;C:\j2sdk1.4.0_03\bin
SET CLASSPATH=.;%CLASSPATH%;C:\j2sdk1.4.0_03\bin
These are the settings i have in MY COMPUTER
properties/environments
SYSTEM VARIABLES
Variable - classpath
Value - C:\Program Files\TextPad 4I am concerned that the classpath in the autoexec.bat is different from what you posted under System variables. What version of Windows are you running? autoexec.bat is used by 98. Others use the system variables. The classpath you show for autoexec.bat looks OK but the classpath you show for system variables looks wrong. It should be the same as what you show for autoexec.bat You do not need the sdk\bin directory in your classpath unless you plan to put classes there.
The NoClassDefFound error means that the java.exe command could not find the class that you specified. You did not post the command that you entered. You may have specified the class wrong. Otherwise, it is probably a classpath problem.
Similar Messages
-
I've just started to take on java, and some examples from my learning source
show the
javac.exe fileincluded.java
to
java.exe fileincluded
method. Although I can compile fine, when I go to run I get a java.exe error - Exception in thread "main" java.lang.NoClassDefFoundError:.
I thought it was an environment variable problem as I'm running win xp.
I've gotten the bin directory included, and I've previously had visual studio .net installed
so the INCLUDE and LIB variables are set to those directories. I've tried to attach the java /lib and /bin directories by ";C:\PROGRAM FILES\JAVA\JDK1.5.0_02\LIB" etc,
and that didn't work. What can I do to fix this problem?I get the I/O exception while reading: D:\Java\HelloApplet (The system cannot find the file specified). I have previously compiled HelloApplet.java into HelloApplet.class using javac.exe
the two include statements in the sample HelloApplet I'm using are
import java.applet.*;
import java.awt.*;
I also have a ComponentEventTest.java file which I've made into a class with these two
include statements:
import java.awt.*;
import java.awt.event.*;
I can however compile .java files which have no include statements.
I take it that my classpath is not set correctly. Like I said earlier, I'm using winxp
and trying to set the classpath variable under system. I have tried under user too. The path names I've tried setting are C:\Program Files\Java\jdk1.5.0_02\, C:\Program Files\Java\jdk1.5.0_02\lib, C:\Program Files\Java\jdk1.5.0_02\include, and C:\Program Files\Java\jdk1.5.0_02\;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\include.
How can I correct this? If it's possible, I would like to set a variable in windows
versus having to type extra commands at the command prompt everytime I try
to run a java class with java.exe. Any help would be much appreciated -
When compiling one of my projects, I am getting this error suddenly:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14
at adobe.abc.GlobalOptimizer$InputAbc.readCode(GlobalOptimizer.java:1510)
at adobe.abc.GlobalOptimizer$InputAbc.readBody(GlobalOptimizer.java:682)
at adobe.abc.GlobalOptimizer$InputAbc.readBodies(GlobalOptimizer.java:403)
at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:326)
at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
Compilation failed while executing : ADT
but only when targeting iOS. fo Android only, it works fine. Anyone have any ideas? I also logged it as a bug.I get the I/O exception while reading: D:\Java\HelloApplet (The system cannot find the file specified). I have previously compiled HelloApplet.java into HelloApplet.class using javac.exe
the two include statements in the sample HelloApplet I'm using are
import java.applet.*;
import java.awt.*;
I also have a ComponentEventTest.java file which I've made into a class with these two
include statements:
import java.awt.*;
import java.awt.event.*;
I can however compile .java files which have no include statements.
I take it that my classpath is not set correctly. Like I said earlier, I'm using winxp
and trying to set the classpath variable under system. I have tried under user too. The path names I've tried setting are C:\Program Files\Java\jdk1.5.0_02\, C:\Program Files\Java\jdk1.5.0_02\lib, C:\Program Files\Java\jdk1.5.0_02\include, and C:\Program Files\Java\jdk1.5.0_02\;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\include.
How can I correct this? If it's possible, I would like to set a variable in windows
versus having to type extra commands at the command prompt everytime I try
to run a java class with java.exe. Any help would be much appreciated -
Web services java.lang.NoClassDefFoundError Exception
Hi,
I am trying to run example Echo01.java in chapter "Simple API for XML" on web services tutorial,
it has been compiled, no exception, but when I run it , I got the following exception.
Any ideal?
Thanks
Bruce Xie
D:\JWSDP-~2\docs\tutorial\examples\jaxp\sax\samples>java Echo01 slideSample01.xml
Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
D:\JWSDP-~2\docs\tutorial\examples\jaxp\sax\samples>I also get the same problem.
the .jar files I have put in c:\jdk1.3.1\jre\lib\ext
and I also use -classpath point to all jar files again, but the problem still be happened.
have any more idea?
Cheers,
Sanphet -
Java.lang.NoClassDefFoundError exception when accessing BDB container using WAS
Dear Techies,
I installed BDB 2.5.16 on a Solaris 10 machine using the below build arguments.
bash ./buildall.sh -c gcc -x g++ --with-configure-env="CFLAGS='-mcpu=v9' CXXFLAGS='-mcpu=v9' LDFLAGS='-mcpu=v9 -L$PWD/install/lib'" --enable-java --prefix=<installation target path>
I am able to create BDB container and access it from a standalone java class. But, when I try to achieve the same using application deployed on WebSphere (WAS 7.0.0.23 ND 64 bit), it throws me the below error:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sleepycat.db.internal.db_javaJNI
at com.sleepycat.db.internal.DbEnv.<init>(DbEnv.java:264)
at com.sleepycat.db.EnvironmentConfig.createEnvironment(EnvironmentConfig.java:3910)
at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:3863)
at com.sleepycat.db.Environment.<init>(Environment.java:93)
at com.ins.sot.batch.CreateBDBEnvProcessor.process(CreateBDBEnvProcessor.java:59)
at com.ins.batch.BatchDeligator.deligateJob(BatchDeligator.java:32)
at com.ins.batch.BatchService.processBatch(BatchService.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMethod(JavaDispatcher.java:178)
at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOperation(JavaDispatcher.java:141)
at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequestResponse(SoapRPCProcessor.java:490)
at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMessage(SoapRPCProcessor.java:433)
at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessage(BasicDispatcher.java:134)
at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invoke(SessionDispatcher.java:204)
I am not sure what the problem is, and what to do next. Is it a 32-bit JVM vs 64-bit JVM (on WAS) issue? Can someone kindly help?
This is my first application with BDB. Kindly bear if I sound too basic.
Thanks & Regards
AmitHello, the missing class is in reposimpl.jar. In fact you need to add a lot of jars to publicapi.jar. Publicapi.jar is simply a public entry point to the common library used by other components (the GUI, OMBPlus,etc). I suggest you browse the scripts OWB_HOME/owb/bin/unix/setowbenv.sh or OWB_HOME/owb/bin/win32/setowbenv.bat depending on you OS, and start with the content of the OMBCLASSPATH variable.
Make sure you have corrected the problem with JCE libraries, as mentioned in thread OWB client not working
pubapi_javadoc.jar contains the docs, but if you've reached this far I suppose you already have it.
Good work, Antonio -
Java.lang.NoClassDefFoundError . Please help
Hi everyone!
I have this problem...i create a small java program, like "hello world". It is ok to compile and run it. The directory structure is as follows:
/some/files/mypackage/myclass.java
if i put in my source pacake mypackage/myclass, then i can compile the program, but when i try to run it i get this error:
java.lang.NoClassDefFoundError
Exception in thread "main" java.lang.NoClassDefFoundError: myclass (wrong name: mypackage/myclass)
Thanks!!!You can always search the forum for answers - just put "wrong name" in the search box.
In your case, you entered "java myclass" but the class that the jvm found was named mypackage/myclass. In other words, the myclass class is defined to be in the mypackage package so the fully qualified name of the class is mypackage/myclass (or mypackage.myclass). Your command needs to be "java mypackage/myclass" Most likely, you need to "cd /some/files/" before entering the command to run it. -
Problems Installing ABAP Netweaver 7 - java.lang.NoClassDefFoundError:
When I try to install this version of a ABAP Netweaver in my notebook, with Windows XP, an error message appers saying that "java.lang.NoClassDefFoundError: runException in thread main "
I've already configured the enviroment variable and I've tested running javac through command line . The Microsoft Loopback adapter is configured too ( I think that this error dosent have any relation to this configuration).
The only topic that ive found in forum its here: Software Downloads and the solution propoused there doesn't works for me.
Can anyone help me?
ThanksHi,
it's me again
I think that my .jar is not corrupted because I've tried to install in another machines and the error doesn't occur and I've used this DVD in the same notebook, but in a VM without problems.
Well, then the files should be really ok.
Maybe a problem with SP2?
No, the trail version is working fine with SP2.
Before I have to leave the office now two additional advices/attempts from me:
1. Please make sure that you've deactivated all installed antivirus- and/or firewall-programs while installing - e.g. the in SP2 included one.
2. Try to download the latest Java version from http://java.com/en/download/index.jsp
3. Install it to a new directory
4. Point the environment variable JAVA_HOME to the new directory
5. Restart your computer
6. Test the proper installation of Java with java -version
7. Try to restart the setup.
If it fails again please check the event log of Windows. Perhaps there is a helpful error message logged.
But I cross the fingers that it's working.
Regards,
Norman Schröder
Sorry for my wrong english.
I think I have to say the same
But I can understand you very well so don't think about it. -
Stuck for 2 days: Exception in thread "main" java.lang.NoClassDefFoundError
I wrote the code in netbeans 5.5 under windows XP and compiled perfectly. I tried to run the generated Jar file code in the command prompt and it did work perfectly.
C:\Datahub\dist> java -jar Datahub.jar
BUT when I took the jar file and tried to run it under linux here is what I got:
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: main.hw
at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:Datahub.jar,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
...4 more
The project i am working on is funded by IBM and they will be really mad if it didn't work :(
Please help.It is not clear what You want to run under Linux. Jar under JVM or native code? If You are going to use JVM make it clear for Yourself which one You are going to use and then make sure it is installed properly.
-
Run time error - Exception in thread "main" java.lang.NoClassDefFoundError:
Can can one help me with this error:
Exception in thread "main" java.lang.NoClassDefFoundError: TestEnv
The program is a simple one
import java.io.*;
import java.util.*;
import java.lang.*;
import java.lang.String.*;
//A Very Simple Example
class TestEnv {
public static void main(String[] args){
System.out.println("Env is fine");
Compile the program:
javac TestEnv.java
Run the program:
java TestEnv
Error: Exception in thread "main" java.lang.NoClassDefFoundError: TestEnvTry setting the classpath properly. It seems the runtime evironment is unable to find the compiled class files. Nothing else is wrong.
--Anil -
Hello World App : Exception in thread "main" java.lang.NoClassDefFoundErro
Hi
I have downloaded a latest version of JDK, I have several other versions on my machine from other times i endeavored to work on Java, but never got to doing so.
I have compiled the HelloWorldApp (code below) but when i try to run it, I get the error below: My java version is listed as 1.5.0_06. Any insight would be great.
F:\GamingExtravaGanza>java HelloWorldApp.class
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp/class
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}F:\GamingExtravaGanza>java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
MikeI had tried without the class extension, too. Anyone have ideas for why i am getting the error ?
F:\GamingExtravaGanza>java HelloWorldApp
Exception in thread "main" java.lang.UnsupportedClassVersionError:
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Sour
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Metho
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source) -
BEA WLS 9.0 java.lang.NoClassDefFoundError: utils/ImportPrivateKey
Hi
I’m newbie on this forum and on BEA WebLogic 9.0.
I have to import my certificate in the keystore in order to setup SSL connection.
I’m trying to use the java utils provided by BEA WL, but I have this error:
bash-3.00# java utils.ImportPrivateKey
Exception in thread "main" java.lang.NoClassDefFoundError: utils/ImportPrivateKey
Suggestions ?
Thanks for any help.Hi,
The reason why you've got this error is because you didn't set the WebLogic context, prior to the use of the tool.
To do so, first execute the script WLS_HOME\server\bin\setWLSEnv.sh or setWLSEnv.cmd, depending on your environment.
Then, it should work.
Regards. -
Hi Guys!
I want craete the new user 'jdoe' for domain 'tst2_domain' (WebLogic Server Version: 10.3.5.0)
For it I have script 'create_user.sh':
# Set the Environment Variables
/home/testuser/Oracle/Middleware/user_projects/domains/tst2_domain/bin/setDomainEnv.sh
export JAVA_HOME=/home/testuser/Oracle/Middleware/jdk160_24/
export PATH=$PATH:$JAVA_HOME/bin/
export CLASSPATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/modules/com.bea.common.configfwk_1.5.0.0.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-api.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-impl.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-common.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-resources.jar
# Execute the WLST script..
cd resources
java weblogic.WLST createUsers.py.../resources/createUsers.py:
url = 'localhost:7001'
username = 'weblogic'
password = 'welcome1'
print 'Adding users to DefaultAuthenticator.'
connect(username, password, url)
# Check if user already exists
cd('/')
authProvider = cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
if authProvider.userExists('jdoe'):
print 'User jdoe already exists'
exit()
else:
# Create users
print 'Creating new user: jdoe'
authProvider.createUser('jdoe','welcome2','a sample service bus administrator')
authProvider.addMemberToGroup('Administrators','jdoe')
print 'Users created successfully.'
exit()Domain 'tst2_domain' is running...
I started the create_user.sh and then i had the error:
$ ./create_user.sh
Initializing WebLogic Scripting Tool (WLST) ...
Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic.management.scripting.WLScriptContext
Could you please help me? Which the problem in the script?
$ ./setWLSEnv.sh
CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
Your environment has been set.
$ java weblogic.WLST
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic.WLST
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: weblogic.WLST not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)But if run script as $ ./wlst.sh /home/testuser/create_user/resources/createUsers.py - its ok!
$ ./wlst.sh /home/testuser/labs/Practice_05/create_user/resources/createUsers.py
CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
Your environment has been set.
CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/home/testuser/Oracle/Middleware/utils/config/10.3/config-launch.jar::/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbytools.jar::
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Adding users to DefaultAuthenticator.
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'tst2_as_server' that belongs to domain 'tst2_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
Creating new user: jdoe
Users created successfully.
Exiting WebLogic Scripting Tool. -
Javax.servlet.ServletException & java.lang.NoClassDefFoundError
I am getting this javax.servlet.ServletException & java.lang.NoClassDefFoundError
exceptions while running jsp in .netbeans.
Iwas able to compile and run jsp pgms , but i am getting this error when i use jsp:useBean.I think the java class created is not in the proper path..netbeans is using tomcat server.The ide put the jsp's in the proper path. but it is not putting the java class i created with setter and getter methods.I also set the classpath. but din't work
I t is eating up my time!Pl. suggest me a solution!
Directory structure is :source file
c:/windows/.netbeans/3.5/samples/jsp
I guess the ide is putting all the class files(jsp) in
C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
so i copied the userData.class from source dir to the above directory.
and i also did the
set CLASSPATH= C:\WINDOWS\.netbeans\3.5\tomcat406_base\work\Tomcat-Internal\localhost\C_3A_5CWINDOWS_5C.netbeans_5C3.5_5Csampledir\JSP
in dos prompt
pl. find the code below.
Html:
<HTML>
<HEAD>
<TITLE>getData</TITLE>
</HEAD>
<BODY>
<form method = post action="saveData.jsp">
What's your Name : <input type=text name =username size=10>
<br>
What's Age : <input type=text name=age size=10>
<br>
What's ur email id : <input type=text name=email size=10>
<input type=submit>
</FORM>
</BODY>
</HTML>
SaveData.jsp
<jsp:useBean id="user" class="JSP.userData" scope="session"/>
<jsp:setProperty name="user" property="*"/>
<html>
<head><title>using bean</title></head>
<body>
--Continue
Thank u
</body>
</html>
userData.java
* userData.java
* Created on February 12, 2004, 1:06 PM
package JSP;
* @author amano
public class userData {
String userName;
int age;
String email;
/** Creates a new instance of userData */
public userData()
public void setUsername(String str)
userName=str;
public void setAge(int str)
age=str;
public void setEmail(String str)
email=str;
public String getUsername()
return userName;
public int getAge()
return age;
public String getEmail()
return email;when i click on the submit button i get the following error msg.
Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
javax.servlet.ServletException: JSP/user_data
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:349)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: JSP/user_data
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.load(IDEJspServlet.java:106)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.loadIfNecessary(IDEJspServlet.java:150)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper.service(IDEJspServlet.java:160)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(IDEJspServlet.java:246)
at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:148)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534) -
Java.lang.NoClassDefFoundError error on sun one 6.0 web server
Hello,
I'm trying to run a simple hello_world test but get an error message as follows
[17/Nov/2003:12:49:55] info (23151): Internal Info: loading servlet /test/hello_
world.jsp
[17/Nov/2003:12:49:56] failure (23151): Internal error: Unexpected error conditi
on thrown (java.lang.NoClassDefFoundError: sun/tools/javac/Main,sun/tools/javac/
Main), stack: java.lang.NoClassDefFoundError: sun/tools/javac/Main
at com.iplanet.server.http.servlet.IWSJavaC.compile(IWSJavaC.java, Compi
led Code)
at com.iplanet.server.http.servlet.IWSJavaCompiler.compile(IWSJavaCompil
er.java:73)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled C
ode)
at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.
java, Compiled Code)
at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntit
y.java, Compiled Code)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunn
er.java, Compiled Code)
Here is my web-apps.xml file ->
# pg web-apps.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vs PUBLIC "-//Sun Microsystems, Inc.; iPlanet//DTD Virtual Server Web
Applications 6.0//EN"
"http://developer.iplanet.com/webserver/dtds/iws-webapps_6_0.dtd">
<vs>
<web-app uri="/hello_world" dir="/nnn.nnn.nnn.nn/test" enable="true"/>
</vs>
Just erased ip just in case.
Has anyone experinced same behaviour?What service pack of 6.0 server are you using? What is the JDK version? Try running the VM in server mode. Here's the docs to run JVM in server mode:
http://docs.sun.com/source/816-6770-10/rn60sp6.html#1017482
Hope it helps.
Thanks,
Manish -
Exception in thread "main" java.lang.NoClassDefFoundError
Am using java 1.3.1 on Red Hat Linux 7.1
i get this error
Exception in thread "main" java.lang.NoClassDefFoundError
while running a simple program HelloWorld.java
helpWhen you use the "java" command, the only required argument is the name of the class that you want to execute. This argument must be a class name, not a file name, and class names are case sensitive. For example, "java HelloWorld.java" won't work because the class name isn't HelloWorld.java, it's HelloWorld. Similarly, "java helloworld" won't work because a class defined as "public class HelloWorld {" is not named helloworld due to case sensitivity. Finally, the .class file must be in a directory that is in the Classpath - that's where java.exe searches to find the file that contains the class.
Maybe you are looking for
-
Batch won't run unless Illustrator CS3 is active window?
I'm hoping someone can help me out with this as it's driving me nuts. Basically I'm trying to batch an action I made in CS3 to run on about 700 illustrator files. Everything runs just fine and dandy until I switch from Illustrator to another program
-
I am selling my iMac so want to reformat the HD and do a fresh install of Leopard. When I try to boot from the system CD I get the grey screen, I hear the CD Drive reading the disk, then the computer reboots. The same thing happens every time no matt
-
BIG PROBLEM ! Report Software 07B Don't Open
Hi guys, I need help. When I open my report AI/Software 07B, display following error: When I was in http://mydbsccm\reports and I click in report Software 07B display this: There is an error in XML document (1, 74038). '', hexadecimal value 0x07, is
-
Trying to catch all exceptions...
Hi, developers! I am trying to develop the best code, that can catch all the exceptions, in the best possible way, and whenever as possible it must register in a log with informations about the exception occurred. I need your suggestions. See the cod
-
This probably is a dumb question, but I was wondering if i can put my harry Potter books C.D's onto my iPod. If so, is there a particular format i should use for listening? Going on vacation, and would rather take my iPod than a C.D player.