Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.con

Hi everyone,
Just now i tried to run the 'simple' example in an JAXRPC Security part in the JWSDP 1.4 tutorial but got the following error:
run-sample:
[echo] Running the simple.TestClient program....
[java] Service URL=http://localhost:8080/securesimple/Ping
[java] Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.configuration.SecurityConfigurationXmlReader.readJAXRPCSecurityConfigurationString(Ljava/lang/String;Z)Lcom/sun/xml/wss/configuration/JAXRPCSecurityConfiguration;
[java]      at com.sun.xml.rpc.security.SecurityPluginUtil.<init>(SecurityPluginUtil.java:128)
[java]      at simple.PingPort_Ping_Stub.<clinit>(PingPort_Ping_Stub.java:40)
[java]      at simple.PingService_Impl.getPing(PingService_Impl.java:68)
[java]      at simple.TestClient.main(TestClient.java:27)
Can anybody give me a clue?

Vishal, thanks a lot for your reply. I used the App Server 2004Q4 beta and got the problem. When I switch to version 8.0.0_01 the things work well.
But now I'm trying to understand this example and creating my own simple web app using encryption feature. From the files in the example dicrectory I can figure out the security applied at client by examining client stub files generated by the wscompile in the asant gen-client task. But I wonder when security is added to the server side. Is it when we use wsdeploy with the model part specifiedin jaxrpc-ri.xml? What is the procedure to apply the security to the web service?
The last thing I want to ask is whether the deploytool bundled inside App Server can do the same things as ant task (eg. wsdeploy with some arguments).

Similar Messages

  • Exception in thread "main" java.lang.NoSuchMethodError?

    This is the exact same error I recieved from running ListGames:
    Exception in thread "main" java.lang.NoSuchMethodError: ListGames.getConnection(Ljava/lang/String;)Ljava/sql/Connection;
    at ListGames.getGames(ListGames.java:21)
    at ListGames.main(ListGames.java:7)
    What's wrong?
    ListGames.java:
    import java.sql.*;
    import java.text.NumberFormat;
    import ...util.MysqlConnection; // purposely incomplete
    public class ListGames {
         static Connection conn = MysqlConnection.openMysqlConnection("ds_games");
         public static void main(String args[]) {
              NumberFormat cf = NumberFormat.getCurrencyInstance();
              ResultSet games = getGames();
              try {
                   while (games.next()) {
                        Game g = getGame(games);
                        String msg = Integer.toString(g.year) + ": " + g.title + " (" + cf.format(g.price) + ")";
                        System.out.println(msg);
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
         private static ResultSet getGames() {          
              try {
                   Statement s = conn.createStatement();
                   ResultSet rows = s.executeQuery("select title, year, price from my_ds_games order by year, price, title");
                   return rows;
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
              return null;
         private static Game getGame(ResultSet games) {
              try {
                   String title = games.getString("Title");
                   int year = games.getInt("Year");
                   double price = games.getDouble("Price");
                   return new Game(title, year, price);
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
              return null;
         private static class Game {
              public String title;
              public int year;
              public double price;
              public Game(String title, int year, double price) {
                   this.title = title;
                   this.year = year;
                   this.price = price;
    MysqlConnection.java:
    package ...util; // purposely incomplete
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public final class MysqlConnection {     
         public static final Connection openMysqlConnection(String database) {
              Connection conn = null;
              try {
                   Class.forName("com.mysql.jdbc.Driver");
                   conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/" + database, user, password); // username and password purposely uninitialized
              } catch(SQLException e) {
                   System.out.println("SQLException: " + e.getMessage());
                   System.out.println("SQLState: " + e.getSQLState());
                   System.out.println("VendorError: " + e.getErrorCode());
              } catch(Exception e) {
                   e.printStackTrace();
              } finally {
                   return conn;
         public static final Connection closeMysqlConnection(Connection conn) {
              try {
                   if (conn != null) {
                        conn.close();
                        if (conn == null) {
                             System.out.println("Conection Closed");
              } catch (SQLException e) {
                   e.printStackTrace();
              } finally {
                   return null;
    }

    Darkstar444 wrote:
    I deleted ListGames.class, ListGames$Games.class, and MysqlConnection.class but still the same thing.Then you didn't delete the version of ListGames.class which is actually being used when you run your application. This suggests that your classpath is pointing to an old version as well as to the version produced currently by the compiler. Or that there's an old version which you put into the Java extensions directory.

  • Exception in thread "main" java.lang.NoSuchMethodError: main -- Help

    I am new to Java programming and I have been working out of a book trying to learn the language. I am working on a Ubuntu system using Eclipse. I get an error when I try to run this app. It is: Exception in thread "main" java.lang.NoSuchMethodError: main. I have Googled it and read different possible solutions, but none have helped. Can someone help me solve this?
    Here is the code for battleshipGameTestDrive.java:_
    import java.util.ArrayList;
    public class battleshipGameTestDrive
         public static void main(String[] args, ArrayList<String> locations)      
              int numOfGuesses = 0;
              boolean isAlive = true;
              GameHelper helper = new GameHelper();
              battleshipGame ship = new battleshipGame();
              for (int ctr = 1; ctr < 4; ctr++)
                   int randomNum = (int) (Math.random() * 5);          
                   locations.add(Integer.toString(randomNum));
                   ship.setLocationCells(locations);
              while (isAlive == true){
                   String userGuess = helper.getUserInput("Enter a number (1-7): ");
                   numOfGuesses++;
                   String result = ship.checkYourself(userGuess);
                   if (result.equals("kill")){
                        isAlive = false;
                        System.out.println("You took " + numOfGuesses + " guesses");
                   } // close result if
              }  //end while loop
         }// end of main
    }// end of battleshipGameTestDrive class
    Here is the code for the battleshipGame class.java:_
    import java.util.ArrayList;
    public class battleshipGame {
         private ArrayList<String> locationCells;
         public void setLocationCells(ArrayList<String> loc){
              locationCells = loc;
         public String checkYourself(String userInput){
              String result = "miss";          
              int index = locationCells.indexOf(userInput);
              if (index >= 0){
                   locationCells.remove(index);
                   if (locationCells.isEmpty()){
                        result = "kill";
                   }else{
                        result = "hit";
                   }// close if
              }// closer outer if
              return result;
         }     //close method
    }     //close class

    Hello,
    I saw your short message youe sent to someone who had a problem : Exception in thread "main" java.lang.NoSuchMethodError :main
    So I was thinking maybe you could help me I struggle with this code fro 3weeks, this is a code I save it later as
    import java.awt.*;
    import java.awt.event.*;
    class Party {
    public void makeInvitation(){
    Frame f = new Frame();
    Label l = new Label("Party at Tom's");
    Button b = new Button("Sure");
    Button c = new Button("Noo...");
    Panel p = new Panel();
    p.add(l);
    I write this code in Notepad++ than I save it as java file with looks like this : Java source file (*.java)
    - than in Command Prompt I write : javac Party.java as usual and it comes with this error below Exception in thread "main" .......
    I have no idea what's wrong with it.Can you help me
    Thank you in advance

  • Exception in thread main java.lang.NoClassDefFoundError: com/object/msg/Sms

    Exception in thread main java.lang.NoClassDefFoundError: com/object/msg/SmsService
    caused by: java.lang.NotFoundException: com.object.msg.SmsService
    at java.net........................
    at java.security.......
    I'm trying to send SMS using this code and it gives above Exception during Runtime.
    import java.io.File;
    import com.objectxp.msg.*;
    public class SendSMS
    public static void main(String[] args)
    SmsService service = null;
    try {
    // Configuration
    File config = new File("jsms.conf");
    // create service object.
    service = new GsmSmsService();
    service.init(config);
    // create a new Message.
    Message msg = new Message();
    msg.setRecipient("7894561");
    msg.setMessage("jSMS is cool!");
    // Connect to the device
    service.connect();
    // send the Message
    service.sendMessage(msg);
    System.out.println("Message sent successfully, ID is ");
    } catch (Exception ex) {
    System.err.println("Message could not be sent: "+ex.getMessage());
    ex.printStackTrace();
    } finally {
    if (service != null) {
    try {
    service.disconnect();
    } catch( Exception unknown ) {}
    service.destroy();
    }

    run this one in command prompt and then convert the applet using converter tool
    JC_HOME = C:\java_card_kit-2_2_2\bin\
    set CLASSES=%JCHOME%\lib\apduio.jar;%JC_HOME%\lib\apdutool.jar;%JC_HOME%\lib\jcwde.jar;%JC_HOME%\lib\converter.jar;%JC_HOME%\lib\scriptgen.jar;%JC_HOME%\lib\offcardverifier.jar;%JC_HOME%\lib\api.jar;%JC_HOME%\lib\installer.jar;%JC_HOME%\lib\capdump.jar;
    D:\NareshPalle\jcardRE\Smart\src>java -classpath %_CLASSES% com.sun.javacard.con
    verter.Converter -out EXP JCA CAP -exportpath .\exp -applet 0x0a:0x00:0x00:0x00:0x0e:0x01:0x02:
    0x03:0x04:0x05:0x06 PackageName appletName 0x01:0x02:0x03:0x04:0x05:0x0
    6:0x07:0x08 1.0
    or
    go to following directory and run the converter tool in command prompt
    step 1: cd C:\java_card_kit-2_2_2\bin\
    then run this command under the above directory
    step 2:converter -classdir E:\Pathof Your applet class file -out EXP JCA CAP -exportpath E:\path of exp files folder -applet AID PackageName AppletName PackAID major.minor no
    For more doubts mail me....
    *[removed by moderator]*
    Thanks and Regards
    NareshPalle
    Edited by: EJP on 31/03/2012 20:09: removed your email address. Unless you like spam and unless you think these forums are provided for your personal benefit only, posting an email address here serves no useful purpose whatsoever.

  • Java.lang.NoSuchMethodError: com.sun.xml.ws.util.JAXWSUtils.getEncodedURL(Ljava/lang/String;)Ljava/net/URL;

    java.lang.NoSuchMethodError: com.sun.xml.ws.util.JAXWSUtils.getEncodedURL(Ljava/lang/String;)Ljava/net/URL.
    Gettin exception while trying to execute clientGen from build.xml from eclipse using Oracle weblogic 10.3 server.
    I tried with both jars jaxws-rt-2.1.4 and jaxws-rt-2.1.3
    Regards,
    Manish

    along with wlfullclient.jar please add wseeclient.jar
    Copy the file WL_HOME/server/lib/wseeclient.zip from the computer hosting WebLogic Server to the client computer( where WL_HOME refers to the WebLogic Server installation directory, such as /Oracle/Middleware/wlserver_12.1)
    Unzip the wseeclient.zip file into the appropriate directory. For example, you might unzip the file into a directory that contains other classes used by your client application.
    Add the wseeclient.jar file (unzipped from the wseeclient.zip file) to your CLASSPATH.
    Note:
    Also be sure that your CLASSPATH includes the JAR file that contains the Ant classes (ant.jar). This JAR file is typically located in the lib directory of the Ant distribution.
    http://docs.oracle.com/cd/E24329_01/web.1211/e24967/client.htm#WSRPC214
    Regards,
    Sunil P

  • Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)

    I am trying to config application in Sun One Portal server 3.0 SP5 , (Sun Solaris 8)during configuration I was trying to import some xml files however during the process I got the error :
    Exception in thread "main" java.lang.OutOfMemoryError.
    I tried increasing the size of the heap in jvm12.conf to 512 MB and even tried to run the command -Xms512M, but this didn't help.
    Pls respond as asap.
    Sharad gehani

    Hi gimbal2,
    yeah, its streaming the particular data (ie CUSTOMER) from input xml file and generate the txt file.
    I tried like below . But this is also not working. Getting the same error.
    java -Xmx2048m -mx2048m -Xss1024k -Xoss1024m
    Any other possible solution on this?

  • Exception in thread "main" java.lang.NoSuchMethodError: main

    I know you answered this questions a thousand times, but from all the threads i've read, i understand that it is also a program specific problem. I'm an absolute beginner in Java coding, learning it right now at university... I also undertood from other threads u want me to post in the correct way with the code attached to the message. i hope the form i am posting this thread in is ok... sorry to bother you, but it would be really nice if we could solve this problem somehow:
    I created a java file, which compiled without problems; but when i try to run the program, my terminal gives out the failure message stated above.
    I already set the classpath variable to the directory i am working in, so i don't think that this is the problem...
    anyway, here's the code, hope you can deal with it.
    class Widerstand{
              //Attribute
         float rho;
         float laenge;
         float flaeche;
         public float r;
              //Widerstand aus der Formel
              Widerstand(float rho, float laenge, float flaeche){
                   float r=rho*(laenge/flaeche);
              } //Formel
              //Widerstandswert (direkt �bergeben)
              Widerstand(float r){
                   r=r;
              } //Wert     
                   //Wert zur�ckgeben
                   float sWert(){
                        return r;
    }//class
    class Netzwerk{
    public static void main(String[] args) {
         float rho=Terminal.askFloat("Rho=");
         float laenge=Terminal.askFloat("Leiterlaenge=");
         float flaeche=Terminal.askFloat("Leiterdurchmesser=");
         }//Argumente
    }//class

    The error is telling you that the error is:
    Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
    Delete the .class files and recompile programs to insure that the .class files are valid.

  • Exception in thread "main" java.lang.NoSuchMethodError: main (Error)

    Hello,
    I'm new to learning Java and I'm receiving the following error message whenever I try to run the following program. Can someone help?
    //code
    class Books {
         String title;
         String author;
         class BooksTestDrive {
         public static void main(String [] args)     {
         Books [] myBooks = new Books[3];
         int x = 0;
         myBooks[0] = new Books();
         myBooks[1] = new Books();
         myBooks[2] = new Books();
         myBooks[0].title = "The Grapes of Java";
         myBooks[1].title = "The Java Gatsby";
         myBooks[2].title = "The Java Cookbook";
         myBooks[0].author = "bob";
         myBooks[1].author = "sue";
         myBooks[2].author = "ian";
         while (x < 3) {
         System.out.print(myBooks[x].title);
         System.out.print(" by ");
         System.out.println(myBooks[x].author);
         x = x + 1;
    //end of code
    Thanks,
    H

    1.) Use the code button when posting your code, it makes it more readable.
    2.) You should have posted the error message in the text as well, it's slightly confusing this way.
    NoSuchMethodError means that Java wanted to invoke a method that's not there. In this case it's called "main". So you tried to run a Java class that does not have a main method. How did you try to run your Program (exact command, please)?

  • Java.lang.NoSuchMethodError: com.sun.mail.util.SocketFetcher.getSocket

    I am recieving the above error in a FileNet Content Manager environment. The full stack trace is:
    Exception in thread "main" java.lang.NoSuchMethodError: com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1195)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322)
    at javax.mail.Service.connect(Service.java:233)
    at javax.mail.Service.connect(Service.java:134)
    at javax.mail.Service.connect(Service.java:86)
    at javax.mail.Transport.send0(Transport.java:162)
    at javax.mail.Transport.send(Transport.java:80)
    at com.bearingpoint.utilities.EMail.send(EMail.java:171)
    at com.bearingpoint.utilities.EMail.send(EMail.java:31)
    at email.main(email.java:11)
    I have spent many hours, fiddling with classpaths, ensuring that the mail.jar, mailapi.jar, smtp.jar, activation.jar are all from the same generation of JavaMail. With my classpath set correctly I can run a simple program constructed to just test whether the box can send out email from the command line.
    The code for the program is:
    public class email {
         public email() {
         public static void main (String args[]) {
              try {
              EMail.send("10.132.147.62", "[email protected]", "[email protected]", "test", "test");
              catch (Exception e) {
                   System.err.println(e.toString());
    Where EMail.send() is:
    public static void send(
    String mail_server_host,
    String email_from,
    String email_to,
    String subject,
    String message) throws AddressException, MessagingException, IOException {
    send(mail_server_host,
    (Authenticator)null,
    new InternetAddress[] {new InternetAddress(email_from)},
    new InternetAddress[] {new InternetAddress(email_to)},
    (InternetAddress[])null,
    (InternetAddress[])null,
    subject,
    message,
    null,
    null);
    which calls:
    public static void send(
    String mail_server_host,
    Authenticator authenticator,
    InternetAddress[] addresses_from,
    InternetAddress[] addresses_to,
    InternetAddress[] addresses_cc,
    InternetAddress[] addresses_bcc,
    String subject,
    String message,
    InputStream[] attachments,
    MimeType[] attachmentTypes) throws MessagingException,IOException {
    Properties properties = new Properties();
    properties.put("mail.smtp.host", mail_server_host);
    MimeMessage msg = new MimeMessage(
    Session.getInstance(properties, authenticator));
    msg.addFrom(addresses_from);
    msg.setRecipients(Message.RecipientType.TO, addresses_to);
    msg.setRecipients(Message.RecipientType.CC, addresses_cc);
    msg.setRecipients(Message.RecipientType.BCC, addresses_bcc);
    msg.setSubject(subject);
    BodyPart bpBody = new MimeBodyPart();
    bpBody.setText(message);
    Multipart mpMessageBody = new MimeMultipart();
    if (attachments == null && attachmentTypes == null) {
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    else if (attachments == null) {
    bpBody.setContent(message, attachmentTypes[0].toString());
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    else {
    mpMessageBody.addBodyPart(bpBody);
    for (int i=0; i<attachments.length;i++) {
    bpBody = new MimeBodyPart();
    DataSource dsAttachment = new ByteArrayDataSource(attachments, attachmentTypes[i].toString());
    bpBody.setDataHandler(new DataHandler(dsAttachment));
    bpBody.setFileName("attachment." + new MimeFileExtensions(attachmentTypes[i].getValue()).toString());
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    Transport.send(msg);
    As said before all .jar files are of the same generation, yet when I run FileNet and the underlying content engine, and try to send an email, I recieve this exception. I have run out of ideas, and any help would be appreciated.
    Things I've tried (multiple times):
    - Removing any old versions of the jar files and replace them with JavaMail 1.3.3_01
    - Have the content engine specifically import the JavaMail jar files.
    While I realize some of you may not know what FileNet is, perhaps you have come across this exception before. Any new ideas would be more then appreciated.
    Thank you for your time.

    I haven't seen this error before so I need more detail to reproduce it.
    It looks like you daisy chained calls to various static send() methods from various classes. Could you write a static main() for the class with the send() method actually doing the work? In the main() write the test case and compile it, test it and if it still doesnt work post it. Please include the import statements as it is germain to the solution.
    Its much easier for me to help you if I don't have to recreate "FileNet" to reproduce your error.
    As an alternative....
    The following code I got from: http://javaalmanac.com/egs/javax.mail/SendApp.html?l=new
    its simpler than you're code but gets the job done (without attachments).
    I've tested it and it works with:
    javac -classpath .;c:\sun\appserver\lib\j2ee.jar;c:\sun\appserver\lib\mail.jar SendApp.java
    java -classpath .;c:\sun\appserver\lib\j2ee.jar;c:\sun\appserver\lib\mail.jar SendApp
    Ran on Windows XP, Sun J2EE 1.4/Appserver Bundle
        import java.io.*;
        import javax.mail.*;
        import javax.mail.internet.*;
        import javax.activation.*;
        public class SendApp {
            public static void send(String smtpHost, int smtpPort,
                                    String from, String to,
                                    String subject, String content)
                    throws AddressException, MessagingException {
                // Create a mail session
                java.util.Properties props = new java.util.Properties();
                props.put("mail.smtp.host", smtpHost);
                props.put("mail.smtp.port", ""+smtpPort);
                Session session = Session.getDefaultInstance(props, null);
                // Construct the message
                Message msg = new MimeMessage(session);
                msg.setFrom(new InternetAddress(from));
                msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
                msg.setSubject(subject);
                msg.setText(content);
                // Send the message
                Transport.send(msg);
            public static void main(String[] args) throws Exception {
                // Send a test message
                send("10.1.4.105", 25, "[email protected]", "[email protected]",
                     "test", "test message.");
        }

  • Reg:- Exception in thread "main" java.lang.NoClassDefFoundError

    Hi Friends,
    I am trying to connect to Central Management Server using Java.I have created a sample program.I set class path as
    D:\j2sdk1.4.2_14\lib;D:\Program Files\Business Objects\common\3.5\java\lib\rebean.wi.jar;D:\Program Files\Business Objects\common\3.5\java\lib\rebean.jar;D:\Program Files\Business Objects\common\3.5\java\lib\ceplugins.jar;D:\Program Files\Business Objects\common\3.5\java\lib\cesession.jar;D:\Program Files\Business Objects\common\3.5\java\lib\cecore.jar;D:\Program Files\Business Objects\common\3.5\java\lib\celib.jar;D:\Program Files\Business Objects\common\3.5\java\lib\.;.
    Source Code Sample.java
    import com.crystaldecisions.enterprise.ocaframework.ServiceNames;
    import com.crystaldecisions.sdk.exception.SDKException;
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    import com.crystaldecisions.sdk.occa.pluginmgr.*;
    import com.crystaldecisions.sdk.plugin.*;
    import com.crystaldecisions.sdk.plugin.desktop.report.*;
    import com.crystaldecisions.sdk.plugin.desktop.user.*;
    import com.crystaldecisions.sdk.framework.*;
    import com.businessobjects.rebean.wi.LogicalOperator;
    import com.crystaldecisions.sdk.occa.infostore.*;
    import com.businessobjects.rebean.wi.*;
    import java.util.*;
    import java.lang.StringBuffer;
    import java.io.*;
    public class Sample1
    public static void main(String[] args)
    System.out.println("After Method Call");
    String Juname = "Administrator";
    String Jpwd = "";
    String Jcms = "hst-pcs4892:6400";
    String Jauth = "secEnterprise";
    SDKException Jfailure = null;
    boolean JloggedIn = true;
    IEnterpriseSession JenterpriseSession=null;
    // If no session already exists, logon using the specified parameters.
    if (JenterpriseSession == null)
    try
    /* Attempt logon. Create an Enterprise session
    * manager object.
    ISessionMgr JsessionMgr = CrystalEnterprise.getSessionMgr();
    // Log on to BusinessObjects Enterprise.
    JenterpriseSession = JsessionMgr.logon(Juname, Jpwd, Jcms, Jauth);
    String JlogonToken = JenterpriseSession.getLogonTokenMgr().getDefaultToken();
    catch (SDKException error)
    System.out.println("Exception Occured");
    JloggedIn = false;
    Jfailure = error;
    //System.out.println(JloggedIn);
    I am getting the following error
    Exception in thread "main" java.lang.NoClassDefFoundError: com/crystaldecisions/thirdparty/org/omg/CORBA/TRANSIENT
    at com.crystaldecisions.enterprise.ocaframework.ServiceMgrFactory.getServiceMgr(Unknown Source)
    at com.crystaldecisions.sdk.occa.security.internal.m.<init>(Unknown Source)
    at com.crystaldecisions.sdk.occa.security.internal.SecurityFactory.makeSecurityMgr(Unknown Source)
    at com.crystaldecisions.sdk.framework.internal.d.<init>(Unknown Source)
    at com.crystaldecisions.sdk.framework.internal.CEFactory.makeSessionMgr(Unknown Source)
    at com.crystaldecisions.sdk.framework.CrystalEnterprise.getSessionMgr(Unknown Source)
    at Sample1.main(Sample1.java:46)
    Please help me resolve this.
    Regards,
    Sriram.
    [email protected]

    Hi Cotton,
    First let me thank you for responding to this
    thread.I gave the class path where all these are
    availableJava disagrees with you.
    Do you know which jar com.crystaldecisions.thirdparty.org.omg.CORBA/TRANSIENT is supposed to be in?

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

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • I get the message Exception in thread "main" java.lang.StackOverflowError

    I'm trying to make a program for my class and when I run the program I get the error Exception in thread "main" java.lang.StackOverflowError, I have looked up what it means and I don't see where in my program would be giving the error, can someone please help me, here is the program
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    // This visual application allows users to "shop" for items,
    // maintaining a "shopping cart" of items purchased so far.
    public class ShoppingApp extends JFrame
    implements ActionListener {
    private JButton addButton, // Add item to cart
    removeButton; // Remove item from cart
    private JTextArea itemsArea, // Where list of items for sale displayed
    cartArea; // Where shopping cart displayed
    private JTextField itemField, // Where name of item entered
    messageField; // Status messages displayed
    private ShoppingCart cart; // Reference to support object representing
    // Shopping cart (that is, the business logic)
    String itemEntered;
    public ShoppingApp() {
    // This array of items is used to set up the cart
    String[] items = new String[5];
    items[0] = "Computer";
    items[1] = "Monitor";
    items[2] = "Printer";
    items[3] = "Scanner";
    items[4] = "Camera";
    // Construct the shopping cart support object
    cart = new ShoppingCart(items);
    // Contruct visual components
    addButton = new JButton("ADD");
    removeButton = new JButton("REMOVE");
    itemsArea = new JTextArea(6, 8);
    cartArea = new JTextArea(6, 20);
    itemField = new JTextField(12);
    messageField = new JTextField(20);
    // Listen for events on buttons
    addButton.addActionListener(this);
    removeButton.addActionListener(this);
    // The list of items is not editable, and is in light grey (to
    // make it distinct from the cart area -- this would be done
    // better by using the BorderFactory class).
    itemsArea.setEditable(false);
    itemsArea.setBackground(Color.lightGray);
    cartArea.setEditable(false);
    // Write the list of items into the itemsArea
    itemsArea.setText("Items for sale:");
    for (int i = 0; i < items.length; i++)
    itemsArea.append("\n" + items);
    // Write the initial state of the cart into the cartArea
    cartArea.setText("No items in cart");
    // Construct layouts and add components
    JPanel mainPanel = new JPanel(new BorderLayout());
    getContentPane().add(mainPanel);
    JPanel controlPanel = new JPanel(new GridLayout(1, 4));
    controlPanel.add(new JLabel("Item: ", JLabel.RIGHT));
    controlPanel.add(itemField);
    controlPanel.add(addButton);
    controlPanel.add(removeButton);
    mainPanel.add(controlPanel, "North");
    mainPanel.add(itemsArea, "West");
    mainPanel.add(cartArea, "Center");
    mainPanel.add(messageField, "South");
    public void actionPerformed(ActionEvent e)
    itemEntered=itemField.getText();
    if (addButton==e.getSource())
    cart.addComputer();
         messageField.setText("Computer added to the shopping cart");
    public static void main(String[] args) {
    ShoppingApp s = new ShoppingApp();
    s.setSize(360, 180);
    s.show();
    this is a seperate file called ShoppingCart
    public class ShoppingCart extends ShoppingApp
    private String[] items;
    private int[] quantity;
    public ShoppingCart (String[] inputitems)
    super();
    items=inputitems;
    quantity=new int[items.length];
    public void addComputer()
    int x;
    for (x=0; "computer".equals(itemEntered); x++)
         items[x]="computer";
    please somebody help me, this thing is due tomorrow I need help asap!

    First, whenever you post, there is a link for Formatting Help. This link takes you to here: http://forum.java.sun.com/features.jsp#Formatting and tells you how to use the code and /code tags so any code you post will be easily readable.
    Your problem is this: ShoppingApp has a ShoppingCart and ShoppingCart is a ShoppingApp - that is ShoppingCart extends ShoppintApp. You are saying that ShoppingCart is a ShoppingApp - which probably doesn't make sense. But the problem is a child class always calls one of its parent's constructors. So when you create a ShoppingApp, the ShoppingApp constructor tries to create a ShoppingCart. The ShoppingCart calls its superclass constructor, which tries to create a ShoppingCart, which calls its superclass constructor, which tries to create a ShoppingCart, which...
    It seems like ShoppingCart should not extend ShoppingApp.

  • FB 4.7 AIR 3.6 Flex 4.9 iOS packing - Exception in thread "main" java.lang.OutOfMemoryError'

    I've got an error similar to Isaac_Sunkes' 'FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError',
    but the causes are not related to what he discovered, corrupt image or other files, I'd exclude bad archive contents in my project.
    I'm using Flash Builder 4.7 with Adobe AIR 3.6 set into an Apache Flex 4.9.1 SDK;
    HW system is:
    iMac,    2,7 GHz Intel Core i5,    8 GB 1600 MHz DDR3,    NVIDIA GeForce GT 640M 512 MB,    OS X 10.8.2 (12C3103)
    The Flash project consists in an application with a main SWF file which loads, via ActionScript methods, other SWF in cascade.
    I've formerly compiled and run the application on an iPad 1, IOS 5.0.1 (9A405), but got on the device the error alert:
    "Uncompiled ActionScript
    Your application is attempitng to run
    uncompiled ActionScript, probably
    due to the use of an embedded
    SWF. This is unsupported on iOS.
    See the Adobe Developer
    Connection website for more info."
    Then I changed the FB compiler switches, now are set to:
    -locale en_US
    -swf-version=19
    Please note that without the switch    -swf-version=19     the application is compiled correctly and the IPA is sent to the device
    and I can debug it, but iOS traps secondary SWF files and blocke the app usage, as previously told.
    they work on deploy of small applications,
    but, when I try to build a big IPA file either for an ad-hoc distribution, either for an debug on device, after some minutes long waiting, I get a Java stuck, with this trace:
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:753)
        at java.util.HashMap.put(HashMap.java:385)
        at java.util.HashSet.add(HashSet.java:200)
        at adobe.abc.Algorithms.addUses(Algorithms.java:165)
        at adobe.abc.Algorithms.findUses(Algorithms.java:187)
        at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4731)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
        at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler .java:599)
        at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
    I've tried to change the Java settings on FB's eclipse.ini in MacOS folder,
    -vmargs
    -Xms(various settings up to)1024m
    -Xmx(various settings up to)1024m
    -XX:MaxPermSize=(various settings up to)512m
    -XX:PermSize=(various settings up to)256m
    but results are the same.
    Now settings are back as recommended:
    -vmargs
    -Xms256m
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:PermSize=64m
    I've changed the Flex build.properties
    jvm.args = ${local.d32} -Xms64m -Xmx1024m -ea -Dapple.awt.UIElement=true
    with no results; now I'n get back to the standard:
    jvm.args = ${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true
    and now I truely have no more ideas;
    could anyone give an help?
    many thanks in advance.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • J2ee server Exception in thread Main java.lang.OutOfMemoryError

    hallo
    i need your help
    first my java j2ee and jdk
    j2ee j2sdkee1.3.1
    jdk j2sdk 1.4
    i nedd the server for jms.
    when i started the server with j2ee -verbose
    i get the error message:
    Starting web service at port: 8000
    Exception in thread "Main" java.lang.OutOfMemoryError
    what can i do to get out off this error message and starting the server normal. please help me to solve the problem!!!
    i read in this forum about -Xms und Xmx but this Commands don't go on my system.
    thx for help!!!

    Hi Warren,
    Still I am not clear with your question. But generally this out of memoryspace error can be rectified by changing the properties which comes in the menubar of your command prompt. Then increasing the virtual memory over there. I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

Maybe you are looking for

  • A Problem with LR 4.1 update

    With Lightroom 4.0 (64 bits), everything goes normal. When I clicked "Edit in Adobe Photoshop CS5.." the edited raw file was exported to CS5 photoshop in "tif" format. After updating Lightroom 4.1 today, LR no longer generates "DSC-1234-Edit.tif" and

  • How do I copy a photo in iphoto

    how do I copy a photo in iphoto.  When i highlight the photo and then press the control and mouse button the copy option is greyed out.

  • Query regarding short dump

    Hi The runtime error is DBIF_RSQL_INVALID_RSQL and the exception is CX_SY_OPEN_SQL_DB.can anyone explain me these errors. At this select query it going to short dump.Could anyone help me.Its urgent. Select aaufnr agstrp agsuzp biedd b~iedz into table

  • Regarding infotype 0580 (It's contain the prevoius year date )

    Dear Friends,                           I am using the infotype 0580(Preveoius emplyee tax detail) but in that infotype to date field contain the wrong date it's contain the previous year date and also this to date field is disabled mode also we not

  • I need recovery disks

    Hi, had problems with my laptop running bad and all kinds of problems. I decided to re-install the software back to the factory setup when I purchased the laptop. I have a new set of recovery disks I got from HP back then and I had never used them. I