SAPXPG Problems

Hi Experts,
OS: Linux RH4AS (x86_64)
SAP SRM 5.0, DB - Oracle 10.2.0.2
My jobs in DB13 currently are failing with the following error:
SXPG_COMMAND_EXECUTE failed for BRCONNECT - Reason: x_error
I am using a distributed environment with a standalone DB on one server and the CI on another server. I do <b>NOT</b> have a standalone gateway on the DB server and am trying to connect using remote calls. I have set the parameter gw/remsh to ssh.
What Works:
ssh between both servers have been setup and I can successfully test this from the OS level.
The <sid>adm user is setup on both servers with the same shell and permissions and I can access the DB server through ssh and run brtools functions.
The SAPDBHOST has been specified with the DB Server.
I have created an entry in SM69 for ssh and tested with SM49 successfully. Eg: If I pass the parameter ls -l, it returns with the list of files present.
/usr/bin/ssh -q srmdtst01 ls -al -
Works
/usr/bin/ssh -q srmdtst01 sapxpg ls -al  -- Does NOT work.
What Does NOT Work:
SAPXPG when run with the above entry in SM69 returns nothing, which according to note 446172 is supposed to mean that everything is all right. But RFC SAPXPG_DBDEST_<DBSERVER> also fails the connection test. I've got Activation type in the RFC set to "Start on Explicit Host" and have even provided the full path to sapxpg on the DB Server. The RFC connection test fails with a "timeout during allocate".
What should I set the "start type of External Program" to in the RFC? Its currently set to Default Gateway Value but I've tried all the other options and it still fails.
Any other ideas on why sapxpg fails to start?
Regards,
Chengappa Ballachanda

Problem was that the server name was not fully qualified in the ssh known hosts file. This caused a "host key verification" failure causing the RFC to fail.
Regards,
Chengappa

Similar Messages

  • Backup problem in SAP  BW 3.5

    Dear All,
    I am using SAP BW 3.5 with Oracle 9.2. I started the job via DB13 after that I am receiving the error
    Job started
    Step 001 started (program RSDBAJOB, variant &0000000000029, user ID BASIS)
    No application server on database host - rsh will be used
    Execute logical command BRBACKUP On host biddb
    Parameters:-u / -c force -t online -m all -p initBID.sap -w use_dbv
    SXPG_COMMAND_EXECUTE failed for BRBACKUP - Reason: program_start_error: For More Information, See SYS
    Job cancelled after system exception ERROR_MESSAGE
    Please help me to solve the problem
    Regards,
    MMSK

    Look at the sapxpg logs for errors dev_cp, dev_xpg.
    Regards
    Juan

  • Problem with logs in DB13

    Hello!
    I have problems with clearing logs via transaction DB13.
    When I start this operation for the first time after starting SAP system this job is finished successfully.
    But then I have error in this job:
    Job started
    Step 001 started (program RSDBAJOB, variant &0000000000033, user ID SAP*)
    Format "X_PAPER" not defined for printer "$LOCL"
    Execute logical command BRCONNECT On host SAP-TSC
    Parameters: -u / -jid CLNUP20140505004009 -c -f cleanup
    External communication error at program start (see system log)
    SAPXPG_START_XPG_LONG: sy-subrc ne 0
    destination = %_TCPIP_%1
    SXPG_STEP_COMMAND_START: SXPG_STEP_XPG_START returned: 1.006
    SXPG_COMMAND_EXECUTE(LONG)
    <timestamp> = 20140505004031
    COMMANDNAME = BRCONNECT
    ADDITIONAL_PARAMETERS = -u / -jid CLNUP20140505004009 -c -f cleanup
    LONG_PARAMS
    OPERATINGSYSTEM = ANYOS
    TARGETSYSTEM = SAP-TSC
    DESTINATION
    SY-SUBRC =  902
    SXPG_COMMAND_EXECUTE failed for BRCONNECT - Reason: x_error
    Job cancelled after system exception ERROR_MESSAGE
    And i have to restart the SAP for using DB13.
    Why it's happening?
    P.s. Yes, i changed SAPSR3 passwords via brtools and brconnect.
    Thank you for answering.

    Hello Janos,
    I checked SAPDBHOST parameter in DEFAULT.PFL:
    SAPDBHOST = SAP-TSC
    BRCONNECT is located in the directory with appropriate user rights.
    Also I checked developer traces:dev_rd
    LOCATION    SAP-Gateway on host SAP-TSC / sapgw00
    *  ERROR       timeout during allocate
    *  TIME        Wen May 07 16:08:10 2014
    *  RELEASE     720
    *  COMPONENT   SAP-Gateway
    *  VERSION     2
    *  RC          242
    *  MODULE      gwr3cpic.c
    *  LINE        6070
    *  DETAIL      no connect of TP sapxpg from host SAP-TSC.localdomain after 20
    *              sec
    *  COUNTER     11
    But i can't understand why rebooting sap system the first clearing logs finish successfully, but then i have errors.

  • Sapxpg  program core_dump,   how can I do?  need your help

    In my AIX system ,  I get such an error:   
    I do not know what can I do ?     do you have any advise?    thanks
    LABEL:          CORE_DUMP
    IDENTIFIER:     A63BEB70
    Date/Time:       Sun Jul 13 07:01:34 2008
    Sequence Number: 3823
    Machine Id:      00C0EEEC4C00
    Node Id:         KS1DSDB1
    Class:           S
    Type:            PERM
    Resource Name:   SYSPROC
    Description
    SOFTWARE PROGRAM ABNORMALLY TERMINATED
    Probable Causes
    SOFTWARE PROGRAM
    User Causes
    USER GENERATED SIGNAL
            Recommended Actions
            CORRECT THEN RETRY
    Failure Causes
    SOFTWARE PROGRAM
            Recommended Actions
            RERUN THE APPLICATION PROGRAM
            IF PROBLEM PERSISTS THEN DO THE FOLLOWING
            CONTACT APPROPRIATE SERVICE REPRESENTATIVE
    Detail Data
    SIGNAL NUMBER
              11
    USER'S PROCESS ID:
                    438672
    FILE SYSTEM SERIAL NUMBER
              17
    INODE NUMBER
               9
    PROCESSOR ID
               6
    CORE FILE NAME
    /usr/sap/PRD/DVEBMGS00/work/core
    PROGRAM NAME
    sapxpg
    STACK EXECUTION DISABLED
               0
    ADDITIONAL INFORMATION
    Unable to generate symptom string.
    Stack is unusable.

    here is the content of file:dev_cp    ,    I do not know whether there are any problems?   and my sapxpg generated core_dump in 07:00 AM,    I can not find any record at the time 07:00 AM,
    Trace file of control program (trace level 3)
    < Function: BtcTrcInit> Function: main  SAPXPG 640
    2008-07-13--15-00-21 : Before BtcXpgDetach
      > Function: BtcXpgDetach    Can't detach from process group (already leader)
      < Function: BtcXpgDetach  Accept RFC connection from R/3 system
    2008-07-13--15-00-21 : Before RfcAccept
    2008-07-13--15-00-21 : RfcAccept returned OK
    security check switched OFF
      Install RFC call SAPXPG_START_XPG
      Install RFC call SAPXPG_START_XPG_LONG
      Install RFC call SAPXPG_END_XPG
      Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
    2008-07-13--15-00-21 : Before first call of RFCDispatch
      > Function: BtcXpgStartXpg   
    2008-07-13--15-00-21 : Beginning of BtcXpgStartXpg
        > Function: BtcXpgStartXpgImport      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgTable      < Function: BtcXpgTable    < Function: BtcXpgStartXpgImport    > Function: BtcXpgStartXpgInt      > Function: BtcXpgItTransfer        Content of source log table:
              Line  Text
              <No StdOut/StdErr output reported>
            Target log table is not identical to source
            ItGetLine terminated with NULL
          < Function: BtcXpgItTransfer      > Function: BtcTrcReset        Trace level reset to 3
          < Function: BtcTrcReset      Call mode: VIA RFC
          Input arguments of BtcXpgStartXpg:
            External program: brarchive
            Program argument string:  -u / -c force -p initPRD.sap -cds
            Contents of control flags:
              StdIn control flag: redirect StdIn
              StdOut control flag: store StdOut output in memory
              StdErr control flag: store StdErr output in memory
              Trace control flag: trace level 0
              Termination control flag: control program will wait for termination
          > Function: BtcXpgCheck        > Function: BtcXpgArgv          Scanned parameter 1: -u
              Scanned parameter 2: /
              Scanned parameter 3: -c
              Scanned parameter 4: force
              Scanned parameter 5: -p
              Scanned parameter 6: initPRD.sap
              Scanned parameter 7: -cds
              Total number of arguments scanned: 7
              Argument argv[0]: brarchive
            < Function: BtcXpgArgv      < Function: BtcXpgCheck      > Function: BtcXpgSigInst        set signal handler for SIGCHLD to SIG_DFL
            old signal handler for SIGCHLD: SIG_IGN
          < Function: BtcXpgSigInst      > Function: BtcXpgStart        > Function: BtcTrcInit        Process id: 442864
            Parent process id: 233906
          < Function: BtcXpgStart      Start status of external program: external program successfully started
          Id of external process: 0000930102
          StdOut/StdErr collected in memory
            Line  Text
            <No StdOut/StdErr output reported>
        < Function: BtcXpgStartXpgInt    > Function: BtcXpgStartXpgExport      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam    < Function: BtcXpgStartXpgExport   
    2008-07-13--15-00-21 : End of BtcXpgStartXpg
      < Function: BtcXpgStartXpg 
    2008-07-13--15-00-21 : After first call of RFCDispatch
      Wait for RFC call SAPXPG_END_XPG
    2008-07-13--15-00-21 : Before second call of RFCDispatch
      > Function: BtcXpgEndXpg   
    2008-07-13--15-00-21 : Beginning of BtcXpgEndXpg
        > Function: BtcXpgEndXpgImport      > Function: BtcXpgTable      < Function: BtcXpgTable    < Function: BtcXpgEndXpgImport    > Function: BtcXpgEndXpgInt      > Function: BtcXpgItTransfer        Content of source log table:
              Line  Text
              <No StdOut/StdErr output reported>
            Target log table is not identical to source
            ItGetLine terminated with NULL
          < Function: BtcXpgItTransfer      > Function: BtcXpgReadChild        Read returns 28 bytes
            > Function: BtcXpgLog          Log message (27 byte): BR0002I BRARCHIVE 6.40 (15)
            < Function: BtcXpgLog        Read returns 79 bytes
            > Function: BtcXpgLog          Log message (78 byte): BR0006I Start of offline redo log processing: adyivkpp.cds 2008-07-13 15.00.21
            < Function: BtcXpgLog        Read returns 113 bytes
            > Function: BtcXpgLog          Log message (112 byte): BR0477I Oracle pfile /oracle/PRD/920_64/dbs/initPRD.ora created from spfile /oracle/PRD/920_64/dbs/spfilePRD.ora
            < Function: BtcXpgLog        Read returns 1 bytes
            > Function: BtcXpgLog          Log message (0 byte):
            < Function: BtcXpgLog        Read returns 55 bytes
            > Function: BtcXpgLog          Log message (54 byte): BR0013W No offline redo log files found for processing
            < Function: BtcXpgLog        Read returns 183 bytes
            > Function: BtcXpgLog          Log message (0 byte):
            < Function: BtcXpgLog        > Function: BtcXpgLog          Log message (76 byte): BR0007I End of offline redo log processing: adyivkpp.cds 2008-07-13 15.00.27
            < Function: BtcXpgLog        > Function: BtcXpgLog          Log message (49 byte): BR0280I BRARCHIVE time stamp: 2008-07-13 15.00.27
            < Function: BtcXpgLog        > Function: BtcXpgLog          Log message (54 byte): BR0004I BRARCHIVE completed successfully with warnings
            < Function: BtcXpgLog        Process executing external program has terminated
          < Function: BtcXpgReadChild      > Function: BtcXpgEnd        > Function: BtcXpgLog          Log message (44 byte): External program terminated with exit code 1
            < Function: BtcXpgLog      < Function: BtcXpgEnd      Termination status of external program: program terminated with error code 1
          StdOut/StdErr collected in memory
            Line  Text
               1  BR0002I BRARCHIVE 6.40 (15)
               2  BR0006I Start of offline redo log processing: adyivkpp.cds 2008-07-13 15.00.21
               3  BR0477I Oracle pfile /oracle/PRD/920_64/dbs/initPRD.ora created from spfile /oracle/PRD/920_64/dbs/spfilePRD.ora
               4 
               5  BR0013W No offline redo log files found for processing
               6 
               7  BR0007I End of offline redo log processing: adyivkpp.cds 2008-07-13 15.00.27
               8  BR0280I BRARCHIVE time stamp: 2008-07-13 15.00.27
               9  BR0004I BRARCHIVE completed successfully with warnings
              10  External program terminated with exit code 1
        < Function: BtcXpgEndXpgInt    > Function: BtcXpgEndXpgExport      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam    < Function: BtcXpgEndXpgExport   
    2008-07-13--15-00-27 : End of BtcXpgEndXpg
      < Function: BtcXpgEndXpg 
    2008-07-13--15-00-27 : After second call of RFCDispatch
    2008-07-13--15-00-27 : After call of RfcClose (wait)
    < Function: main
    2008-07-13--15-00-27 : End of SAPXPG: main

  • Sapxpg - connection to partner broken (SLD - SolMan)

    Hello,
    I've problem wtih my RFC-Connection SAPXPG_DBDEST_<host>.
    To collect data for dba-cockpit, we need a RFC-Connection between SolMan and SLD:
    RFC Destination     SAPXPG_DBDEST_HBMESA5A
    Connection Type  T  TCP/IP Connection                 Description
    Description 1       sapxpg
    Program               sapxpg
    Target Host          hbmesa5a......
    Save as               10.0.61.86
                                     20     Defined Value in Seconds
    Gateway Host        hbmesa5a......
    Gateway service:   sapgw00
    Gatway is running correct.
    Connection Test gives result:
    Logon     Cancel
    Error Details     connection to partner '127.0.0.1:0' broken / CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 t
    Error Details     ERROR: connection to partner '127.0.0.1:0' broken
    Error Details     LOCATION: SAP-Gateway on host hbmesa5a / sapgw00
    Error Details     DETAIL: NiIRead: 127.0.0.1:0
    Error Details     CALL: recv
    Error Details     COMPONENT: NI (network interface)
    Error Details     COUNTER: 9655
    Error Details     MODULE: nixxi.cpp
    Error Details     LINE: 4702
    Error Details     RETURN CODE: -6
    Error Details     SUBRC: 0
    Error Details     RELEASE: 711
    Error Details     TIME: Fri Feb  4 17:28:20 2011
    Error Details     VERSION: 39
    rfc-connection from our solution manager to the target host.
    Could anyone give us advice? Thanks in advance
    Best Regards
    Gerry Vanek
    Edited by: Gerry Vanek on Feb 4, 2011 5:34 PM

    Hello,
    we fixed the problem. Really simple when you know ...;()
    We deleted the existing RFC-Connection and created a new one with the same parameters.
    After that the connection works fine. The RFC had the problem, probably a corrupted entry in the table.
    Best regards
    Gerry Vanek
    Edited by: Gerry Vanek on Feb 25, 2011 3:37 PM

  • Starting external progran SAPXPG failed (SM69)

    System Information:
    ECC 6, Oracle 10.2, AIX 5.3, Kernel Patch level 147
    Hi all,
    We were encountered problems when try to scheduled actions in DB13.
    We had install CI & DB on separate server and the rfc SAPXPG_DBDEST_<Destination> is not working.
    We tried to use RSH in SM49/SM69 to start external program SAPXPG in target host remotely, however, it return External program terminated with exit code 1 when we executed it.
    *External command we used
    Rsh
    Target host u2013l <sid>adm sapxpg
    Logs of dev_cp:
    Trace file of control program (trace level 3)
    < Function: BtcTrcInit> Function: main  SAPXPG 700
    2009-02-05--21-18-10 : Before BtcXpgDetach
      > Function: BtcXpgDetach  < Function: BtcXpgDetach  Accept RFC connection from R/3 system
    2009-02-05--21-18-10 : Before RfcAccept
    2009-02-05--21-18-10 : RfcAccept returned OK
    security check switched OFF
      Install RFC call SAPXPG_START_XPG
      Install RFC call SAPXPG_START_XPG_LONG
      Install RFC call SAPXPG_END_XPG
      Wait for RFC call SAPXPG_START_XPG or SAPXPG_START_XPG_LONG
    2009-02-05--21-18-10 : Before first call of RFCDispatch
      > Function: BtcXpgStartXpgLong
    2009-02-05--21-18-10 : Beginning of BtcXpgStartXpgLong
        > Function: BtcXpgStartXpgImportLong      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgTable      < Function: BtcXpgTable    < Function: BtcXpgStartXpgImportLong
    BtcXpgStartXpgLong: special_trace_flag = <3>
        > Function: BtcXpgStartXpgInt      > Function: BtcXpgItTransfer        Content of source log table:
              Line  Text
              <No StdOut/StdErr output reported>
            Target log table is not identical to source
            ItGetLine terminated with NULL
          < Function: BtcXpgItTransfer      > Function: BtcTrcReset      < Function: BtcTrcReset      Call mode: VIA RFC
          Input arguments of BtcXpgStartXpg:
            External program: rsh
          tracecntl = : 3
            Program argument string: bir-hrerpdb -l prdadm sappxpg
            Contents of control flags:
              StdIn control flag: redirect StdIn
              StdOut control flag: store StdOut output in memory
              StdErr control flag: store StdErr output in memory
              Trace control flag: unknown contents
              Termination control flag: control program will wait for termination
          > Function: BtcXpgCheck        > Function: BtcXpgArgv
              parameter number 1:
              Scanned parameter: bir-hrerpdb
              parameter number 2:
              Scanned parameter: -l
              parameter number 3:
              Scanned parameter: prdadm
              parameter number 4:
              Scanned parameter: sappxpg
              Total number of arguments scanned: 4
              Argument argv[0]: rsh
            < Function: BtcXpgArgv      < Function: BtcXpgCheck      > Function: BtcXpgSigInst        set signal handler for SIGCHLD to SIG_DFL
            old signal handler for SIGCHLD: SIG_DFL
          < Function: BtcXpgSigInst      > Function: BtcXpgStart        Process id: 172232
            Parent process id: 352710
            > Function: BtcTrcIni      Start status of external program: external program successfully started
          Id of external process: 0000323746
          StdOut/StdErr collected in memory
            Line  Text
            <No StdOut/StdErr output reported>
        < Function: BtcXpgStartXpgInt    > Function: BtcXpgStartXpgExport      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam    < Function: BtcXpgStartXpgExport
    2009-02-05--21-18-10 : End of BtcXpgStartXpgLong
      < Function: BtcXpgStartXpgLong
    2009-02-05--21-18-10 : After first call of RFCDispatch
      Wait for RFC call SAPXPG_END_XPG
    2009-02-05--21-18-10 : Before second call of RFCDispatch
      > Function: BtcXpgEndXpg
    2009-02-05--21-18-10 : Beginning of BtcXpgEndXpg
        > Function: BtcXpgStartXpgExport      > Function: BtcXpgTable      < Function: BtcXpgTable    < Function: BtcXpgEndXpgImport    > Function: BtcXpgEndXpgInt      > Function: BtcXpgItTransfer        Content of source log table:
              Line  Text
              <No StdOut/StdErr output reported>
            Target log table is not identical to source
            ItGetLine terminated with NULL
          < Function: BtcXpgItTransfer      > Function: BtcXpgReadChild        Process executing external program has terminated
          < Function: BtcXpgReadChild      > Function: BtcXpgEnd        > Function: BtcXpgLog
              Log message (44 byte): External program terminated with exit code 1
            < Function: BtcXpgLog
          < Function: BtcXpgEnd      Termination status of external program: program terminated with error code 1
          StdOut/StdErr collected in memory
        < Function: BtcXpgEndXpgInt    > Function: BtcXpgEndXpgExport      > Function: BtcXpgParam      < Function: BtcXpgParam      > Function: BtcXpgParam      < Function: BtcXpgParam    < Function: BtcXpgEndXpgExport
    2009-02-05--21-18-10 : End of BtcXpgEndXpg
      < Function: BtcXpgEndXpg
    2009-02-05--21-18-10 : After second call of RFCDispatch
    2009-02-05--21-18-10 : After call of RfcClose (wait)
    < Function: main
    2009-02-05--21-18-10 : End of SAPXPG: main
    We couldnu2019t located any clear error indication that might help us in troubleshooting.
    We already configured settings in .rhosts file & we had resolve the permission problem
    We executed the following commands as user <sid>adm:
    In DB host, we executed rsh <CI host> date & it works.
    But in DB hosts, its doesn't work when we executed rsh <DB host> date
    Is this issue should be isolated as AIX OS issue?
    We couldn't execute any activities from DB13 as the DB rfc destination is not working.
    Is that alternative way that we can execute sapxpg on DB host?
    Or we have to install standalone gateway as solution? It's that any impact if we installing standalone gateway at DB host now (It's production system)?
    Thanks.
    BR,
    Terry

    Hi Guru,
    When we tried to execute the following command from host DB:
    rsh <Host CI> date
    it was return results.
    However, if we tried to execute from host CI:
    rsh <Host DB> data
    it was return no results.
    That's means we could'nt remotely start any of external command at DB host from CI host.
    Start external program error was isolated within operating system level.
    Any luck on this?
    Thanks.
    BR,
    Terry

  • Problem in BRBACKUP tool

    Dear All,
    We are facing a problem with BRBACKUP tool.
    DB: 10.2g
    OS: AIX:5.3
    SAP: on ECC6
    while taking the backup BTTOOLS at ORA<sid> we are getting this error:
    hgdevsrv:orahds 1> brbackup
    BR0051I BRBACKUP 7.00 (18)
    BR0055I Start of database backup: bdypgckw.aft 2008-08-16 10.48.02
    BR0280I BRBACKUP time stamp: 2008-08-16 10.48.03
    BR0301E SQL error -28000 at location BrDbConnect-2, SQL statement:
    'CONNECT system/*******'
    ORA-28000: the account is locked
    BR0310E Connect to database instance HDS failed
    BR0280I BRBACKUP time stamp: 2008-08-16 10.48.03
    BR0301E SQL error -28000 at location BrDbConnect-2, SQL statement:
    'CONNECT system/*******'
    ORA-28000: the account is locked
    BR0310E Connect to database instance HDS failed
    BR0056I End of database backup: bdypgckw.aft 2008-08-16 10.48.03
    BR0280I BRBACKUP time stamp: 2008-08-16 10.48.03
    BR0054I BRBACKUP terminated with errors
    hgdevsrv:orahds 2>
    anyone can help us in this regards.
    Udaya

    Hi,
    here is the output of the command:
    ls -ltr
    total 1366600
    -rwxrwxrwx   1 hdsadm   sapsys      6296599 Oct 10 2005  SAPCAR
    -rwxrwxrwx   1 hdsadm   sapsys     21870937 Jul 13 2006  sgxgis.so
    -rwxrwxrwx   1 hdsadm   sapsys     24079692 Jul 13 2006  bwgis.so
    -rwxrwxrwx   1 hdsadm   sapsys     37136343 Jul 13 2006  xmlchart.so
    -rwxrwxrwx   1 hdsadm   sapsys     37964714 Jul 13 2006  gfwchart.so
    -rwxrwxrwx   1 hdsadm   sapsys     11175935 Jul 13 2006  imgconv.so
    -rwxrwxrwx   1 hdsadm   sapsys      6923619 Jul 13 2006  zipper.so
    -rwxrwxrwx   1 hdsadm   sapsys     39749327 Jul 13 2006  igsmux_mt
    -rwxrwxrwx   1 hdsadm   sapsys     13453369 Jul 13 2006  igspw_mt
    -rwxrwxrwx   1 hdsadm   sapsys      9724226 Jul 13 2006  igswd_mt
    -rwxrwxrwx   1 hdsadm   sapsys          380 Jul 13 2006  igsmanifest.mf
    -rwxrwxrwx   1 hdsadm   sapsys          118 Jul 13 2006  igsexe.lst
    -rwxrwxrwx   1 hdsadm   sapsys        20557 Aug 29 2006  saproot.sh
    -rwxrwxrwx   1 hdsadm   sapsys           25 Aug 29 2006  rfcexec.sec
    -rwxrwxrwx   1 hdsadm   sapsys          349 Aug 29 2006  icm.properties
    -rwxrwxrwx   1 hdsadm   sapsys          362 Aug 29 2006  gw.properties
    -rwxrwxrwx   1 hdsadm   sapsys         4898 Aug 29 2006  sapsecin
    -rwxrwxrwx   1 hdsadm   sapsys      2655695 Aug 29 2006  libsapsecu.o
    -rwxrwxrwx   1 hdsadm   sapsys       275931 Aug 29 2006  libsapu16.so
    -rwxrwxrwx   1 hdsadm   sapsys      1701425 Aug 29 2006  libicuuc30.a
    -rwxrwxrwx   1 hdsadm   sapsys      2315841 Aug 29 2006  libicui18n30.a
    -rwxrwxrwx   1 hdsadm   sapsys      8558147 Aug 29 2006  libicudata30.a
    -rwxrwxrwx   1 hdsadm   sapsys      1974810 Aug 29 2006  dboraslib.o
    -rwxrwxrwx   1 hdsadm   sapsys       135740 Aug 29 2006  icmadmin.SAR
    -rwxrwxrwx   1 hdsadm   sapsys       135740 Aug 29 2006  wdispadmin.SAR
    -rwxrwxrwx   1 hdsadm   sapsys       278227 Aug 29 2006  libsapu16_mt.so
    -rwxrwxrwx   1 hdsadm   sapsys       440093 Aug 30 2006  sapparar
    -rwxrwxrwx   1 hdsadm   sapsys       452599 Aug 30 2006  rscpf2f
    -rwxrwxrwx   1 hdsadm   sapsys       443035 Aug 30 2006  rscpf3f
    -rwxrwxrwx   1 hdsadm   sapsys      2846132 Aug 30 2006  sapiconv
    -rwxrwxrwx   1 hdsadm   sapsys       603232 Aug 30 2006  rstrcscs
    -rwxrwxrwx   1 hdsadm   sapsys       623059 Aug 30 2006  rstrsscs
    -rwxrwxrwx   1 hdsadm   sapsys       610132 Aug 30 2006  rstrlscs
    -rwxrwxrwx   1 hdsadm   sapsys       642436 Aug 30 2006  rstrfile
    -rwxrwxrwx   1 hdsadm   sapsys       646108 Aug 30 2006  rslgview
    -rwxrwxrwx   1 hdsadm   sapsys       612490 Aug 30 2006  rslglscs
    -rwxrwxrwx   1 hdsadm   sapsys       676488 Aug 30 2006  rslgsend
    -rwxrwxrwx   1 hdsadm   sapsys       713823 Aug 30 2006  rslgcoll
    -rwxrwxrwx   1 hdsadm   sapsys      1007914 Aug 30 2006  rsyn.bin
    -rwxrwxrwx   1 hdsadm   sapsys      1449408 Aug 30 2006  estst
    -rwxrwxrwx   1 hdsadm   sapsys      1308052 Aug 30 2006  esmon
    -rwxrwxrwx   1 hdsadm   sapsys       797569 Aug 30 2006  es2mon
    -rwxrwxrwx   1 hdsadm   sapsys       950444 Aug 30 2006  eg2mon
    -rwxrwxrwx   1 hdsadm   sapsys      1316302 Aug 30 2006  emmon
    -rwxrwxrwx   1 hdsadm   sapsys      1048338 Aug 30 2006  em2mon
    -rwxrwxrwx   1 hdsadm   sapsys      1492603 Aug 30 2006  niping
    -rwxrwxrwx   1 hdsadm   sapsys      1578793 Aug 30 2006  saprouter
    -rwxrwxrwx   1 hdsadm   sapsys      1867600 Aug 30 2006  lgtst
    -rwxrwxrwx   1 hdsadm   sapsys      1624956 Aug 30 2006  msclients
    -rwxrwxrwx   1 hdsadm   sapsys      1672525 Aug 30 2006  msprot
    -rwxrwxrwx   1 hdsadm   sapsys      2240056 Aug 30 2006  msmon
    -rwxrwxrwx   1 hdsadm   sapsys       565400 Aug 30 2006  shmd
    -rwxrwxrwx   1 hdsadm   sapsys       611578 Aug 30 2006  semd
    -rwxrwxrwx   1 hdsadm   sapsys       520209 Aug 30 2006  evtd
    -rwxrwxrwx   1 hdsadm   sapsys       196925 Aug 30 2006  showipc
    -rwxrwxrwx   1 hdsadm   sapsys       196925 Aug 30 2006  cleanipc
    -rwxrwxrwx   1 hdsadm   sapsys       212106 Aug 30 2006  ipclimits
    -rwxrwxrwx   1 hdsadm   sapsys       231969 Aug 30 2006  memlimits
    -rwxrwxrwx   1 hdsadm   sapsys      6991743 Aug 30 2006  sapftp
    -rwxrwxrwx   1 hdsadm   sapsys      6943227 Aug 30 2006  saphttp
    -rwxrwxrwx   1 hdsadm   sapsys      1667948 Aug 30 2006  sapevt
    -rwxrwxrwx   1 hdsadm   sapsys      7527362 Aug 30 2006  R3load
    -rwxrwxrwx   1 hdsadm   sapsys      3775948 Aug 30 2006  R3ldctl
    -rwxrwxrwx   1 hdsadm   sapsys      3712423 Aug 30 2006  R3szchk
    -rwxrwxrwx   1 hdsadm   sapsys       715897 Aug 30 2006  sapstart
    -rwxrwxrwx   1 hdsadm   sapsys       477843 Aug 30 2006  sappfpar
    -rwxrwxrwx   1 hdsadm   sapsys       218196 Aug 30 2006  sapexec
    -rwxrwxrwx   1 hdsadm   sapsys       193391 Aug 30 2006  sapdbmrfc
    -rwxrwxrwx   1 hdsadm   sapsys      1763986 Aug 30 2006  ldapreg
    -rwxrwxrwx   1 hdsadm   sapsys      1484670 Aug 30 2006  ldappasswd
    -rwxrwxrwx   1 hdsadm   sapsys      7136455 Aug 30 2006  sapkprotp
    -rwxrwxrwx   1 hdsadm   sapsys      1618451 Aug 30 2006  icmbnd
    -rwxrwxrwx   1 hdsadm   sapsys      6663776 Aug 30 2006  icman
    -rwxrwxrwx   1 hdsadm   sapsys      3195644 Aug 30 2006  wdispmon
    -rwxrwxrwx   1 hdsadm   sapsys      3195644 Aug 30 2006  icmon
    -rwxrwxrwx   1 hdsadm   sapsys      5453274 Aug 30 2006  sapwebdisp
    -rwxrwxrwx   1 hdsadm   sapsys      3846342 Aug 30 2006  msg_server
    -rwxrwxrwx   1 hdsadm   sapsys      4374803 Aug 30 2006  enserver
    -rwxrwxrwx   1 hdsadm   sapsys      4049147 Aug 30 2006  enrepserver
    -rwxrwxrwx   1 hdsadm   sapsys      2629812 Aug 30 2006  sapcontrol
    -rwxrwxrwx   1 hdsadm   sapsys      2577636 Aug 30 2006  jcontrol
    -rwxrwxrwx   1 hdsadm   sapsys      2469450 Aug 30 2006  jcmon
    -rwxrwxrwx   1 hdsadm   sapsys      2884983 Aug 31 2006  sapcpp46.o
    -rwxrwxrwx   1 hdsadm   sapsys      4989311 Aug 31 2006  xml63d.o
    -rwxrwxrwx   1 hdsadm   sapsys      1250398 Aug 31 2006  libsapcsa.o
    -rwxrwxrwx   1 hdsadm   sapsys      4135920 Aug 31 2006  ensmon
    -rwxrwxrwx   1 hdsadm   sapsys      3061184 Sep 01 2006  dbadaslib.o
    -rwxrwxrwx   1 hdsadm   sapsys      3062980 Sep 01 2006  dw_stl.o
    -rwxrwxrwx   1 hdsadm   sapsys      6669034 Sep 01 2006  dw_xml.o
    -rwxrwxrwx   1 hdsadm   sapsys     12174711 Sep 01 2006  dw_xtc.o
    -rwxrwxrwx   1 hdsadm   sapsys      4870154 Sep 01 2006  dbsdbslib.o
    -rwxrwxrwx   1 hdsadm   sapsys     22473926 Sep 01 2006  dw_gui.o
    -rwxrwxrwx   1 hdsadm   sapsys      1018112 Sep 01 2006  libregex.o
    -rwxrwxrwx   1 hdsadm   sapsys       589928 Sep 01 2006  ABAP.pad
    -rwxrwxrwx   1 hdsadm   sapsys       785165 Sep 01 2006  dw_mdm.o
    -rwxrwxrwx   1 hdsadm   sapsys      4496721 Sep 01 2006  dsrlib.o
    -rwxrwxrwx   1 hdsadm   sapsys      3179825 Sep 01 2006  libjmon.so
    -rwxrwxrwx   1 hdsadm   sapsys        54697 Sep 01 2006  jstartup.jar
    -rwxrwxrwx   1 hdsadm   sapsys         8769 Sep 01 2006  jstartupapi.jar
    -rwxrwxrwx   1 hdsadm   sapsys        41450 Sep 01 2006  jstartupimpl.jar
    -rwxrwxrwx   1 hdsadm   sapsys      8687038 Sep 01 2006  sldreglib.o
    -rwxrwxrwx   1 hdsadm   sapsys      6411808 Sep 01 2006  sapxpg
    -rwxrwxrwx   1 hdsadm   sapsys     64526772 Sep 01 2006  disp+work
    -rwxrwxrwx   1 hdsadm   sapsys       601467 Sep 01 2006  sapmscsa
    -rwxrwxrwx   1 hdsadm   sapsys      6155926 Sep 01 2006  rscpf_db
    -rwxrwxrwx   1 hdsadm   sapsys      5188115 Sep 01 2006  gwrd
    -rwxrwxrwx   1 hdsadm   sapsys      1750824 Sep 01 2006  gwmon
    -rwxrwxrwx   1 hdsadm   sapsys      3242380 Sep 01 2006  dpmon
    -rwxrwxrwx   1 hdsadm   sapsys      3085776 Sep 01 2006  dpj2ee
    -rwxrwxrwx   1 hdsadm   sapsys     12223752 Sep 01 2006  tp
    -rwxrwxrwx   1 hdsadm   sapsys      9011300 Sep 01 2006  R3check
    -rwxrwxrwx   1 root     sapsys      1045454 Sep 01 2006  saposcol
    -rwxrwxrwx   1 hdsadm   sapsys      7327140 Sep 01 2006  mdxsvr
    -rwxrwxrwx   1 hdsadm   sapsys      2490999 Sep 01 2006  saplicense
    -rwxrwxrwx   1 hdsadm   sapsys      4898876 Sep 01 2006  dipgntab
    -rwxrwxrwx   1 hdsadm   sapsys      2998859 Sep 01 2006  enqt
    -rwxrwxrwx   1 hdsadm   sapsys      6708948 Sep 01 2006  startrfc
    -rwxrwxrwx   1 hdsadm   sapsys      6714877 Sep 01 2006  rfcexec
    -rwxrwxrwx   1 hdsadm   sapsys      6713982 Sep 01 2006  rfcping
    -rwxrwxrwx   1 hdsadm   sapsys      7093934 Sep 01 2006  ldap_rfc
    -rwxrwxrwx   1 hdsadm   sapsys      6780788 Sep 01 2006  ssfrfc
    -rwxrwxrwx   1 hdsadm   sapsys      3074561 Sep 01 2006  rscparulib.o
    -rwxrwxrwx   1 hdsadm   sapsys      1065559 Sep 01 2006  rscpf_ars
    -rwxrwxrwx   1 hdsadm   sapsys      1162752 Sep 01 2006  libjperflib.so
    -rwxrwxrwx   1 hdsadm   sapsys        13034 Sep 01 2006  jperflib.jar
    -rwxrwxrwx   1 hdsadm   sapsys      6665005 Sep 01 2006  libjenqulib.o
    -rwxrwxrwx   1 hdsadm   sapsys        86826 Sep 01 2006  jenqulib.jar
    -rwxrwxrwx   1 hdsadm   sapsys      7064803 Sep 01 2006  librfcum.o
    -rwxrwxrwx   1 hdsadm   sapsys      5987307 Sep 01 2006  sapstartsrv
    drwxrwxrwx   3 hdsadm   sapsys          256 Sep 01 2006  servicehttp
    -rwxrwxrwx   1 hdsadm   sapsys     14467904 Sep 01 2006  sapccm4x
    -rwxrwxrwx   1 hdsadm   sapsys     14612207 Sep 01 2006  sapccmsr
    drwxrwxrwx   5 hdsadm   sapsys          256 Sep 01 2006  jkit
    drwxrwxrwx   4 hdsadm   sapsys          256 Sep 01 2006  cfw
    -rwxrwxrwx   1 hdsadm   sapsys     11082007 Sep 01 2006  jlaunch
    -rwxrwxrwx   1 hdsadm   sapsys      2410270 Sep 01 2006  vscan_rfc
    -rwxrwxrwx   1 hdsadm   sapsys       805165 Sep 01 2006  sldreg
    -rwxrwxrwx   1 hdsadm   sapsys          318 Sep 01 2006  webdispinst.lst
    -rwxrwxrwx   1 hdsadm   sapsys          430 Sep 01 2006  scsclient.lst
    -rwxrwxrwx   1 hdsadm   sapsys          311 Sep 01 2006  scs.lst
    -rwxrwxrwx   1 hdsadm   sapsys          537 Sep 01 2006  sapmanifest.mf
    -rwxrwxrwx   1 hdsadm   sapsys         2226 Sep 01 2006  sapcpeft
    -rwxrwxrwx   1 hdsadm   sapsys          430 Sep 01 2006  j2eeinst.lst
    -rwxrwxrwx   1 hdsadm   sapsys         1218 Sep 01 2006  instance.lst
    -rwxrwxrwx   1 hdsadm   sapsys          215 Sep 01 2006  gateway.lst
    -rwxrwxrwx   1 hdsadm   sapsys          552 Sep 01 2006  sapmanifestdb.mf
    -rwxrwxrwx   1 hdsadm   sapsys          195 Sep 01 2006  instancedb.lst
    -rwxrwxrwx   1 hdsadm   sapsys          362 Sep 01 2006  exe_ora.lst
    -rwxrwxrwx   1 hdsadm   sapsys       566788 Oct 11 2006  sapcpe
    -rwxrwxrwx   1 hdsadm   sapsys      9231773 Oct 18 2006  R3trans
    -rwxrwxrwx   1 hdsadm   sapsys         4889 Oct 21 2006  sapdba_role.sql
    -rwxrwxrwx   1 hdsadm   sapsys         1664 Oct 21 2006  sapconn_role.sql
    -rwxrwxrwx   1 hdsadm   sapsys        20837 Oct 21 2006  initSID.sap
    -rwxrwxrwx   1 hdsadm   sapsys      1482671 Oct 21 2006  libsbt.o
    -rwxrwxrwx   1 orahds   dba         1929358 Oct 21 2006  brrestore
    -rwxrwxrwx   1 orahds   dba         4493034 Oct 26 2006  brarchive
    -rwxrwxrwx   1 orahds   dba         4619637 Oct 26 2006  brbackup
    -rwxrwxrwx   1 orahds   dba         6072423 Oct 26 2006  brconnect
    -rwxrwxrwx   1 orahds   dba         5070138 Oct 26 2006  brrecover
    -rwxrwxrwx   1 orahds   dba         6176926 Oct 26 2006  brspace
    -rwxrwxrwx   1 orahds   dba         2248568 Oct 26 2006  brtools
    -rwxrwxrwx   1 hdsadm   sapsys          135 Oct 27 2006  dbatoolsora.lst
    -rwxrwxrwx   1 hdsadm   sapsys         4743 Apr 03 2007  jdbcconnect.jar
    -rwxrwxrwx   1 hdsadm   sapsys        48966 Apr 03 2007  stopsap
    -rwxrwxrwx   1 hdsadm   sapsys        11119 Apr 03 2007  stopj2eedb
    -rwxrwxrwx   1 hdsadm   sapsys        11119 Apr 03 2007  stopdb
    -rwxrwxrwx   1 hdsadm   sapsys        53873 Apr 03 2007  startsap
    -rwxrwxrwx   1 hdsadm   sapsys        15752 Apr 03 2007  startj2eedb
    -rwxrwxrwx   1 hdsadm   sapsys        15752 Apr 03 2007  startdb
    drwxrwxrwx   3 hdsadm   sapsys          256 Apr 03 2007  uc
    drwxrwxrwx   3 hdsadm   sapsys          256 Apr 03 2007  nuc
    ##pwd
    /usr/sap/HDS/SYS/exe/run
    Best Regards
    Udaya Bhaslar

  • Problems upgrading the version of the operating system to Maverick.

    Hello everyone and thanks for your help.
    I'm trying to update the version of the OS X operating system to Maverick, also download the latest version of XCode and every time I try to do I get the following error:
    15/04/14 16:56:35,507 ReceiptInstaller[482]: 3891612: (CGSLookupServerRootPort) Untrusted apps are not allowed to connect to or launch Window Server before login.
    15/04/14 16:56:35,507 ReceiptInstaller[482]: kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    15/04/14 16:56:35,508 ReceiptInstaller[482]: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100)
    15/04/14 16:56:35,512 ReceiptInstaller[482]: kCGErrorRangeCheck: On-demand launch of the Window Server is allowed for root user only.
    15/04/14 16:56:35,512 ReceiptInstaller[482]: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100)
    15/04/14 16:56:35,845 sandboxd[483]: ([482]) ReceiptInstaller(482) deny file-read-data /private/var/root/Library/Preferences/.GlobalPreferences.plist
    15/04/14 16:56:35,933 sandboxd[483]: ([482]) ReceiptInstaller(482) deny file-read-data /Library/Preferences/.GlobalPreferences.plist
    15/04/14 16:56:35,947 sandboxd[483]: ([482]) ReceiptInstaller(482) deny mach-lookup com.apple.windowserver.active
    15/04/14 16:56:35,953 sandboxd[483]: ([482]) ReceiptInstaller(482) deny mach-lookup com.apple.windowserver.active
    What should I do?

    Hola Jose,
    is this happening with a certain command or with all of them?.
    Basically seems like connection is timing out.. so make sure that the host were the command is running is reachable. Also you can find more info about the problem in the SAPXPG logs.... I had a similar issue in the past and i solve it by updating the version of SAPXPG on the sap kernel.
    Regards
    Juan

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • J2ME problem with threads

    Hi all,
    I would like to ask you for a help. I need to write a small program at my university. I started to write a midlet which function would be to countdown time for sports activities. I woul like to start a new thread - the one that counts down - and at the same time make the main thread sleep. After the "countdown" thread finishes, the main thread wakes up and waits for user input. The problem is that when the "countdown" thread finishes his work, I've got Uncaught exception java/lang/NullPointerException. error and the midlet halts.
    Below you can find the code
    import java.lang.*;
    import java.util.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class intervals extends MIDlet implements CommandListener
    public Display ekran;
    private SweepCanvas sweeper;
    private Form rundy;
    private TextField round0, round1, round2, round3, round4, round5, round6, round7, round8;
    private long czas,x;
    private Command exitCommand;
    private Command addRound;
    private Command delRound;
    private Command start;
    private TextField repeat;
    private Form odliczanie;
    private Alert ostrz;
    Licznik thread;
    String test;
    StringItem test1;
    int parz,i,j,k;
    static int l;
    int ilrund;
    int ilpowt;
    Item sec;
    long sec1;
    public intervals()
        rundy = new Form("Interwa&#322;y sportowe");
        exitCommand = new Command("Wyj&#347;cie", Command.EXIT, 2);
        addRound = new Command("Dodaj","Dodaj rund&#281;", Command.ITEM,1);
        delRound = new Command("Usu&#324;","Usu&#324; ostatni&#261; rund&#281;", Command.ITEM,1);
        start = new Command("Start", Command.ITEM,1);
        odliczanie = new Form("Odliczanie");
        TextField dodaj(TextField kolej)
            kolej=new TextField("Podaj czas (s) rundy "+parz,null, 4, TextField.NUMERIC);//stworzenie nowej instancji do wybierania czasu trwania rundy
            if(rundy.size()==0)
                rundy.insert(rundy.size(),kolej);
                else
                    rundy.insert(rundy.size()-1, kolej);
            return kolej;
        void odliczanie(TextField round)
            monitor m=new monitor();
            k=Integer.parseInt(round.getString());
            ekran.setCurrent(odliczanie);
            thread=new Licznik(k,odliczanie);
            thread.start();
            ekran.setCurrent(rundy);
    public void startApp()// throws MIDletStateChangeException
        rundy.deleteAll();
        repeat = new TextField("Podaj ilo&#347;&#263; powtórze&#324;",null,1,TextField.NUMERIC);
        rundy.addCommand(addRound);
        rundy.addCommand(exitCommand);
        rundy.setCommandListener(this);
        Canvas obrazek = new MyCanvas();
        ekran = Display.getDisplay(this);
        ekran.setCurrent(obrazek);
        czas=System.currentTimeMillis();
        while (System.currentTimeMillis()<czas+1000)
            continue;
        ekran.setCurrent(rundy);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
        notifyDestroyed();
    public void commandAction(Command c, Displayable s)
        if (c == exitCommand)
            destroyApp(false);
            notifyDestroyed();
        else if(c==addRound)
            if(rundy.size()==0)//Sprawdzenie ilo&#347;ci elementów w celu poprawnego wy&#347;wietlania liczby rund w formie
                parz=1;
                else
                parz=rundy.size();
            switch(parz)
                case 1:
                    round0=dodaj(round0);break;
                case 2:
                    round1=dodaj(round1);break;
                case 3:
                   round2= dodaj(round2);break;
                case 4:
                    round3=dodaj(round3);break;
                case 5:
                    round4=dodaj(round4);break;
                default:
                    ostrz=new Alert("Uwaga","Maksymalna liczba rund wynosi 9", null, AlertType.INFO);
                    ostrz.setTimeout(3000);
                    ekran.setCurrent(ostrz);
            if(rundy.size()==1)
                rundy.append(repeat);
                rundy.addCommand(start);
            rundy.addCommand(delRound);
        else if(c==delRound)
            if(rundy.size()!=0)
                rundy.delete(rundy.size()-2);
                if (rundy.size()==1)
                    rundy.deleteAll();
                if(rundy.size()==0)
                    rundy.removeCommand(delRound);
                    rundy.removeCommand(start);
        else if(c==start)
            ilrund=rundy.size()-1;
            if(this.repeat.size()>0)
                ilpowt=Integer.parseInt(this.repeat.getString());
            ekran = Display.getDisplay(this);
            for (i=1; i<=ilpowt;i++)
                odliczanie= new Form("Odliczanie");
                 for (j=0;j<ilrund;j++)
                    switch(j)
                         case 0:
                             odliczanie(round0);
                             break;
                         case 1:
                             odliczanie(round1);
                             break;
                         case 2:
                             odliczanie(round2);
                             break;
                         case 3:
                             odliczanie(round3);
                             break;
                         case 4:
                             odliczanie(round4);
                             break;
                         case 5:
                             odliczanie(round5);
                             break;
                         case 6:
                             odliczanie(round6);
                             break;
                         case 7:
                             odliczanie(round7);
                             break;
                         case 8:
                             odliczanie(round8);
                             break;
    class Licznik extends Thread
        int czas1,k;
        Form forma;
        monitor m;
        public Licznik(int k,Form formap)
            czas1=k;
            forma=formap;
        public synchronized void run()
            while(czas1>0)
                forma.deleteAll();
                forma.append("Czas pozosta&#322;y (s): "+czas1);
                try{Thread.sleep(1000);} catch(InterruptedException e){e.printStackTrace();}
                czas1--;
            if(czas1<=0)
                m.put();
        }and monitor class
    public class monitor
    boolean busy=false;
    synchronized void get()
        if(!busy)
            try
                wait();
            }catch(InterruptedException e){e.printStackTrace();}
        notify();
    synchronized void put()
        if(busy)
            try
            wait();
            }catch(InterruptedException e){e.printStackTrace();}
        busy=true;
        notify();
    }Can anybody help me with this?

    Groovemaker,
    Your Licznik class has a member m of type monitor, which has not been instantiated (in other words is null) hence, when calling m.put() you get NullPointerException. Please also mind, that using Thread.sleep(1000) is not an accurate way of measuring time.
    If I may, please use recommended for Java class naming conventions - some of your names use lower case, while other don't which is confusing to the reader.
    Daniel

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with Threads and "plase wait..."-Window

    Hi everyone,
    I have a problem that I'm not able to solve in any way... I have a time-consuming task (a file decryption) which I execute in a separate thread; I've used the SwingWorker class, like suggested by sun-tutorial, and it works right. The problem is that I have to wait that the decryption have finished before continuing with program-execution. Therefore I would like to display a "please wait"-window while the task runs. I've tryed all the possible ways I know but the problem is always the same: the waitWindow is displayed empty, the bounds are painted but the contents no; it's only painted when the decrypt-task has finished. Please help me, I have no more resources....
    decrypt-file code:
    public class DecryptFile {
      private String cryptedFileNameAndPath;
      private ByteArrayInputStream resultStream = null;
      // need for progress
      private int lengthOfTask;
      private int current = -1;
      private String statMessage;
      public DecryptFile(String encZipFileNameAndPath) {
        cryptedFileNameAndPath = encZipFileNameAndPath;
        //Compute length of task...
        // 0 for indeterminate
        lengthOfTask = 0;
      public ByteArrayInputStream getDecryptedInputStream() {
        return this.resultStream;
       * Called from ProgressBarDemo to start the task.
      public void go() {
        current = -1;
        final SwingWorker worker = new SwingWorker() {
          public Object construct() {
            return new ActualTask();
        worker.start();
       * Called from ProgressBarDemo to find out how much work needs
       * to be done.
      public int getLengthOfTask() {
        return lengthOfTask;
       * Called from ProgressBarDemo to find out how much has been done.
      public int getCurrent() {
        return current;
      public void stop() {
        current = lengthOfTask;
       * Called from ProgressBarDemo to find out if the task has completed.
      public boolean done() {
        if (current >= lengthOfTask)
          return true;
        else
          return false;
      public String getMessage() {
        return statMessage;
       * The actual long running task.  This runs in a SwingWorker thread.
      class ActualTask {
        ActualTask () {
          current = -1;
          statMessage = "";
          resultStream = AIUtil.getInputStreamFromEncZip(cryptedFileNameAndPath); //here the decryption happens
          current = 0;
          statMessage = "";
      }The code that calls decryption and displays waitWindow
          final WaitSplash wS = new WaitSplash("Please wait...");
          final DecryptFile cryptedTemplate = new DecryptFile (this.templateFile);
          cryptedTemplate.go();
          while (! cryptedTemplate.done()) {
            try {
              wait();
            } catch (Exception e) { }
          this.templateInputStream = cryptedTemplate.getDecryptedInputStream();
          wS.close();Thanks, thanks, thanks in advance!
    Edoardo

    Maybe you can try setting the priority of the long-running thread to be lower? so that the UI will be more responsive...

Maybe you are looking for