"main" java.lang.NoClassDefFoundError: msgshow : ERROR

Hi To All Of U!
I am a new user to this group and very new to Java.
I tried to install JavaMail-1.3.2ea on linux server.
before installing JavaMail i installed JavaBeans Activation Framework
(Jaf-1_0_2.) also.
After installation of both the things i set the CLASSPATH which include both mail.jar and activation.jar files.
$CLASSPATH = .:/usr/local/jdk/lib/classes.zip:/root/downloads/Javamail/javamail-1.3.2ea/mail.jar:.:/root/downloads/Javamail/jaf-1.0.2/activation.jar
then i compiled the demo prg msgshow.java it compiled successfully..
but when i run
java msgshow -T imap -H <mailserver> -U <username> -P <passwd> -f INBOX 5
i got an error
Exception in thread "main" java.lang.NoClassDefFoundError: msgshow
i am not able to understand this problem..as i am very new to this..
any help will be appreciated..
hope to get a quick response..i need to rectify it soon.

i have tried again to reinstall JAVAMAIL.
now the error comes..:
Exception in thread "main" java.lang.NumberFormatException: For input string: "shrankhl"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:518)
at msgshow.main(msgshow.java:94)
the code of msgshow function is :
public class msgshow {
static String protocol;
static String host = null;
static String user = null;
static String password = null;
static String mbox = null;
static String url = null;
static int port = -1;
static boolean verbose = false;
static boolean debug = false;
static boolean showStructure = false;
static boolean showMessage = false;
static boolean showAlert = false;
static boolean saveAttachments = false;
static int attnum = 1;
public static void main(String argv[]) {
int msgnum = -1;
int optind;
InputStream msgStream = System.in;
for (optind = 0; optind < argv.length; optind++) {
if (argv[optind].equals("-T")) {
protocol = argv[++optind];
} else if (argv[optind].equals("-H")) {
host = argv[++optind];
} else if (argv[optind].equals("-U")) {
user = argv[++optind];
} else if (argv[optind].equals("-P")) {
password = argv[++optind];
} else if (argv[optind].equals("-v")) {
verbose = true;
} else if (argv[optind].equals("-D")) {
debug = true;
} else if (argv[optind].equals("-f")) {
mbox = argv[++optind];
} else if (argv[optind].equals("-L")) {
url = argv[++optind];
} else if (argv[optind].equals("-p")) {
port = Integer.parseInt(argv[++optind]);
} else if (argv[optind].equals("-s")) {
showStructure = true;
} else if (argv[optind].equals("-S")) {
saveAttachments = true;
} else if (argv[optind].equals("-m")) {
showMessage = true;
} else if (argv[optind].equals("-a")) {
showAlert = true;
} else if (argv[optind].equals("--")) {
optind++;
break;
} else if (argv[optind].startsWith("-")) {
System.out.println(
"Usage: msgshow [-L url] [-T protocol] [-H host] [-p port] [-U user]");
System.out.println(
"\t[-P password] [-f mailbox] [msgnum] [-v] [-D] [-s] [-S] [-a]");
System.out.println(
"or msgshow -m [-v] [-D] [-s] [-S] [-f msg-file]");
System.exit(1);
} else {
break;
try {
if (optind < argv.length)
msgnum = Integer.parseInt(argv[optind]);
// Get a Properties object
Properties props = System.getProperties();
// Get a Session object
Session session = Session.getInstance(props, null);
session.setDebug(debug);
if (showMessage) {
MimeMessage msg;
if (mbox != null)
msg = new MimeMessage(session,
new BufferedInputStream(new FileInputStream(mbox)));
else
msg = new MimeMessage(session, msgStream);
dumpPart(msg);
System.exit(0);
// Get a Store object
Store store = null;
if (url != null) {
URLName urln = new URLName(url);
store = session.getStore(urln);
if (showAlert) {
store.addStoreListener(new StoreListener() {
public void notification(StoreEvent e) {
String s;
if (e.getMessageType() == StoreEvent.ALERT)
s = "ALERT: ";
else
s = "NOTICE: ";
System.out.println(s + e.getMessage());
store.connect();
} else {
if (protocol != null)
store = session.getStore(protocol);
else
store = session.getStore();
// Connect
if (host != null || user != null || password != null)
store.connect(host, port, user, password);
else
store.connect();
// Open the Folder
Folder folder = store.getDefaultFolder();
if (folder == null) {
System.out.println("No default folder");
System.exit(1);
if (mbox == null)
mbox = "INBOX";
folder = folder.getFolder(mbox);
if (folder == null) {
System.out.println("Invalid folder");
System.exit(1);
// try to open read/write and if that fails try read-only
try {
folder.open(Folder.READ_WRITE);
} catch (MessagingException ex) {
folder.open(Folder.READ_ONLY);
int totalMessages = folder.getMessageCount();
if (totalMessages == 0) {
System.out.println("Empty folder");
folder.close(false);
store.close();
System.exit(1);
if (verbose) {
int newMessages = folder.getNewMessageCount();
System.out.println("Total messages = " + totalMessages);
System.out.println("New messages = " + newMessages);
System.out.println("-------------------------------");
if (msgnum == -1) {
// Attributes & Flags for all messages ..
Message[] msgs = folder.getMessages();
// Use a suitable FetchProfile
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
fp.add(FetchProfile.Item.FLAGS);
fp.add("X-Mailer");
folder.fetch(msgs, fp);
for (int i = 0; i < msgs.length; i++) {
System.out.println("--------------------------");
System.out.println("MESSAGE #" + (i + 1) + ":");
dumpEnvelope(msgs);
// dumpPart(msgs[i]);
} else {
System.out.println("Getting message number: " + msgnum);
Message m = null;
try {
m = folder.getMessage(msgnum);
dumpPart(m);
} catch (IndexOutOfBoundsException iex) {
System.out.println("Message number out of range");
folder.close(false);
store.close();
} catch (Exception ex) {
System.out.println("Oops, got exception! " + ex.getMessage());
ex.printStackTrace();
System.exit(1);
System.exit(0);
public static void dumpPart(Part p) throws Exception {
if (p instanceof Message)
dumpEnvelope((Message)p);
/** Dump input stream ..
InputStream is = p.getInputStream();
// If "is" is not already buffered, wrap a BufferedInputStream
// around it.
if (!(is instanceof BufferedInputStream))
is = new BufferedInputStream(is);
int c;
while ((c = is.read()) != -1)
System.out.write(c);
String ct = p.getContentType();
try {
pr("CONTENT-TYPE: " + (new ContentType(ct)).toString());
} catch (ParseException pex) {
pr("BAD CONTENT-TYPE: " + ct);
String filename = p.getFileName();
if (filename != null)
pr("FILENAME: " + filename);
* Using isMimeType to determine the content type avoids
* fetching the actual content data until we need it.
if (p.isMimeType("text/plain")) {
pr("This is plain text");
pr("---------------------------");
if (!showStructure && !saveAttachments)
System.out.println((String)p.getContent());
} else if (p.isMimeType("multipart/*")) {
pr("This is a Multipart");
pr("---------------------------");
Multipart mp = (Multipart)p.getContent();
level++;
int count = mp.getCount();
for (int i = 0; i < count; i++)
dumpPart(mp.getBodyPart(i));
level--;
} else if (p.isMimeType("message/rfc822")) {
pr("This is a Nested Message");
pr("---------------------------");
level++;
dumpPart((Part)p.getContent());
level--;
} else {
if (!showStructure && !saveAttachments) {
* If we actually want to see the data, and it's not a
* MIME type we know, fetch it and check its Java type.
Object o = p.getContent();
if (o instanceof String) {
pr("This is a string");
pr("---------------------------");
System.out.println((String)o);
} else if (o instanceof InputStream) {
pr("This is just an input stream");
pr("---------------------------");
InputStream is = (InputStream)o;
int c;
while ((c = is.read()) != -1)
System.out.write(c);
} else {
pr("This is an unknown type");
pr("---------------------------");
pr(o.toString());
} else {
// just a separator
pr("---------------------------");
* If we're saving attachments, write out anything that
* looks like an attachment into an appropriately named
* file. Don't overwrite existing files to prevent
* mistakes.
if (saveAttachments && level != 0 && !p.isMimeType("multipart/*")) {
String disp = p.getDisposition();
// many mailers don't include a Content-Disposition
if (disp == null || disp.equalsIgnoreCase(Part.ATTACHMENT)) {
if (filename == null)
filename = "Attachment" + attnum++;
pr("Saving attachment to file " + filename);
try {
File f = new File(filename);
if (f.exists())
// XXX - could try a series of names
throw new IOException("file exists");
OutputStream os =
new BufferedOutputStream(new FileOutputStream(f));
InputStream is = p.getInputStream();
int c;
while ((c = is.read()) != -1)
os.write(c);
os.close();
} catch (IOException ex) {
pr("Failed to save attachment: " + ex);
pr("---------------------------");
public static void dumpEnvelope(Message m) throws Exception {
pr("This is the message envelope");
pr("---------------------------");
Address[] a;
// FROM
if ((a = m.getFrom()) != null) {
for (int j = 0; j < a.length; j++)
pr("FROM: " + a[j].toString());
// TO
if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
for (int j = 0; j < a.length; j++) {
pr("TO: " + a[j].toString());
InternetAddress ia = (InternetAddress)a[j];
if (ia.isGroup()) {
InternetAddress[] aa = ia.getGroup(false);
for (int k = 0; k < aa.length; k++)
pr(" GROUP: " + aa[k].toString());
// SUBJECT
pr("SUBJECT: " + m.getSubject());
// DATE
Date d = m.getSentDate();
pr("SendDate: " +
(d != null ? d.toString() : "UNKNOWN"));
// FLAGS
Flags flags = m.getFlags();
StringBuffer sb = new StringBuffer();
Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
boolean first = true;
for (int i = 0; i < sf.length; i++) {
String s;
Flags.Flag f = sf[i];
if (f == Flags.Flag.ANSWERED)
s = "\\Answered";
else if (f == Flags.Flag.DELETED)
s = "\\Deleted";
else if (f == Flags.Flag.DRAFT)
s = "\\Draft";
else if (f == Flags.Flag.FLAGGED)
s = "\\Flagged";
else if (f == Flags.Flag.RECENT)
s = "\\Recent";
else if (f == Flags.Flag.SEEN)
s = "\\Seen";
else
continue; // skip it
if (first)
first = false;
else
sb.append(' ');
sb.append(s);
String[] uf = flags.getUserFlags(); // get the user flag strings
for (int i = 0; i < uf.length; i++) {
if (first)
first = false;
else
sb.append(' ');
sb.append(uf[i]);
pr("FLAGS: " + sb.toString());
// X-MAILER
String[] hdrs = m.getHeader("X-Mailer");
if (hdrs != null)
pr("X-Mailer: " + hdrs[0]);
else
pr("X-Mailer NOT available");
static String indentStr = " ";
static int level = 0;
* Print a, possibly indented, string.
public static void pr(String s) {
if (showStructure)
System.out.print(indentStr.substring(0, level * 2));
System.out.println(s);
this is the whole code of msgshow function.
this is a demo function only.
pls suggest any other way also to check that the java application is running or not.
Thanx Very Much
Hope to get a reply soon....
Happy New Year

Similar Messages

  • On starting WebLogic getting Error : Listening for transport dt_socket at address: 8453 Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m

    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"

  • SQLJ error: "Exception in thread main java.lang.NoClassDefFoundError: sqlj/

    Hi,
    I am new to SQLJ. Now, in my PC (with Win98), I have JDK 1.2 and Oracle 8i (personal edition). I have used Java and Oracle in my PC without any problem. Now, I am going to learn SQLJ in order to create a java program to access Oracle database. What I have done is to set up several classpaths in DOS:
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The code of my program is:
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    import java.util.Date;
    public class Hello{
         public static void main(String[] args){
              java.sql.Date current_date;
              try{
                   // connect to the db
                   Oracle.connect(
                        "C:\ora_program\bin",
                        "system",
                        "manager");
                   // get the current date from the database
                   #sql{SELECT sysdate INTO :current_date FROM dual};
                   // display message
                   System.out.println("Hello, the current date is: "+ current_date);
              catch(SQLException e){
                   System.err.println("sqlException: "+e);
              finally{
                   try{
                        Oracle.close();
                   catch(SQLException e){
                        System.err.println("sqlException: "+e);
    And then I compile my program in DOS with the typing: sqlj Hello.sqlj
    The program cannot be compiled and the error message is:
    "Exception in thread main java.lang.NoClassDefFoundError: sqlj/tools/Sqlj"
    It indicates that the SQLJ translator class files cannot be found.
    I have set up the classpath in DOS (see above). How does the error come? Please help. Thanks.
    PC

    >
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The above only sets the classpath to the last value. You need to use the following.
    SET classpath=%classpath%;C:\ora_program\sqlj\lib\runtime.zip;

  • Error complie "Exception in thread "main" java.lang.NoClassDefFoundError"

    Dear All,
    I have the following problem can not compile the code below.
    Here my settings and the code.
    Thanks for the help.
    My java version.
    ===============================================
    D:\bea\jdk150_22\bin>java -version
    java version "1.5.0_22"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode)
    ===============================================
    I use a bat to compile the code
    ===============================================
    set JDK_HOME=D:\bea\jdk150_22
    set PATH=%JDK_HOME%\bin;%PATH%
    set CLASSPATH=%CLASSPATH%;D:\oracle\product\10.2.0\client_1\jdbc\lib\classes12.jar
    rem ---- compile
    javac GetDBOracle.java
    rem ---- testing
    java GetDBOracle
    rem ---- add to jar
    jar cf GetDBOracle.jar GetDBOracle.class
    ===============================================
    My java code
    ===============================================
    import java.sql.*;
    import java.io.*;
    public class GetDBOracle {
    public static String GetDBOracle(String Parm1, String Parm2) throws SQLException
    String myResult = "";     
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:ORCL", "ORC", "ORC2010");     
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT JAVA_GET_VALUE('"Parm1"','"Parm2"') FROM DUAL");
    // Print the name out
    while (rset.next ()) {
    myResult = rset.getString (1);
    //close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();     
    return myResult;
    public static void main(String args[])
    try {
    System.out.println(GetDBOracle("XXI", "12000"));
    } catch (Exception e) {
    System.out.println(e.getMessage());
    ===============================================
    Erro
    ===============================================
    Exception in thread "main" java.lang.NoClassDefFoundError: GetDBOracle
    ===============================================

    What happened to this Error complie "Exception in thread "main" java.lang.NoClassDefFoundError" ?

  • Java.exe error - Exception in thread "main" java.lang.NoClassDefFoundError:

    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

  • Error: Exception in thread "main" java.lang.NoClassDefFoundError:

    Hi
    I have seen this problem on a few forums but have not found an answer that works for me, sorry if missed it!!
    The command I am giving is:
    C:\Program Files\Rococo\ImprontoSimulator\examples\echo\bin>echo-server
    Exception in thread "main" java.lang.NoClassDefFoundError: com/rococosoft/impronto/examples/echo/EchoServer
    this runs the following batch file:
    @echo off
    set CLASSPATH=
    set CLASSPATH=%SIMULATOR_HOME%\lib\isim_j2se.jar;%CLASSPATH%
    set CLASSPATH=%SIMULATOR_HOME%\lib\log4j.jar;%CLASSPATH%
    set CLASSPATH=%SIMULATOR_HOME%\examples\echo\lib\echo.jar;%CLASSPATH%
    java -classpath "%CLASSPATH%" com.rococosoft.impronto.examples.echo.EchoServer
    this is where I assume all the CLASSPATH's are set.
    Any help would be very much appreciated.
    Thanks
    Nitin

    Once you have defined your classpath as an environment variable, it shouldn't be necessary to include it (or quote it) within the command line. In other words,
    c:\> java EchoServer
    should have worked. However, I suspect the reason the batch script doesn't work might be because %SIMULATOR_HOME% isn't defined? If Java can't find any of the libraries, then it can't find a class EchoServer that contains a main() function to call, resulting in the error message you've received.

  • MiniSAP installation error : "main" java.lang.noclassdeffounderror

    I am sorry for opening a new thread that might be already somewhere resolved (didnt find it).
    During instalation of miniSAP I still have error "main" java.lang.noclassdeffounderror ... I have installed j2re1.4.2_08, even system variables are set to C:\Program Files\Java\j2re1.4.2_08\bin ... but the problem is still there ...
    Any advice? Thank you very much for any help
    (Happy Christmas)

    Hello,
    thank you for your help... but during installation I still have one problem during "import ABAP" phase i have this sort of error >
    Last error reported by the step :Program 'Migration Monitor' exits with error code 1. For details see log file(s) import_monitor.java.log, import_monitor.log
    Do you have any idea how to solve this problem .
    Thank you very much
    Marek

  • 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: TestEnv

    Try setting the classpath properly. It seems the runtime evironment is unable to find the compiled class files. Nothing else is wrong.
    --Anil                                                                                                                                                                                                                                                                                           

  • 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 you

    I 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.

  • 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
    help

    When 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.

  • 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

  • Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/

    Hi!
    Kindly assist on the following error.
    I'm doing the sample acmevideo on Cashier Application deploying as a Java Application from JDeveloper3.0 and Oracle8i 8.1.5. And I had this error after executing the following command;
    Path=e:\javaWebServer2.0\jre\bin;%Path%
    jre -cp "e:\cashier\acme.jar" acmevideo.swing.CashierApp
    ERROR MESSAGE ARE FOLLOWS:
    E:\cashier>jre -cp "e:\cashier\acme.jar" acmevideo.swing.CashierAppException in thread "main" java.lang.NoClassDefFoundError:
    oracle/xml/parser/v2/DOMParser
    at
    at oracle.jbo.server.SessionImpl.init(SessionImpl.java:82)
    at oracle.jbo.server.ApplicationModuleHomeImpl.create(ApplicationModuleHomeImpl.java:81)
    at oracle.dacf.dataset.SessionInfo._createAppModule(SessionInfo.java:1776)
    at oracle.dacf.dataset.SessionInfo.connect(SessionInfo.java:1370)
    at oracle.dacf.dataset.SessionInfo.open(Compiled Code)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:952)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java:934)
    at acmevideo.infoswing.ViewRentalsForm.<init>(ViewRentalsForm.java:189)
    at acmevideo.swing.CashierApp.<init>(CashierApp.java:45)
    at acmevideo.swing.CashierApp.main(CashierApp.java:141)

    Make sure the classpath for the application includes all necessary dependency archives.
    The error in question is referring to the XMLParverv2.jar. This needs to be in the application's classpath when you launch it.
    The jar is available from JDEV_HOME\lib.
    Laura

  • Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/S

    Hi,
    I have created a class JaxmClient.java. When I compile the class with appropriate jar files assigned to -classpath it compiles successfully with no errors. But when I run the classe "java JaxmClient" it produces the following exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/SOAPElement
    Can someone help me I am knew to this technology.
    Thanks in advance

    I tried to use in my execution all the jar files that I used for compilation.
    java -cp jaxm-jar; etc.jar Request
    but it still gives me this execption
    Exception in thread "main" java.lang.NoClassDefFoundError: Request
    I am in the right directory where is the Request.class file is and it is present in this directory....
    Thanks appreciate your help...

  • Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream

    I am trying to develop a web service client for amazon webservice.but i am getting this error while running the app. Can anyone please help me. I have installed the JWSDP and but could not understand why i have to locate all the jar files in the classpath?Please help.
    ===== error=========================================
    C:\abr\classes>java -classpath c:\abr\test.jar;C:\abr\jaxrpc-api.jar;C:\abr\jaxrpc-impl.jar;C:\abr\jaxrpc-spi.jar;c:\abr\classes\amazon.jar;C:\abr\mail.jar;C:\a
    br\saaj-api.jar;C:\abr\activation.jar;c:\abr\FastInfoset.jar;%classpath% Client
    [b]Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLS
    treamWriter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    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 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)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    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 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)
    at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.
    java:672)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:87)
    at amazon.AmazonSearchPort_Stub.authorSearchRequest(AmazonSearchPort_Stu
    b.java:988)
    at Client.main(Client.java:21)

    I'm assuming you're using JWSDP 1.6 as I see Fastinfoset.jar in your list. You are missing some jar files in your classpath there. The best way to know what you need is to look at the release notes for JWSDP 1.6. Since you're building a web serivce start with the table in there and lookup JAX-RPC. It'll show you what jar files are needed and what other libraries are needed. Now depending on what you're doing you don't really need all those.
    For sure you're missing jsr173_api.jar which is where I believe that class you need is located. This is in the JWSDP_1_6\sjsxp\lib directory. You will probably need the other jar thats in there too. Best bet is to follow the dependancy chart in the release notes.
    This should get you going.
    Ryan

  • Exception in thread "main" java.lang.NoClassDefFoundError org/xml/sax/SAXEx

    I want to run an jar file so on command prompt i am giving the command
    " java -jar jSimpleX_3.0.jar "
    I am getting the following error:
    "exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/SAXException "
    Can any body explain the reason of this exception
    Thanks in advance.

    Hi
    I am getting an exception while running code of "
    Reading an XML file in Java"
    The error is " Exception in thread "main"
    java.lang.NoClassDefFoundError:
    org/xml/sax/SAXException "
    I am using j2sdk1.4.0 and j2sdk1.4.2_13 and both are
    containing rt.jar file. But still i am receiving the
    same Error Exception.
    Can anybody there help me out.
    Thanks in Advance. !!!!Please help me out. Its urgent !!!!!!!!!!!!!!!!!!!!!!!

Maybe you are looking for

  • Differences between Oracle's and ArcSDE's validation routines

    I am having a small number of problems with valid Oracle geometries not displaying through ArcSDE. I have read the following on ESRI's website. Features stored in Oracle's SDO_GEOMETRY can be validated after storage using Oracle's validation subprogr

  • Getting error while opening bex analyzer in BI?ple help me asap

    a critical program error occured the problem has to close ple refer to the trace forther onformation say ok SAP BExAnalyzer application has encountered a problem and needs to close.  We are sorry for the inconvenience. saihng ple tell the probelm to

  • How can I publish my flash movie in one swf file in V.2

    Hi When I publish my movie to flash format , skin swf file is segregated from main movie swf file . How can I publish my movie only in one swf file ? I want to merge skin and main movie files together in one swf file .

  • How do i select certain songs to go on my ipod...

    hello everyone is there a way that i can keep a song in my itunes without it going on my ipod when i plug it in? thanks.

  • EIM 4.3 - Closing Cases

    Hello, Had an interesting scenaio (yet very likely) in testing today using integrated EIM. Email came in to agent     - Auto Reply sent to customer     - Customer replied - thanks for auto reply, and added additional information - setting off excepti