What to do of this error ?

Hi when jsp encounter this line
it throws the above exception
<code>
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
</code>
InputStream msgStream = System.in;
One similar error was rectifed by me it was java.util.PropertyPermission by modifying
j2ee/lib/security/client.policy
But i have been unable to do this one.Can someone let me know what to do ?

Here is the complete stuff
<code>
<%@ page language ="java" import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="javax.mail.*" %>
<%@ page import="javax.mail.event.*" %>
<%@ page import="javax.mail.internet.*" %>
<%@ page import="javax.activation.*" %>
<%!
String indentStr = " ";
int level = 0;
String url=null;
String protocol="pop3";
String host = "mail.ineonet.net";
String user = "aditya_per";
String password = "7hNWsZ7e";
String mbox = "INBOX";
int port = -1;
boolean verbose = true;
boolean debug = false;
boolean showStructure = true;
boolean showMessage = true;
boolean showAlert = true;
boolean saveAttachments = true;
int attnum = 1;
int msgnum = -1;
%>
<%
InputStream msgStream = System.in;
try
     // Get a Properties object
     Properties props = System.getProperties();
     // Get a Session object
     Session sess = Session.getInstance(props, null);
     sess.setDebug(debug);
     if (showMessage) {
          MimeMessage msg = new MimeMessage(sess, msgStream);
          dumpPart(msg);
          System.exit(0);
     // Get a Store object
     Store store = null;
     if (url != null) {
          URLName urln = new URLName(url);
          store = sess.getStore(urln);
          if (showAlert) {
          store.addStoreListener(new StoreListener() {
               public void notification(StoreEvent e) {
               String s;
               if (e.getMessageType() == StoreEvent.ALERT)
                    s = "ALERT: ";
               else
                    s = "NOTICE: ";
               System.out.println(s + e.getMessage());
          store.connect();
     } else {
          if (protocol != null)          
          store = sess.getStore(protocol);
          else
          store = sess.getStore();
          // Connect
          if (host != null || user != null || password != null)
          store.connect(host, port, user, password);
          else
          store.connect();
     // Open the Folder
     Folder folder = store.getDefaultFolder();
     if (folder == null) {
     System.out.println("No default folder");
     System.exit(1);
     folder = folder.getFolder(mbox);
     if (folder == null) {
     System.out.println("Invalid folder");
     System.exit(1);
     // try to open read/write and if that fails try read-only
     try {
          folder.open(Folder.READ_WRITE);
     } catch (MessagingException ex) {
          folder.open(Folder.READ_ONLY);
     int totalMessages = folder.getMessageCount();
     if (totalMessages == 0) {
          System.out.println("Empty folder");
          folder.close(false);
          store.close();
          System.exit(1);
     if (verbose) {
          int newMessages = folder.getNewMessageCount();
          System.out.println("Total messages = " + totalMessages);
          System.out.println("New messages = " + newMessages);
          System.out.println("-------------------------------");
     if (msgnum == -1) {
          // Attributes & Flags for all messages ..
          Message[] msgs = folder.getMessages();
          // Use a suitable FetchProfile
          FetchProfile fp = new FetchProfile();
          fp.add(FetchProfile.Item.ENVELOPE);
          fp.add(FetchProfile.Item.FLAGS);
          fp.add("X-Mailer");
          folder.fetch(msgs, fp);
          for (int i = 0; i < msgs.length; i++) {
          System.out.println("--------------------------");
          System.out.println("MESSAGE #" + (i + 1) + ":");
          dumpEnvelope(msgs);
          // dumpPart(msgs[i]);
     } else {
          System.out.println("Getting message number: " + msgnum);
          Message m = null;
          try {
          m = folder.getMessage(msgnum);
          dumpPart(m);
          } catch (IndexOutOfBoundsException iex) {
          System.out.println("Message number out of range");
     folder.close(false);
     store.close();
catch(Exception xy)
System.out.println("General Failure"+xy.getMessage());
System.exit(1);
System.exit(0);     
%>
<%!
public void dumpPart(Part p) throws Exception {
     /*if (p instanceof Message)
     dumpEnvelope((Message)p);
     InputStream is = p.getInputStream();
     // If "is" is not already buffered, wrap a BufferedInputStream
     // around it.
     if (!(is instanceof BufferedInputStream))
     is = new BufferedInputStream(is);
     int c;
     while ((c = is.read()) != -1)
     System.out.write(c);
     String ct = p.getContentType();
     try {
     pr("CONTENT-TYPE: " + (new ContentType(ct)).toString());
     } catch (ParseException pex) {
     pr("BAD CONTENT-TYPE: " + ct);
     String filename = p.getFileName();
     if (filename != null)
     pr("FILENAME: " + filename);
     if (p.isMimeType("text/plain")) {
     pr("This is plain text");
     pr("---------------------------");
     if (!showStructure && !saveAttachments)
          System.out.println((String)p.getContent());
     } else if (p.isMimeType("multipart/*")) {
     pr("This is a Multipart");
     pr("---------------------------");
     Multipart mp = (Multipart)p.getContent();
     level++;
     int count = mp.getCount();
     for (int i = 0; i < count; i++)
          dumpPart(mp.getBodyPart(i));
     level--;
     } else if (p.isMimeType("message/rfc822")) {
     pr("This is a Nested Message");
     pr("---------------------------");
     level++;
     dumpPart((Part)p.getContent());
     level--;
     } else {
     if (!showStructure && !saveAttachments) {
          Object o = p.getContent();
          if (o instanceof String) {
          pr("This is a string");
          pr("---------------------------");
          System.out.println((String)o);
          } else if (o instanceof InputStream) {
          pr("This is just an input stream");
          pr("---------------------------");
          InputStream is = (InputStream)o;
          int c;
          while ((c = is.read()) != -1)
               System.out.write(c);
          } else {
          pr("This is an unknown type");
          pr("---------------------------");
          pr(o.toString());
     } else {
          // just a separator
          pr("---------------------------");
     if (saveAttachments && level != 0 && !p.isMimeType("multipart/*")) {
     String disp = p.getDisposition();
     // many mailers don't include a Content-Disposition
     if (disp == null || disp.equalsIgnoreCase(Part.ATTACHMENT)) {
          if (filename == null)
          filename = "Attachment" + attnum++;
          pr("Saving attachment to file " + filename);
          try {
          File f = new File(filename);
          if (f.exists())
               // XXX - could try a series of names
               throw new IOException("file exists");
          OutputStream os =new BufferedOutputStream(new FileOutputStream(f));
          InputStream is = p.getInputStream();
          int c;
          while ((c = is.read()) != -1)
               os.write(c);
          os.close();
          } catch (IOException ex) {
          pr("Failed to save attachment: " + ex);
          pr("---------------------------");
%>
<%!
public void dumpEnvelope(Message m) throws Exception {
     pr("This is the message envelope");
     pr("---------------------------");
     Address[] a;
     // FROM
     if ((a = m.getFrom()) != null) {
     for (int j = 0; j < a.length; j++)
          pr("FROM: " + a[j].toString());
     // TO
     if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
     for (int j = 0; j < a.length; j++)
          pr("TO: " + a[j].toString());
     // SUBJECT
     pr("SUBJECT: " + m.getSubject());
     // DATE
     Date d = m.getSentDate();
     pr("SendDate: " +
     (d != null ? d.toString() : "UNKNOWN"));
     // FLAGS
     Flags flags = m.getFlags();
     StringBuffer sb = new StringBuffer();
     Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
     boolean first = true;
     for (int i = 0; i < sf.length; i++) {
     String s;
     Flags.Flag f = sf[i];
     if (f == Flags.Flag.ANSWERED)
          s = "\\Answered";
     else if (f == Flags.Flag.DELETED)
          s = "\\Deleted";
     else if (f == Flags.Flag.DRAFT)
          s = "\\Draft";
     else if (f == Flags.Flag.FLAGGED)
          s = "\\Flagged";
     else if (f == Flags.Flag.RECENT)
          s = "\\Recent";
     else if (f == Flags.Flag.SEEN)
          s = "\\Seen";
     else
          continue;     // skip it
     if (first)
          first = false;
     else
          sb.append(' ');
     sb.append(s);
     String[] uf = flags.getUserFlags(); // get the user flag strings
     for (int i = 0; i < uf.length; i++) {
     if (first)
          first = false;
     else
          sb.append(' ');
     sb.append(uf[i]);
     pr("FLAGS: " + sb.toString());
     // X-MAILER
     String[] hdrs = m.getHeader("X-Mailer");
     if (hdrs != null)
     pr("X-Mailer: " + hdrs[0]);
     else
     pr("X-Mailer NOT available");
%>
<%!
public void pr(String s) {
     if (showStructure)
     System.out.print(indentStr.substring(0, level * 2));
     System.out.println(s);
%>
</code>

Similar Messages

  • Do you have any idea, what makes to fix this error in creating PO.

    The error is u201CDocument 101600 does not existu201D
    Do you have any idea, what makes to fix this error in creating PO.The error is u201CDocument 101600 does not existu201D  Here the 101600 is PO no.

    Hi
    Please check in t.code: RZ20 .
    You can find out the nature of this error
    Regards
    G.Ganesh Kumar

  • What the answer for this  error on a Macintosh system, the application can not open because "NameRegistryLib" could not be found

    what the answer for this error, the application could not open because the "NameRegistryLib" could not be found

    http://www.everymac.com/mac-answers/mac-os-9-classic-support-faq/run-macos-9-on- intel-macs.html
    http://www.macwindows.com/Emulator-for-Mac-OS-9-in-OS-X-updated-for-Mountain-Lio n.html
    http://hints.macworld.com/article.php?story=20060509180914879
    How to run Classic (pre OS X) apps on Intel Macs  

  • Hi. I have got problem with my ITunes. Every time I´m opening the program I´ve got the message: One unkwown problem is appering (-42032) Can anybode please tell me what to do wit this error? Thanks

    Hi. I have got problem with my ITunes. Every time I´m opening the program I´ve got the message: One unkwown problem is appering (-42032) Can anybode please tell me what to do wit this error? Thanks

    Gary,
    discussions may sometimes be slow for an hour or so (at which point the opening page of discussions will eventually apologize for the inconvenience, back on line soon...) but your description looks like a cache problem.
    Try OnyX freeware to do some cleanup and see if that helps.
    http://www.titanium.free.fr/index.html

  • "No headers or footer ware added because Acrobat encountered an unidentified error." in adobe professional 6.0, what to do with this error?

    "No headers or footer ware added because Acrobat encountered an unidentified error." in adobe professional 6.0, what to do with this error?

    My suggestion is that you reconsider whether your in Non-Drop frame. NTSC standard is Dropframe 29.97. I'm afraid you may have this backwards. DVX100's default to dropframe (29.97fps) in the USA. FCP could be encountering a pulldown cadence every few minutes because it expects a frame drop that is not there.
    Remember the frame drop only occurs every few minutes so this makes sense. With standard NTSC capture (not 24fps pulldown removal) such dropped frames don't mess anything up. They just subtly shift the timing and sync of the audio track. You could have captured this way for years and rarely seen a problem with short clips. When doing a pulldown removal, a missing or in your case extra frame can confuse the pulldown removal system as it expects to find the video encoded in 29.97 rather than 30fps.

  • What to do with this error

    for example:
    public class BitwiseDemo {
    static final int VISIBLE = 1;
    static final int DRAGGABLE = 2;
    static final int SELECTABLE = 4;
    static final int EDITABLE = 8;
    public static void main(String[] args) {
    int flags = 0;
    flags = flags | VISIBLE;
    flags = flags | DRAGGABLE;
    if ((flags & VISIBLE) == VISIBLE) {
    if ((flags & DRAGGABLE) == DRAGGABLE) {
    System.out.println("Flags are Visible "
    + "and Draggable.");
    flags = flags | EDITABLE;
    if ((flags & EDITABLE) == EDITABLE) {
    System.out.println("Flags are now also Editable.");
    above example should output below:
    Here's the output from this program.
    Flags are Visible and Draggable.
    Flags are now also Editable.
    why does it run with this error?
    BitwiseDemo.java:43: requires "class" or "interface"
    ^
    BitwiseDemo.java:43: requires "class" or "interface"
    who can help me ?
    thanks!

    Hi, I have no problem with executing your source after copy paste to netbeans.
    Is "for example" code the same as code with error result?

  • What's up with this error???

    Here's the NullPointerException I'm getting:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.BumpBuffer.fillBumpBuffer(MetalBumps.java:174)
    at javax.swing.plaf.metal.BumpBuffer.<init>(MetalBumps.java:152)
    at javax.swing.plaf.metal.MetalBumps.createBuffer(MetalBumps.java:61)
    at javax.swing.plaf.metal.MetalBumps.setBumpColors(MetalBumps.java:96)
    at javax.swing.plaf.metal.MetalBumps.<init>(MetalBumps.java:53)
    at javax.swing.plaf.metal.MetalScrollBarUI.installDefaults(MetalScrollBa
    rUI.java:80)
    at javax.swing.plaf.basic.BasicScrollBarUI.installUI(BasicScrollBarUI.ja
    va:98)
    at javax.swing.JComponent.setUI(JComponent.java:325)
    at javax.swing.JScrollBar.updateUI(JScrollBar.java:189)
    at javax.swing.JScrollBar.<init>(JScrollBar.java:140)
    at javax.swing.JScrollBar.<init>(JScrollBar.java:155)
    at javax.swing.JScrollPane$ScrollBar.<init>(JScrollPane.java:635)
    at javax.swing.JScrollPane.createVerticalScrollBar(JScrollPane.java:780)
    at javax.swing.JScrollPane.<init>(JScrollPane.java:242)
    at javax.swing.JScrollPane.<init>(JScrollPane.java:262)
    This only happens maybe 1 in every 20 runs of the application. So what's up the the "fillBumpBuffer"? Is there a way fix this exception?

    I've gotten that working with JSP. There's a thing about setUI() in there that makes me want to tell you to run this line of code:
    javax.swing.UIManager.setLookAndFeel(
        javax.swing.UIManager.getSystemLookAndFeelClassName()
    );Yeah. That should work. It should make everything look like the other stuff in your OS, too.
    Spaceman40
    P.S: Put that code in before initializing any Components, or any gui stuff at all.

  • ISync fails - what to do with this error message?

    I set my iMac to autosync everyday at a certain time. I realized that the last sync was 7/27/06, and when I go to Sync tab in the .Mac system preferences, I get the following ".Mac Sync Error" message exactly as follows:
    "* -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)"
    Any idea of what sync fails? and what I need to do ?
    Thanks!

    With the release of Mac OS X 10.4 more than a year ago, iSync no longer has anything to do with the synchronization of contacts, calendars and tasks with .Mac - that is the responsibility of .Mac Sync. You should probably post you query in the .Mac Sync forum, here:
    http://discussions.apple.com/forum.jspa?forumID=957
    You may be able to deal with the error message by resetting the Sync Services framework—its truth database, actually—by launching iSync, opening the Preferences… dialog, and pressing the Reset Sync History button. That will leave your data intact and your sync clients registered, but reset the truth database and framework to behave in such a way that your next synchronization event will appear to be the first event you have ever performed.
    The 'incomprehensible archive' the error message refers to is likely on your Macintosh.
    Before proceeding further, back up your contact and calendar files using the built in provision to do so in both the Address Book and iCal. If resetting the database does not correct your issue, you can launch System Preferences, open the .Mac pane and press the Advanced tab. In the lower left corner is a Reset Sync History button. Press that, and in the dialog which appears, configure .Mac to overwrite the data files for one OS X application on your machine at a time, starting with contacts. Make sure that you overwrite your computer data [which you have just backed up, and can therefore restore if that is necessary] with the data from .Mac.

  • What to do with this error message?

    Database Log In Failed
    TNS could not resolve service name
    Verify that the TNS name in the connectstring entry of the DAD for this URL is valid.
    Thank you,
    David
    [email protected]

    With the release of Mac OS X 10.4 more than a year ago, iSync no longer has anything to do with the synchronization of contacts, calendars and tasks with .Mac - that is the responsibility of .Mac Sync. You should probably post you query in the .Mac Sync forum, here:
    http://discussions.apple.com/forum.jspa?forumID=957
    You may be able to deal with the error message by resetting the Sync Services framework—its truth database, actually—by launching iSync, opening the Preferences… dialog, and pressing the Reset Sync History button. That will leave your data intact and your sync clients registered, but reset the truth database and framework to behave in such a way that your next synchronization event will appear to be the first event you have ever performed.
    The 'incomprehensible archive' the error message refers to is likely on your Macintosh.
    Before proceeding further, back up your contact and calendar files using the built in provision to do so in both the Address Book and iCal. If resetting the database does not correct your issue, you can launch System Preferences, open the .Mac pane and press the Advanced tab. In the lower left corner is a Reset Sync History button. Press that, and in the dialog which appears, configure .Mac to overwrite the data files for one OS X application on your machine at a time, starting with contacts. Make sure that you overwrite your computer data [which you have just backed up, and can therefore restore if that is necessary] with the data from .Mac.

  • What to do about this error?

    Database Log In Failed
    TNS could not resolve service name
    Verify that the TNS name in the connectstring entry of the DAD for this URL is valid.
    //Oracle Version: Enterprise 8i (evaluating)
    //Solaris: 5.8
    //Other Servers: Cold Fusion MX
    Thank you,
    David
    [email protected]

    You need to add an entry, or double check that your entry is correct in your TNSNAMES.ora file in /Network/Admin directory. You need to have an entry for every database instance you have.
    For example if you have a database called TEST then your WINNT/Network/Admin TNSNAMES.ora file needs an entry that looks like the following:
    test.world =
    (DESCRIPTION =
    (ADDRESS =
    (COMMUNITY = TCP.world)
    (PROTOCOL = TCP)
    (Host = oracle)
    (Port = 1526)
    (CONNECT_DATA =
    (SID = test)
    (GLOBAL_NAME = test.world)
    Ofcourse the host and port..ect will equal what your database server says.
    Hope this helps,
    Matt

  • What to do about this error message??

    I just received the following error message in Lightroom 4 "This version of Lightroom may require the Photoshop Camera Row plug-in version 7.3 for full compatibility.  Please update the Camera Raw plug-in using the update tool available in the Photoshop help menu."  I have the latest Lightroom as well as Photoshop versions.  I don't think I should be getting this message.  Can anyone help?
    Thanks,
    Jennifer

    If you do not have CS6 but an earlier version of CS, this message makes you aware that your previous version has not the latest ACR installed and thus cannot open your image as Raw-file.
    And, you cannot install the latest ACR in previous Photoshop versions. They don't accept the latest ACR.
    The solution is to let Lr render the Raw-file, i.e. Lr creates the PSD (or TIFF) and sends it to CSxx.
    You choose this option by selecting <Render using Lightroom>.

  • Does anyone know what the fix to this error is?

    ERROR ITMS-9000: "Koiso_Invitational_Cup.ibooks: OPS/ibooks.ncx(5): element "content" not allowed yet; missing required element "navLabel"" at Book (MZItmspBookPackage)
    Thanks in advance. 

    Have you tried here:
    iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting

  • Error message O3 387 - what has caused this error?

    I rarely got this error in production system, but was never success to reproduce the error again in the test system.
    SAP has technical explaination on this - but I don't think that is helping to stop the problem from happening again.
    Can someone please tell me what scenario can cause this error?

    Hi,
    You can try to check info from SAPNotes:
    1083410
    1149226
    1385059
    May be it help you.
    KR,
    Sergey

  • Anyone know what this error message might mean ?

    Does anyone know what might be causing this error when I try and download iTunes onto a Wiondows 7 laptop ?

    These ones are typically caused by underlying problems on the PC that also often cause Windows Updates to fail to install. If we can fix the Windows Update trouble, we can usually get the iTunes trouble cleaned up en passant.
    Go into your Windows update and try to check for new updates. If updates install, stock up on the ones you're behind on, restarting the PC if requested to do so. After the restart, try installing iTunes again. Does it go through this time for you?
    If windows updates fail to install, go into your Update History and doubleclick the failures. What alphanumeric codes appear for you? Are they also 80070BC9, or some other number? (If they're another number, what number are you getting?)

  • I am getting this error message, and don't know how to resolve it: 3D features require a minimum of

    I just became a Photoshop CCmember today. I don't know what to do about this error message: 3D features require a minimum of 512MB of vRAM. Photoshop has detected less than that on your system. Updating the driver of your graphics card may resolve the issue.

    What are your hardware specs? How much vRAM do you have? (Note: System RAM and Video RAM are two different things)

Maybe you are looking for