Runtime.exec() problem (jdk1.3.1+rh7, jdk1.4.2+rh9)

Discussion in 'Java' started by Michal M, Jul 28, 2005.

  1. Michal M

    Michal M Guest

    Hello,
    I've got a servlet which runs linux binary file and creates java.lang.Process,
    takes its output (getInputStream()) and writes it on .html page via BufferedReader.
    Old version of linux executable works fine, but I recently got a new version of
    this program which must be deployed and here's problem:
    - new executable works fine when running from linux command line (gives the same
    output - about ten lines - the same text, the same md5sum of outputted file as
    old one)
    - getting error stream (from servlet) also works fine
    - but rewriting process.getInputStream() on html page (as previous) doesn't
    - - under java 1.4.2_07 (rh9) servlet some times works fine but sometimes
    produces no output - exit value (waitFor()) is 129
    - - under java 1.3.1_01 (rh7) servlet doesn't work - everytime exit value is
    139! and there is produced no output on page

    What can I do? Where the problem cames from?
    Please note, I probaly won't be able to gather source code of mentioned linux
    application (c/c++).

    Regards,
    Michal M
     
    Michal M, Jul 28, 2005
    #1
    1. Advertising

  2. On Thu, 28 Jul 2005 10:28:43 +0200, Michal M wrote:
    > - - under java 1.4.2_07 (rh9) servlet some times works fine but
    > sometimes produces no output - exit value (waitFor()) is 129


    The process was killed with signal 1 (hangup), it explicitly returned
    129.

    > - - under java 1.3.1_01 (rh7) servlet doesn't work - everytime exit
    > value is 139! and there is produced no output on page


    The process was killed with signal 11 (segmentation fault) or it
    explicitly returned 139.

    > What can I do? Where the problem cames from?


    The problems come from the child process. If you can't get the source,
    complain to the author. Or use the previous version that worked.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Jul 28, 2005
    #2
    1. Advertising

  3. Michal M

    Michal M Guest

    Gordon Beaton wrote:
    > The problems come from the child process. If you can't get the source,
    > complain to the author. Or use the previous version that worked.
    >
    > /gordon
    >


    Thanks for your help!
     
    Michal M, Aug 1, 2005
    #3
  4. JDBC Access in Japplet

    Hi All,
    Iam new to this group and i know only basic fundas of Java. Iam writing
    an java applet which connects to the database and retrieves data.
    It runs when iam running from jdeveloper ..but when run thru a browser
    it is giving the following exception.

    java.security.AccessControlException: access denied
    (java.net.SocketPermission ab123x1.us.xyz.com resolve)

    And also Iam using File IO...i hope it will also won't work
    since there is security issues..and the file is in the CLIENT side..

    Please help me in this issue.

    thnx,
    Sathish


    Michal M wrote:
    > Gordon Beaton wrote:
    >
    >> The problems come from the child process. If you can't get the source,
    >> complain to the author. Or use the previous version that worked.
    >>
    >> /gordon
    >>

    >
    > Thanks for your help!
     
    Sathish Kumar Raju, Aug 1, 2005
    #4
  5. Michal M

    Pete Barrett Guest

    Re: JDBC Access in Japplet

    On Mon, 01 Aug 2005 12:03:52 +0530, Sathish Kumar Raju
    <> wrote:

    >Hi All,
    >Iam new to this group and i know only basic fundas of Java. Iam writing
    >an java applet which connects to the database and retrieves data.
    >It runs when iam running from jdeveloper ..but when run thru a browser
    >it is giving the following exception.
    >
    >java.security.AccessControlException: access denied
    >(java.net.SocketPermission ab123x1.us.xyz.com resolve)
    >
    >And also Iam using File IO...i hope it will also won't work
    >since there is security issues..and the file is in the CLIENT side..
    >
    >Please help me in this issue.
    >

    Applets aren't allowed to connect to a database except on the host
    they were downloaded from. You either need your databse on the same
    host as the webserver which serves the pages your applet is on, or you
    need a database proxy on that machine which will allow the applet to
    connect to it but to pass the actual requests through to the machine
    the database is actually running on.

    All this is in the Java documentation, if you can find it.

    Pete Barrett
     
    Pete Barrett, Aug 1, 2005
    #5
  6. Michal M

    Dag Sunde Guest

    Re: JDBC Access in Japplet

    "Pete Barrett" <> wrote in message
    news:...
    > On Mon, 01 Aug 2005 12:03:52 +0530, Sathish Kumar Raju
    > <> wrote:
    >
    >>Hi All,
    >>Iam new to this group and i know only basic fundas of Java. Iam writing
    >>an java applet which connects to the database and retrieves data.
    >>It runs when iam running from jdeveloper ..but when run thru a browser
    >>it is giving the following exception.
    >>
    >>java.security.AccessControlException: access denied
    >>(java.net.SocketPermission ab123x1.us.xyz.com resolve)
    >>
    >>And also Iam using File IO...i hope it will also won't work
    >>since there is security issues..and the file is in the CLIENT side..
    >>
    >>Please help me in this issue.
    >>

    > Applets aren't allowed to connect to a database except on the host
    > they were downloaded from. You either need your databse on the same
    > host as the webserver which serves the pages your applet is on, or you
    > need a database proxy on that machine which will allow the applet to
    > connect to it but to pass the actual requests through to the machine
    > the database is actually running on.
    >


    Unless the applet is _signed_ with a code signing certificate, and the
    user have explicitly accepted that he/she trust your applet.

    --
    Dag.
     
    Dag Sunde, Aug 2, 2005
    #6
  7. Re: JDBC Access in Japplet

    Hi Dag,
    Thanks for the info !!
    By the way ..I have created a jar file containing the applet class
    and also signed it. But in the html file, though i mentioned
    code="a.class" archive="a.jar", it says class not found when
    viewed in IE...

    Also , i have an doubt whether it will ask the user to accept
    the digital certificate / not..and if the user accepts the
    certificate ,then will it be possible for jdbc and io ??

    Please i need assistance in this...or i need to convert the
    entire applet to servlet logic ( but bit time taking)

    thnx,
    Sathish

    Dag Sunde wrote:

    > "Pete Barrett" <> wrote in message
    > news:...
    >
    >>On Mon, 01 Aug 2005 12:03:52 +0530, Sathish Kumar Raju
    >><> wrote:
    >>
    >>
    >>>Hi All,
    >>>Iam new to this group and i know only basic fundas of Java. Iam writing
    >>>an java applet which connects to the database and retrieves data.
    >>>It runs when iam running from jdeveloper ..but when run thru a browser
    >>>it is giving the following exception.
    >>>
    >>>java.security.AccessControlException: access denied
    >>>(java.net.SocketPermission ab123x1.us.xyz.com resolve)
    >>>
    >>>And also Iam using File IO...i hope it will also won't work
    >>>since there is security issues..and the file is in the CLIENT side..
    >>>
    >>>Please help me in this issue.
    >>>

    >>
    >>Applets aren't allowed to connect to a database except on the host
    >>they were downloaded from. You either need your databse on the same
    >>host as the webserver which serves the pages your applet is on, or you
    >>need a database proxy on that machine which will allow the applet to
    >>connect to it but to pass the actual requests through to the machine
    >>the database is actually running on.
    >>

    >
    >
    > Unless the applet is _signed_ with a code signing certificate, and the
    > user have explicitly accepted that he/she trust your applet.
    >
     
    Sathish Kumar Raju, Aug 2, 2005
    #7
  8. Re: JDBC Access in Japplet

    On Tue, 02 Aug 2005 12:53:00 +0530, Sathish Kumar Raju wrote:


    Please refrain from top-posting, some of us find it
    most confusing, see further comments (below) 'in-line'..

    > Dag Sunde wrote:
    >
    >> "Pete Barrett" <> wrote in message
    >> news:...
    >>
    >>>On Mon, 01 Aug 2005 12:03:52 +0530, Sathish Kumar Raju
    >>><> wrote:
    >>>
    >>>>..Iam writing an java applet...

    ...
    >>>>java.security.AccessControlException: access denied

    ...
    >>>Applets aren't allowed to connect to a database except on the host
    >>>they were downloaded from.

    ...
    >> Unless the applet is _signed_ ..


    > By the way ..I have created a jar file containing the applet class
    > and also signed it. But in the html file, though i mentioned
    > code="a.class" archive="a.jar", it says class not found when
    > viewed in IE...


    Where is your HTML, jar file..
    Upload it to a web page so we can seeit, post the URL.

    But your answer might be here.
    <http://www.physci.org/codes/javafaq.jsp#appletie>

    Read the entire FAQ - lots of mention of applets.

    A quick test is here..
    <http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor>
    MS? 1.1.4?

    > Also , i have an doubt whether it will ask the user to accept
    > the digital certificate


    It will. If the user refuses, your applet will still
    load, but does not get the extended privileges.

    >../ not..and if the user accepts the
    > certificate ,then will it be possible for jdbc and io ??


    Yes. (If the user accepts it)

    HTH

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Featuring Gratuitous Alien Nudity
     
    Andrew Thompson, Aug 2, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David F. Skoll
    Replies:
    2
    Views:
    881
    David F. Skoll
    Nov 14, 2003
  2. david
    Replies:
    2
    Views:
    1,153
    david
    Nov 12, 2003
  3. Hal Vaughan
    Replies:
    11
    Views:
    1,157
    Gordon Beaton
    May 22, 2006
  4. Replies:
    0
    Views:
    732
  5. Replies:
    1
    Views:
    299
    Victor Bazarov
    Sep 28, 2006
Loading...

Share This Page