Setuid in Java

Hi,
We have a Java application on Unix (Linux/Solaris/HP-UX). It can be run by
any user (non-root). The application needs to write into a file, which is
owned by root. How does one achieve this?
In "C/C++", we can use the "setuid" command, to get "root" privileges for
doing this. (e.g. the Unix "passwd" command is a setuid program)
We tried to achieve the same in Java, by having a "native" method, which
does a setuid and tries to write to the file. However, it is unable to
"setuid" to root.
Has any one faced a similar scenario? If so, how was it handled?
Is there an alternate approach for this problem?
One discovery regarding "setuid" from Java (through JNI) is that, we can run
the application as "root", and downgrade permission to a non-root user.
However, our requirement is for the reverse, viz., run as non-root, and
upgrade as required.
We also cannot have an entry in "java.policy" file granting permission to
write to a file, which the OS does not permit. (e.g. we cannot grant "write"
permission to /etc/passwd, because the OS permissions do not allow non-root
users to write to the file).
Thanks in advance for any pointers on this.
Tiju

On many unix platforms, the "java" command is a shell script that calculates a bunch of paths and then runs the "real" java runtime.
Also on many unix platforms, suid behavior is disabled for shell scripts because it is a security hole that can allow unauthorized users to get root permissions.
The work around is to write a small C program that checks all of its parameters, and then does an exec(2) call to start the java runtime for your program. You would then make this C program suid root. The effect is that your java program would then be suid root.

Similar Messages

  • Setuid bit on java - UnsatisfiedLinkError

    Scenario:
    set user id bit for java executable for linux is set as this
    -rwsr-sr-x 1 root root 64492 Aug 27 05:33 java
    Now you login as non-root and run a Java Program's main method with following code
    System.out.println(java.awt.Component);
    System.out.println(Class.forName("java.awt.Component"));The first line of code is sucessful, but the second line is not.
    It throws the UnsatisfiedLinkError on line 2.
    java.lang.UnsatisfiedLinkError: /opt/SnappimonAgent/jre/lib/i386/libawt.so: libmlib_image.so: cannot open shared object file: No such file
    ry
    But when run as root, it just runs fine.
    Can any body breaks it?

    hi,
    to know what libraries dont are in LD_LIBRARY_PATH do something like:
    ldd /opt/SnappimonAgent/jre/lib/i386/libawt.soyou will get something like:
    linux-gate.so.1 =>  (0x00202000)
            libmlib_image.so => /opt/jdk1.5.0_06/jre/lib/i386/libmlib_image.so (0x00203000)
            libjvm.so => not found
            libm.so.6 => /lib/libm.so.6 (0x0078e000)
            libdl.so.2 => /lib/libdl.so.2 (0x0032e000)
            libjava.so => /opt/jdk1.5.0_06/jre/lib/i386/libjava.so (0x006e0000)
            libc.so.6 => /lib/libc.so.6 (0x00c69000)
            /lib/ld-linux.so.2 (0x00a3a000)
            libjvm.so => not found
            libjvm.so => not found
            libverify.so => /opt/jdk1.5.0_06/jre/lib/i386/libverify.so (0x001b0000)
            libnsl.so.1 => /lib/libnsl.so.1 (0x003e1000)
            libjvm.so => not foundnote with libjvm.so we get a not found, then you must find where is that library, and change your LD_LIBRARY_PATH to the correct path, I think that for you the follow will works:
    export LD_LIBRARY_PATH=/opt/SnappimonAgent/jre/lib/i386/:/opt/SnappimonAgent/jre/lib/i386/server/this approach solve my problem with UnsatisfiedLinkError i hope that solve yours.

  • How to install correctly Java 1.5 on Mountain Lion?

    After Moiuntain Lion installing, I have re-install my Java 1.5 in my system.
    I need of it to run a build for a specific application. When I tried to do it, I got the following message:
    [javac] Invalid memory access of location 00000000 eip=0237da36
    I would like to know if Java 1.5 is fully supported on Mountain Lion?

    Thank you for your return
    But this article is related to the Java 1.6, not the 1.5 version .
    I need to find a way to re-install my jdk 1.5 on my Mountain Lion.
    Since my Lion update, when I try to use the sudo command, I have this kind of message:
    dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
    And also when I tried to build my project, I got this error:
    [javac] Invalid memory access of location 00000000 eip=0077da39

  • Comms6 IM java.lang.NoClassDefFoundError: org/apache/log4j/Layout

    Hi,
    After install (and configure) Comms6 Instant Messaging Server I cannot turn on IM services:
    bash-3.00# svcadm enable sunim
    bash-3.00# svcs -xv
    svc:/application/sunim:default (Sun Instant Messaging Server)
    State: offline since Thu Sep 18 18:57:15 2008
    Reason: Start method is running.
    See: http://sun.com/msg/SMF-8000-C4
    See: /var/svc/log/application-sunim:default.log
    Impact: This service is not running.
    (I added some debug lines to the /opt/sun/comms/im/sbin/imadmin)
    bash-3.00# tail /var/svc/log/application-sunim:default.log
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    [TIMEOUT]
    [ Sep 18 18:41:57 Method "start" exited with status 1 ]
    [ Sep 18 18:44:57 Leaving maintenance because disable requested. ]
    [ Sep 18 18:44:57 Disabled. ]
    [ Sep 18 18:57:15 Enabled. ]
    [ Sep 18 18:57:15 Executing start method ("/opt/sun/comms/im/sbin/imadmin start") ]
    Starting Watchdog /opt/sun/comms/im/sbin/../lib/execdaemon /usr/jdk/entsys-j2se/bin/java -Dlogdir=/var/opt/SUNWiim/default/log -Djava.awt.headless=true -cp /opt/sun/comms/im/sbin/../lib/imcommon.jar:/opt/SUNWmfwk/lib/mfwk_instrum_tk.jar:/opt/SUNWmfwk/lib/mfwk_agent.jar:/opt/SUNWmfwk/lib/rmi2rpc.jar:/opt/SUNWmfwk/lib/xml-apis.jar:/opt/SUNWmfwk/lib/javax77.jar:/opt/SUNWmfwk/lib/jdom.jar:/opt/SUNWmfwk/lib/xercesImpl.jar:/opt/SUNWjdmk/5.1/lib/jmx.jar:/opt/SUNWjdmk/5.1/lib/jmxremote.jar:/opt/SUNWjdmk/5.1/lib/jmxremote_optional.jar:/opt/SUNWjdmk/5.1/lib/jdmkrt.jar:/usr/share/lib/xmpp/improvider.jar:/usr/share/lib/imservice.jar:/opt/sun/comms/im/sbin/../lib/xmppd.jar:/usr/share/lib/jso.jar:/usr/share/lib/xp.jar:/usr/share/lib/log4j.jar:/usr/share/lib/jaxen-core.jar:/usr/share/lib/saxpath.jar com.iplanet.im.server.Watchdog -m noncluster -c /opt/sun/comms/im/sbin/../config/iim.conf
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    Anyway,
    When I try to start it manually I get the same error:
    bash-3.00# /opt/sun/comms/im/lib/execdaemon /usr/jdk/entsys-j2se/bin/java -Dlogdir=/var/opt/SUNWiim/default/log -Djava.awt.headless=true -cp /opt/sun/comms/im/sbin/../lib/imcommon.jar:/opt/SUNWmfwk/lib/mfwk_instrum_tk.jar:/opt/SUNWmfwk/lib/mfwk_agent.jar:/opt/SUNWmfwk/lib/rmi2rpc.jar:/opt/SUNWmfwk/lib/xml-apis.jar:/opt/SUNWmfwk/lib/javax77.jar:/opt/SUNWmfwk/lib/jdom.jar:/opt/SUNWmfwk/lib/xercesImpl.jar:/opt/SUNWjdmk/5.1/lib/jmx.jar:/opt/SUNWjdmk/5.1/lib/jmxremote.jar:/opt/SUNWjdmk/5.1/lib/jmxremote_optional.jar:/opt/SUNWjdmk/5.1/lib/jdmkrt.jar:/usr/share/lib/xmpp/improvider.jar:/usr/share/lib/imservice.jar:/opt/sun/comms/im/sbin/../lib/xmppd.jar:/usr/share/lib/jso.jar:/usr/share/lib/xp.jar:/usr/share/lib/log4j.jar:/usr/share/lib/jaxen-core.jar:/usr/share/lib/saxpath.jar com.iplanet.im.server.Watchdog -m noncluster -c /opt/sun/comms/im/sbin/../config/iim.conf
    bash-3.00# Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    It comes from non global zone on Solaris 10u5.

    The package SUNWiimdv was not installed.
    bash-3.00# pwd
    /install/SunOS_i386/IMAPI/Packages
    bash-3.00# pkgadd -d . SUNWiimdv
    Processing package instance <SUNWiimdv> from </export/install/comms/SunOS_i386/IMAPI/Packages>
    Sun Java System Instant Messaging and Presence APIs(i386) 7.3,REV=2008.01.14
    Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
    PROPRIETARY/CONFIDENTIAL
    Use is subject to license terms.
    Using </> as the package base directory.
    ## Processing package information.
    ## Processing system information.
    3 package pathnames are already properly installed.
    ## Verifying package dependencies.
    ## Verifying disk space requirements.
    ## Checking for conflicts with packages already installed.
    ## Checking for setuid/setgid programs.
    Installing Sun Java System Instant Messaging and Presence APIs as <SUNWiimdv>
    ## Installing part 1 of 1.
    /usr/share/lib/imservice.jar
    /usr/share/lib/jaxen-core.jar
    /usr/share/lib/jso.jar
    /usr/share/lib/log4j.jar
    /usr/share/lib/saxpath.jar
    /usr/share/lib/xmpp/improvider.jar
    /usr/share/lib/xmpp/xmppd
    /usr/share/lib/xmpp/xmppd.conf
    /usr/share/lib/xp.jar
    [ verifying class <none> ]
    Installation of <SUNWiimdv> was successful.
    bash-3.00# /opt/sun/comms/im/sbin/imadmin stop
    Stopping IM services using SMF. Please see the SMF logs for progress messages
    bash-3.00# /opt/sun/comms/im/sbin/imadmin start
    Starting IM services using SMF. Please see the SMF logs for progress messages
    bash-3.00# /opt/sun/comms/im/sbin/imadmin status
    Server [UP]
    Multiplexor [UP]
    Agent:calendar [UP]
    Watchdog [UP]

  • Java appl. with oracle on Linux

    Hello all,
    I would like to ask how to connect my Java application to
    Oracle on Linux. Is there any JDBC driver ?
    null

    Hi Mark,
    I am also running Oracle 8.0.5 in my RD6.0 machine.
    I installed Developer2000 into my win98 machine.
    I tried to login using the developer2000 into the
    oracle running under linux but connection cannot
    go through. I don't know the reason to this. Though
    I can use the SQL*Plus to connect to this database
    from win98, can you figure out what is wrong with
    my setup?
    Thanks,
    -Paul
    Mark Kirkwood (guest) wrote:
    : Hi all,
    : I thought you guys might be interested to know that this stuff
    : is used out there...
    : I work for a Government property management company ( Housing
    : New Zealand ), and they were looking at downsizing their
    systems
    : infrastructure. A subset of the business was picked to pilot a
    : downsized system.
    : We ported from :
    : "thin client" : Citrix Winframe, Developer 2000, HPUX , Oracle
    : 7.3
    : to a :
    : client server : Win95, Developer 2000, RedHat 6.0, Oracle
    8.0.5SE
    : Instead of running 80 users on :
    : 80 P300 PCs, Winframe Client +
    : 1 4xP200 Winframe/NT, Developer 2000 +
    : 1 HP-PA/Risc, HPUX ,Oracle 7.3.3
    : We are running 5 users on :
    : 5 P300 PC Win95, Developer 2000 +
    : 1 P300 PC RedHat 6.0, Oracle 8.0.5, samba
    : ( Obviously this was the pilot subset ! )
    : Although this represents a "step backwards" in deployment
    : architecture ( 3 tier - 2 tier ), it represented a decrease in
    : cost infrastructure per user ( No Winframe/NT License, No
    : expensive Proprietry hardware, only 1 ( Cheap ) propritary o/s
    : Win95 ).
    : We went live with this beast on 1 Aug.
    : The Redhat box has been rebooted once since them - not by us (
    : Power outage at the site ).
    : The server is just idling with 5 concurrent connections.
    : Oracle 8.0.5/Redhat is rock solid as far as we can tell !
    : ( with the right patches ....
    : for those interested they are
    : 8.0.5.1 patchset
    : redo log async write - bug 882446
    : glibc patch
    : setuid security patch
    : Cheers
    : Mark
    null

  • Port 80 listen with SetUID fails WLS 4.51SP8

    Any assistance is greatly appreciated...
    WLS starts fine on Port 80 as user root with no setUID.
    WLS starts fine on Port 7001 as user weblogic
    WLS fails on Port 80 as user root with setUID to user weblogic
    Wed Jun 21 08:47:59 PDT 2000:<E> <ListenThread> ListenThread:run failed:
    Wed Jun 21 08:47:59 PDT 2000:<E> <ListenThread>
    java.lang.UnsatisfiedLinkError: no weblogicunix1 in java.library.path
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:124)
    at
    weblogic.platform.OperatingSystem.getOS(OperatingSystem.java:77)
    at weblogic.t3.srvr.T3Srvr$1.run(T3Srvr.java:1162)
    at weblogic.t3.srvr.Callback.done(Callback.java:37)
    at
    weblogic.t3.srvr.ListenThread.newServerSocket(ListenThread.java:220)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:249)
    #uname -a
    HP-UX app02 B.11.00 U 9000/800 149901507 unlimited-user license
    #java -fullversion
    java full version "1.2.2.04-00/04/14-PA_RISC2.0"
    WelbLogic Server 4.51 with SP8
    JAVACLASSPATH=./classes/boot:./eval/cloudscape/lib/cloudscape.jar:./lib/poolorb.jar:/opt/weblogic/lib/weblogic451sp8boot.jar
    WEBLOGICCLASSPATH=./license:./classes:./lib/weblogicaux.jar:./myserver/serverclasses:/opt/weblogic/lib/weblogi451sp8.jar
    $JAVA -ms64m -mx64m -classpath $JAVACLASSPATH
    -Dweblogic.class.path=$WEBLOGICCLASSPATH -Djava.security.manager
    -Djava.security.policy==weblogic.policy weblogic.Server
    Patrick Sheehy
    Hewlett-Packard Consulting
    [email protected]

    You need to add the /opt/weblogic/lib/hpux11 directory (or whatever the real path to this directory is on your system) to your
    SHLIB_PATH environment variable.
    Michael Girdley wrote:
    It appears that you need to make sure that the shared object listed
    below (see stack trace) is in your link library path for your user
    (LD_LIBRARY) or equivalent.
    Thanks,
    Michael
    Patrick Sheehy wrote:
    Any assistance is greatly appreciated...
    WLS starts fine on Port 80 as user root with no setUID.
    WLS starts fine on Port 7001 as user weblogic
    WLS fails on Port 80 as user root with setUID to user weblogic
    Wed Jun 21 08:47:59 PDT 2000:<E> <ListenThread> ListenThread:run failed:
    Wed Jun 21 08:47:59 PDT 2000:<E> <ListenThread>
    java.lang.UnsatisfiedLinkError: no weblogicunix1 in java.library.path
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:124)
    at
    weblogic.platform.OperatingSystem.getOS(OperatingSystem.java:77)
    at weblogic.t3.srvr.T3Srvr$1.run(T3Srvr.java:1162)
    at weblogic.t3.srvr.Callback.done(Callback.java:37)
    at
    weblogic.t3.srvr.ListenThread.newServerSocket(ListenThread.java:220)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:249)
    #uname -a
    HP-UX app02 B.11.00 U 9000/800 149901507 unlimited-user license
    #java -fullversion
    java full version "1.2.2.04-00/04/14-PA_RISC2.0"
    WelbLogic Server 4.51 with SP8
    JAVACLASSPATH=./classes/boot:./eval/cloudscape/lib/cloudscape.jar:./lib/poolorb.jar:/opt/weblogic/lib/weblogic451sp8boot.jar
    WEBLOGICCLASSPATH=./license:./classes:./lib/weblogicaux.jar:./myserver/serverclasses:/opt/weblogic/lib/weblogi451sp8.jar
    $JAVA -ms64m -mx64m -classpath $JAVACLASSPATH
    -Dweblogic.class.path=$WEBLOGICCLASSPATH -Djava.security.manager
    -Djava.security.policy==weblogic.policy weblogic.Server
    Patrick Sheehy
    Hewlett-Packard Consulting
    [email protected]
    Thanks,
    Michael
    -- BEA WebLogic is hiring!
    Check our website: http://www.bea.com/

  • Create java: error reporting

    Hey all,
    Does anyone have any suggestions for how to receive more specific error messages from the compilation of java sources through sql statements? For example, I just tried compiling a piece of code and received the following error message:
    ORA-29511: could not resolve Java class
    I'm not surprised that I received the error, but it's a little inconclusive.
    Any ideas?
    Thanks,
    Jonathan

    Umm.....so....I just realized this may actually be a problem with the HTML DB interface. I had assumed it would transparently pass db error messages to the front-end. -_-;;
    I'm actually having trouble replicating this error now. Right now, when I try the following three commands I receive the following replies:
    1) Statement processed.
    2) Function created.
    3) ORA-29541: class ARDB.CalendarInterface could not be resolved
    The 'create java' statement should be returning a 'cannot find class' error.
    Hmm.....excuse the long post.
    Jonathan
    create or replace and compile java source named "CalendarInterface" as
    import oracle.calendar.soap.client.CalendaringResponse;
    import oracle.calendar.soap.client.Calendarlet;
    import oracle.calendar.soap.client.CreateCommand;
    import oracle.calendar.soap.client.authentication.BasicAuth;
    import oracle.calendar.soap.iCal.iCalendar;
    import oracle.calendar.soap.iCal.vCalendar;
    import oracle.calendar.soap.iCal.vEvent;
    public class CalendarInterface
      public static int addEvent(String title, String description, String dtStart, String duration)
           iCalendar ical   = new iCalendar();    
           vCalendar vcal   = new vCalendar();
           vEvent    vevent = new vEvent();
           ical.addvCalendar(vcal);
           vcal.addvComponent(vevent);
           String uid     = "ARDB-TEST-2";
           vevent.setEventClass(vEvent.k_eventClassPublic);
           // dtStart format: "yyyymmddThhmmssZ"
           vevent.setDtStart(dtStart);
           // Duration format: "PThhHmmM"
           vevent.setDuration(duration);
           vevent.setLocation("HQ");
           vevent.setSummary(title);
           vevent.setUid(uid);
           vevent.setXEventType(vEvent.k_eventTypeAppointment);
           vevent.setDescription(description);
           CreateCommand create = new CreateCommand();
           create.setCmdId("test");
           create.setiCalendar(ical);
           Calendarlet cws = new Calendarlet();      
           BasicAuth auth = new BasicAuth();
           auth.setName("username");
           auth.setPassword("password");
           cws.setEndPointURL("url");
           cws.setWantIOBuffers(true);
           cws.setAuthenticationHeader(auth.getElement());
           try {
              CalendaringResponse response = cws.Create(create.getElement());
           } catch (Exception ex)
             System.out.println("There was an error while retrieving a response from the Calendar server.");
           return 1;
    CREATE OR REPLACE FUNCTION addEvent (
       title IN VARCHAR2,
       description IN VARCHAR2,
       dtStart IN VARCHAR2,
       duration IN VARCHAR2)
       RETURN NUMBER
    AS LANGUAGE JAVA
       NAME 'CalendarInterface.addEvent (
                java.lang.String,
                java.lang.String,
                java.lang.String,
                java.lang.String)
                return int';
    declare
      retval   number;
    begin
      retval := addEvent('Title', 'Description', '20050817T100000Z', 'PT01H00M');
      htp.p(retval);
    end;

  • Error while running a Java Program

    Can anyone help me,
    I am getting the following error while running a Java program, Below is the exception thrown, please help.
    java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Buffer.java:425)
    at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
    at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
    at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
    at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
    at org.jetel.graph.Edge.writeRecord(Edge.java:288)
    at com.tcs.re.component.RESummer1.run(RESummer1.java:505)
    java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Buffer.java:425)
    at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
    at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
    at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
    at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
    at org.jetel.graph.Edge.writeRecord(Edge.java:288)
    at com.tcs.re.component.RECollectCont.run(RECollectCont.java:304)

    Ok, let's see. Write the following class:
    public class Grunt {
      public static void main(String[] args) {
        System.out.println("Hello Mars");
    }Save it as "C:\Grunt.java", compile by typing:
    javac c:\Grunt.javaRun by typing:
    java -classpath "C:\" GruntDoes it say "Hello Mars"? If yes, go back to your program and compare for differences (maybe you used the "package" statement?).
    Regards

  • Erro de SYSFAIL e Queda do Ambiente JAVA (PI)

    Bom Dia
    Estou num projeto de NFe e atualmente esta acontecendo o seguinte cenário de Erros:
        Na SMQ2 , quando apresenta um aumento nas filas de Mensagens , aparece SYSFAIL em determinadas Filas , todas as outras travam , aumenta o numero de Filas.
       Com essa mensagem de SYSFAIL nas filas , o serve0 (Parte JAVA do PI) cai e após isso estou tendo que efetuar manualmente um STOP/START em todos os canais de comunnicação para que os R/3 voltem a emitir NFe.
        Isso esta ocorrendo com mais frequência após inserir uma nova empresa para emissão de NFe.
        Alguem poderia me ajudar a entender por que ocorre o SYSFAIL as mensagens travam e derruba o ambiente JAVA ?
    Sérgio.

    1º) Erro: Commit Fault: com.sap.aii.af.rfc.afcommunication.RfcAFWException:SenderA
    2º) Foi alterado o numero de Filas O numero de Filas foi alterado , mas não consigo ver esse parametros na RZ10 , tem  3 entradas : X32_DVEBMGS32_NFISAP ; DEFAULT ; START_DVEBMGS32_NFISAP nessa transação ...onde eu vejo isso
    3º) Esse parametro não tem nessa transação (/usr/sap//DVEBMGS00/j2ee/cluster/server0/log/). em qual desses diretórios abaixo eu encontro esse parametro ?
    Existe esses:
    DIR_ATRA      /usr/sap/X32/DVEBMGS32/data
    DIR_BINARY      /usr/sap/X32/DVEBMGS32/exe
    DIR_CCMS      /usr/sap/ccms
    DIR_CT_LOGGIN    /usr/sap/X32/SYS/global
    DIR_CT_RUN              /usr/sap/X32/SYS/exe/run
    DIR_DATA              /usr/sap/X32/DVEBMGS32/data
    DIR_DBMS              /usr/sap/X32/SYS/SAPDB
    DIR_EXECUTABLE /usr/sap/X32/DVEBMGS32/exe
    DIR_EXE_ROOT     /usr/sap/X32/SYS/exe
    DIR_GEN              /usr/sap/X32/SYS/gen/dbg
    DIR_GEN_ROOT    /usr/sap/X32/SYS/gen
    DIR_GLOBAL        /usr/sap/X32/SYS/global
    DIR_GRAPH_EXE  /usr/sap/X32/DVEBMGS32/exe
    DIR_GRAPH_LIB   /usr/sap/X32/DVEBMGS32/exe
    DIR_HOME             /usr/sap/X32/DVEBMGS32/work
    DIR_INSTALL        /usr/sap/X32/SYS
    DIR_INSTANCE     /usr/sap/X32/DVEBMGS32
    DIR_LIBRARY      /usr/sap/X32/DVEBMGS32/exe
    DIR_LOGGING     /usr/sap/X32/DVEBMGS32/log
    DIR_MEMORY_INSPECTOR   /usr/sap/X32/DVEBMGS32/data
    DIR_ORAHOME       /oracle/X32/102_64
    DIR_PAGING                            /usr/sap/X32/DVEBMGS32/data
    DIR_PUT                            /usr/sap/X32/put
    DIR_PERF                            /usr/sap/tmp
    DIR_PROFILE      /usr/sap/X32/SYS/profile
    DIR_PROTOKOLLS     /usr/sap/X32/DVEBMGS32/log
    DIR_REORG                          /usr/sap/X32/DVEBMGS32/data
    DIR_ROLL                          /usr/sap/X32/DVEBMGS32/data
    DIR_RSYN                            /usr/sap/X32/DVEBMGS32/exe
    DIR_SAPHOSTAGENT     /usr/sap/hostctrl
    DIR_SAPUSERS     ./
    DIR_SETUPS                           /usr/sap/X32/SYS/profile
    DIR_SORTTMP     /usr/sap/X32/DVEBMGS32/data
    DIR_SOURCE     /usr/sap/X32/SYS/src
    DIR_TEMP                           /tmp
    DIR_TRANS                           /usr/sap/trans
    DIR_TRFILES                          /usr/sap/trans
    DIR_TRSUB                          /usr/sap/trans

  • Starting deployment prerequisites: error in BI-Java installation sapinst

    Hi all,
    We are in process updating Bw 3.5 to BI 7.0 we hace sucessfully completed the Upgrade but while installing Bi java thru Sapinst in third step like java instance installtion  i was stck with the below error.
               We have downloaded the Cryptographic file and placed in jdk folder still the same problem is  coming.
    Please suggest...
    Thanks,
    Subhash.G
    Starting deployment prerequisites:
    Oct 13, 2007 2:42:18 AM  Error: Creation of DataSource for database "BWQ" failed.
    Original error message is:
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..
    Stack trace of original Exception or Error is:
    com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..

    Problem solved  followed the notes 1063396.

  • If Statement in java.awt paint

    import java.applet.Applet;  //bring in the applet class
    import java.awt.*;             //bring in the graphics class
    import java.awt.event.*;      //bring in the event class
    import java.text.DecimalFormat;    //bring in the decimal format class
    import java.lang.Float;       //bring in the float class
    public class Bmi extends Applet implements ActionListener {   //begin program and start ActionListener
      Label weight, height;    //define Label variable
      TextField weighttext, heighttext;    //define TextField variables
      Button calculate;     //define button variables
      float index, wt, ht, max, min;    //define float variables
      DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
    public void init() {    //begin init()
      weight = new Label("Please enter your weight in Kg. (2 decimal places): ");   //define content of Label weight
      weighttext = new TextField(6);            //define size of TextField
      height = new Label("Please enter your height in Metres (2 decimal places): ");   //define content of Label height
      heighttext = new TextField(5);    //define size of TextField
      calculate = new Button("Calculate!!");       //define content of Button
      add(weight);      //add Label weight to the GUI
      add(weighttext);   //add TextField weighttext to the GUI
      add(height);      //add Label height to the GUI
      add(heighttext);     //add TextField heighttext to the GUI
      add(calculate);        //add button calculate to the GUI
      calculate.addActionListener(this);    //wait for button to be returned
      wt = 0;     //reset wt to 0
      index = 0;  //reset index to 0
      ht = 0;      //reset ht to 0
      max = 0;      //reset max to 0
      min = 0;    //reset min to 0
      public void actionPerformed( ActionEvent e ) {   //run upon return of button
      wt = Float.parseFloat(weighttext.getText());  //convert weighttext from String to Float
      ht = Float.parseFloat(heighttext.getText());    //covert heighttext from String to Float
      repaint();     //refresh paint area
      public float indexer()  //begin indexer method
        float ind;    //delare local variable ind
        ind = wt/(ht*ht);      //perform calculation
        return ind;    //make indexer() the value of variable ind
      }  // end of indexer method
      public float maxWeight()  //begin maxWeight method
        float maxwt;    //declare local variable maxwt
        final float UPPER = 25.0f;   //declare variable UPPER as a float with a decimal value of 25.0
        maxwt = UPPER*ht*ht;      //perform calculation
        return maxwt;          //make maxWeight() the value of variable maxwt
      }  // end of maxWeight method
      public float minWeight()   //begin minWeight method
        float minwt;    //declare local variable minwt
        final float LOWER= 20.0f;   //declare variable LOWER as a float with a decimal value of 20.0
        minwt = LOWER*ht*ht;    //perform calculation
        return minwt;      //make minWeight() the value of variable minwt
      }  // end of minWeight method
    public void paint(Graphics g)    //begin paint method, define g as Graphics
        index=indexer();   //covert method indexer() to variable index
        max=maxWeight();      //convert method maxWeight() to variable max
        min=minWeight();     //convert method minWeight() to variable min
        g.setFont(new Font("Verdana", Font.ITALIC, 15));    //define font, weight and size
        g.setColor(new Color(90,90,90));     //set new colour
        g.drawRect(5,100,300,75);      //define size of rectangle
        g.setColor(new Color(255,107,9));   //set new colour
        g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120);   //create string in paint, define its on screen position
        g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140);   //create string in paint, define its on screen position
        g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160);     //create string in paint, define its on screen position
      }  // end of paint method
    }    // end of Bmi classI have written the above code to calculate someones BMI (Body Mass Index). Basically as you can see it recieves a weight and height from the user and calculates the rest. But whilst that good I would like to know how I can make it tell the user something to the effect of "Your overweight" or "Your underweight". The if statement runs like this:
    if (wt > max)This forum doesn't quite handle <> properly. The greater and less than symbols. So above you will see > this is the html character code for a greater than symbol so please read it as such.
    And then if wt is greater than max then it will say "Your overweight".
    But I can't figure out how to include it in the above program. Becuase it won't run in paint, atleast it won't the way I have done it previously. So can you think of any other ways?
    Help much appreciated,
    Simon

    Thanks very much that works well.
    Simon
    My code now looks like this: import java.applet.Applet;  //bring in the applet class
    import java.awt.*;             //bring in the graphics class
    import java.awt.event.*;      //bring in the event class
    import java.text.DecimalFormat;    //bring in the decimal format class
    import java.lang.Float;       //bring in the float class
    public class Bmi extends Applet implements ActionListener {   //begin program and start ActionListener
      Label weight, height;    //define Label variable
      TextField weighttext, heighttext;    //define TextField variables
      Button calculate;     //define button variables
      float index, wt, ht, max, min;    //define float variables
      DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
    public void init() {    //begin init()
      weight = new Label("Please enter your weight in Kg. (2 decimal places): ");   //define content of Label weight
      weighttext = new TextField(6);            //define size of TextField
      height = new Label("Please enter your height in Metres (2 decimal places): ");   //define content of Label height
      heighttext = new TextField(5);    //define size of TextField
      calculate = new Button("Calculate!!");       //define content of Button
      add(weight);      //add Label weight to the GUI
      add(weighttext);   //add TextField weighttext to the GUI
      add(height);      //add Label height to the GUI
      add(heighttext);     //add TextField heighttext to the GUI
      add(calculate);        //add button calculate to the GUI
      calculate.addActionListener(this);    //wait for button to be returned
      wt = 0;     //reset wt to 0
      index = 0;  //reset index to 0
      ht = 0;      //reset ht to 0
      max = 0;      //reset max to 0
      min = 0;    //reset min to 0
      public void actionPerformed( ActionEvent e ) {   //run upon return of button
      wt = Float.parseFloat(weighttext.getText());  //convert weighttext from String to Float
      ht = Float.parseFloat(heighttext.getText());    //covert heighttext from String to Float
      repaint();     //refresh paint area
      public float indexer()  //begin indexer method
        float ind;    //delare local variable ind
        ind = wt/(ht*ht);      //perform calculation
        return ind;    //make indexer() the value of variable ind
      }  // end of indexer method
      public float maxWeight()  //begin maxWeight method
        float maxwt;    //declare local variable maxwt
        final float UPPER = 25.0f;   //declare variable UPPER as a float with a decimal value of 25.0
        maxwt = UPPER*ht*ht;      //perform calculation
        return maxwt;          //make maxWeight() the value of variable maxwt
      }  // end of maxWeight method
      public float minWeight()   //begin minWeight method
        float minwt;    //declare local variable minwt
        final float LOWER= 20.0f;   //declare variable LOWER as a float with a decimal value of 20.0
        minwt = LOWER*ht*ht;    //perform calculation
        return minwt;      //make minWeight() the value of variable minwt
      }  // end of minWeight method
    public void you(Graphics g)
      String statement;
      if(wt > max) statement="You are very fat";
      else if(wt < min) statement="You are very thin";
      else statement="You are in the recommended weight range for your height";
      g.drawString(statement, 20,210);
    public void paint(Graphics g)    //begin paint method, define g as Graphics
        you(g);
        index=indexer();   //covert method indexer() to variable index
        max=maxWeight();      //convert method maxWeight() to variable max
        min=minWeight();     //convert method minWeight() to variable min
        g.setFont(new Font("Verdana", Font.ITALIC, 15));    //define font, weight and size
        g.setColor(new Color(90,90,90));     //set new colour
        g.drawRect(5,100,300,75);      //define size of rectangle
        g.setColor(new Color(255,107,9));   //set new colour
        g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120);   //create string in paint, define its on screen position
        g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140);   //create string in paint, define its on screen position
        g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160);     //create string in paint, define its on screen position
      }  // end of paint method
    }    // end of BmiThanks again,
    Simon

  • SSO java sample application problem

    Hi all,
    I am trying to run the SSO java sample application, but am experiencing a problem:
    When I request the papp.jsp page I end up in an infinte loop, caught between papp.jsp and ssosignon.jsp.
    An earlier thread in this forum discussed the same problem, guessing that the cookie handling was the problem. This thread recommended a particlar servlet , ShowCookie, for inspecting the cookies for the current session.
    I have installed this cookie on the server, but don't see anything but one cookie, JSESSIONID.
    At present I am running the jsp sample app on a Tomcat server, while Oracle 9iAS with sso and portal is running on another machine on the LAN.
    The configuration of the SSO sample application is as follows:
    Cut from SSOEnablerJspBean.java:
    // Listener token for this partner application name
    private static String m_listenerToken = "wmli007251:8080";
    // Partner application session cookie name
    private static String m_cookieName = "SSO_PAPP_JSP_ID";
    // Partner application session domain
    private static String m_cookieDomain = "wmli007251:8080/";
    // Partner application session path scope
    private static String m_cookiePath = "/";
    // Host name of the database
    private static String m_dbHostName = "wmsi001370";
    // Port for database
    private static String m_dbPort = "1521";
    // Sehema name
    private static String m_dbSchemaName = "testpartnerapp";
    // Schema password
    private static String m_dbSchemaPasswd = "testpartnerapp";
    // Database SID name
    private static String m_dbSID = "IASDB.WMDATA.DK";
    // Requested URL (User requested page)
    private static String m_requestUrl = "http://wmli007251:8080/testsso/papp.jsp";
    // Cancel URL(Home page for this application which don't require authentication)
    private static String m_cancelUrl = "http://wmli007251:8080/testsso/fejl.html";
    Values specified in the Oracle Portal partner app administration page:
         ID: 1326
         Token: O87JOE971326
         Encryption key: 67854625C8B9BE96
         Logon-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_login
         single signoff-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_logout
         Name: testsso
         Start-URL: http://wmli007251:8080/testsso/
         Succes-URL: http://wmli007251:8080/testsso/ssosignon.jsp
         Log off-URL: http://wmli007251:8080/testsso/papplogoff.jsp
    Finally I have specified the cookie version to be v1.0 when running the regapp.sql script. Other parameters for this script are copied from the values specified above.
    Unfortunately the discussion in the earlier thread did not go any further but to recognize the cookieproblem, so I am now looking for help to move further on from here.
    Any ideas will be greatly appreciated!
    /Mads

    Pierre - When you work on the sample application, you should test the pages in a separate browser instance. Don't use the Run Page links from the Builder. The sample app has a different authentication scheme from that used in the development environment so it'll work better for you to use a separate development browser from the application testing browser. In the testing browser, to request the page you just modified, login to the application, then change the page ID in the URL. Then put some navigation controls into the application so you can run your page more easily by clicking links from other pages.
    Scott

  • SSO between a Java EE application (Running on CE) and r/3 backend

    Hi All,
    Over the past few days I have been trying to implement a SSO mechanism between NW CE Java Apps and R/3 backend without any success. I have been trying to use SAP logon tickets for implementing SSO.
    Below is what I need:
    I have a Java EE application which draws data from R/3 backend and does some processing before showing data to the users. As of now the only way the Java App on CE authenticates to r/3 backend is by passing the userid and pwds explicitly. See sample authentication code below:
    BindingProvider bp = (BindingProvider) myService;
    Map<String,Object> context = bp.getRequestContext();
    context.put(BindingProvider.USERNAME_PROPERTY, userID);
    context.put(BindingProvider.PASSWORD_PROPERTY, userPwd);
    Now this is not the way we want to implement it. What we need is when the user authenticates to CE ( using CE's UME) CE issues a SAP logon ticket to the user. This ticket should be used to subsequently login to other system without having to pass the credentials. We have configured the CE and Backend to use SAP logon tickets as per SAP help.
    What I am not able to figure out is: How to authenticate to SAP r/3 service from the java APP using SAP logon tickets. I couldnt find any sample Java  code on SAP help to do this. (For example the above sample code authenticates the user by explicitly passing userid and pwd, I need something similar to pass a token to the backend)
    Any help/pointers on this would be great.
    Thanks,
    Dhananjay

    Hi,
    Have you imported the java certificate into R/3 backend system ? if so.
    Then just go to backend system and check on sm50 for each applicaion instance of any error eg.
    SM50-> Display files (ICON) as DB symbol with spect.(cntrlshiftF8)
    You will get logon ticket details.
    with thanks,
        Rajat

  • 'Unable to Launch Application Error' - Java Web Start Running Under MS IIS.

    I am attempting to render the following .jnlp in MS IE:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for LottoMadness Application -->
    <jnlp
       codebase="http://localhost/LottoMadness/"
       href="LottoMadness.jnlp">
       <information>
         <title>LottoMadness Application</title>
         <vendor>Rogers Cadenhead</vendor>
         <homepage href="http://localhost/LottoMadness/"/>
         <icon href="lottobigicon.gif"/>
       </information>
       <resources>
         <j2se version="1.5"/>
         <jar href="LottoMadness.jar"/>
       </resources>
       <application-desc main-class="LottoMadness"/>
    </jnlp>I've deployed the .jnlp, .gif, and .jar to MS IIS, running locally on my PC.
    When I attempt to render the .jnlp in IE I obtain an 'Application Error' window stating 'Unable to Launch Application'. Clicking details gives me:
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost/LottoMadness/LottoMadness.jnlp
         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.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.Launcher.updateFinalLaunchDesc(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 have configured MS IIS for Web Start, by setting the Extension/Content Type fields to .jnlp and application/x-java-jnlp-file.
    (The .jnlp is basically from 'Programming with Java in 24 Hours', as this is the book I am learning Java from.)

    AndrewThompson64 wrote:
    I am not used to seeing references to a local server that do not include a port number.
    E.G. http://localhost:8080/LottoMadness/
    I have deployed the following HTML (HelpMe.html) to the web server:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>Untitled</title>
    </head>
    <body>
    Help Me!
    </body>
    </html>When I attempt to render the URL in IE, I see the page just fine. The URL is use is:
    http://localhost/LottoMadness/HelpMe.htmlSo, I think my web server setup and usage is ok.
    >
    As an aside, what happens if (your MS IIS is running and) you click a direct link to..
    [http://localhost/LottoMadness/LottoMadness.jnlp|http://localhost/LottoMadness/LottoMadness.jnlp]
    When I click this link I get the error and exception I cited in my previous post.

  • Partner Application written in other language than PL/SQL and Java

    I have an application written in another language than PL/SQL or Java. I want to integrate this application as an Partner apps where I use the same user repository as Portal.
    Can I integrate the application by calling a stored PL/SQL-procedure based on the PLSQL SSO APIs examples that authenticates the user based on the username/password in portal and redirects the user to the application ?
    Are there any examples / references where this has been done ?
    Jens

    Check out the PDK referance for URL-Services, which allow you to integrate with any web based service/content.
    http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO

Maybe you are looking for

  • Pages won't open doc, says I need update

    I just installed the latest update to pages. Now it won't open a doc saying, "You need a newer version of Pages to open this document." I just checked and I don't need any updates!

  • Can we create a Simulation tutorial steps from a Video in HTML5

    Hi Everyone, I want to create a tutorial something like a simulation by using the video. And the big thing is that it has to be in html5 format. I have one video in MP4 format from which I have to create the tutorial.The video is just a screen record

  • Photoshop CS6 stopped saving file extensions

    I am running PhotoShop CS6 on Mac Yosemite 10.10.2.  Photoshop suddenly stopped saving file extensions.  I can open the files saved on my computer, but others cannot because the file extension is missing.  Under preferences > file handling > append f

  • Error in UWL config help!!

    We are having following error in the "Registration for Item Types of Universal Worklist Webflow" iview   , when we are trying to configure the UWL, Portal Runtime Error An exception occurred while processing a request for : iView : pcd:portal_content

  • Number Key

    hello Friends, Can anyone tell what is the meaning of this message with suitable solution. While making bank challan i get an error " Number Key not found " what does it mean and pleas suggest soltuion for it. Regards, Greeshma