OTM problem with Siebel

hi,
I am using OATS 12.1... when i run Siebel aoutomation script on server from open script everything is ok, but when i try to run it from otm gets an error:
Error(-1,022) submitting CAS command: System error. Debug info: Failed to execute method id 3 with args ((Accounts Screen)). Reason: HandleAutoRequest.
on login in Siebel there is no problems but when it have to use SiebelFT it fails this happen only when i run script from test manager.

Hello
Have you tried to manually execute the script once on the OTM server? Because you need to install the ActiveX and particularly the Automation ActiveX to make sure to be able to interact with Siebel.
So go to your OTM server, manually navigate to Siebel with the SWEAuto=on parameter and make sure to install all the needed ActiveX.
Good Luck
JB

Similar Messages

  • Problem with Siebel and OIM

    We have a conflict with Siebel. We are executing the process of reconciliation "Siebel Lookup Recon", the process takes about 30 minutes and concludes with a execute status of "Success", apparently is bringing the information correctly from Siebel, but nothing is written in the OIM.
    Therefore I request your support to validate what happens.
    Any idea?
    Regards.

    I change the config to authwl.conf instead of auth.conf and worked, but now I am stuck at:
    tcResultSet rs = userOps.findAllUsers(query);
    where it's thrown:
    java.lang.NullPointerException
         at Thor.API.Operations.tcUserOperationsClient.findAllUsers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy0.findAllUsers(Unknown Source)
         at ar.com.tgs.vk.commons.OIMUtils.prueba(OIMUtils.java:57)
         at ar.com.tgs.vk.commons.OIMUtils.main(OIMUtils.java:48)
    Is like some Weblogic library is needed by the Eclipse project..

  • Problem with Siebel Tool ORA-12154

    Hi,
    This is my problem:
    I installed Siebel Tool in Windows XP successful, but when attempt to connect to me marks the following error:
    An internall error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)
    If I probe the conexion ODBC that finished with this error:
    [DataDirect][ODBC Oracle driver][Oracle]ORA-12154: Tns: could not resolve the connect identifier specified
    I can connect to the database using SQL Plus without problems.
    My Datababase is "Oracle Database 10g Release 10.2.0.1.0".
    My Oracle Client is 10.2.0.1.0
    My tnsnames.ora contain this lines
    TEST.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER01)(PORT = 1521))
    (CONNECT_DATA = (SID = TEST))
    Any idea, what is the problem?
    Please, help me.

    Hi,
    Yes, I'm using siebel driver C:\SiebelTool\8.1\Tools_1\bin\seor823.dll
    My problem already this solved.
    My error was the Oracle client. I had installed Oracle Client 8.0.6.3.2 and I'm trying to connect in "Oracle Database 10g Release 10.2.0.1.0". Then I updated the Oracle Client to Oracle Client 10.2.0.1.0
    I installed Oracle Client 10.2.0.1.0 completely with option Administration Tools and I added line the new tnsnames.ora:
    TEST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER01)(PORT = 1521))
    (CONNECT_DATA = (SID = TEST))
    And now I already could be connected without problems.
    Thank you very much by the aid
    Edited by: Wings2009 on 10-jul-2009 10:59

  • Problem with Siebel Analyics Web

    Hi,
    I have installed siebel analytics on my mahine and admintool is working fine and siebel analtyics web is not working. when i type http://localhost/analytics i am not getting the answers page. it is giving me page can not be displayed. when i check for http://localhost/ then i am getting IIS home page. when i check the services both IIS Admin and siebel analytics web both are up and running.
    Please let me know where is the problem as soon as possible.
    Regards
    Sankar

    Hi,
    Instead of giving the address manually in the address bar you can start the Siebel Analytics Web as follows:-
    Start -> Programs -> Oracle Business Intelligence -> Presentation Services
    This will take you to the Login page. Make sure that Oracle BI Server and Oracle BI Presentation Server services are running.

  • Problem with Siebel Image Creator in Windows Seven OS

    Hi! i try to generate the siebel install image with the Image Creator for Windows OS. The version of Siebel that i download of edelivery is 8.1.1.5 for windows OS (32 bits).
    I have in my computer, windows seven OS (32 bits), but the Image Creator don't work well... I can't create the Siebel Install Image...
    Any ideas?
    Thanks,
    Regards

    Have you tried to run the Image Creator in XP mode and with Administrator rights?
    http://www.howtogeek.com/howto/windows-vista/using-windows-vista-compatibility-mode/
    Otherwise you can try to run it in console mode:
    http://siebel-essentials.blogspot.com/2011/01/siebel-image-creator-in-console-mode.html

  • Problems with Siebel HI Calendar since Microsoft Update KB2360131

    Hi Forum,
    has anyone lately installed KB2360131 in their companies? It is a cummulative security update for Internet Explorer Versions 6 through 8. After installing it, we were experiencing issues on our mobile client's HI calendar. Some buttons could not be displayed anymore, the font size was screwed. After uninstalling this patch it suddenly worked again.
    I have tested this with SEA 7.8.2.14 as well as SIA 8.1.1 on IE6 and IE8. Always the same issue ...
    I am wondering whether we are the only ones deploying Microsoft patches regularly :) :) : ??

    Mayumi,
    IT WORKS !
    now I am wondering what exactly that means .. ? When I try to put "res://C:\WINDOWS\Downloaded Program Files\SiebelAx_Calendar_XXXXX.dll/#405" into the trusted sites, it automatically substitues it with "about:internet". Would this not cause security issues? I'm not exactly sure what about:internet means in Internet Explorer.

  • Problem with descriptions in Siebel Configuration Wizzard

    Hi, I'm trying to solve problem with siebel 8.1.1,
    after reainstalation of Enterprise, SWSE, and webclient language (enu language package) on windows XP proffesional , after configuration of oracle 11g database, and IIS server,
    I found out that there are no messages shown in install shield Configuration Wizzard,
    there is no LANG parameter, SIEBEL_LANGUAGE environment variable, language and locale in system are set to English
    descriptions of fields in normal and with -is:javaconsole parameter look like:
    Press 1 for Next, 3 to Cancel or 4 to Redisplay [1] 1
    [ ] 1 - Create
    [ ] 2 - Modify
    [ ] 3 - Remove
    [ ] 4 - Exit
    instead of "Create new configuration"... Additional during configuration of gateway server there is new textbox called PrimaryLanguage. It looks like language file is not loaded with the wizzard, do you have any idea what can be the reason of the problem?
    when I use -is:log parameter, it outputs the following file:
    file type: 0
    file id: 0
    length: 187
    offset: 299095
    file name: instructions.txt
    file type: 5
    file id: 1
    length: 1009
    offset: 299282
    file name: Verify.jar
    file type: 2
    file id: 2
    length: 723
    offset: 300291
    file name: launch.txt
    file type: 4
    file id: 3
    length: 30106977
    offset: 301014
    file name: Windows-Sun-1.5.0.exe
    Executing launch script command: "C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE169.tmp/bin\java.exe" -cp "";"setup.jar";"" -Dtemp.dir="C:\DOCUME~1\mirek\USTAWI~1\Temp" -Dis.jvm.home="C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE169.tmp" -Dis.jvm.temp="1" -Dis.media.home="" -Dis.launcher.file="d:\sba81\gtwysrvr\BIN\ssincfgw.exe" -Dis.jvm.file="C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE169.tmp\jvm" -Dis.external.home="d:\sba81\gtwysrvr\BIN" -Xms64m -Xmx128m -Xss2m run "-args" "MODEL_FILE=d:\sba81\gtwysrvr\ADMIN\enterprise_console.scm" "-console" in working directory d:\sba81\gtwysrvr\BIN
    file type: 0
    file id: 0
    length: 187
    offset: 299095
    file name: instructions.txt
    file type: 5
    file id: 1
    length: 1009
    offset: 299282
    file name: Verify.jar
    file type: 2
    file id: 2
    length: 723
    offset: 300291
    file name: launch.txt
    file type: 4
    file id: 3
    length: 30106977
    offset: 301014
    file name: Windows-Sun-1.5.0.exe
    Executing launch script command: "C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE182.tmp/bin\java.exe" -cp "";"setup.jar";"" -Dtemp.dir="C:\DOCUME~1\mirek\USTAWI~1\Temp" -Dis.jvm.home="C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE182.tmp" -Dis.jvm.temp="1" -Dis.media.home="" -Dis.launcher.file="d:\sba81\gtwysrvr\BIN\ssincfgw.exe" -Dis.jvm.file="C:\DOCUME~1\mirek\USTAWI~1\Temp\LRE182.tmp\jvm" -Dis.external.home="d:\sba81\gtwysrvr\BIN" -Xms64m -Xmx128m -Xss2m run "-args" "MODEL_FILE=d:\sba81\gtwysrvr\ADMIN\enterprise_console_sia.scm" in working directory d:\sba81\gtwysrvr\BIN
    Output from the launch script execution
    StdOut:
    title Kreator konfiguracji aplikacji Siebel uruchomi oprogramowanie z następującymi ustawieniami:)
    ErrOut:
    Best regards,
    Mirek Lewandowski
    Edited by: user8366313 on 2009-07-14 02:25
    Edited by: user8366313 on 2009-07-14 03:15

    is there any tool to clean windows registry after siebel installation?

  • Siebel Problem With a Workflow Process (Pleaseee help REAL PROBLEM)

    Well the problem is this i have a designed a workflow who is called by a JOB. Its functionality is to close Service Requests at certain time in the night.
    when i simulate a workflow against 2 different Servers it works fine without errors, but when i run a job that calls this WP in those servers i have diferent errors in diferent steps.
    In one server i have this kind of error in the last step "Cerrar Requerimiento":
    SBL-EXL-00151
    SBL-SCR-00141
    SBL-BPR-00162
    This operation is not allowed when there are no records displayed.
    Please execute a query that returns at least one record or add a new record
    and in the other i have this error in the 3er step:
    SBL-SCR-00141- Problem Running a eScript
    in spanish:
    Error de tiempo de ejecuci?n de Siebel eScript en el procedimiento 'GetFieldValue' de BusComp [Action]:
    Error: SiebelError: Esta operaci?n no se permite cuando no hay registros mostrados. Ejecute una consulta que devuelva por lo menos un registro o agregue un nuevo registro.(SBL-DAT-00215)
    (SBL-SCR-00141)
    Error al invocar servicio 'BCH EAI Query Utility', m?todo 'UpdateRecord' en el paso 'Cerrar Actividades'.(SBL-BPR-00162)
    (error in the Runtime of the Siebel eScript in the process GetFieldValue of Action,This operation is not allowed when there are no records displayed.
    Please execute a query that returns at least one record or add a new record
    error invoking the service "BCH EAI Query Utility in the Method UpdateRecord in the step "Cerrar Actividades".
    If they have the same job and workflow, and BS's active(i use the BS in other workflows and no problem with it) why they give error in diferent steps but they work fine when i use the Business Simulator?, its there a solution?, this can be a problem about the server config or triggers??
    thanks a lot!

    Hi,
    1.Is you're server and youre client using the same version of SRF ?
    2.Is the version for workflow in server and the one youre testing in client are the same ?
    3. Last but not least this BCH EAI Query Utility search spec is it correct ? Can it able to return at least one record base on you're search spec because I know some business service are required to return at least one record else it will throw error.
    Thanks,
    Joey Tan , Malaysia

  • Problems with oracle adapters siebel 7.5.2 encoding ISO646-US

    Hi,
    I have to make a conexion with oracle adapters to siebel 7.5.2. I am using solaris 10 with 64 bits for or soa server and our siebel 7.5.2 server is on windows. I configure the adapter as Adapter for Siebel User's Guide. I changed the encoding like it said on Adding Required Encoding Option (All UNIX Platforms). The new enconding is utf-8. But when I try to connect to siebel it's getting and error with the encoding ISO646-US. I dont know where it is getting this enconding. Does anyone knows what it could be the problem?
    Regards,
    Ivan Loaiza.
    20080605-11:25:13 DEBUG com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory:adapter factory method: [GETTARGET]
    20080605-11:25:13 DEBUG com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory:iwae method: [GETTARGET] with idx [3]
    20080605-11:25:13 ERROR com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory:java.lang.IllegalStateException: Pág. de cód. "ISO646-US" no admit. Utilice "-encoding" para cambiar la codific. del arch.
         at com.ibi.adapter.siebelaf.SiebelAdapter.activate(SiebelAdapter.java:143)
         at com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory.handleGETTARGET(XDSOAPAdapterFactory.java:934)
         at com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory.processWithDB(XDSOAPAdapterFactory.java:1868)
         at com.iwaysoftware.ibse.iwse.XDSOAPAdapterFactory.process(XDSOAPAdapterFactory.java:186)
         at com.iwaysoftware.ibse.iwse.IBSEServlet.doPost(IBSEServlet.java:550)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Ivan
    Did you ever got around this issue? I'm having the exact same problem except I'm connecting with Siebel 6.3.
    Thanks in advance
    Alex

  • Installation problem with Siebel8.0 on Oracle Enterprise Linux 4 system

    We are having installation problem with Siebel8.0 on Oracle Enterprise Linux 4 system.
    Using interface, when installation come up to “Installing Wizard” window where Gateway Name Server Configuration window should take place, everything just freeze up
    Using console, after installation we obtain following errors:
    Installing Siebel Enterprise Server. Please wait...
    unable to launch: "ksh export
    LD_LIBRARY_PATH=/siebel/gtwysrvr/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/gtwysrvr/bin/setup.jar run -args LANG=ENU
    MODE=LIVE MODEL_FILE=/siebel/gtwysrvr/admin/enterprise_console.scm" error code:
    "236"(SBL-STJ-00152)
    LD_LIBRARY_PATH=/siebel/siebsrvr/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/siebsrvr/bin/setup.jar run -args LANG=ENU
    REPEAT=FALSE MODE=LIVE MODEL_FILE=/siebel/siebsrvr/admin/siebel_server.scm"
    error code: "236"(SBL-STJ-00152)
    LD_LIBRARY_PATH=/siebel/siebsrvr/mgmtagent/lib;PATH=${PATH}:.;/root/istemp8058094162222/_bundledJRE_/bin/java
    -Dtemp.dir=/root -cp /siebel/siebsrvr/mgmtagent/bin/setup.jar run -args
    LANG=ENU MODE=LIVE
    MODEL_FILE=/siebel/siebsrvr/mgmtagent/admin/mgmtagent_ses.scm" error code:
    "236"(SBL-STJ-00152)
    Running command :
    ./ssincfgw -is:javaconsole -console -args LANG=ENU MODE=LIVE MODEL_FILE=/siebel/gtwysrvr/admin/enterprise_console.scm
    Infinite loop of following error pops out:
    An error occurred during wizard bean change notification:
    java.lang.NoClassDefFoundError
    at ConfigInitialize.execute(ConfigInitialize.java:21)
    at com.installshield.wizard.StandardWizardListener.execute(StandardWizardListener.java:123)
    Is there any clue how this error can be solved??
    Thanks in advance!!
    Gordon
    Message was edited by:
    user605023

    I'm facing the same error message while install Siebel 8.0 on OEL. But before I had this ksh problem, it complains about disc space first, and I actually has plenty of disk space under the directory (it needs only 0.7 G and I have 17G free). Anybody has encountered such problem before?
    /net/sdcnas05/vol/engfs01/v_sia/8.0SIA[20405|http://forums.oracle.com/forums/]/Release/Linux/Server/Siebel_Enterprise_Server
    -bash-3.00$ ./setuplinux -is:javaconsole -console
    Initializing InstallShield Wizard........
    Initializing InstallShield Wizard........
    Launching InstallShield Wizard........
    0% 25% 50% 75% 100%
    Welcome to the InstallShield Wizard for Siebel Enterprise Server
    The InstallShield Wizard will install Siebel Enterprise Server on your
    computer.
    To continue, choose Next.
    Siebel Enterprise Server
    Siebel Systems
    Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]
    Siebel Enterprise Server Install Location
    Please specify a directory or press Enter to accept the default directory.
    Directory Name: [siebel] /slot/ems1115/appmgr/20405
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Please select the products you wish to install.
    [ ] 1 - Gateway Name Server
    [ ] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]: 1
    [X] 1 - Gateway Name Server
    [ ] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]: 2
    [X] 1 - Gateway Name Server
    [X] 2 - Siebel Server
    [ ] 3 - Database Configuration Utilities
    [ ] 4 - EAI Connectors
    To select an item enter its number, or 0 when you are finished: [0]:
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Configuring uninstallers. Please wait...
    0% 25% 50% 75% 100%
    Choose the setup type that best suits your needs.
    [X] 1 - Typical
    [ ] 2 - Compact
    [ ] 3 - Custom
    To select an item enter its number, or 0 when you are finished: [0]
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    Please select the languages you wish to install.
    [X] 1 - enu - English (American)
    [ ] 2 - fin - Finnish
    [ ] 3 - kor - Korean
    [ ] 4 - cht - Chinese (Traditional)
    [ ] 5 - ita - Italian (Standard)
    [ ] 6 - esn - Spanish (Modern)
    [ ] 7 - deu - German (Standard)
    [ ] 8 - chs - Chinese (Simplified)
    [ ] 9 - tha - Thai
    [ ] 10 - dan - Danish
    [ ] 11 - heb - Hebrew
    [ ] 12 - fra - French (Standard)
    [ ] 13 - nld - Dutch (Standard)
    [ ] 14 - ptb - Portuguese (Brazilian)
    [ ] 15 - csy - Czech
    [ ] 16 - jpn - Japanese
    [ ] 17 - ptg - Portuguese (Standard)
    [ ] 18 - ara - Arabic (Sa`udi)
    [ ] 19 - sve - Swedish
    To select an item enter its number, or 0 when you are finished: [0]
    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]
    {color:#ff0000}*Drive "/slot/ems1115/appmgr/20405" does not have enough space to install the*
    selected configuration. Please free up "766446" KB on drive
    *"/slot/ems1115/appmgr/20405" before continuing.*{color}
    -bash-3.00$ pwd
    /slot/ems1115/appmgr/20405
    -bash-3.00$ df -h .
    Filesystem Size Used Avail Use% Mounted on
    sdc1002nap-vlan1:/vol/ems_39426_1115
    71G 55G 17G 77% /slot/ems1115

  • Problem with change capture

    HI,
    we've a problem with the Change Capture in the DAC's Execution Plan.
    We've cretead a new data model but we want to reuse the image table and the Change Capture process, so we've perfomed the following step:
    1) create the mapping SDE e SIL for the new tables of datamodel in Informatica Power Center
    2) register these mapping in the DAC
    3) create a subject areas and associate these tasks to this
    4) create execution plan including "change capture" and "change capture sync"
    5) execute our "execution plan"
    the problem is the following:
    from the Execute -> Current Run Tab -> task
    we can see that execution time of change capture is 0
    from the Execute -> Current Run Tab -> task details
    there aren't any change capture details
    So, our image table are empty.
    Do you have any idea?
    Thanks in advance,
    Antonello.

    HI Antonello,
    I am also having the same issue like you. I have created a new execution plan in DAC 101341 and ran it. It seems like the task Change Capture For Siebel OLTP completed in 0 seconds and there are no details for that particular task. Can you please let me know if you have resolved this issue? Your help is much appreciated.
    Thanks
    Ravi

  • Problem with IDOCs

    Hi all,
    I am trying to send MATMAS IDOCs to Siebel server using plain HTTP Reciever Adapter.I am able to see success messages in SXMB_MONI for Some IDOCs I mean where the IDOC have minimum segments which does not contains mandatory data.
    In some IDOCs it is showing the following error which includes all the relavant fields for Siebel.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_SERVER</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3>Internal Server Error</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Http server code 500 reason Internal Server Error explanation Internal Server Error</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Any ideas on this ???
    Sekhar

    Hi all,
    sorry for the confusion...problem with the IDOC data only..
    Sekhar

  • 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();
    }

  • 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

Maybe you are looking for

  • Operation does not fetch in process order

    hi PP-Pi gru, when i am creating process order from planed order , operation ( master recipe) does not fetch in process order..only take default operation 10, kindly suggest me how all operation will fetch in process order another mater is when assig

  • Server Problem, thanks for your help

    Hi there, We have 2 informix database instabce running on same machine. Call devdb and systestdb. The structure are same. The question is, when I run application on systestdb, it works. But if i run same app on devdb, seems nothing happen. I do belie

  • Service po short close for  project closure

    Dear All, My client has a project which is to be closed but there is committment in service po we have tried to set a final service entry indicator and final invoice still the commitment remains is there any other way that can be closed Regards, Reen

  • Buttons in Report Component

    Hi How to add a button in a report that will update the current record ??? null

  • Setting jdbc classpath in xp, completely stuck

    I must be going crazy cause i could swear i posted my msg but it never showed up later on, on the forum so here i go again Plateform: XP java file: ConTest.java I am trying to add a classpath to a jdbc drvier (lets calls it jdbcdriver.jar in d:\temp)