OAM Integration with WAS 6.1 -main" java.lang.NoClassDefFoundError
I am running the registryTester after installing connector for WebSphere on WAS 6.1. The registry gets started and after providing the credentials, it gives the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.ws.bootstrap.
RASWsLoggerFactory
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at com.ibm.ws.security.core.ContextManagerFactory.<clinit>(ContextManage
rFactory.java:36)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ibm.websphere.security.WSSecurityException.printStackTrace(WSSecu
rityException.java:154)
at com.oblix.registry.RegistryLogger.logException(RegistryLogger.java:21
3)
at com.oblix.tools.registryTester.main(registryTester.java:104)
I notice that wssec.jar which is in the classpath for registryTester.bat is not present in %WAS_INSTALL_DIR%\lib\wssec.jar location. Is that the problem?
Thanks!
Seems to be a CLASSPATH problem. Try:
java -cp . ExampleProgramIt should help. (Beware there are three arguments, the . is the second.)
Maybe you have a classpath variable set where the path doesn't contain the working directory (the "."). You may then consider adding it to the end.
Hope it helps
Ivan
Similar Messages
-
Help with error "main" java.lang.NoClassDefFoundError:
I am pretty new to Java and I just install the JDK1.4.2 03
I am getting an error when I run the class file TestChart.class with the
java.exe:
Exception in thread "main" java.lang.NoClassDefFoundError:
I have several class files in the directory d:\personal\java-ChartGen
Chart.class
ChartColourScheme.class
ChartPanel.class
ColorPanel.class
TestChart.class
TestIt.class
All these files are for the program.
Can some one help me why is this happening?? Is there something I can do
that I am missing???
I tried using the -CLASSPATH to direct it to the same directory but still
with the same error.
Please help me. Thank youI use the command line as follows:
c:\j2sdk1.4.2_03\bin\java d:\personal\java-ChartGen\TestChart.class
The full error message is as follows:
Exception in thread "main" java.lang.NoClassDefFoundError:
d:\personal\java-ChartGen\TestChart/class
I thought it may be the CLASSPATH, but all my class files are located in the
same folder and I used the switch -classpath but the same error comes up. -
Hi,
system i am using for Oracle SOA is :
Windows 64 Bit
i5 Processor
6 GB RAM
29 GB on C Drive is already free after installation of all SOA related products.
I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
setting memory limit
starting weblogic server (Admin Server)
starting weblogic managed server
and so on
now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
est_classpath weblogic.Server
Listening for transport dt_socket at address: 8453
Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
Caused by: java.lang.ClassNotFoundException: vXmx512m
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: ++Xmx512m. Program will exit.
Now to resolve this what i already tried are :
I change JAVA_HOME and PATH to jdk6 which came with web logic installer
Location is at :
JAVA_HOME : C:\Oracle\Middleware\jdk160_29
PATH : C:\Oracle\Middleware\jdk160_29\bin
The above dose not include any space between path
I ran the startWebLogic.cmd and got same error
After that I also added
CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
WL_HOME: C:\Oracle\Middleware\wlserver_10.3
I ran the startWebLogic.cmd and got same error
I also used earlier path which I used with eclipse when I was working on other java development.
JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
PATH : C:\Program Files\Java\jdk1.7.0_21\bin
I ran the startWebLogic.cmd and got same error
Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib (including the existing one using ; )
I ran the startWebLogic.cmd and got same error
Now may be there is a file called setSOADomainEnv.cmd in
< C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
That include some values for memory set :
set JAVA_OPTIONS=%JAVA_OPTIONS%
set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
set PORT_MEM_ARGS=-Xms512m –Xmx768m
if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
WebLogic :
C:\Oracle\Middleware\wlserver_10.3
C:\Oracle\Middleware\coherence_3.7
C:\Oracle\Middleware\oepe_11.1.1.8.0
SOA Oracle Home Directory :
C:\Oracle\Middleware\Oracle_SOA1
OSB Home Location :
C:\Oracle\Middleware\Oracle_OSB1
Domain name : soa_div_domain
Domain Location : C:\Oracle\Middleware\user_projects\domains
Application Location : C:\Oracle\Middleware\user_projects\applications
Domain Location: C:\Oracle\Middleware\user_projects\domains\soa_div_domain
form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
Please tell me any body want more details.
Thanks.I think you are missing a character '-'
USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
"-Xms512m -Xmx512m -XX:MaxPermSize=128m" -
Exception in thread "main" java.lang.NoClassDefFoundError: Helloworld
Hi Java Experts,
I am at a lost to how Java searches for all the classes when running a program. Below are the following steps I have taken to try a simple basic HelloWorld.java program on the command prompt on Windows XP (SP2) platform:
( i ) Installed both jdk1.5.0_09 and Netbeans IDE 5.0 and working properly.
( ii ) The source file is located in F:\Documents and Settings\abc\HeadFirstDesignPattern\src\ch11 and the compiled file is in F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes\ch11 which was compiled in Netbeans.
( iii ) No problem compiling & running this program in Netbeans.
( iv ) The RUN CLASSPATH in Netbeans is F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes.
( v ) No CLASSPATH variable has been set.
( vi ) The HelloWorld program looks like this:
package ch11;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
( vi ) Got the message
"Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
when running a combination of the following Java commands:
( a ) cd F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes
( b ) java HelloWorld, or
java -cp . HelloWorld or java -cp "." HelloWorld, or
java -cp F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes" HelloWorld, or
java -cp F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes;. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld, or
java -cp "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";"." HelloWorld, or
java -cp "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";. HelloWorld or "F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes";"." ch11\HelloWorld.
It is the package location which is a subdirectory of F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes which caused Java not to find this program. I had no problem running it if the HelloWorld.java was moved one level up. ie from F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes\ch11 to F:\Documents and Settings\abc\HeadFirstDesignPattern\build\classes.
I have written Java in the last year mostly on Netbeans without any problem running them.
The reason for having to learn to run Java on the command line is so that I could add arguments to the program which I couldn't do in Netbeans just yet.
I have gone through a lot of the articles from Java forums, Google searches but yet to have found a solution.
Many thanks,
Netbeans FanI am getting the same problem when running the same program on a Fedora 4.0 (Redhat Linux 10) system, together with Netbeans 5.5 and JDK1.5.0_09. Again, I have no such problem when running the same program in Netbeans.
Here are the steps that I have taken as follows:
$ hostname
spisu07.stvincents.com.au
$ uname -a
Linux spisu07.stvincents.com.au 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686
$ pwd
/home/dbi/HeadFirstDesignPattern/build/classes/ch11a
$ cd ..
$ pwd
/home/dbi/HeadFirstDesignPattern/build/classes
$ ls
ch11a
$ ls ch11a
GumballMachine.class GumballMonitor.class NoQuarterState.class State.class
GumballMachineRemote.class GumballMonitorTestDrive.class SoldOutState.class WinnerState.class
GumballMachineTestDrive.class HasQuarterState.class SoldState.class
$ java -cp . ch11a.GumballMachineTestDrive
Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: ch11a.GumballMachineTestDrive
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:./,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)file:///usr/share/doc/HTML/index.html
...4 more
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/netbeans-5.5/bin:/etc/alternatives/.:/opt/netbeans-5.5/bin:/opt/jdk1.5.0_09:/etc/alternatives/.
$ echo $JAVA_HOME
$ echo $CLASSPATH
Any suggestions?
Thanks,
Henry -
TZupdater: Exception in thread "main" java.lang.NoClassDefFoundError:
Hello,
I am using the tool tzupdater over Solaris 9 to get java compliant with new DST (Daylight Saving Time) for US (2007).
I am using the following command:
# find /usr -fstype nfs -prune -o -fstype autofs -prune -o -name java -print -exec {} /marksman/packages/tzupdater2006p/tzupdater.jar -u \;
Getting the following messages:
/usr/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/dt/appconfig/netscape/java
/usr/j2se/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/j2se/bin/sparcv9/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/j2se/jre/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/j2se/jre/bin/sparcv9/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/j2se/opt/javahelp/doc/api/com/sun/java
/usr/java
/usr/iplanet/console5.1/java
/usr/iplanet/ds5/java
/usr/iplanet/admserv5.1/java
/usr/apache/jserv/docs/api/org/apache/java
/usr/java1.2/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/java1.2/jre/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/java1.2/jre/bin/sparc/native_threads/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/appserver/samples/rmi-iiop/cpp/src/client/java
/usr/appserver/samples/rmi-iiop/cpp/src/client/org/omg/boxedRMI/java
/usr/dlc91d/jre/bin/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/dlc91d/jre/bin/sparc/native_threads/java
Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
/usr/dlc91d/java
Any idea why I am getting this error, and how can I fix it?
Thank youHi,
I was wondering if you ever saw a resolution to your problem. I am seeing the same error on Windows and can't figure out what is causing it. Any information is appreciated.
Thanks,
Marina Orton -
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server
Dear Sir/Madam
I downloaded the Weblogic610 server five times, and when I install it on my Linux
box (RedHat 7.1), I always met the exception like:
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server
When I check with lib directory, there is weblogic.jar here, but the file looks
was damaged, the file size is ok, but I can't open it by use jar tool or other
tools.
Some packeage is very strange, after my downloaded, and install, there are only
a few files in lib directory and some subdirectory and weblogic.jar is missing,
but the download is normal.
So, I hope who guy have similar experience, please let me know.
Thank you
CidyHi Raj,
Could you provide more information from the log; is there a full
traceback. A first step may be to use the latest service pack [1].
Also you might try your question in the management newsgroup [2] or
contact our outsanding support group [3].
Hope this is of some value,
Bruce
[1]
http://commerce.bea.com/showproduct.jsp?family=WLS&major=8.1&minor=2
[2]
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.management
[3]
http://[email protected]
Raj wrote:
>
Hello All,
I have installed wls 8.1 and created domain. I have manged server running at other location.I am getting the following Log,When i tried to start managed server from admin server
java.lang.NoClassDefFoundError: weblogic/Server Exception in thread "main"
and on admin side
The request to start the server ecgNode01 of domain CQ6UIDomain failed because the node manager did not hear from the managed server in the configured timeout period. Despite this, if the managed server has not failed, it will come up and the node manager will start monitoring it. To adjust this timeout so that the task does not fail prematurely, please refer to the node manager property ScavangerDelaySeconds (Default value : 180 seconds. Current value : 180 seconds
can anyone tell me where i went wrong -
Exception in thread "main" java.lang.noclassDefFoundError: AudioExample
Hi,
i tried to run the intermedia "AduioExample" Demo in Oracle8.1.7 (Java). It is compiled, however when i run the AudioExample.class as:
c:\AudioExample Dir> java AudioExample
i receive "Exception in thread "main" java.lang.noclassDefFoundError:AudioExample". anyway
before running the AudioExample Demo i did
1- install java 1.4.2 and i tried "HelloWorld" example and it worked
2- setup the CLASSPATH and the PATH environment variables in Win2000 as requested in the Readme.txt file in the demo....Could anyone please tell me what's wrong...thank youi have solved the running of AudioExample.java Demo, the problem was that i loaded the CLASSPATH Environment Variables with many directories...when i deleted all the directories from CLASSPATH except the directories mentioned in the Readme.txt, it worked...
-
Exception in thread "main" java.lang.NoClassDefFoundError: Xms512m
when i change memory arguments , i am getting the following error and the server is not starting.
JAVA Memory arguments: Xms512m -Xmx512m -XX:MaxPermSize=128m
WLS Start Mode=Production
CLASSPATH=:/home3/bea9/patch_weblogic922/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home3/bea9/jdk150_07/lib/tools.jar:/home3/bea9/weblogic92/server/lib/weblogic_sp.jar:/home3/bea9/weblogic92/server/lib/weblogic.jar:/home3/bea9/weblogic92/server/lib/webservices.jar::/home3/bea9/weblogic92/common/eval/pointbase/lib/pbclient51.jar:/home3/bea9/weblogic92/server/lib/xqrl.jar::
PATH=/home3/bea9/weblogic92/server/bin:/home3/bea9/jdk150_07/jre/bin:/home3/bea9/jdk150_07/bin:/home3/bea8/weblogic81/server/bin:/weblogic/bea/scripts:/home3/bea8/jdk142_05/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/hparray/bin:/opt/langtools/bin:/opt/imake/bin:/opt/perf/bin:/opt/ignite/bin:/opt/OV/bin/OpC:/opt/hpnp//bin:/opt/resmon/bin:/usr/sbin/diag/contrib:/opt/pred/bin:/opt/sec_mgmt/spc/bin:/opt/graphics/common/bin:/opt/OV/bin:/opt/ssh/bin:/opt/aCC/bin:/opt/sec_mgmt/bastille/bin:.:/u01/app/oracle/product/8.1.7/bin
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
starting weblogic with Java version:
java version "1.5.0.07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.07-_20_mar_2007_05_31)
Java HotSpot(TM) Server VM (build 1.5.0.07 jinteg:03.20.07-04:39 PA2.0 (aCC_AP), mixed mode)
Starting WLS with line:
/home3/bea9/jdk150_07/bin/java -server Xms512m -Xmx512m -XX:MaxPermSize=128m -da -Dplatform.home=/home3/bea9/weblogic92 -Dwls.home=/home3/bea9/weblogic92/server -Dwli.home=/home3/bea9/weblogic92/integration -Dweblogic.management.discover=false -Dweblogic.management.server=http://localhost:9001 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home3/bea9/patch_weblogic922/profiles/default/sysext_manifest_classpath -Dweblogic.Name=TEST -Djava.security.policy=/home3/bea9/weblogic92/server/lib/weblogic.policy weblogic.Server
Exception in thread "main" java.lang.NoClassDefFoundError: Xms512m
$
The server is starting fine with domain variables without changing the memory arguments in the managed server startup scripts.
But when i changed the mem args in the server startup script , this is the error and server is not starting.
the domain env is set and weblogic server version 9.2
Here is the arguments i changed in the startup script, the server is starting with out these arguments with domain set memory arguments. Any body please help
USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"
export USER_MEM_ARGSI think you are missing a character '-'
USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
"-Xms512m -Xmx512m -XX:MaxPermSize=128m" -
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 -
Exception in thread "main" java.lang.NoClassDefFoundError: JDBCVersion
I using the example in the online jdbc docs shown below:
+++++++
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.OracleDataSource;
class JDBCVersion
public static void main (String args[]) throws SQLException
OracleDataSource ods = new OracleDataSource();
//ods.setURL("jdbc:oracle:thin:scott/tiger@host:port:service");
ods.setURL("jdbc:oracle:thin:scott/tiger@testdb:1521:xe");
Connection conn = ods.getConnection();
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
I compiles without a problem:
C:\temp>javac JDBCVersion.java -classpath c:\instantclient\ojdbc6.jar
+++
I keep getting the following error when attempting to run the
C:\temp>java JDBCVersion -classpath c:\instantclient\ojdbc6.jar
Exception in thread "main" java.lang.NoClassDefFoundError: JDBCVersion
Caused by: java.lang.ClassNotFoundException: JDBCVersion
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: JDBCVersion. Program will exit.
I attempted to set my classpath using the parameter -classpath
and setting the environment variable in the ontrol panel, system, adv, env. vars.
I still get the error.
Can someone provide some specific idea why this is occuring?
Thanks in advance,
LarryThanks for the response. I also found a solution by setting the classpath using the environment variable in xp. I tried to set the environmental variable before, but I did it incorrectly(unknown to me); I set it up in the system variable portion. I was surfing around for solutions and found the proper way to set the value with this link. I hope it saves some else several days of work that it cost me :)
http://faculty.ed.umuc.edu/~arnoldyl/NetBeansTutorials/Setting-Classpath.html -
Exception in thread "main" java.lang.NoClassDefFoundError in Textpad
Hello to everybody:
I programed in java some time ago and now i'm trying to recycle and start again with it. I was programming using Textpad and compiling and excuting the files from there. Now i'm trying to configure it the same way that i had it some time ago. But i'm not able.
My program is just a operation of 2 numbers. I know it's so dumb :P but i'm trying to learn again. I can compile it (Ctrl+1, using the instruction javac of j2sdk1.4.2_13) but when i try to execute (Ctrl+2, instruction java.exe) i throws me this error:
Exception in thread "main" java.lang.NoClassDefFoundError: 6
where "6" is the first parameter for the program.
I put the CLASSPATH in enviromental variables
CLASSPATH: C:\j2sdk1.4.2_13\bin;.
PATH: C:\j2sdk1.4.2_13\bin (this last one after all the others that existed before and separated by ";" )
If i try to execute it from the promp using the instructions javac.exe and java.exe it works ok. And using NetBeans too. So i have to think it's sth from textpad.
Can somebody help me? Thank you to everybody for your time.Hey, first of all thank you for your help again.
I'm trying to execute it in the textpad itself. You press Ctrl+2 and appears a window to put the arguments. So there's a parameter called $File (maybe that's the problem, this name should be another one), the name of the current project you're trying to execute. I've tried to put the class name between but it threw me the same error changing the parameter for the class name. So finally i've put the name of the project without extension and after it the arguments, and it has work. I'll go on looking for the parameter to substitute the project name.
Thank you for all your help. It's the first time i enter in a forum and you've been really helpful. Tahnk you so much. Sure you'll see me here again,, cos i'm a kid of rookie:P -
Hi All
I am using XSLT transformation in JDeveloper with the following code but getting exception. How to avoid using Oracle XSLT processor which looks incomplete ?
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer;
try {
result =
new StreamResult(new OutputStreamWriter(new FileOutputStream(output),
"UTF-8"));
transformer = factory.newTransformer(XSLTFile);
transformer.transform(inputXML, result);
} catch (TransformerException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
Code runs fine but throws exception when there is any XPath expression in the XSLT file such as
/ns:root/sa:node[@name='attribName']
It does not show exception for simple expressions like "/ns:root/sa:node"
Exception is
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/i18n/text/OraCollator
at oracle.xml.xqxp.functions.builtIns.FNUtil.getCollator(FNUtil.java:355)
at oracle.xml.xqxp.datamodel.OXMLItem.compareValue(OXMLItem.java:1080)
at oracle.xml.xpath.XPathItem.compareValue(XPathItem.java:409)
at oracle.xml.xpath.XPathSequence.compareGeneral(XPathSequence.java:1477)
at oracle.xml.xpath.ComparisonExpr.evaluate(XSLExpr.java:1507)
at oracle.xml.xpath.XPathPredicate.filter(XPathPredicate.java:264)
at oracle.xml.xpath.XPathChildAxis.getNodeList(XPathAxis.java:580)
at oracle.xml.xpath.XPathStep.evaluate(XPathStep.java:555)
at oracle.xml.xpath.PathExpr.evaluate(XSLNodeSetExpr.java:859)
at oracle.xml.xpath.XSLExprBase.streamingEvaluate(XSLExprBase.java:392)
at oracle.xml.xslt.XSLForEach.processAction(XSLForEach.java:135)
at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:497)
at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:585)
at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:332)
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:485)
PS. my XSLT version is <?xml version="1.0" , can't make it to 2.0 as Jdeveloper (11.1.1.5.0) throws error during compilation.The exception got resolved by the library orai18n-collation.jar in the directory "Oracle\Middleware\oracle_common\modules\oracle.nlsrtl_11.1.0"
However I wanted to completely avoid Oracle V2 Parser as it was working in a fresh project where only standard import javax.xml.transform.Transformer was available. -
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/
After I got this exception, I tried the following solution:
I downloaded the Windows package for JAI from this link:
https://jai-imageio.dev.java.net/binary-builds.html
Then I went to the Projects window > Libraries (Netbeans IDE) and browsed to the two jar files in that download. The two jar files are now showing under the Libraries node and, accordingly, they are listed in my Classpath as this:
..\..\..\Desktop\jai-imageio-1_2-pre-dr-b04-lib-windows-i586-07_Apr_2009\lib\ext\jai_imageio.jar
..\..\..\Desktop\jai-imageio-1_2-pre-dr-b04-lib-windows-i586-07_Apr_2009\lib\ext\clibwrapper_jiio.jar
There also a couple of DLL files which I wasn't sure how to add.
So why am I still getting this error? Maybe it's the wrong version of JAI?This research made me VERY late for work and I've been swamped all day. Didn't have a chance to post my solution earlier.
"It appears that you have downloaded wrong package... try downloading and installing the stable release " jai_imageio-1_1-lib-windows-i586-jdk.exe ".
I didn't know how to install that one. I tried clicking it and got an error msg. Then I added it as a reference (I browsed to it from the Libraries node) which "seemed" to work (allowed me to run my app using F6) but then it wouldn't produce a deployment package when I seleced Run > Clean and Build. So I went back and downloaded the "Daily Build" which unzips to two jar files
jai_imageio.jar
clibwrapper_jiio.jar
and immedliately Run > Clean and Build produced a deployment package. (All of this is to get PDFbox running in my app). I also needed jai_core.jar which I believe was from this page:
http://code.google.com/p/mapmap/downloads/detail?name=jai_core.jar&can=2&q=
specifically this link:
http://mapmap.googlecode.com/files/jai_core.jar
By the way I am using a "Daily Build" for PDFbox (0.7.4) which came from the "FOP" downloads here:
http://www.jeremias-maerki.ch/download/fop/pdf-images/
but I still needed the older pdfbox 0.7.3 download just to extract the Fontbox.jar from it. I needed a codec from this page as well:
http://www.findjar.com/jar/geoserver/jai/jars/jai_codec-1.1.3-alpha.jar.html
the codec was offered as a one-link download:
http://www.findjar.com/jar/geoserver/jai/jars/jai_codec-1.1.3-alpha.jar.html
The upshot of all this is that I can now work with more types of PDF files than before - but still not all of them. I'm getting another error on some of them (I'll have to reproduce this at home). -
Can't get by Exception in thread "main" java.lang.NoClassDefFoundError:
With the help of someone on the Forum, I resolved the class reference that was giving me fits. But I'm still getting
Exception in thread "main" java.lang.NoClassDefFoundError: jform_example
This is all the information that I get. It compiles and runs from SunOne IDE, but not from command line. What Class reference or whatever am I missing? I don't know that my environment variables are correct. I've tried to find a comprehensive list of steps to do so, but without success. So I've been winging it.
What information should I provide that will help you help me. I'm spending WAY to much time on this issue.
Help!
GaryThis error occurs when the java.exe program can not find the class whose name was specified on the command line. Note that the argument to java.exe is the class name not a file name. java.exe tried to find a file whose name is jform_example.class. It searched the directories that were in your system's Classpath environment variable at the time of command execution. It didn't find the file.
So the file jform_example.class must exist, must be named exactly as specified (java is case sensitive so Jform_Example won't work), the source code must not start with a package statement (a package statement means the class name is package_name.jform_example), and the jform_example.class must be in a directory that's in your Classpath.
Try to CD to the directory where jform_example.class is located and use the command "java -classpath . jform_example" This uses the current directory as the Classpath during execution. -
"main" java.lang.NoClassDefFoundError
Hi guys!
I have a problem with have. I have just set up the following version of java
http://java.sun.com/j2se/1.4.1/download.html
Setup created the following folder
C:\Program files\java\j2re1.4.1_02
java.exe can be executed from anywhere on my hard disk (the path was setup accordingly)
However, I get the following error all the time:
"main" java.lang.NoClassDefFoundError HH/java
for the bellow program, saved with 'java' extension
It does not matter whatever HH.java may contain (a non-java program for example). The above error appears all the time for this stupid program
class HH
public static void main(String[] arguments)
System.out.println("Hello World !");
I have even tried 'public class HH' instead of 'class HH'
I typed in 'SET CLASSPATH =' in the command prompt to set the classpath to the current directory.
Can anybody help me?Hi guys!
I have a problem with have. I have just set up the
following version of java
http://java.sun.com/j2se/1.4.1/download.html
Setup created the following folder
C:\Program files\java\j2re1.4.1_02
It appears that you downloaded the run time environment, but not the developement kit. You need to download j2sdk... On the download page, it is the rightmost column.
java.exe can be executed from anywhere on my hard disk
(the path was setup accordingly)
However, I get the following error all the time:
"main" java.lang.NoClassDefFoundError HH/java
for the bellow program, saved with 'java' extension
The syntax for the java command requires the class name, not a file name, so the command must be "java HH" for your example. However, you must have a compiled class first - you can not execute the source code.
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
Maybe you are looking for
-
Only allow the user to add simple files to a page
I know I can restrict what items that can be added to the page at the page group level but is it possible to do it at page level? I'm using portal 10.1.2. Thanks
-
Power Supply is not working in Germany
Hi, I bought long time ago a notebook in USA. When I was back in Germany the notebook didn't charged any more. I asked for support, because of the guarantee, but they said there guarantee is for supplies only six month. I forgot the notebook in the c
-
How do I import Adobe Photoshop Album Library in to Aperture?
I was wondering if any members out there have had experience trying to migrate an Adobe Photoshop Album library in to Aperture. Getting the images in won't be a problem it is keeping the tagging data I am concerned about. Ideally I would like to keep
-
Keep getting "error 499" when trying to access iTunes store.
Can access part of store through Ping, but not music category...error 499
-
I have a simple menu with a video set as background and a psd (one layer only) file for the incrustation (overlay). I created a button. The incrustation disappears when I switch between the different button states (opacity and color are set correctly