Exception in thread "main" javax.mail.NoSuchProviderException: invalid prov

HI,
I am trying to read mails from my inbox i amgetting the ErrorC:\javamail>java
Readmail
Exception in thread "main" javax.mail.NoSuchProviderException: No provider for IMAP
        at javax.mail.Session.getProvider(Session.java:455)
        at javax.mail.Session.getStore(Session.java:530)
        at javax.mail.Session.getStore(Session.java:510)
        at Readmail.main(Readmail.java:24)My Code is    {
String host = "hostname";
String username = "user";
String password = "password";
// Create empty properties
Properties props = new Properties();
// Get session
Session session = Session.getDefaultInstance(props,null);
// Get the store
Store store = session.getStore("IMAP");
store.connect(host, username, password);
// Get folder
Folder folder = store.getFolder("Inbox");
folder.open(Folder.READ_ONLY);
// Get directory
Message message[] = folder.getMessages();
for (int i=0, n=message.length; i<n; i++)
   System.out.println(i + ": " + message.getFrom()[0]
+ "\t" + message[i].getSubject());
// Close connection
folder.close(false);
store.close();
I have also tried POP3 and MIME and SMTP
Can anyone help me Thanks

hi bshannon,
I am getting the same error for others but for pop3 the error is as below
Exception in thread "main" javax.mail.MessagingException: Connect failed;
  nested exception is:
        java.net.ConnectException: Connection refused: connect
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:148)
        at javax.mail.Service.connect(Service.java:275)
        at javax.mail.Service.connect(Service.java:156)
        at Readmail.main(Readmail.java:25)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
        at com.sun.mail.pop3.Protocol.<init>(Protocol.java:81)
        at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:201)
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:144)
        ... 3 more

Similar Messages

  • Exception in thread "main" javax.mail.MessagingException: [EOF]

    hi i have a new Application which i need to send Email from it to people
    i have tried the code in my university pc's and i works soo fine...but in my home
    it gave my error
    here is the code
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class TestMail
         public static void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException
             boolean debug = false;
              //Set the host smtp address
              Properties props = new Properties();
              props.put("mail.smtp.host", "mx2.hotmail.com");
             // create some properties and get the default Session
             Session session = Session.getDefaultInstance(props, null);
             session.setDebug(debug);
             // create a message
                  Message msg = new MimeMessage(session);
             // set the from and to address
             InternetAddress addressFrom = new InternetAddress(from);
             msg.setFrom(addressFrom);
             InternetAddress[] addressTo = new InternetAddress[recipients.length];
             for (int i = 0; i < recipients.length; i++)
                 addressTo[i] = new InternetAddress(recipients);
         msg.setRecipients(Message.RecipientType.TO, addressTo);
         // Optional : You can also set your custom headers in the Email if you Want
         msg.addHeader("MyHeaderName", "myHeaderValue");
         // Setting the Subject and Content Type
         msg.setSubject(subject);
         msg.setContent(message, "text/plain");
         Transport.send(msg);
         public static void main(String args[])throws MessagingException
              String mailers[] = new String[1];
              mailers[0] = "[email protected]";
              postMail(mailers,"hello","hello my dear ay","[email protected]");
    }and  here is the output of the programe(the error)Exception in thread "main" javax.mail.MessagingException: [EOF]
    at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    512)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
    at javax.mail.Transport.send0(Transport.java:189)
    at javax.mail.Transport.send(Transport.java:118)
    at TestMail.postMail(TestMail.java:39)
    at TestMail.main(TestMail.java:45)
    Press any key to continue . . .plz help meee
    Edited by: mld on Dec 30, 2007 9:37 AM
    Edited by: mld on Dec 31, 2007 2:32 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    i have tried every thing
    i put stmp.bebug in my code and it gave me the following (tis is a part of the output...the other is not important)
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: not loading file: C:\Program Files\Java\jdk1.5.0_06\jre\lib\javamail.addr
    ess.map
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_06\jre\lib\
    javamail.address.map (The system cannot find the file specified)
    Exception in thread "main" javax.mail.MessagingException: [EOF]
            at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
            at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    512)
            at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
            at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
            at javax.mail.Transport.send0(Transport.java:189)
            at javax.mail.Transport.send(Transport.java:118)
            at TestMail.postMail(TestMail.java:43)
            at TestMail.main(TestMail.java:49)
    Press any key to continue . . .

  • Exception in thread "main" javax.naming.NoInitialContextException: Need to

    Hey,
    I am exploring the technique 'JMS'. I found an sample code on the Internet (https://www.redhat.gl/docs/manuals/jboss/jboss-eap-4.2/doc/Server_Configuration_Guide/JMS_Examples-A_Point_To_Point_Example.html).
    But unfortunately, by running the code on my local computer, I got an NoInitialContextException (Exception in thread "main" javax.naming.NoInitialContextException: Need to ...Application resource file: java.naming.factory.initial). After searching on the Internet, I discovered I need to configure some JNDI values. But, also after passing on the variables to the class by parameter (-Djava.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory), I still get the same error.
    What have I forgotten? Hope someone can help. Thanks!
    Tongue78.
    public void setupPTP()
    throws JMSException,
    NamingException
    InitialContext iniCtx = new InitialContext();
    Object tmp = iniCtx.lookup("ConnectionFactory"); // exception occurs here..
    QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
    conn = qcf.createQueueConnection();
    que = (Queue) iniCtx.lookup("queue/testQueue");
    session = conn.createQueueSession(false,
    QueueSession.AUTO_ACKNOWLEDGE);
    conn.start();
    ....

    Refer to the Sun App Server documentation.
    http://docs.sun.com/source/819-0079/dgacc.htmlIt lists down the steps you need to follow.

  • Exception in thread "main" javax.naming.NameNotFoundException: Unable to re

    Hi friends,
    I am running simple Client program of JMS to produce text message. I have JMSServer under JMS tab in weblogic home site.my desnation is topic its name is topic2.Following Error occurs
    C:\j2sdk1.4.2_12\bin>java Client1
    Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve
    'topic1' Resolved [Root exception is javax.naming.NameNotFoundException: Unabl
    e to resolve 'topic1' Resolved ]; remaining name 'topic1'
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
    ava:108)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:284)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:244)
    at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Sou
    rce)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at Client1.main(Client1.java:21)
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'topic1' Resolv
    ed
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
    NamingNode.java:897)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
    a:230)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
    ava:154)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:18
    8)
    at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
    ef.java:108)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    144)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
    a:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
    .java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    C:\j2sdk1.4.2_12\bin>

    I am no expert to this but, I have gotten that error when I try to subscribe to a topic that does not exist.
    Make sure your server is running and that the topic exists.

  • 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:javax/actiovation

    c:\>java Emailer
    Exception in thread "main" java.lang.NoclassDefFoundError:javax/actiovation/DataSource
    at Main.<inti><Main.java:36>
    at Main.<inti><Main.java:51>
    am getting the following error wen am try to run my code..
    i think am havin problem in settin the classpath for
    authentication.jar file
    and if poissible give me full code for sending email from maa system
    can any one tell me how to set the class path for the jar file and wer to download the jar file
    thanks in advance
    bye

    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import com.sun.mail.smtp.SMTPMessage;
    public class Emailer
         String subject;
         String body;
      public Emailer()
      public void sendEmail(String fromEmailAddr, String toEmailAddr, String ccEmailAddr, String aSubject, String aBody) throws AddressException
           subject = aSubject;
           body = aBody;
           Properties eMailConfigProps = new Properties();
      eMailConfigProps = System.getProperties();
    eMailConfigProps.put("mail.from",new InternetAddress(fromEmailAddr));
           eMailConfigProps.put("mail.smtp.host", "59.175.161.22");
          eMailConfigProps.setProperty("mail.smtp.port", "25");
      eMailConfigProps.put("mail.transport.protocol", "59.175.161.22");
           Session session = Session.getInstance(eMailConfigProps, null);
           MimeMessage message = new SMTPMessage(session);
              try
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(toEmailAddr));
    message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccEmailAddr));
                message.setSubject(subject);
                message.setText(body);
                Transport.send(message);
              catch (MessagingException ex)
                System.err.println("Cannot send email. " + ex);
    public static void main(String args[])
          Emailer objEmailer = new Emailer();
         try
              objEmailer.sendEmail("[email protected]","[email protected]","[email protected]","Test Mail","Hi am working...");
         catch(javax.mail.internet.AddressException e)
              e.printStackTrace();
    wen am trying to execute the about code .. itss showing the following error
    plz wat r the changes that i should do in that coding..
    even i got the code from this forum only
    plz tel me
    this is the error am getting :
    c:/>java Emailer
    cannto send email. javax.mail.MessagingException : Could not connect to SMTP host :192.168.15.100,port :25;
    nested exception is :java.net.ConeectException :Connecton refused:connect
    tis is the error am getting ..
    pplzz anyone help
    wat r the changess that i should do in maa programm .. wat is the ipaddress and port no i should put ..wer can i get these 2..
    thanks in advance
    bye

  • 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/media/jai/

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

  • Javax.mail.NoSuchProviderException: No provider for ifs1

    Similar to the question found in William Troper's thread run on
    November 1. We had mail code working fine, changed some
    variables to incorporate a migratable build and have now lost
    our mail functionality.
    We have followed William's advice by renaming all of Sun's Mail
    classes in the ~\9ifs\settings\META-INF directory and still no
    joy.
    Does anyone have any ideas of what is causing a "No provider for
    ifs1" error message?
    Cheers,
    Susan

    Hi Scott,
    These (among other) items are in my CLASSPATH (printed out at
    runtime)
    /projects/intranet/lib/mail.jar:/app/oracle/product/9.0.1S/9ifs/s
    ettings/META-INF:
    Here is my stack. Also, the code is EXACLTY the same between
    what was working and what is now not. Thanks for looking in to
    this:
    javax.mail.NoSuchProviderException: No provider for ifs1
         at javax.mail.Session.getProvider(Session.java:249)
         at javax.mail.Session.getTransport(Session.java:442)
         at javax.mail.Session.getTransport(Session.java:423)
         at com.mim.intranet.utils.MessageFactory.sendMesg
    (MessageFactory.java:130)
         at
    com.mim.intranet.unittest.utils.MessagingUT.testValidMesg
    (MessagingUT.java:56)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect
    (TestResult.java:106)
         at junit.framework.TestResult.runProtected
    (TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at junit.textui.TestRunner.doRun(TestRunner.java:74)
         at junit.textui.TestRunner.run(TestRunner.java:200)
         at com.mim.intranet.unittest.AllTests.main
    (AllTests.java:40)
    4887 [main] WARN com.mim.intranet.unittest.utils.MessagingUT -
    Sending Exception
    F
    Time: 4.898
    There was 1 failure:
    1) testValidMesg(com.mim.intranet.unittest.utils.MessagingUT)
    junit.framework.AssertionFailedError: Failed sending message :
    com.mim.intranet.exception.IntranetException: Failed sending
    message encountered unexpected exception
    Wrapped Exception is : javax.mail.NoSuchProviderException: No
    provider for ifs1
         at
    com.mim.intranet.unittest.utils.MessagingUT.testValidMesg
    (MessagingUT.java:63)
         at com.mim.intranet.unittest.AllTests.main
    (AllTests.java:40)
    FAILURES!!!
    Tests run: 1, Failures: 1, Errors: 0
    com.mim.intranet.exception.IntranetException: Failed sending
    message encountered unexpected exception
    Wrapped Exception is : javax.mail.NoSuchProviderException: No
    provider for ifs1
         at com.mim.intranet.utils.MessageFactory.sendMesg
    (MessageFactory.java:187)
         at
    com.mim.intranet.unittest.utils.MessagingUT.testValidMesg
    (MessagingUT.java:56)
         at java.lang.reflect.Method.invoke(Native Method)
         at junit.framework.TestCase.runTest(TestCase.java:166)
         at junit.framework.TestCase.runBare(TestCase.java:140)
         at junit.framework.TestResult$1.protect
    (TestResult.java:106)
         at junit.framework.TestResult.runProtected
    (TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:131)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at junit.framework.TestSuite.runTest(TestSuite.java:173)
         at junit.framework.TestSuite.run(TestSuite.java:168)
         at junit.textui.TestRunner.doRun(TestRunner.java:74)
         at junit.textui.TestRunner.run(TestRunner.java:200)
         at com.mim.intranet.unittest.AllTests.main
    (AllTests.java:40)
    -----------------------------------------------------------------

  • Exception in thread "main" org.xml.sax.SAXParseException:

    Hi everybody,
    I had a code which is running good in the output till error comes,i want to remove that error in xml file and replace with blanck(or null value) by using string function.
    It will be a great help if some body could modify my code .
    import javax.xml.bind.Validator;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.DefaultHandler;
    import java.util.jar.Attributes;
    import java.io.File;
    class Reading extends DefaultHandler
    public static void main(String args[])throws Exception
    SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    File file=new File("C://raj.xml");
    sp.parse(file,new Reading());
    /*XMLReader xmlr=sp.getXMLReader();
    xmlr.setContentHandler(new Reading());
    xmlr.parse("first.xml");*/
    private Object args;
    public void startElement(String uri,String localName,String qName,
    Attributes attributes)
    System.out.println(qName);
    public void characters(char []ch,int start,int length)
    String str=new String(ch,start,length);
    System.out.print(str);
    public void endElement(String uri,String localName,String qName)
    System.out.println(qName);
    // Get a validator from the schema.
    //Validator validator = schema.newValidator();
    /*String file;
    try {
    Object validator;
         Object source;
         ((Object) validator).validate(source);
    System.out.println(file + " is valid.");
    catch (SAXException ex) {
    System.out.println(file + " is not valid because ");
    System.out.println(ex.getMessage());
    /* Object args;
              if (args.length != 1) {
    System.err.println("Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.");
    System.exit(1);
    //public boolean equalsIgnoreCase(String anotherString)
    //String s="content_ppov_1704781_1091806592456";
    //String s1="null";
    //Object error = null;
    //Stringreplace(content_ppov_1704781_1091806592456,null);
    //return null;
    //System.out.println("");
    //private void Stringreplace(Object error, Object object) {
         // TODO Auto-generated method stub
    /* Object internal;
         private String file;
         // Let's suppose that lines in the underlying input stream are known
    // to be no greater than 80 characters long.
         // Emit an error message, and delete the resource:
                   String msg = file+ "content_ppov_1704781_1091806592456";
                   //void getServer().errlog(this, msg);
                   delete();
                        private void delete() {
                             // TODO Auto-generated method stub
                        private void errlog(Reading reading, String msg2) {
                             // TODO Auto-generated method stub
    and my raj.xml file is like this
    <div>This is a data .</div>]]>
    </TEXT>
    </content>
    &content_1234789; // this line of error is comming
    </content>
    thanks in advance.
    The error message displaying on console is
    Exception in thread "main" org.xml.sax.SAXParseException: The entity "content_ppov_1704781_1091806592456" was referenced, but not declared.
         at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
         at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:601)
         at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1264)
         at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:331)
         at runner.Reading.main(Reading.java:18)

    The error is in your XML input, not in your Java code. Probably the XML doesn't declare its encoding, so the parser assumes that it is encoded in UTF-8. And probably it contains some character (like an accented letter, for example) that is not part of the UTF-8 encoding. So contact the person who created the XML -- which is not well-formed XML, by the way -- and get them to fix it. It's possible that declaring the encoding as ISO8859-1 might work, but it might not. All depends on what the invalid character is.

  • Exception in thread "main" java.sql.SQLException: ORA-01704: string literal

    Hi Everyone,
    I am Using This Code to read the Mail from server and inserting those into database but i am getting error like
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message[i].getFrom()[0]);
    //System.out.println("Subject : " + message[i].getSubject());
    //System.out.print("Message : ");
    InputStream stream = message[i].getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@***.co.in','"+message[i].getSubject()+"','"+s.toString()+"')");
    stm.execute(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@****.co.in','"+message[i].getSubject()+"','"+Message_2001+"')");
    folder.close(true);
    store.close();
    when i execute this some messages get inserted into table but for some messages
    Exception in thread "main" java.sql.SQLException: ORA-01704: string literal too long
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:942)
    at ReadMail_OLD.main(ReadMail_OLD.java:64)
    Edited by: 997089 on May 1, 2013 9:29 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

    Hi All,
    Thanks for Your Reply .
    I got the answer i have made a mistake in loop after every iteration i have not cleared the stringBuffer Varaible so the after one or two iteration it givesthe error.
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message.getFrom()[0]);
    //System.out.println("Subject : " + message.getSubject());
    //System.out.print("Message : ");
    InputStream stream = message.getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"s.toString()"')");
    stm.execute(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"Message_2001"')");
    s.delete(0, s.length());
    folder.close(true);
    store.close();
    Thanks for Reply
    Edited by: 997089 on May 1, 2013 9:28 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint

    Hi,
    I have an application jar file which is run from a .sh file.
    The application uses ridc api to checkin a document on UCM.
    I have placed jars for supporting the application on the folder where we have kept the application jar
    also we have mentioned the supporting jar file names in the Manifest.mf file of the application jar.
    The necessary jar files which we have placed are:
    com.lnt.ucm.integrationutility.ucm.Client
    log4j-1.2.16.jar
    oracle.ucm.ridc-11.1.1.jar
    poi-2.5.1.jar
    commons-codec-1.2.jar
    commons-httpclient-3.1.jar
    commons-logging-1.0.4.jar
    mail.jar
    jxl-2.6.10.jar
    com.bea.core.antlr.runtime_2.7.7.jar
    com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar
    jrf.jar
    org.eclipse.persistence_1.1.0.0_2-1.jar
    weblogic.jar
    wlfullclient.jar
    wseeclient.jar
    jaxws-rt-2.1.4.jar
    we are getting below exception when we run the jar from the .sh file.
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint
    at weblogic.wsee.jaxws.spi.WLSProvider.<clinit>(WLSProvider.java:90)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:31)
    at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
    at javax.xml.ws.spi.Provider.provider(Provider.java:83)
    at javax.xml.ws.Service.<init>(Service.java:56)
    at com.abc.ucm.proxy.JDEUCMManagerService.<init>(JDEUCMManagerService.java:66)
    at com.abc.ucm.integrationutility.ucm.Client.executeUtilty(Client.java:50)
    at com.abc.ucm.integrationutility.ucm.Client.main(Client.java:540)
    I'm not able to find any jar for weblogic/diagnostics/instrumentation/JoinPoint can you please tell me which jar needs to be added.
    Regards,
    Tejaswini L

    914897 wrote:
    I encounter the similar error. Anyone knows how to fix it?By providing a configuration file which validates with the corresponding XSDs found in coherence.jar. Sorry, but can't point you to the specific issue without seeing the erroneous configuration file.
    Best regards,
    Robert

  • Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib

    I am trying to add jdbc to my project and find that jdbc components seem to be missing
    compiles and runs fine in IDE
    but when I try to run outside IDE I get this error
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/sql/
    DataNavigator

    here is my log file
    Log Session: Sunday, May 22, 2005 10:17:39 PM EDT
    System Info: Product Version = Sun(tm) Java(tm) Studio Enterprise 7 2004Q4 (Build 041123)
    IDE Versioning = IDE/1 spec=4.26.1 impl=041123
    Operating System = Windows XP version 5.1 running on x86
    Java; VM; Vendor = 1.4.2_05; Java HotSpot(TM) Client VM 1.4.2_05-b04; Sun Microsystems Inc.
    Java Home = C:\j2sdk1.4.2_05\jre
    System Locale; Encod. = en_US (f4j_ee); Cp1252
    Home Dir; Current Dir = C:\Documents and Settings\dale; C:\Sun\jstudio_04Q4\Ent_04Q4\bin
    IDE Install; User Dir = C:\Sun\jstudio_04Q4\Ent_04Q4; C:\Documents and Settings\dale\.jstudio\Ent04Q4
    CLASSPATH = C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\boot.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\Describe.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\DescribeIDE.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\jaxen.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\logger.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\msv.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\parser.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\saxpath.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\Tidy.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgdtj55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgetj55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsglt55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgltc55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgltjava55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgmtj55.jar;C:\j2sdk1.4.2_05\lib\dt.jar;C:\j2sdk1.4.2_05\lib\tools.jar;C:\Sun\jstudio_04Q4\AppServer7\pointbase\client_tools\lib\pbclient42RE.jar
    Boot & ext classpath = C:\j2sdk1.4.2_05\jre\lib\rt.jar;C:\j2sdk1.4.2_05\jre\lib\i18n.jar;C:\j2sdk1.4.2_05\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_05\jre\lib\jsse.jar;C:\j2sdk1.4.2_05\jre\lib\jce.jar;C:\j2sdk1.4.2_05\jre\lib\charsets.jar;C:\j2sdk1.4.2_05\jre\classes;C:\j2sdk1.4.2_05\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_05\jre\lib\ext\jai_codec.jar;C:\j2sdk1.4.2_05\jre\lib\ext\jai_core.jar;C:\j2sdk1.4.2_05\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_05\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_05\jre\lib\ext\mlibwrapper_jai.jar;C:\j2sdk1.4.2_05\jre\lib\ext\sunjce_provider.jar
    Dynamic classpath = C:\Sun\jstudio_04Q4\Ent_04Q4\lib\patches\TopLogging.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\core.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openfile-cli.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openide-loaders.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openide.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\core_f4j.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\core_f4j_ee.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\openide_f4j.jar
    Patched TopLogging from crash-reporter.nbm
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module com.sun.xml.registry1_0_01: added = [module org.netbeans.libs.xerces/1 > 1.2] removed = [package org.apache.xerces.parsers[SAXParser], package org.apache.xml.serialize[XMLSerializer]]; details: [Xerces is now available only as an autoload module, not in classpath: http://libs.netbeans.org/#xerces]
    [org.netbeans.core.modules #4] Warning: the extension C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\ext\namespace1_3.jar may be multiply loaded by modules: [C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\jaxr-module-1-3.jar, C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\jax-qname-module.jar]; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html#class-path
    Module patch or custom extension: C:\Sun\jstudio_04Q4\Ent_04Q4\modules\patches\org-netbeans-modules-editor\codetemplatesPatches.jar
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.jarpackager: added = [module org.netbeans.libs.regexp > 1.2] removed = [package org.apache.regexp > 1.2]; details: [Regexp is now available only as an autoload module, not on classpath: http://libs.netbeans.org/#regexp]
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.refactoring: added = [module org.openide.debugger > 1.0, token org.openide.compiler.CompilationEngine, module org.openide.compiler > 1.0, token org.openide.TopManager, module org.openide.execution > 1.0, token org.openide.windows.IOProvider, module org.openide.deprecated > 1.0, token org.openide.execution.ExecutionEngine] removed = []; details: [API separation phase I (#19443): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I, API separation phase II (#19443): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-II, Debugger API separation (#29914): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-III]
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.web.tomcat.tomcat40: added = [module org.netbeans.libs.xerces/1 > 1.2] removed = [package [org.apache.xml.serialize.EncodingInfo]]; details: [Xerces is now available only as an autoload module, not in classpath: http://libs.netbeans.org/#xerces]
    [org.netbeans.core.modules #4] Warning - had to add recursive class loader dependencies for module org.netbeans.modules.refactoring on [org.netbeans.modules.classfile]; see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-indirect-dep-cp
    [org.netbeans.core.modules #4] Warning - had to add recursive class loader dependencies for module com.sun.forte4j.j2ee.debugger on [org.openidex.util, org.netbeans.modules.web.core, org.netbeans.modules.schema2beans, org.netbeans.api.xml, org.netbeans.modules.jarpackager, javax.activation, org.netbeans.modules.vcscore, org.netbeans.libs.jaxp, org.netbeans.libs.xerces, org.netbeans.modules.projects, org.netbeans.modules.logger, org.netbeans.modules.html, com.sun.forte4j.j2ee.lib, org.netbeans.modules.clazz, javax.mail, org.netbeans.modules.image, com.sun.forte4j.modules.depclass, org.netbeans.libs.regexp]; see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-indirect-dep-cp
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.jarpackager uses org.netbeans.libs.regexp which is deprecated: JDK 1.4 includes regular expression support which should be used instead: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.6-jre-regexp
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.projects uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.refactoring uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module com.embarcadero.netbeans uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module com.sun.forte4j.j2ee.debugger uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    Type Groups Level Module Name
    err * 255 * (Default)
    Type Groups Level Module Name
    err * 255 * (Default)
    cfg 9 255 com.sun.forte4j.webdesigner
    Last execution suffered an abnormal exit at Sunday, May 22, 2005 10:15:18 PM EDT
    Log file not specified
    Turning on modules:
         org.openide/1 [4.26.1 041123]
         org.openide.loaders [4.11.1 041123]
         org.netbeans.core/1 [1.21.1 041123]
         org.openide.io [1.1.1 041123]
         org.netbeans.lib.terminalemulator [1.1.1 041123]
         org.netbeans.core.output/1 [1.1.1 041123]
         com.sun.tools.ide.collab/1 [7.0.0 041123]
         com.sun.im [7.0.0 041123]
         org.openide.src [1.1.1 041123]
         org.openide.execution [1.1.1 041123]
         org.openide.compiler [1.2.1 041123]
         org.netbeans.core.compiler/1 [1.4.1 041123]
         org.openide.debugger [1.1.1 041123]
         org.netbeans.modules.editor/1 [1.14.1 041123]
         org.netbeans.libs.xalan/1 [1.4.1 2.5.2]
         org.netbeans.libs.jaxp/1 [1.2.1 1.1.2]
         org.netbeans.api.xml/1 [1.3.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.core/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.text/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.classfile/1 [1.8 041123]
         org.netbeans.core.execution/1 [1.3.1 041123]
         org.netbeans.modules.clazz/1 [1.13.1 041123]
         org.netbeans.modules.javahelp/1 [2.1.1 041123]
         org.netbeans.modules.db/1 [1.8.2 041123]
         com.sun.forte4j.modules.dbmodel.jdbcimpl/1 [7.0.0 041123]
         org.openide.deprecated [1.3.1 041123]
         org.netbeans.core.deprecated [1.3.1 041123]
         org.netbeans.modules.debugger.core/3 [2.10.1 041123]
         org.netbeans.modules.debugger.jpda/1 [1.17.1 041123]
         org.netbeans.modules.j2eeserver/2 [1.7.3 041123]
         org.apache.xalan [2.2.2 Xalan 2.2.0 release]
         org.netbeans.modules.image/1 [1.11.1 041123]
         javax.activation/1 [1.0.2 1.0.2]
         javax.mail/1 [1.1.4 1.1.4]
         org.netbeans.modules.logger/1 [1.5 041123]
         com.sun.forte4j.modules.depclass/1 [2.4 041123]
         org.openidex.util/2 [2.7.1 041123]
         org.netbeans.modules.vcscore/1 [1.9.1 041123]
         org.netbeans.libs.regexp [1.2.1 1.2]
         org.netbeans.modules.jarpackager/2 [1.13.3 041123]
         org.netbeans.modules.schema2beans/1 [1.4.3 041123]
         org.netbeans.api.java/1 [1.3.1 041123]
         org.netbeans.libs.xerces/1 [1.4.1 2.6.0]
         org.netbeans.modules.java/1 [1.16.1 041123]
         com.sun.ffj.modules.licensemgr/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.lib/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejb/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejbmodule/1 [7.0.0 041123]
         org.netbeans.modules.projects/1 [1.14.1 041123]
         org.netbeans.modules.html/1 [1.12.1 041123]
         org.netbeans.modules.web.core/1 [1.16.3 041123]
         com.sun.forte4j.j2ee.appasm/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.appclient/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.j2eeconn/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.importear/1 [7.0.0 041123]
         org.netbeans.modules.diff/1 [1.7.1 041123]
         org.netbeans.modules.vcs.advanced/1 [1.9.1 041123]
         org.netbeans.modules.vcs.profiles.clearcase/1 [1.2 041123]
         org.netbeans.modules.xml.catalog/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.properties/1 [1.11.1 041123]
         org.netbeans.modules.i18n/1 [1.14.1 041123]
         org.netbeans.modules.javadoc/1 [1.11.1 041123]
         javax.xml.namespace/1 [1.0 1.0]
         com.sun.xml.messaging1_3/1 [1.0 1.0]
         com.sun.xml.registry1_3/1 [1.0 1.0]
         com.sun.tools.jaxrpc_cmn/1 [1.1 1.1]
         com.sun.xml.rpc1_3/1 [1.0 1.0]
         com.sun.forte4j.j2ee.wsdl/1 [7.0.0 041123]
         org.netbeans.modules.servletapi23/1 [1.3.2 041123]
         org.netbeans.modules.web.jspparser/1 [1.5.2 041123]
         org.netbeans.modules.web.tomcat.tomcat40/1 [1.8.3 041123]
         com.sun.forte4j.genericgenerator4/1 [1.1.1 020327]
         org.netbeans.modules.web.ie/1 [1.15.3 041123]
         com.sun.forte4j.webdesigner.xmlservice/1 [7.0.0 041123]
         com.sun.tools.ide.j2eeant/1 [7.0.0 041123]
         org.netbeans.modules.xml.schema/1 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.filecopy/1 [1.11 041123]
         org.netbeans.modules.group/1 [1.0.1 041123]
         org.netbeans.modules.settings/1 [1.4.1 041123]
         org.netbeans.tasklistapi/1 [1.7.1.2 2 041123]
         org.netbeans.modules.tasklist.core/2 [1.22.1.26 6 041123]
         org.netbeans.modules.suggestions_framework/2 [1.2.1.265 5 041123]
         org.netbeans.modules.tasklist.docscan/2 [1.13.1.2653 3 041123]
         com.sun.forte4j.codetemplates/1 [7.0.0 @BUILD_NUMBER_SUBST@]
         com.sun.tools.vcsscc/1 [7.0.0 041123]
         com.sun.tools.vcsscc.profiles.vss/1 [7.0.0 041123]
         com.sun.forte4j.modules.pointbase/1 [7.0.0 041123]
         org.netbeans.core.windows/2 [2.0.1 041123]
         org.netbeans.core.ui/1 [1.3.1 041123]
         org.netbeans.modules.utilities/1 [1.15.1 041123]
         org.netbeans.modules.autoupdate/1 [2.8.1 041123]
         org.netbeans.modules.welcome/1 [1.5.1 041123]
         org.apache.soap [2.2.1 SOAP 2.2 release]
         org.netbeans.lib.cvsclient/1 [1.8.1 041123]
         org.netbeans.modules.vcs.profiles.cvsprofiles/1 [1.3.1 041123]
         org.netbeans.modules.applet/1 [1.14.1 041123]
         org.netbeans.modules.web.debug/1 [1.8.2 041123]
         org.netbeans.modules.web.core.syntax/1 [1.12.3 041123]
         com.sun.jato.tools.sunone.ee/1 [2.1.4 20041123.213634]
         org.netbeans.modules.usersguide/1 [1.13.1 041123]
         com.sun.forte4j.ee_examples/1 [7.0.0 041123]
         org.netbeans.modules.css/2 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.tools.j2mews/1 [7.0.0 041123]
         org.ksoap/1 [1.0.1 kSOAP release 1.0]
         org.netbeans.modules.vcs.cmdline.compat/1 [1.3.1 041123]
         org.netbeans.modules.form/2 [1.13.1 041123]
         com.sun.tools.ide.collab.channel.mdc/1 [7.0.0 041123]
         org.netbeans.modules.servletapi/1 [1.3.1 041123]
         org.netbeans.modules.web.taglibed/1 [1.11.3 041123]
         com.sun.tools.dbdrivers/1 [7.0.0 041123]
         org.netbeans.modules.refactoring/1 [7.0.0 041123]
         org.netbeans.modules.web.assemblee/1 [1.2.1 041123]
         com.sun.tools.ide.portal.portlet/1 [1.0 041123]
         com.sun.tools.crashreporter [7.0.0 041123]
         org.netbeans.modules.text/1 [1.12.1 041123]
         com.embarcadero.netbeans/2 [1.0 041123]
         com.sun.tools.modules.cvsdisabler/1 [7.0.0 041123]
         com.sun.tools.vcsscc.profiles.pvcs/1 [7.0.0 041123]
         com.sun.tools.ide.collab.channel.chat/1 [7.0.0 041123]
         org.netbeans.modules.i18n.form/2 [1.12 041123]
         org.netbeans.modules.properties.syntax/1 [1.11 041123]
         org.netbeans.modules.cvsclient/1 [2.0.1 041123]
         com.sun.tools.ide.collab.channel.filesharing/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejbtest/1 [7.0.0 041123]
         org.netbeans.modules.httpserver/1 [1.13.1 041123]
         org.netbeans.modules.jdbc/1 [7.0.0 041123]
         com.sun.jdo.modules.persistence.mapping.core/1 [7.0.0 041123]
         com.sun.jdo.modules.persistence.mapping.ejb/1 [7.0.0 041123]
         org.netbeans.modules.web.tomcat.tomcat40.autocompile/1 [7.0.0 041123]
         org.netbeans.modules.junit/2 [2.11.1 041123]
         com.sun.ffj.modules.registration/1 [7.0.0 041123]
         org.netbeans.modules.xsl/1 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.forte4j.webdesigner.jwsdp/1 [7.0.0 041123]
         org.netbeans.modules.extbrowser/1 [1.3.1 041123]
         com.sun.forte4j.j2ee.debugger/1 [7.0.0 041123]
         com.sun.xml.messaging1_0_01/1 [1.0 1.0]
         com.sun.xml.rpc1_0_01/1 [1.0 1.0]
         org.netbeans.modules.web.monitor/1 [1.8.3 041123]
         org.netbeans.core.ide/1 [1.3.1 041123]
         org.apache.tools.ant.module/3 [3.6.1 041123]
         javax.portlet/1 [1.0 041123]
         org.netbeans.modules.autoupdateffj/1 [7.0.0 041123 ]
         com.sun.tools.profiler.monitor [7.2.4 041123]
         org.netbeans.modules.beans/1 [1.11.1 041123]
         com.sun.enterprise.webserver.tools/1 [7.0.0 PLUGINVERSION]
         com.sun.portal.devtool/1 [1.0 041123]
         com.sun.tools.ide.collab.ui/1 [7.0.0 041123]
         org.netbeans.modules.xml.tax/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.tools/2 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.appserv.tools.forte/1 [7.0.0 041123]
         org.netbeans.modules.web.dd.editors/1 [1.1.2 041123]
    QuantumAutoupdateModule 1116814706515 starting check
    Warning - org.netbeans.modules.projects.SetMainClassCookieAction should override CallableSystemAction.asynchronous() to return false
    Warning - org.netbeans.modules.debugger.delegator.DefaultDebuggerType should have overridden startDebugger(DataObject,boolean); falling back on deprecated ExecInfo usage; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-II-ExecInfo

  • Javax.mail.SendFailedException: Invalid Addresses

    Hi all,
    I write a web application with a module can send mail to specific mail address using JAVAMAIL . I test my SendMail.java  which has sendEmail() function with command line ../java SendMail and it run OK. But when I call sendEmail() from my web page it throw out ERROR: javax.mail.SendFailedException: Invalid Addresses.
    I don't know why? Do you have any idea about it ?
    Thanks!

    Hi all,
    This is more Error information:
    javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
        com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
        at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1294)
        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:635)
        at view.MailImplement.sendEmail(MailImplement.java:152)
        at view.MailImplement.main(MailImplement.java:40)
    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay
    Thanks a lot!

  • Trying to get off the ground! Exception in thread "main" java.lang.NoClass

    I'm having difficulty setting up my system to cope with simple demo codes. Error Message at end
    System: Sony Vaio Laptop
    OS: Vista
    Java Components
    JAF-1.1.1
    JDK-1.6.0_03
    JRE-1.6.0_03
    JAVAMAIL-1.4.1
    I've edited my PATH to include contents of "JDK-1.6.0_03" so java, javac etc work from any directory
    I've edited my CLASSPATH so that from commandprompt I get the following message (using Set CLASSPATH)
    CLASSPATH=.;c:\java\;C:\Program Files\Java\javamail-1.4.1\mail.jar;C:\Program Files\Java\jaf-1.1.1\activation.jar;
    C:\Java\ is my working directory for all my codes, other directories are correct(copy and pasted)
    the following is the FrameDemo Code I'm trying to use, it appears to compile perfectly well
    package components;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    /* FrameDemo.java requires no other files. */
    public class FrameDemo {
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("FrameDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JLabel emptyLabel = new JLabel("");
            emptyLabel.setPreferredSize(new Dimension(175, 100));
            frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }the following is the complete command prompt dump
    Microsoft Windows [Version 6.0.6000]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.
    c:\java>java FrameDemo
    Exception in thread "main" java.lang.NoClassDefFoundError: FrameDemo (wrong name
    : components/FrameDemo)
    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$000(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)
    c:\java>
    I'd be very grateful for any help.....
    I'm guessing I'm missing something from the CLASSPATH but I've no clue what it is
    FrameDemo code is taken from Sun's own Swing Tutorial so I'm pretty sure the code is fine
    Edited by: Dioxin on Nov 16, 2007 6:29 AM

    ok NOW IT GETS WORSE!
    currently I have FrameDemo,java and FrameDemo.class in c:\java
    I create C:\Java\components
    then java components.FrameDemo from c:\java
    produces
    Exception in thread "main" java.lang.NoClassDefFoundError: components/FrameDemo
    if I put FrameDemo.java into the components directory and then compile it
    I get FrameDemo.class AND FrameDemo$1.class
    and when I then java components.FrameDemo from c:\java
    it works....
    when I remove the first line of code from my original FrameDemo.Java
    and then recompile it....I get FrameDemo.class AND FrameDemo$1.class in c:\Java
    Java FrameDemo
    works perfectly
    the line
    package components;was screwing me over
    I'm a little confused why I need FrameDemo$1.class though.....
    Cheers for all the responses
    Dioxin

Maybe you are looking for