Exception in JRE1.6

Hello,
In my own application i can see my applications through browsers using JRE1.5 and it was working fine.
And now for the new version of my application i upgrad from JRE1.5 to JRE1.6
And now i am getting the following application in Java console :
java.util.zip.ZipException: error in opening zip file
     at java.util.zip.ZipFile.open(Native Method)
     at java.util.zip.ZipFile.<init>(Unknown Source)
     at java.util.jar.JarFile.<init>(Unknown Source)
     at java.util.jar.JarFile.<init>(Unknown Source)
     at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
     at com.sun.deploy.cache.Cache$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
     at com.sun.deploy.cache.DeployFileOutputStream.close(Unknown Source)
     at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(Unknown Source)
     at java.io.BufferedInputStream.close(Unknown Source)
     at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
     at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
     at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
     at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
     at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
     at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
     at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
     at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
     at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
     at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
     at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
     at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
     at sun.misc.URLClassPath$3.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.misc.URLClassPath.getLoader(Unknown Source)
     at sun.misc.URLClassPath.getLoader(Unknown Source)
     at sun.misc.URLClassPath.getResource(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 sun.applet.AppletClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.applet.AppletClassLoader.loadCode(Unknown Source)
     at sun.applet.AppletPanel.createApplet(Unknown Source)
     at sun.plugin.AppletViewer.createApplet(Unknown Source)
     at sun.applet.AppletPanel.runLoader(Unknown Source)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
But JRE1.6 is working fine with my older versions of my application and i did no code cahge in my application too.
Can u please anyone help me to solve this issue??
And onemore thing,some of my application working through applets are not working properly with JRE1.6.
Can anyone tell me how can i solve this issue!!!
Thanks in advance!!!

---> java.util.zip.ZipException: error in opening zip file
Check if the file you want to zip/unzip is existing.

Similar Messages

  • GetLockingKeyState((KeyEvent.VK_CAPS_LOCK) throws exception on Solaris

    Hello All,
    I have a function like:
    private void displayCapsLockWarning() {
             boolean bCapLockOn=false;
             try{
                  bCapLockOn =  getToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
             catch(java.lang.UnsupportedOperationException e){
                  //NOTE: non-windows machines will throw an exception on JRE1.6
                  bCapLockOn=false;
            if (bCapLockOn) {
                getCAPSWarningLabel().setVisible(true);
            } else {
                getCAPSWarningLabel().setVisible(false);
        }This function works fine when using JRE1.5.u11 on Solaris 10. But after we updated to JRE1.6u12, the getLockingKeyState() always throws UnsupportedOperationException . The same function works fine on Windows XP.
    Is this a known problem? Why would SUN remove support for this function when it was already working? Does anybody know of any work-arounds?
    Thanks

    Is it because of a switch from MToolkit to XToolkit?
    [http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html]
    It says Linux was switched from MToolkit to XToolkit in 1.5, and Solaris would "eventually be replaced," so maybe Java 6 was the time?
    That page tells you an environment variable you can use to change the toolkit used by Java for your VM; maybe you could try playing with this with your app in both 1.5 and 1.6 and see if the Toolkit is making the difference?
    It's a known problem that getLockingKeyState() doesn't work with XToolkit, but does with MToolkit:
    [http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=af849d41020d53fffffffff8d498737c80062?bug_id=5100701]

  • CA error - when adding a new job.

    Hi,
    Receive the below error while invoking a job on CA.
    when try to add a new job ->select template->Select Environment->Select Initial upgrade->Exception comes
    jre1.6.0_03 installed in the server.
    Exception java.lang.NumberFormatException caught in sun.misc.FloatingDecimal.readJavaFormatString() empty String java.lang.NumberFormatException: empty String at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Float.valueOf(Unknown Source) at com.peoplesoft.pt.changeassistant.Job.initStatus(Job.java:715) at
    Performed the below action but issue not resolved.
    --Make sure that when creating the Environments for the Upgrade, that the correct ids and passwords have been entered.  A userid and userid password plus the accessid and accessid password need to be entered.  The connectid, many times "People", should not be entered where accessid is supposed to be entered. 
    --Reinstall the Change Assistant
    --Be sure that the accessid and password being used is valid. 
    --Be sure that there is not an & character in PSRELEASE.Releaselabel column.  Change this to a text 'and' if you find one there.
    Thanks
    Soundappan

    In the installation notes of PeopleTools 8.52.07 at the bottom it says:
    PATCH NOTES
    IMPORTANT: Please read this section in its entirety before applying the PeopleTools 8.52.07 patch. This section covers any last-minute information or existing issues that may impact your PeopleSoft implementation whether or not you choose to apply this PeopleTools patch. This section does not list the items fixed/included in this patch. Information on patch content can be accessed via instructions found at the bottom of this UserDoc.
    13906590 – Change Assistant gives error while creating a new job for upgrade
    Problem: Change Assistant gives error while creating a new job for upgrade
    Workaround:
    DB2 customers running Change Assistant must set the variable 'override_connection_reset' to the value 1 in the following registry key:
    HKEY_CURRENT_USER\Software\PeopleSoft\PeopleTools\Release8.40\Profiles\Default\Database Options
    When they are done using Change Assistant, they must change the value to 0 before they use any other PeopleSoft 2 tier applications.
    That look a lot like your issue :)
    Try setting the registry key value as defined above to see if it solves your issue.

  • Java Web Start Application surprisedly does not start anymore based on new JRE1.7.0_45

    Hi everyone,
    we have to maintain a self-developed Java Application which is running based on JRE1.5.0_51 (x64). Our recent client machines have JRE1.7.0_40 (x64 too) installed in addition to the mentioned (and needed) JRE1.5.0_51 (x64).
    Everything was fine up to the point where we tried to install the newest JRE1.7.0_45 (x64) as the new version for doing the web start magic. The result is that our application (which is/was unchanged!) does not launch anymore. The strange thing is that we do not get any StackTrace, Exception or something else like this.
    The startup process simply hangs :-(
    Nothing has changed (application itself, firewall, network settings, hardware) apart from the new JRE version. It's reproducible at will. If I install JRE1.7.0_40 (x64) the application starts, if I install JRE1.7.0_45 (x64) the application hangs.
    I can say for sure, that in both cases (*_40 AND *_45) Web Start is able to do the synchronizing job and to launch the application base on the correct JRE1.5.0_51 (x64).
    My guess is that in case of an installed JRE1.7.0_45 (x64), the application hangs when it tries to connect to the database (Oracle 11g) via JDBC.
    I found a little hint in the Web Start Console. Therefore I had to switch the trace level of the console to 3 (which includes security, network and basic)
    In case of an installed JRE1.7.0_40 (x64) - which leads to a running application - I will receive the following output:
    Java Web Start 10.40.2.43
    JRE-Version verwenden 1.5.0_51-b10 Java HotSpot(TM) 64-Bit Server VM
    security: Istrusted: http://PKS-Server/jnlp2/advise_office.jnlp true
    avawsApplicationMain     3798 DEBUG root                : get Service: com.sun.jnlp.BasicServiceImpl@3b8e609b  fileName: connection.properties
    network: Cacheeintrag nicht gefunden [URL: http://PKS-Server/jnlp2//connection.properties, Version: null]
    network: Verbindung von http://PKS-Server/jnlp2//connection.properties mit Proxy=DIRECT wird hergestellt
    avawsApplicationMain     3803 INFO  root                : 'Alex2 connection.properties' wurde vom WebServer gelesen
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    avawsApplicationMain     4488 DEBUG root                : get Service: com.sun.jnlp.BasicServiceImpl@3b8e609b  fileName: connection.properties
    network: Cacheeintrag nicht gefunden [URL: http://PKS-Server/jnlp2//connection.properties, Version: null]
    network: Verbindung von http://PKS-Server/jnlp2//connection.properties mit Proxy=DIRECT wird hergestellt
    avawsApplicationMain     4492 INFO  root                : 'Alex2 connection.properties' wurde vom WebServer gelesen
    Connect OK => application starts.
    In case of an installed JRE1.7.0_45 (x64) - which leads to a hanging application - I will receive the following output:
    Java Web Start 10.45.2.18
    JRE-Version verwenden 1.5.0_51-b10 Java HotSpot(TM) 64-Bit Server VM
    security: Istrusted: http://PKS-Server/jnlp2/advise_office.jnlp true
    avawsApplicationMain     3805 DEBUG root                : get Service: com.sun.jnlp.BasicServiceImpl@25a41cc7  fileName: connection.properties
    network: Cacheeintrag nicht gefunden [URL: http://PKS-Server/jnlp2//connection.properties, Version: null]
    network: Verbindung von http://PKS-Server/jnlp2//connection.properties mit Proxy=DIRECT wird hergestellt
    avawsApplicationMain     3810 INFO  root                : 'Alex2 connection.properties' wurde vom WebServer gelesen
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    network: Verbindung von socket://PKS-Server:1521 mit Proxy=DIRECT wird hergestellt
    These last "network:" log entries will never stop. This will lead to an infinite loop which results in a great memory leak. I have to kill the process via windows task manager in order to get rid of it.
    Does someone out there has the same problem? Are there any new additional security issues which prevent my client to establish the database connection on port 1521?
    Any other ideas?
    Thanks in advance for any hint on this issue!
    Regards,
    Alex

    Resolution: We still were not able to solve this issue! The only way to get out of this is to install the JRE1.5 as the x64 variant. In this case no switching from 64-bit to 32-bit is needed and everything is on track again.
    But this is still strange and unexplainable :-(

  • Jbutton in applet not appearing when embedded in webpage(jre1.6.0_02)

    Hi,
    I am accessing a webcam from an applet embedded in a webpage using JMF 2.1. I am using JButtons using Image Icons. When i view the applet using applet viewer both the player and buttons appear fine. However when the applet is embedded in a jsp page the image JButtons don't appear at all. I am using jre1.6.0_02.
    Following is the code( The capture and cancel JButtons dont appear when viewed in webpage):
    import java.awt.*;
    import java.io.*;
    //import java.awt.Graphics;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.*;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.media.format.*;
    import javax.media.control.*;
    import javax.media.util.*;
    import javax.media.*;
    import javax.swing.ImageIcon;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGEncodeParam;
    import com.sun.image.codec.jpeg.JPEGImageEncoder;
    public class WebCamUnit extends JApplet implements ActionListener
         static final long serialVersionUID = -116069779446114664L;
         private static final String FILENAME_HEADER = "fileName";
         private static final String FILELASTMOD_HEADER = "fileLastMod";
         public static Player player = null;
         public CaptureDeviceInfo captureDeviceInfo = null;
         public MediaLocator ml = null;
         public JButton captureButton, cancelButton = null;
         public Buffer buf = null;
         public Image img = null;
         public VideoFormat vf = null;
         public BufferToImage btoi = null;
         public Component comp;
         public static boolean isTrue = true;
         public JPanel buttonPanel, playerPanel;
         public static String localDirectoryName = null;
         public static String serverDirectoryName = null;
         public static String servletURL = null;
         public static String localImageName = null;
         public static String serverImageName = null;
         String webCamDriverName = null;
         String middleButtonFilename = "TakePicture.JPG";
         String frontButtonFilename = "Cancel.JPG";
         public void init()
              localImageName = getParameter("LOCAL_IMAGE_NAME");
              serverImageName = getParameter("SERVER_IMAGE_NAME");
              localDirectoryName = getParameter("LOCAL_DIRECTORY_NAME");
              serverDirectoryName = getParameter("SERVER_DIRECTORY_NAME");
              servletURL = getParameter("SERVLET_URL");
              webCamDriverName = getParameter("WEBCAM_DRIVER_NAME");
              setLayout(new BorderLayout());
              setSize(320, 340);
              ImageIcon middleButtonIcon = new ImageIcon(middleButtonFilename);
              ImageIcon frontButtonIcon = new ImageIcon(frontButtonFilename);
              captureButton = new JButton(middleButtonIcon);
              cancelButton = new JButton(frontButtonIcon);
              captureButton.setBackground(Color.WHITE);
              captureButton.setContentAreaFilled(false);
              captureButton.setBorderPainted(false);
              captureButton.setFocusPainted(false);
              captureButton.addActionListener(this);
              captureButton.setEnabled(true);
              cancelButton.setBackground(Color.WHITE);
              cancelButton.setContentAreaFilled(false);
              cancelButton.setBorderPainted(false);
              cancelButton.setFocusPainted(false);
              cancelButton.addActionListener(this);
              cancelButton.setEnabled(true);
              buttonPanel = new JPanel();
              buttonPanel.add(captureButton);
              buttonPanel.add(cancelButton);
              buttonPanel.setBackground(Color.WHITE);
              getContentPane().add(buttonPanel, BorderLayout.CENTER);
              if(null==webCamDriverName)
                   webCamDriverName = "vfw:Microsoft WDM Image Capture (Win32):2";
              captureDeviceInfo = CaptureDeviceManager.getDevice(webCamDriverName);
              ml = captureDeviceInfo.getLocator();
                   try
                        player = Manager.createRealizedPlayer(ml);
                   catch (Exception e)
                   try
                        player.start();
                   catch (Exception e)
         public void destroy()
              player.close();
         public void start()
              try
                   if ((comp = player.getVisualComponent()) != null)
                        playerPanel = new JPanel();
                        comp.setBounds(0, 0, 320, 240);
                        playerPanel.add(comp);
                        getContentPane().add(playerPanel, BorderLayout.NORTH);
                   player.start();
              catch (Exception e)
              setVisible(true);
              invalidate();
              repaint();
         public boolean action(Event e, Object o)
              return true;
         public void paint(Graphics g)
              super.paint(g);
         public static void playerclose()
              player.close();
              player.deallocate();
         public void actionPerformed(ActionEvent e)
              JComponent c = (JComponent) e.getSource();
              if (c == captureButton)
                   player.stop();
                   FrameGrabbingControl fgc = (FrameGrabbingControl) player
                             .getControl("javax.media.control.FrameGrabbingControl");
                   buf = fgc.grabFrame();
                   btoi = new BufferToImage((VideoFormat) buf.getFormat());
                   img = btoi.createImage(buf);
                   String newDir = localDirectoryName;
                   boolean success = (new File(newDir)).mkdirs();
                   String imageServername = localDirectoryName + localImageName;
                   saveJPG(img, imageServername);
                   isTrue = false;
              else
                   if ((comp = player.getVisualComponent()) != null)
                        getContentPane().add(comp, BorderLayout.NORTH);
                        player.start();
                   isTrue = true;
         public void stop()
              player.stop();
              player.deallocate();
              getContentPane().removeAll();
         public static void saveJPG(Image img, String s)
              img = img.getScaledInstance(160, 120, 1);
              BufferedImage bi = new BufferedImage(img.getWidth(null), img
                        .getHeight(null), BufferedImage.TYPE_INT_RGB);
              Graphics2D g2 = bi.createGraphics();
              g2.drawImage(img, 0, 0, null, null);
              FileOutputStream out = null;
              try
                   out = new FileOutputStream(s);
              catch (java.io.FileNotFoundException io)
                   String message = "File Not Found";
                   JOptionPane pane = new JOptionPane(message);
                   JDialog dialog = pane.createDialog(new JFrame(), "Dilaog");
                   dialog.show();
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
              param.setQuality(0.50f, false);
              encoder.setJPEGEncodeParam(param);
              try
                   encoder.encode(bi);
                   out.close();
                   try
                   transferFile(localDirectoryName+localImageName,serverImageName,"",-1);
                   catch (Exception e1)
                        String message = "Error occurred while transferring image to server!!";
                        JOptionPane pane = new JOptionPane(message);
                        JDialog dialog = pane.createDialog(new JFrame(), "Dilaog");
                        dialog.show();
                   String message = "Image saved successfully!!";
                   JOptionPane pane = new JOptionPane(message);
                   JDialog dialog = pane.createDialog(new JFrame(), "Dilaog");
                   dialog.show();
              catch (java.io.IOException io)
                   String message = "Error occurred while saving image!!";
                   JOptionPane pane = new JOptionPane(message);
                   JDialog dialog = pane.createDialog(new JFrame(), "Dilaog");
                   dialog.show();
              catch (Exception e)
            // this method transfers the prescribed file to the server.
            // if the destination directory is "", it transfers the file to      "d:\\".
            //11-21-02 Changes : This method now has a new parameter that references the item
            //that is being transferred in the import list.
            public static String transferFile(String srcFileName, String
         destFileName,
                                              String destDir, int itemID)
               if (destDir.equals(""))
                  destDir = serverDirectoryName;
               // get the fully qualified filename and the mere filename.
               String fqfn = srcFileName;
               String fname = fqfn.substring(fqfn.lastIndexOf(File.separator)+1);
               try
                  //importTable importer = jbInit.getImportTable();
                  // create the file to be uploaded and a connection to      servlet.
                  File fileToUpload = new File(fqfn);
                  long fileSize = fileToUpload.length();
                  // get last mod of this file.
                  // The last mod is sent to the servlet as a header.
                  long lastMod = fileToUpload.lastModified();
                  String strLastMod = String.valueOf(lastMod);
                  URL serverURL = new URL(servletURL);
                  URLConnection serverCon = serverURL.openConnection();
                  // a bunch of connection setup related things.
                  serverCon.setDoInput(true);
                  serverCon.setDoOutput(true);
                  // Don't use a cached version of URL connection.
                  serverCon.setUseCaches (false);
                  serverCon.setDefaultUseCaches (false);
                  // set headers and their values.
                  serverCon.setRequestProperty("Content-Type",
                                               "application/octet-stream");
                  serverCon.setRequestProperty("Content-Length",
                  Long.toString(fileToUpload.length()));
                  serverCon.setRequestProperty(FILENAME_HEADER, destDir + destFileName);
                  serverCon.setRequestProperty(FILELASTMOD_HEADER, strLastMod);
                 // if (webadminApplet.DEBUG) System.out.println("Connection with FTP server established");
                  // create file stream and write stream to write file data.
                  FileInputStream fis = new FileInputStream(fileToUpload);
                  OutputStream os = serverCon.getOutputStream();
                  try
                     // transfer the file in 4K chunks.
                     byte[] buffer = new byte[4096];
                     long byteCnt = 0;
                     //long percent = 0;
                     int newPercent = 0;
                     int oldPercent = 0;
                     while (true)
                        int bytes = fis.read(buffer);
                        byteCnt += bytes;
                        //11-21-02 :
                        //If itemID is greater than -1 this is an import file      transfer
                        //otherwise this is a header graphic file transfer.
                        if (bytes < 0) break;
                        os.write(buffer, 0, bytes);
                     os.flush();
                     //if (webadminApplet.DEBUG) System.out.println("No of bytes sent: " + byteCnt);
                  finally
                     // close related streams.
                     os.close();
                     fis.close();
                 // if (webadminApplet.DEBUG) System.out.println("File Transmission complete");
                  // find out what the servlet has got to say in response.
                  BufferedReader reader = new BufferedReader(
                                 new
         InputStreamReader(serverCon.getInputStream()));
                  try
                     String line;
                     while ((line = reader.readLine()) != null)
                       // if (webadminApplet.DEBUG) System.out.println(line);
                  finally
                     // close the reader stream from servlet.
                     reader.close();
               } // end of the big try block.
               catch (Exception e)
                  System.out.println("Exception during file transfer:\n" + e);
                  e.printStackTrace();
                  return("FTP failed. See Java Console for Errors.");
               }  // end of catch block.
               return("File: " + fname + " successfully transferred.");
            }  // end of method transferFile().
    }

    >
    I am accessing a webcam from an applet embedded in a webpage using JMF 2.1. I am using JButtons using Image Icons. When i view the applet using applet viewer both the player and buttons appear fine. However when the applet is embedded in a jsp page the image JButtons don't appear at all. >That is probably because of security. Add 10 Dukes to the thread to indicate you are serious about resolving this, and I might expand on that answer.

  • Download Error Exception in 1.6. Works in all older versions.

    I had some customers complaining that Java Web Start stopped working after upgrading to Java 1.6. I got the following after I upgraded.
    JNLPException[category: Download Error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I get the following on the console:
    #### Java Web Start Error:
    #### Unable to load resource: http://barracudaserver.com/products/BarracudaDrive/HttpsTunnelWS.jar
    I have cleared the Java cache, but the Java client still sends a " If-Modified-Since" so the server responds with a 304 Not Modified.
    If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
    That is a long time ago.
    I have attached the HTTP headers at the bottom.
    Any ideas?
    BTW, it would be great if SUN could make things backward compatible. This JNLP file is integrated inside a product and requires that all customers upgrade the product.
    A copy of the JNLP file is available online at:
    http://barracudaserver.com/products/BarracudaDrive/HttpsTunnelClient.html
    GET /products/BarracudaDrive/HttpsTunnelWS.jar HTTP/1.1
    content-type: application/x-java-archive
    accept-encoding: pack200-gzip,gzip
    User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01
    UA-Java-Version: 1.6.0_01
    Host: barracudaserver.com
    Cache-Control: no-cache
    Pragma: no-cache
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
    Cookie: __utma=72791808.1501057734.1166376940.1177887848.1178031465.9; __utmz=72791808.1177300532.7.3.utmccn=(referral)|utmcsr=localhost|utmcct=/setup/wizard/SetAdmin.lsp|utmcmd=referral; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D
    HTTP/1.1 304 Not Modified
    Date: Tue, 01 May 2007 17:44:38 GMT
    Server: BarracudaServer.com (Posix)
    Connection: Keep-Alive
    Content-Type: application/java
    Etag: 461adac6
    Last-Modified: Tue, 10 Apr 2007 00:31:02 GMT
    Content-Length: 0
    Message was edited by:
    wi_ni
    Message was edited by:
    wi_ni

    JNLP version ?
    i tried to look up in my control panel
    and i have in user tab
    1.6     1.6.0_01     http://java.sun.com/products/autodl/j2se     C:\Program Files\Java\jre1.6.0_01\bin\javaw.exe     true
    system tab
    1.6     1.6.0_01     http://java.sun.com/products/autodl/j2se     C:\Program Files\Java\jre1.6.0_01\bin\javaw.exe     true
    and java -version is
    java version "1.6.0_01"
    Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
    Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
    here is my JNLP test program
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://172.22.90.128/Rel05_01_052">
    <information>
    <title>JNLPTest</title>
    <vendor>JNLPTest</vendor>
    <description>JNLPTest</description>
    <offline-allowed/>
    </information>
    <security><all-permissions/></security>
    <resources>
    <j2se version="1.5" initial-heap-size="64m" max-heap-size="512m"/>
    <jar href="iMS/STS-6.jar.pack.gz"/>
    <property name="Secure" value="false"/>
    </resources>
    <application-desc main-class="SwingTest"/>
    </jnlp>
    and this same works in machine where i have 1.5.
    I don't know the reason why java 1.6 webstart throw this error
    java.io.IOException: Corrupted pack file: magic/ver = CAFED00D/160.1 should be CAFED00D/150.7
         at com.sun.java.util.jar.pack.NativeUnpack.start(Native Method)
         at com.sun.java.util.jar.pack.NativeUnpack.run(Unknown Source)
         at com.sun.java.util.jar.pack.NativeUnpack.run(Unknown Source)
         at com.sun.java.util.jar.pack.UnpackerImpl.unpack(Unknown Source)
         at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • Null pointer Exception with Custom EventQueue

    I created a simple class customEventQueue which is extended from EventQueue class and pushed it using
    Toolkit.getDefaultToolkit().getSystemEventQueue().push(customEventQueue);
    Now, whenever there are three modal dialogs on top of a frame and if I click on top dialog that closes all three dialog boxes, I get nullpointer exception in console. The custom event class does not have any method in it. It just extends from EventQueue.
    I checked it in different JRE and it happens only in JRE1.3.1.
    Has anybody tried the same thing with custom event queue? Any help is most welcome. Thanks...
    java.lang.NullPointerException
    at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
    at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
    at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)

    Hi Chandel me having the same problem
    java.lang.NullPointerException
    at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
    at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
    at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown
    Source)
    at
    java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour
    ce)
    at
    java.awt.DefaultKeyboardFocusManager.pumpApprovedKeyEvents(Unknown So
    urce)
    at
    java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Sour
    ce)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown
    Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.SequencedEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Th bigger problem is that i don't know what is causing this exception, cause the stack trace doesn't mention the line of code where the exception occurred.
    In earlier version of java we had pData null pointer exception. This bug manifests when the pull down menu doesn't fit completely into the frame's bounds and swing has to create a seaprate window for the pull-down.
    The problem is that WInputMethod caches a reference to peer and that that reference becomes stale when peer is destroyed and recreated.
    In this bug cached peer reference becomes stale as the Window for the menu is hidden (and its peer is destroyed) and shown again (with new peer this time).
    WInputMethod have a cached reference to the old peer but that old peer is not connected to the underlying native window used to display the menu.
    But it's been fixed. I want to know if our problem is in some way related to this pData bug.
    Thanx.

  • Problem is running application in JRE1.3

    Hello,
    I am facing some problems in JRE1.3. I have my application developed with JDK1.1.8. It was running fine with machines on which JRE1.2 is installed. But when running the application on machines on which JRE1.3 is installed, I am getting an exception of Java.Lang.ClassNotFoundException. And when I un-install JRE1.3, application runs fine. I am not sure what this problem is due to. Can anyone please suggest me some solution to the same.
    Regards,
    Sheshu-

    how did you solve tihs problem, bvecouse � have the same problem

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

    Hello;
    I got a error to run my application, i have not problem with compile it. But it give me the following error massage when i run it.
    Could anyone help me please.
    E:\Java>javac HelloWorldSwing.java
    E:\Java>java HelloWorldSwing
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldSwing
    E:\Java>path
    PATH=C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\QuickTime\QTSystem\;C:\
    Program Files\Common Files\Adobe\AGL;C:\Program Files\Microsoft SQL Server\80\To
    ols\BINN;C:\Program Files\Java\jre1.6.0\bin;C:\Program Files\Java\jre1.6.0\bin;C
    :\Program Files\Java\j2re1.4.2_13\bin
    The following are where my jdk and jre store.
    C:\Program Files\Java>dir
    Volume in drive C has no label.
    Volume Serial Number is 3023-229B
    Directory of C:\Program Files\Java
    04/02/2007 12:22 AM <DIR> .
    04/02/2007 12:22 AM <DIR> ..
    01/02/2007 10:54 PM <DIR> j2re1.4.2_13
    03/02/2007 04:54 PM <DIR> jdk1.6.0
    01/02/2007 10:02 PM <DIR> jre1.5.0_06
    04/02/2007 12:22 AM <DIR> jre1.6.0
    0 File(s) 0 bytes
    6 Dir(s) 5,761,228,800 bytes free

    It even tries to tell you what's wrong. Run class "start.HelloWorldSwing", not "HelloWorldSwing".
    I bet that copying that error message without the class name into Google would have given you the answer right away.

  • SimpleDateFormat.parse() causes Unparsable date exception

    I am using SimpleDateFormat to both format and parse date strings. The format is working properly, but parse results in the following exception:
    java.text.ParseException: Unparseable date: "2007-08-31T12:05:05.651-0700"
    at java.text.DateFormat.parse(Unknown Source)
    Here is my code:
    SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ss.SZ");
    String dateTime = dateFormatter.format(new Date());
    Date test = dateFormatter.parse(dateTime);
    For testing purposes, I am formatting a date string, and then passing it right back into parse() and I get the exception.
    I am using jre1.5.0_10.
    Thank you for your help.
    -Karen

    You have specified the milliseconds (S) to have a minimum of 1 letter.
    From the API:
    Number: For formatting, the number of pattern letters is the minimum number of digits, and shorter numbers are zero-padded to this amount. For parsing, the number of pattern letters is ignored unless it's needed to separate two adjacent fields.
    If you specify it like this:SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ss.SSSZ");
    // or like this
    SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ss.S Z");it will work.
    Message was edited by:
    dwg

  • Error=2 in jre1.6.0_07 when calling cmd /c -- Windows 2003 server 5.2

    Must be very simple. Although, I do not where else to check.
    A java application allows opening the OS shell and executing programs. For Windows
    (without further details) a "cmd /c" prefix is recomended in the config file. None
    for Linux.
    The application runs the shell from a path relative to its configurations file,
    for which I have defined "../scripts".
    Thus a .wsf script located at MyAppPath\scripts can be executed as "Cscript //NoLogo MyScript.wsf". It works OK under XP Profesional, Version 2002, Service Pack3, jre1.6.0_07, JAVA_HOME defined. The application log reports a proper application start up using Java VM 10.0b-23. and execute the shell as many times as called without any problem.
    The applications works also fine for every aspect on Windows 2003 server 5.2, except for calling the os Shell. The following error is displayed:
    Cannot run program "cmd /c Cscript //NoLogo Myscript.wsf" (in directory C:\MyAppPath\script"): CreateProcess error=2 the system can not find the file specified.
    Of course, the file "Myscript.wsf" is there...
    In both cases (XP and 2003), CompSpec is set to %SystemRoot%\system32\cmd.exe and PATHEXT inlcudes ".WSF".
    Any help will be most appreciated.

    I have no experience with cscript, but by typing cscript in a command prompt i get:
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.
    Usage: CScript scriptname.extension [option...] [arguments...]
    Options:
    //B         Batch mode: Suppresses script errors and prompts from displaying
    //D         Enable Active Debugging
    //E:engine  Use engine for executing script
    //H:CScript Changes the default script host to CScript.exe
    //H:WScript Changes the default script host to WScript.exe (default)
    //I         Interactive mode (default, opposite of //B)
    //Job:xxxx  Execute a WSF job
    //Logo      Display logo (default)
    //Nologo    Prevent logo display: No banner will be shown at execution time
    //S         Save current command line options for this user
    //T:nn      Time out in seconds:  Maximum time a script is permitted to run
    //X         Execute script in debugger
    //U         Use Unicode for redirected I/O from the consoleDoesn't this mean that the script file name should come before the option (//Nologo)?
    I run XP SP 3.

  • Move from client 1.5 to 1.6.0_1 causes random https exception?

    How is everyone doing?
    Me? Well, life was good when our clients and server were running java 1.5.X. Now after some of our clients have upgraded to 1.6.0_1, life isn't so good.
    I am seeing seemingly random exceptions that appear to be generated down in the guts of the https api layer. I could use your help.
    Please, I appreciate any advice.
    The setup:
    1) Server side: Tomcat 5.5.15 with jdk 1.5.0_09
    2) Tomcat is setup for standard https and http but https is forced. Not using native APR connectors.
    3) Clients are using IE6 and IE7.
    4) Clients login to a web page that starts a fairly large applet running against the java plugin for 1.6.0_01.
    5) POJOs (plain old java objects) are being serialized back and forth. At some random point during the communication an exception occurs (see below). It appears that the session is closed or corrupt at this point.
    6) The above problem happens quicker for some and not at all for others.
    7) No errors show up on the server side that I can find. (catalina.out)
    The problem:
    The clients are randomly failing (at least it seems that way) with :
    javax.net.ssl.SSLException: java.lang.NullPointerException
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
         at com.mycompany.hm.callq.client.common.HttpMessage.sendPostObject(HttpMessage.java:227)
         at com.mycompany.hm.callq.client.common.CallQSerializeData.sendViaHttp(CallQSerializeData.java:132)
         at com.mycompany.hm.callq.client.common.SessionMonitor.getSessionInterval(SessionMonitor.java:355)
         at com.mycompany.hm.callq.client.common.SessionMonitor.startSessionMonitorTimers(SessionMonitor.java:78)
         at com.mycompany.hm.callq.client.common.JDockingApplet.start(JDockingApplet.java:331)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
         at com.sun.deploy.security.X509ExtendedDeployTrustManager.isSupportedAlgorithm(Unknown Source)
         at com.sun.deploy.security.X509ExtendedDeployTrustManager.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         ... 13 moreOnce this happens, the cache for class files becomes corrupt. Any further attempts at using the client fail (even after restarting the browser) as the class files are foobar. I have to manually delete the cache directory!
    The plea for help.
    I'm really hoping someone has some ideas. I don't know where to go from here? Perhaps there is more information I can provide to help?
    Thank you!
    -Dennis

    In the clients machine where Java 1.6 was installed, please do following -
    1. Right click 'Start' button and click on 'explore'
    2. In the main menu click 'Tools'->'Folder Options'->'File Types' tab
    3. Under 'Registered file types:' highlight 'JNLP' extension and click on 'Advanced' button
    4. In the 'Edit File Type' window, highlight 'Launch' option and click on 'Edit' and then 'Browse' button
    5. In 'Open with' window select 'javaws.exe' under 'C:\Program Files\Java\jre1.5.0_12\bin\' directory and click on 'Open' button.
    (Note: Select whichever JRE version you want to use)
    6. Finally, make sure the entry under 'Application used to perform action:' looks like "C:\Program Files\Java\jre1.5.0_12\bin\javaws.exe" "%1"
    7. Click 'OK' button for all open windows. (For all open windows, click on 'Apply' button first if it is enabled and then 'OK' button.)
    8. Close all browser windows and open again.
    Let me know if this works.

  • FindClass() throws java.lang.UnsatisfiedLinkError exception

    Hi All,
    I am using a JNI to make my C program to communicate with the GUI developed in Java Swings. In my C program I have used FindClass() method to find the java class. While exececuting my C program, I got the following exception,
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/java/jre1.5.0_04/lib/i386/libawt.so: /usr/java/j2sdk1.4.2_08/jre/lib/i386/libmlib_image.so: version `VER_1.1' not found (required by /usr/java/jre1.5.0_04/lib/i386/libawt.so)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at sun.security.action.LoadLibraryAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
    at sun.awt.DebugHelper.<clinit>(Unknown Source)
    at java.awt.Component.<clinit>(Unknown Source)
    I have ensured that the libawt.so and ibmlib_image.so paths are set in LD_LIBRARY_PATH. Inspite of that I am not able to access the java class because of the above mentioned exception. Please help me out in this.
    For your reference, I am attaching the code with this,
    #include <jni.h>
    int main()
         JavaVMOption options[2];
         JNIEnv *env;
         JavaVM *jvm;
         JavaVMInitArgs vm_args;
         long status;
         jclass cls;
         jobject obj;
         jmethodID mid;
         jstring jstr;
         char str[25];
           options[0].optionString =        "-Djava.class.path=/home/maniyan/work/Dhruv_proj/vers/v5";
         options[1].optionString = "-verbose:jni";
         memset(&vm_args, 0, sizeof(vm_args));
            vm_args.version = JNI_VERSION_1_4;
         vm_args.nOptions = 1;
         vm_args.options = options;
         vm_args.ignoreUnrecognized = 1;
         status = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
         printf("status %d\n",status);
         if (status != JNI_ERR)
              printf("Exception %d\n",(*env)->ExceptionCheck(env));
              cls = (*env)->FindClass(env, "frame_main_v1");
              printf("Exception %d\n",(*env)->ExceptionCheck(env));
              if ((*env)->ExceptionCheck(env)) {
              (*env)->ExceptionDescribe(env);
              (*env)->ExceptionClear(env);
         if(cls !=0)
                 //printf("am here\n");
              mid = (*env)->GetStaticMethodID(env, cls, "display_message", "(Ljava/lang/String;)V");
              printf("Method %d\n",mid);
              if(mid !=0)
              {      strcpy(str,"Hello world");
                    (*env)->CallStaticCharMethod(env, cls, mid, (*env)->NewStringUTF(env, str));
         (*jvm)->DestroyJavaVM(jvm);
         return 0;
    else {
              printf("some error\n");
              return -1;
    Thanks in adv,
    Cool Dude

    this is like a classpath issue, but for a native library
    basically you need to include the library file in your path info to the JVM

  • Filenotfound exception  javamail.providers

    hi, i am using java mail API to Send mails , my code is executed correctly but, all mails are goes to badmail folder of the host
    and my code is ....
    package com;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    * @author gaucho
    * TODO To change the template for this generated type comment go to Window -
    * Preferences - Java - Code Style - Code Templates
    public class SendMailUsingAuthentication {
         private static final String SMTP_HOST_NAME = "192.168.2.33";
         private static final String SMTP_AUTH_USER = "[email protected]";
         private static final String SMTP_AUTH_PWD = "Password1";
         private static final String emailMsgTxt = "Please visit my project at ";
         private static final String emailSubjectTxt = "Order Confirmation Subject";
         private static final String emailFromAddress = "[email protected]";
         // Add List of Email address to who email needs to be sent to
         private static final String[] emailList = { "[email protected]"};
         public static void main(String args[]) throws Exception {
              SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
              smtpMailSender.postMail(emailList, emailSubjectTxt, emailMsgTxt,
                        emailFromAddress);
              System.out.println("Sucessfully Sent mail to All Users");
         public void postMail(String recipients[], String subject, String message,
                   String from) throws MessagingException {
              boolean debug = false;
              java.security.Security
                        .addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              //Set the host smtp address
              Properties props = new Properties();
              props.put("mail.transport.protocol", "smtp");
              props.put("mail.smtp.starttls.enable","true");
              props.put("mail.smtp.host", SMTP_HOST_NAME);
              props.put("mail.smtp.auth", "true");
              props.put("mail.debug","true");
              Authenticator auth = new SMTPAuthenticator();
              Session session = Session.getDefaultInstance(props, auth);
              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);
              // Setting the Subject and Content Type
              msg.setSubject(subject);
              msg.setContent(message, "text/plain");
              Transport.send(msg);
         * SimpleAuthenticator is used to do simple authentication when the SMTP
         * server requires it.
         private class SMTPAuthenticator extends javax.mail.Authenticator {
              public PasswordAuthentication getPasswordAuthentication() {
                   String username = SMTP_AUTH_USER;
                   String password = SMTP_AUTH_PWD;
                   return new PasswordAuthentication(username, password);

    DEBUG: JavaMail version 1.3.3
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_04\lib\javamail.providers (The system cannot find the file specified)
    DEBUG: URL jar:file:/C:/EmailAgent60/lib/imap.jar!/META-INF/javamail.providers
    DEBUG: successfully loaded resource: jar:file:/C:/EmailAgent60/lib/imap.jar!/META-INF/javamail.providers
    DEBUG: URL jar:file:/C:/EmailAgent60/lib/pop3.jar!/META-INF/javamail.providers
    DEBUG: successfully loaded resource: jar:file:/C:/EmailAgent60/lib/pop3.jar!/META-INF/javamail.providers
    DEBUG: URL jar:file:/C:/EmailAgent60/lib/smtp.jar!/META-INF/javamail.providers
    DEBUG: successfully loaded resource: jar:file:/C:/EmailAgent60/lib/smtp.jar!/META-INF/javamail.providers
    DEBUG: not loading resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsy stems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsy stems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc]}
    DEBUG: not loading resource: /META-INF/javamail.default.address.map
    DEBUG: URL jar:file:/C:/EmailAgent60/lib/smtp.jar!/META-INF/javamail.address.map
    DEBUG: successfully loaded resource: jar:file:/C:/EmailAgent60/lib/smtp.jar!/META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jre1.5.0_04\lib\javamail.address.map (The system cannot find the file specified)
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "192.168.2.33", port 25, isSSL false
    220 Dunagiri Microsoft ESMTP MAIL Service, Version: 5.0.2195.6713 ready at Wed, 12 Jul 2006 11:40:07 +0530
    DEBUG SMTP: connected to host "192.168.2.33", port: 25
    EHLO manas
    250-Dunagiri Hello [192.168.2.64]
    250-TURN
    250-ATRN
    250-SIZE 2097152
    250-ETRN
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-8bitmime
    250-BINARYMIME
    250-CHUNKING
    250-VRFY
    250 OK
    DEBUG SMTP: Found extension "TURN", arg ""
    DEBUG SMTP: Found extension "ATRN", arg ""
    DEBUG SMTP: Found extension "SIZE", arg "2097152"
    DEBUG SMTP: Found extension "ETRN", arg ""
    DEBUG SMTP: Found extension "PIPELINING", arg ""
    DEBUG SMTP: Found extension "DSN", arg ""
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: Found extension "8bitmime", arg ""
    DEBUG SMTP: Found extension "BINARYMIME", arg ""
    DEBUG SMTP: Found extension "CHUNKING", arg ""
    DEBUG SMTP: Found extension "VRFY", arg ""
    DEBUG SMTP: Found extension "OK", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 [email protected] OK
    RCPT TO:<[email protected]>
    250 2.1.5 [email protected]
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <29509536.01152684496937.JavaMail.chiranjeevi@manas>
    Date: Wed, 12 Jul 2006 11:38:16 +0530 (GMT+05:30)
    From: [email protected]
    To: [email protected]
    Subject: Test E-Mail through Java
    Cc: [email protected]
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This is a test of sending a plain text e-mail through Java.
    Here is line 2.
    250 2.6.0 <29509536.01152684496937.JavaMail.chiranjeevi@manas> Queued mail for delivery
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 [email protected] OK
    RCPT TO:<[email protected]>
    250 2.1.5 [email protected]
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <15277917.11152684497046.JavaMail.chiranjeevi@manas>
    Date: Wed, 12 Jul 2006 11:38:16 +0530 (GMT+05:30)
    From: [email protected]
    To: [email protected]
    Subject: Test E-Mail through Java
    Cc: [email protected]
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_0_19690856.1152684497031"
    ------=_Part_0_19690856.1152684497031
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This is part one of a test multipart e-mail.
    ------=_Part_0_19690856.1152684497031
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This is the second part
    ------=_Part_0_19690856.1152684497031--
    250 2.6.0 <15277917.11152684497046.JavaMail.chiranjeevi@manas> Queued mail for delivery
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 [email protected] OK
    RCPT TO:<[email protected]>
    250 2.1.5 [email protected]
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <11587215.21152684497093.JavaMail.chiranjeevi@manas>
    Date: Wed, 12 Jul 2006 11:38:16 +0530 (GMT+05:30)
    From: [email protected]
    To: [email protected]
    Subject: Test E-Mail through Java
    Cc: [email protected]
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_0_19690856.1152684497031"
    ------=_Part_0_19690856.1152684497031
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This is part one of a test multipart e-mail.
    ------=_Part_0_19690856.1152684497031
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This is the second part
    ------=_Part_0_19690856.1152684497031--
    250 2.6.0 <11587215.21152684497093.JavaMail.chiranjeevi@manas> Queued mail for delivery
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 2.1.0 [email protected] OK
    RCPT TO:<[email protected]>
    250 2.1.5 [email protected]
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <10807107.31152684497156.JavaMail.chiranjeevi@manas>
    Date: Wed, 12 Jul 2006 11:38:16 +0530 (GMT+05:30)
    From: [email protected]
    To: [email protected]
    Subject: Test E-Mail through Java
    Cc: [email protected]
    MIME-Version: 1.0
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    <html><head><title>Test E-Mail through Java</title></head><body><h1>Test E-Mail through Java</h1><p>This is a test of sending an HTML e-mail through Java.</body></html>
    250 2.6.0 <10807107.31152684497156.JavaMail.chiranjeevi@manas> Queued mail for delivery
    QUIT

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

    I am very new to java. Tried to take the time to learn but got wrapped up in other things. Now I am back to learn and here is what I am getting. I don't know if it has anything to do with java required files being in a different directory or what. I have my java sdk files in C:\Program Files\Java\jre1.6.0_05\ and the source file is in C:\Java
    Here is more information.
    My Error at runtime:_
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
    My actions in the shell:_
    C:\Java>javac HW.java
    C:\Java>java HW
    Exception in thread "main" java.lang.NoClassDefFoundError: HW
    Caused by: java.lang.ClassNotFoundException: HW
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    My Source:_
    * The HelloWorldApp class implements an application that
    * simply prints "Hello World!" to standard output.
    class HW {
        public static void main(String[] args) {
            System.out.println("Hello World!"); // Display the string.
    }

    My Error at runtime:_
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
    Exception in thread "main" java.lang.NoClassDefFoundError: HW
    Caused by: java.lang.ClassNotFoundException: HWO_o
    That's two different errors.
    Try to execute with:
    java -cp . HW

Maybe you are looking for

  • White box around text in Windows-based PDFs viewed on Mac

    I make a lot of Microsoft Word-based PDFs that include colored, text-filled tables. They look great when viewed on my machine, but Mac users see a faint white outline around the text in each cell of the table. How do I get rid of the white box?

  • Color in ALV Column

    hi to all, I want to display ALV with diffrent colors in column. Is it possible. If so plz send me the sample code for guidance. Thanks in advance. Dharmishta

  • Asa5512, ver. 8.6(1)2, SMTP over NAT problem

    hi guys, i have a weird issue while trying to organize smtp-server behind my asa 5512. the most interesting thing is that all other services like ssh, http, https, etc works just fine...except smtp....and yes, i've disabled inspect esmtp feature. obj

  • No text Messages

    Hi All, My BB torch 9800 was working fine till yesterday , All of a sudden it got restarted after i clicked a photo from it. When restarted i opened my messages and i cant see any of my previous message history , I can see them if i go through * Veiw

  • Can't recover exchange 2013 server using recoverserver switch

    CU5 crashed while installing on one of our 4 DAG members.  I was able to coax it back to life with some manual steps and doing a repair of sp1, but was unable to get cu5 to install or to cleanly uninstall sp1 despite repeated tries. Finally I decided