Java.io.FilePermission read error

I was wondering if anyone can help me or point me to the right direction in terms of accessing a file (Brucella.xml) using an applet.
Within my applet.html located in my build folder, I have indicated a dataLocation variable to be passed into the applet.java file. I have tried signing the jars that is used by the application using keytool -genkey and -jarsigner, and I tried placing the xml file in a jar (pronetSample.jar), placing this jar in the build directory, and signing it, but it didn't seem to work.
<param name="DataLocation" value="pronetSample/Brucella.xml">I also tried putting the Brucella.xml in the build directory and called it directly in the html and got the same error
<param name="DataLocation" value="Brucella.xml">Next, I tried placing the file on the web and accessing http://staff.vbi.vt.edu/chlee/Brucella.xml but still received the same error message.
<param name="DataLocation" value="http://staff.vbi.vt.edu/chlee/Brucella.xml">Perhaps, I may be accessing it incorrectly? (wrong path syntax) By the way, the applet works if I were to go in and change my java policy file, but I'd like to avoid this so that end users will only need to do as little as possible to get the applet to run. I'm not sure what I'm doing wrong, but any help would be much appreciated. Thanks.

any insightful feedback would be great. thanks

Similar Messages

  • Continually opening a file in a java display to read errors?!

    hello all,
    I have what seems to be an easy task but hard for me. my question is, i am currently running a bat file that dumps all error logs into a error.log. what I would like to do is have my bat file also kick off a java program that reads the error.log file and print out the errors to screen? is there a easy way to do this? im thinking if this error.log file is being updated, maybe its locked, and that I wont be able to display the error logs sort of realtime right?
    suggestions?
    THANKS!

    It's the file length you need to store.
    Open the file up for the first time, read everything and remember its length.
    Sometime later, check the file length again. If it's greater than the length you stored, open up the file, jump to the previous length, read everything from there up to the end of the file and save the new length. And repeat!
    I wouldn't advise storing line numbers, since that doesn't translate into the file offset positions that Java needs easily.

  • Same message 2 dnld Plugin, (Java), and Adobe Reader: Error 2203.Database: C:\Windows\Installer\ced2e.ipi. Cannot open database file. System error -2147287035.E

    Spent all afternoon downloading Java plugiins and Adobe reader; each with the following "failure message."
    Error 2203.Database: C:\Windows\Installer\ced2e.ipi. Cannot open database file. System error -2147287035.Error 2203.Database: C:\Windows\Installer\ced2e.ipi. Cannot open database file. System error -2147287035.

    This is going to sound lame, but... have you shut down and restarted Windows since this problem began? Sometimes the Windows Installer starts behaving erratically, perhaps due to a backlog of deferred updates, and the only way to get around it is to reboot.

  • Java.security.AccessControlException: access denied (java.io.FilePermission

    Hi,
    I have written swing code using applets.The code is::
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class JButtonDemo extends JApplet implements ActionListener{
    JTextField jtf;
    public void init(){
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    ImageIcon ii = new ImageIcon("");
    JButton but = new JButton(ii);
    but.setActionCommand("myButton");
    but.addActionListener(this);
    c.add(but);
    jtf = new JTextField(10);
    c.add(jtf);
    public void actionPerformed(ActionEvent ae){
    jtf.setText(ae.getActionCommand());
    The html is::
    <html>
    <body>
    <applet code="JButtonDemo.class" width="250" height="150">
    </applet
    >
    </body>
    </html>
    Its getting compiled but when I'm trying to run it like..
    appletviewer JButtonDemo.html
    its throwing the following error ..
    java.security.AccessControlException: access denied (java.io.FilePermission read)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
    at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
    at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:472)
    at sun.awt.SunToolkit.getImage(SunToolkit.java:486)
    at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
    at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
    at JButtonDemo.init(JButtonDemo.java:10)
    at sun.applet.AppletPanel.run(AppletPanel.java:353)
    at java.lang.Thread.run(Thread.java:534)
    could anyone pls help me in rectifying this problem...
    Thanks in advance
    Srinivas

    You must have missed something, here is how I got it to work:
    appelt in c:\temp\test.java:import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.ImageIcon;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JTextField;
    public class test extends JApplet implements ActionListener {
         JTextField jtf;
         public void init() {
              Container c = getContentPane();
              c.setLayout(new FlowLayout());
              ImageIcon ii = new ImageIcon("c:/test.jpg");
              JButton but = new JButton(ii);
              but.setActionCommand("myButton");
              but.addActionListener(this);
              c.add(but);
              jtf = new JTextField(10);
              c.add(jtf);
         public void actionPerformed(ActionEvent ae) {
              jtf.setText(ae.getActionCommand());
    }html file in c:\temp:<DIV id="lblOutputText">Output comes here</DIV>
    <object
        classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab"
        >
        <PARAM NAME = CODE VALUE = test >
        <PARAM NAME = ARCHIVE VALUE = sTest.jar >
        <param name = "type" value = "application/x-java-applet">
        <param name = "scriptable" value = "false">
        <comment>
         <embed
                type = "application/x-java-applet" \
                CODE = test \
                ARCHIVE = sTest.jar
             scriptable = false
             pluginspage = "http://java.sun.com/products/plugin/index.html#download">
             <noembed>
                </noembed>
         </embed>
        </comment>
    </object>The batch file creating the signed jar in c:\temp\sign.batdel *.cer
    del *.com
    del *.jar
    del *.class
    javac test.java
    keytool -genkey -keystore harm.com -keyalg rsa -dname "CN=Harm Meijer, OU=Technology, O=org, L=Amsterdam, ST=, C=NL" -alias harm -validity 3600 -keypass password -storepass password
    rem keytool -export -alias harm -file exportPublicKey.cer -keystore harm.com -storepass password
    jar cf0 test.jar test.class
    jarsigner -keystore harm.com -storepass password -keypass password -signedjar sTest.jar test.jar harm
    del *.class
    pause

  • Java.io.FilePermission error while writing file to disk

    Hi All,
    I have done a simple JSP form in which am uploading a file to the server, am using apache commons file upload, in my local system its working fine(windows), but when i uploaded the same to the shared server(Linux), tomcat throwing a exception when java class file trying to write the file to disk, i have given all permissions (read,write,execute) to all users to the target folder("timeSheet_uploadedFiles") where am trying to write the file and tried but no luck still the exception continues, below i copied the exception am getting, somebody please help me.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: access denied (java.io.FilePermission /var/chroot/home/content/html/timeSheet_uploadedFiles/admin_4_5_CSharp Coding Standards.pdf write)
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
    root cause
    java.security.AccessControlException: access denied (java.io.FilePermission /var/chroot/home/content/html/timeSheet_uploadedFiles/admin_4_5_CSharp Coding Standards.pdf write)
         java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         java.security.AccessController.checkPermission(AccessController.java:427)
         java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
         java.io.FileOutputStream.<init>(FileOutputStream.java:169)
         java.io.FileOutputStream.<init>(FileOutputStream.java:70)
         com.roots.UploadAction.upload(UploadAction.java:72)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27Thanks,
    vyrav.

    You have apparently missed setting the write permission to the target directory for the user that Tomcat is running as. Tomcat may be running as a different user than the one you are logged into on the system.
    It may be trying to save to an incorrect location, so double check the directory is what you expect it to be.
    The file may already exist, so it may not be able to over-write the file, so make sure you give the tomcat user the ability to delete and overwrite as well as write - or check if the file exists before writing and warn user if you don't want to give delete permissions.

  • Why signed and get "access denied (java.io.FilePermission hello.txt read)"?

    I am learning the Java tools and policy to create some local browser application for personal use. So I signed a jar file with jarsigner, keytool and policytool and still trying to figure out why my browser application cannot read a simple local text file.
    My question are
    1. Why use java policy tool (policytool.exe)? If I signed a .jar with keytool and jarsigner, do I really need java policytool to write a policy?
    2. What is the maximum validity days? 365? or more? Do I need to sign again when validity expire?
    3. I don't want any of my local browser application gets to internet but only work with local files (read, write, or execute). how do I do that?
    4. how to use java security policy to grant access to the jar applet? where do I place and import the policy file so the hosting web browser and the applet can work?
    My java applet is a simple class that read a text line from a local file in the same folder, and pass the result to a calling web browser Javascript.
    Currently the result in the web page is the error message below, even though the jar is signed correctly.
    access denied (java.io.FilePermission hello.txt read)
    Someone please help and enlight the newbie!

    leoku wrote:
    I am learning the Java tools and policy to create some local browser application for personal use.Why would you wrap a mostly useless and unhelpful browser window around a Java app. for 'local' use?
    .. So I signed a jar file with jarsigner, keytool and policytool and still trying to figure out why my browser application cannot read a simple local text file.
    My question are
    1. Why use java policy tool (policytool.exe)? If I signed a .jar with keytool and jarsigner, do I really need java policytool to write a policy?No. In fact, don't stuff around with policy files - they are a path to madness.
    2. What is the maximum validity days? 365? or more?Keytool accepts an argument for the number of days to remain valid. I do not believe it has an upper limit, but it might be best to experiment with it and find out for yourself. Please report your findings back.
    (2a) Do I need to sign again when validity expire?No, but the end user gets a huge warning that the certificate has expired. Further, if it was a certificate that was certified by a CA, the 'always trust' check box which used to default to true, would now default to false.
    3. I don't want any of my local browser application gets to internet but only work with local files (read, write, or execute). how do I do that?I am not sure I understand, but if you only offer a JFileChooser for the applet to access resources, that should restrict it to resources off the local file-system. Of course, that would not restrict the end user from downloading something from the internet to their local disks, then accessing it using the applet.
    4. how to use java security policy to grant access to the jar applet? where do I place and import the policy file so the hosting web browser and the applet can work?The only place it will work is in the JRE directories of the end-user's machine. Even if you find a way to install your local policy file, do not go messing with the end-user's policy files.
    My java applet is a simple class that read a text line from a local file in the same folder,.. In the 'same folder' as what? (1)
    ..and pass the result to a calling web browser Javascript. That might be the problem. AFAIR, using JS with trusted applets causes the security to be tightened. Perhaps it could be fixed by calling System.setSecurityManager(null) on applet init(), but I have also seen references to using [AccessController.doPrivileged()|http://java.sun.com/j2se/1.4.2/docs/api/java/security/AccessController.html] to wrap the problematic code. I am hazy on the details of how/if that works.
    Currently the result in the web page is the error message below, even though the jar is signed correctly.
    access denied (java.io.FilePermission hello.txt read)
    1) If the answer to my question is what I suspect, there may be better ways to access the resource that are usable even in a sand-boxed app.

  • Java.io.FilePermission Error

    So i am getting the following error when I attempt to upload a picure into my applet from my system. The applet has been signed and it does ask if I will accept the certificate. Yet I still get the error shown below. When I edit my java.policy file to allow all permissions it does work. So what do I need to do to make this work. Sort of useless if other can't upload stuff into my applet.
    java.security.AccessControlException: access denied (java.io.FilePermission C:\Users\Philip DePalo\Documents\_TricksTrade\phil.jpg read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.File.isFile(Unknown Source)
         at org.apache.commons.httpclient.methods.multipart.FilePartSource.<init>(FilePartSource.java:67)
         at org.apache.commons.httpclient.methods.multipart.FilePart.<init>(FilePart.java:129)
         at ThumbnailHandler$UploadImage.actionPerformed(ThumbnailHandler.java:369)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(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.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Unknown Source)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at java.awt.Window.setVisible(Unknown Source)
         at java.awt.Dialog.setVisible(Unknown Source)
         at ThumbnailHandler$UploadImage.<init>(ThumbnailHandler.java:353)
         at ThumbnailHandler$1.actionPerformed(ThumbnailHandler.java:107)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at SessionClient$MenuItemListener.actionPerformed(SessionClient.java:500)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(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)

    public void actionPerformed(ActionEvent e) {     
                try{
                    Object source = e.getSource();
                    if (source == okBtn) {
                       final PostMethod filePost = new PostMethod(uploadServer);
                        int listSize= fileListModel.size();
                        if (listSize <= 0) return;
                        try {
                            final Part[] parts= new Part[listSize];
                            for (int i=0; i<listSize; i++) {
                                File targetFile= new File((String)fileListModel.get(i));
                                parts= new FilePart(targetFile.getName(), targetFile);
    String strQuery= "tId=" + topicId
    + "&uploadPath=" + uploadPath;
    final String queryString= strQuery.replace(' ', '+');
    filePost.setQueryString(queryString);
    filePost.setRequestEntity(new MultipartRequestEntity(parts, filePost.getParams()));
    HttpClient client = new HttpClient();
    client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
    int status = client.executeMethod(filePost);
    if (status == HttpStatus.SC_OK) {
    String strImage[];
    Vector fileList= new Vector();
    String str= filePost.getResponseBodyAsString();
    strImage= str.split(";");
    for (int i=0; i<strImage.length; i++){
    fileList.addElement(strImage[i]);
    addImages(fileList);
    JOptionPane.showMessageDialog(mainFrame, "Upload Images Successfully!"
    +System.getProperty("line.separator")
    +str);
    } else {
    JOptionPane.showMessageDialog(mainFrame, "Upload Images Fail!");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    filePost.releaseConnection();
    uploadDialog.dispose();
    else if (source == cancelBtn) {
    uploadDialog.dispose();
    else if (source == addFileBtn) {
    File[] selFiles;
    String pathStr, nameStr;
    selFiles= fc.getSelectedFiles();
    for (int i=0; i<selFiles.length; i++) {
    if (selFiles[i].isFile()) {
    pathStr= selFiles[i].toString();
    nameStr= selFiles[i].getName();
    if (!fileListModel.contains(pathStr)) {
    fileListModel.addElement(pathStr);
    fc.setSelectedFiles(null);
    else if (source == delFileBtn) {
    int[] selectedIndices= fileList.getSelectedIndices();
    for (int i=selectedIndices.length-1; i>=0; i--) {
    fileListModel.removeElementAt(selectedIndices[i]);
    } catch (Exception aa) {
    System.out.println(aa);

  • Java.io.filepermission error while executing a batch file from java prog

    Hi,
    i want run a java program which executes a batch file, both are in a jar file. while am trying this using webstart it shows error:access denied java.io.filepermission <<ALL FILES>>execute. why this happens how to rectify this.
    By
    Vinod

    Clearly, it would be a security vulnerability to be able to do such a thing from the web w/o user granting trust to the application.
    Java Web Start applications run in the Java SE secure sandbox unless they have been granted all-permissions by the user:
    1.) sign all jar files.
    2.) add <security><all-permissions/></security> to the jnlp file.
    The user would then be prompted to grant trust to the applications.
    /Andy

  • Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK

    Hi PI gurus,
      Need some suggestions on one issue below -
      Scenario - proxy (SAP) to SOAP (Web based system)
      In the RWB Communication Channel Monitirong we are receiving the below error
      " Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK"
    the request from XI system is going to target system and printing the lables (as per the functionality) with no issues but the comminication channel is giving the above error and this is causing the repeated sending the same request to target sytem and the data is printing repeateadly. This issues is occuring in Quality environment.
    Strangley the same Interface with the same connectivity details is working fine in Development environment. But not working in Quality environment. Checked the firewalls settings on both in XI and Target system side and confirmed that everything is fine.
    Below are the Logs both from Quality and developement are as follows
    Quality ( Failure Case) 
    17.03.2011 07:19:59 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:25:03 Error SOAP: call failed: java.io.IOException: Read timed out; HTTP 200 OK
    Development     (Success ful)
    17.03.2011 07:27:55 Success SOAP: request message entering the adapter with user J2EE_GUEST
    17.03.2011 07:27:58 Success SOAP: completed the processing
    When we checked with basis team on user id J2EE_GUEST,  they confirmed that they are same in Development and Quality.
    I repeat,, that the same target url and everthing is same in XI Configuration
    Thanks in Advance. Points would be rewared for the best solution.
    Thanks,
    Jitender

    HI Jitender,
          If your scenariois working in DEV and if it is not working in QAS.Could you please check if both the systems are at same patch levels..
    Please refer below notes :1551161,817894,952402.
    Cheers!!!
    Naveen.

  • Access denied (java.io.FilePermission c:\hello.html read

    hi all,
    i'm trying to run an application in web start which runs otherwise absolutely fine.i have made a tree application .if i press a link in a node it opens another page in jeditor pane which is on the other side of the split pane.every time i try to open a page it gives me the following exception
    Exception occurred during event dispatching:
    java.security.AccessControlException: access denied (java.io.FilePermission c:\Program Files\Apache Tomcat 4.0\webapps\web\hello.html read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.File.isDirectory(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(Unknown Source)
         at sun.net.www.protocol.file.FileURLConnection.getHeaderField(Unknown Source)
         at sun.net.www.URLConnection.getContentType(Unknown Source)
         at javax.swing.JEditorPane.getStream(Unknown Source)
         at javax.swing.JEditorPane.setPage(Unknown Source)
         at browser.HelpPanel.displayURL(HelpPanel.java:156)
         at browser.HelpPanel.access$000(HelpPanel.java:37)
         at browser.HelpPanel$2.valueChanged(HelpPanel.java:74)
         at javax.swing.JTree.fireValueChanged(Unknown Source)
         at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
         at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
         at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
         at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
    i have given permissions for file io in jdk1.3 jre,tomcat 's catalina as well as in the java.policy file for this particular application which is in the jar folder but no use.can anybody tell me the solution.following is the content of my policy file.
    grant {
    permission java.net.SocketPermission "*:1024-65535",
    "connect,accept,resolve";
    permission java.net.SocketPermission "*:80", "connect";
    permission java.security.AllPermission;
    permission java.util.PropertyPermission "os.name", "read";
         permission java.util.PropertyPermission "os.version", "read";
         permission java.util.PropertyPermission "os.arch", "read";
         permission java.util.PropertyPermission "file.separator", "read";
         permission java.util.PropertyPermission "path.separator", "read";
         permission java.util.PropertyPermission "line.separator", "read";
    permission java.util.PropertyPermission "user.dir", "read";
    permission java.util.PropertyPermission "dir", "read";
    permission java.io.FilePermission "c:\Program Files\Apache Tomcat 4.0\webapps\web\", "read,write,execute";
    thanks

    Hi sangeeta,
    I am working on java web start and have posted a query at the following link
    http://forum.java.sun.com/thread.jsp?forum=38&thread=328294
    I read your question and I found it similar to my problem.
    I was wondering if you could temm me exactly what file you had to modify under web start and what was the line that you had to put in.
    If the question is ambiguous .... and as an after thot it does look kinda that way please lemme know.
    Thanks
    Shahid
    hi all,
    i'm trying to run an application in web start which
    runs otherwise absolutely fine.i have made a tree
    application .if i press a link in a node it opens
    another page in jeditor pane which is on the other
    side of the split pane.every time i try to open a page
    it gives me the following exception
    Exception occurred during event dispatching:
    java.security.AccessControlException: access denied
    (java.io.FilePermission c:\Program Files\Apache Tomcat
    4.0\webapps\web\hello.html read)
    at
    java.security.AccessControlContext.checkPermission(Unk
    own Source)
    at
    java.security.AccessController.checkPermission(Unknown
    Source)
    at java.lang.SecurityManager.checkPermission(Unknown
    Source)
    at java.lang.SecurityManager.checkRead(Unknown
    Source)
         at java.io.File.isDirectory(Unknown Source)
    at
    sun.net.www.protocol.file.FileURLConnection.connect(Un
    nown Source)
    at
    sun.net.www.protocol.file.FileURLConnection.initialize
    eaders(Unknown Source)
    at
    sun.net.www.protocol.file.FileURLConnection.getHeaderF
    eld(Unknown Source)
    at sun.net.www.URLConnection.getContentType(Unknown
    Source)
         at javax.swing.JEditorPane.getStream(Unknown Source)
         at javax.swing.JEditorPane.setPage(Unknown Source)
         at browser.HelpPanel.displayURL(HelpPanel.java:156)
         at browser.HelpPanel.access$000(HelpPanel.java:37)
    at
    browser.HelpPanel$2.valueChanged(HelpPanel.java:74)
    at javax.swing.JTree.fireValueChanged(Unknown
    Source)
    at
    javax.swing.JTree$TreeSelectionRedirector.valueChanged
    Unknown Source)
    at
    javax.swing.tree.DefaultTreeSelectionModel.fireValueCh
    nged(Unknown Source)
    at
    javax.swing.tree.DefaultTreeSelectionModel.notifyPathC
    ange(Unknown Source)
    at
    javax.swing.tree.DefaultTreeSelectionModel.setSelectio
    Paths(Unknown Source)
    i have given permissions for file io in jdk1.3
    jre,tomcat 's catalina as well as in the java.policy
    file for this particular application which is in the
    jar folder but no use.can anybody tell me the
    solution.following is the content of my policy file.
    grant {
    permission java.net.SocketPermission
    ion "*:1024-65535",
    "connect,accept,resolve";
    permission java.net.SocketPermission "*:80",
    0", "connect";
    permission java.security.AllPermission;
    permission java.util.PropertyPermission
    ssion "os.name", "read";
    permission java.util.PropertyPermission "os.version",
    "read";
    permission java.util.PropertyPermission "os.arch",
    "read";
    permission java.util.PropertyPermission
    "file.separator", "read";
    permission java.util.PropertyPermission
    "path.separator", "read";
    permission java.util.PropertyPermission
    "line.separator", "read";
    permission java.util.PropertyPermission
    ssion "user.dir", "read";
    permission java.util.PropertyPermission "dir",
    dir", "read";
    permission java.io.FilePermission "c:\Program
    ogram Files\Apache Tomcat 4.0\webapps\web\",
    "read,write,execute";
    thanks

  • JDBC java.io.IOException: IO Error: Unexpected packet error reading BLOB

    Oracle JDBC driver threw exception _"java.io.IOException: IO Error: Unexpected packet"_ - while reading data from a BLOB column.
    Any help in resolution please?
    Database Version: Oracle Database 11g Enterprise Edition Release _11.2.0.2.0_ - 64bit Production.
    Database configuration: This is a single-server, non-RAC Oracle 11g, With the Partitioning, OLAP, Data Mining, Real Application Testing options and High compression.
    JDBC driver: ojdbc6.jar with manifest information as below:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.5
    Created-By: 1.5.0_17-b02 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle Corporation
    Implementation-Title: JDBC
    Implementation-Version: _11.2.0.1.0_
    Specification-Vendor: Sun Microsystems Inc.
    Specification-Title: JDBC
    Specification-Version: 4.0
    Main-Class: oracle.jdbc.OracleDriver
    Here is the complete stack trace (excluding my custom exception handler):
    Caused by: java.io.IOException: IO Error: Unexpected packet
    at oracle.jdbc.driver.OracleBlobInputStream.needBytes
    (OracleBlobInputStream.java:204)
    at oracle.jdbc.driver.OracleBufferedStream.readInternal
    (OracleBufferedStream.java:169)
    at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.
    java:143)
    at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.
    java:132)
    ... 91 more
    Caused by: java.sql.SQLRecoverableException: IO Error: Unexpected packet
    at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2325)
    at oracle.sql.BLOB.getBytes(BLOB.java:319)
    at oracle.jdbc.driver.OracleBlobInputStream.needBytes
    (OracleBlobInputStream.java:181)
    ... 100 more
    Caused by: oracle.net.ns.NetException: Unexpected packet
    at oracle.net.ns.NetException.(NetException.java:183)
    at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:222)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
    at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket
    (T4CSocketInputStreamWrapper.java:118)
    at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read
    (T4CSocketInputStreamWrapper.java:78)
    at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
    at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:146)
    at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2313)
    ... 102 more
    .

    jfdenise wrote:
    Hi,
    I am facing the exact same issue when getting a big jar of more than 7 megs. It seems to occur in some special network configuration that I am not yet able to figure out. It is obviously linked to the fact that the jar is unpacked on the client side.
    Anybody ran into this one and understood the root cause?Please, don't resurrect old threads, and don't use signatures with addresses. I'm locking this thread.
    Kaj

  • Java.io.FilePermission

    I am baffled by a security.AccessControlException that I get when I try to start an RMI server.
    The server sets an RMISecurityManager(), then creates an engine that extends UnicastRemoteObject and attempts to bind it (on localhost) with Naming.rebind(...). There it fails:
    RemoteCalcServer exception: access denied (java.io.FilePermission \\C\Projects\OmegaClient\classes read)
    java.security.AccessControlException: access denied (java.io.FilePermission \\C\Projects\OmegaClient\classes read)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:354)
         at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
         at java.rmi.Naming.rebind(Naming.java:160)
    at com.tibotec.isclient.calc.server.RemoteCalcServer.main(RemoteCalcServer.java:52)
    The policy file is:
    grant codeBase "file://C:/Projects/OmegaClient/classes/-" {
    permission java.io.FilePermission "\\C\\Projects\\OmegaClient\\classes\\", "read";
    permission java.net.SocketPermission "localhost:1024-", "listen, accept, connect";
    It must be correctly loaded and used, because a (different) exception is generated when I comment out the SocketPermission. But why does RMI complain about not having reading permission on that directory (the codeBase, and its value must be correct, or else I should get ClassNotFound exceptions)?
    I have tried every almost imaginable change to the directory syntax, including including "C:\\-", "file://C:/-", and "<<ALL FILES>>" but those don't help...
    Emmanuel

    did you find out what the problem was in the end??
    Im in a similar predicament.
    Decided i would have a look at some of the tutorials so i took the nice and easy hello world.
    You can find it here
    http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html
    Anyways when it comes down to running it i run into all sorts of problems. Im using the jdk1.5 Update 13.
    I trying to run both the server locally on my machine. My first exception i run into is
    (Package name differs slightly to the example but everything else is the same)
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: hello.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: hello.Hello
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
    Ok all class files are there and sit in the same package and tells me it cant find the Hello class. So i then set the
    Djava.rmi.server.codebase attribute to my classes directory. So then i move onto to my next exception
    Server exception: java.security.AccessControlException: access denied (java.io.FilePermission \\c\eclipse\workspace\helloworld\bin read)
    java.security.AccessControlException: access denied (java.io.FilePermission \\c\eclipse\workspace\helloworld\bin read)
    So i then create a policy file and grant all access.(Which im thinking i shouldnt be doing this because everything is local)
    So i then specify it on the command line Djava.security.policy= grant all policy
    Still get the same problem, what i dont get is why i need this when i run everything local, my understanding is that if you run it locally you dont need to specify a security policy file and codebase.
    if gives no indication in the tutorial either that you need this. Anyone any ideas how i can get this simple thing to work!!
    Cheers,
    LL

  • Java.io.FilePermission + Flex :(

    Hi Guys,
    i have a very strange problem and hope that u can help me. J
    I am developing an Air-App using a Coldfusion (Hoster is hostek.com) Backend. The Application has a User-Login which works correctly.
    After the login the app calls the server to get a full list of all members to display them into a Datagrid…
    Problem: On my localmashine both is working great. “Online” just the login works great… Calling the “getTeam” method causes an error:
    Error Loading team: [RPC Fault faultString="access denied (java.io.FilePermission D:\home\website.com\wwwroot\projects\teamplaner\Member.cfc read)"
    I just don’t get, why login works super and the other function (is in the same cfc) isn’t working.
    Again: local both is working…
    Any ideas? L
    Greetings from germany,
    nico

    STRANGE:
    I "solved" it...
    I am using customObjects in my application and on the server. (remoteClass....) If i am parsing an Object of that type to the function on the server there are no problems.... (of course this make sense if i am calling the "login" function... there i am parsing a UserVO instance containing username/password)
    anyway...
    in the "getTeam" method there is obviously no cfargument, just a returntype. (i am calling all users, without any specific propertys)
    Now i parsed an empty instance of that "UserObject" to my Cfc.component... Voila no error and i get the results i want....
    It seems that the server just "know" the objects i am parsing... doesn't make any sense for me.
    WTF? WHY?
    greets, nico

  • Can't run applet with appletviewer(java.io.FilePermission)

    Guys, I am writing an applet and it has compiled fine but when I try running it with appletviewer, it spews out these error. I have changed permissions on my .class file and .html file.
    Can anyone help? It's pretty frustrating...
    ava.security.AccessControlException: access denied (java.io.FilePermission /.automount/blah/usr/blah/blah/Node.class read)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.lang.SecurityManager.checkRead(SecurityManager.java:890)
    thanks.

    See if you find anything here:
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A31&qt=%22java.security.AccessControlException%3A+access+denied+%22&x=17&y=14
    It�s a search on the forum, users with the same error.
    Andreas

  • Runtime.getRuntime().exec() and java.io.FilePermission

    Hi all.
    I'm trying to run the following code, in an JSP file, inside an Tomcat installation, with Security Manager activated:
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("arp -n -a");But, when I run the JSP, I receive the following error:
    java.security.AccessControlException: access denied (java.io.FilePermission <> execute)I have the following config. file:
    grant {
      permission java.io.FilePermission "/etc/intranet/intranet.properties", "read";
      permission java.io.FilePermission "/home/projetos/Shofar/conf/ShofarParameters.xml", "read";
      permission java.io.FilePermission "arp", "execute";
      permission java.net.SocketPermission "*:5432",   "accept,connect";
      permission java.lang.RuntimePermission  "selectorProvider";
      permission java.util.PropertyPermission "dns.server",        "read";
      permission java.util.PropertyPermission "dns.search",        "read";
      permission java.net.SocketPermission    "*",                 "resolve";
      permission java.net.SocketPermission    "*:53",              "accept,connect,resolve";
      permission java.io.FilePermission       "/etc/resolv.conf",  "read";
      permission java.net.SocketPermission        "127.0.0.1:465",                                                     "resolve,connect";
      permission java.util.PropertyPermission     "user.name",                                                         "read";
      permission java.io.FilePermission           "/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/javamail.providers",   "read";
      permission java.io.FilePermission           "/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/javamail.address.map", "read";
      permission java.security.SecurityPermission "insertProvider.SunJSSE";
      permission java.util.logging.LoggingPermission "control";
      permission java.util.PropertyPermission "java.awt.headless", "read";
      permission java.io.FilePermission "/tmp/-",                  "read,write,delete";
      permission java.io.FilePermission "/var/lib/tomcat5/temp",   "read";
      permission java.io.FilePermission "/var/lib/tomcat5/temp/-", "read,write,delete";
      permission java.io.FilePermission "/var/lib/tomcat5/work/-", "read,write,delete";
      permission java.util.PropertyPermission "java.io.tmpdir",    "read,write";
      permission java.lang.RuntimePermission "accessClassInPackage.sun.util.calendar";
      permission java.lang.RuntimePermission "accessDeclaredMembers";
      permission java.lang.RuntimePermission "suppressAccessChecks";
      permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper";
      permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    };As seen, I put the permission java.io.FilePermission "/usr/sbin/arp", "execute"; line, but it don't work.
    What I need to put in the file?

    paulcw is right on the money on that one. You can easily create a bat file to perform that operation for you. However if you are feeling a little adventurous you can always use a Process:
    Process process=Runtime.getRuntime().exec(.....);
    int oneChar;
    InputStream inputStream=process.getInputStream();
    File file=new File("test.txt");
    try{
    file.createNewFile();
    } catch (Exception e){}
    FileOutputStream outputStream=new FileOutputStream(file);
    while ((oneChar=inputStream.read())!=-1){
    outputStream.write(oneChar);

Maybe you are looking for