Threads threads threads...

Hi,
I�d like to know if anybody has experimeted with following scenario:
I`m experimenting with a web application that runs on Tomcat 4.0.2 and it uses MySQL database. A servlet runs on a background that uses Jakarta Turbine to give database connections from the pool for each user.
In the "worst" scenario I can have multiple users on the JSP pages and each one has a connection to the database ( from the pool ), and each user can read and write the same data.
It`s really hard to find any info if these kind of scenarious are really thread safe. Most importantly are read/write operations on the same data atomic ( multiple threads / users using the same data ).
And if the database scenario would be thread / transaction safe, how does the Tomcat ( JSP -pages ) survive in the described scenario?
Any experience or knowledge?
Regards,
eki

Yes, I've encountered the same issue and as mentioned before - transactions are there exactly for that. BUT --
My scenario was that I needed to read a row from a table and than update it according to what I've just read. Meaning:
tx.begin()
select
update
tx.commit()
I've achieved that using TRANSACTION_SERIALIZABLE isolation level and I also HAD to specify the following table hint in the select statement: WITH (UPDLOCK). The later is needed in order to prevent any reads while in the transaction (reading or updating).
The only think I could not do is lock only the selected row and not the entire table (MS SQL 2000).
If anyone knows how to achieve that it'll make me a happy man...
Alon

Similar Messages

  • JMS error- Exception in thread "Main Thread" java.lang.NoClassDefFoundError

    Hi guys,
    I am new to JMS programming and i'm have the following error...I have set up a simple weblogic server on my local machine and i am trying to send a message to a queue i've created on a JMS server. I am trying to manually run an example provided by BEA WebLogic... the code follows.
    //package examples.jms.queue;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    /** This example shows how to establish a connection
    * and send messages to the JMS queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received, and to browse the queue
    * for messages. The class is used to send messages to the queue.
    * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
    public class QueueSend
      // Defines the JNDI context factory.
      public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
      // Defines the JMS context factory.
      public final static String JMS_FACTORY="weblogic.examples.jms.QueueConnectionFactory";
      // Defines the queue.
      public final static String QUEUE="weblogic.examples.jms.exampleQueue";
      private QueueConnectionFactory qconFactory;
      private QueueConnection qcon;
      private QueueSession qsession;
      private QueueSender qsender;
      private Queue queue;
      private TextMessage msg;
       * Creates all the necessary objects for sending
       * messages to a JMS queue.
       * @param ctx JNDI initial context
       * @param queueName name of queue
       * @exception NamingException if operation cannot be performed
       * @exception JMSException if JMS fails to initialize due to internal error
      public void init(Context ctx, String queueName)
        throws NamingException, JMSException
        qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
        qcon = qconFactory.createQueueConnection();
        qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        queue = (Queue) ctx.lookup(queueName);
        qsender = qsession.createSender(queue);
        msg = qsession.createTextMessage();
        qcon.start();
       * Sends a message to a JMS queue.
       * @param message  message to be sent
       * @exception JMSException if JMS fails to send message due to internal error
      public void send(String message) throws JMSException {
        msg.setText(message);
        qsender.send(msg);
       * Closes JMS objects.
       * @exception JMSException if JMS fails to close objects due to internal error
      public void close() throws JMSException {
        qsender.close();
        qsession.close();
        qcon.close();
    /** main() method.
      * @param args WebLogic Server URL
      * @exception Exception if operation fails
      public static void main(String[] args) throws Exception {
        if (args.length != 1) {
          System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
          return;
        System.out.println(args[0]);
        InitialContext ic = getInitialContext(args[0]);
        QueueSend qs = new QueueSend();
        qs.init(ic, QUEUE);
        readAndSend(qs);
        qs.close();
      private static void readAndSend(QueueSend qs)
        throws IOException, JMSException
        BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
        String line=null;
        boolean quitNow = false;
        do {
          System.out.print("Enter message (\"quit\" to quit): \n");
          line = msgStream.readLine();
          if (line != null && line.trim().length() != 0) {
            qs.send(line);
            System.out.println("JMS Message Sent: "+line+"\n");
            quitNow = line.equalsIgnoreCase("quit");
        } while (! quitNow);
      private static InitialContext getInitialContext(String url)
        throws NamingException
        Hashtable<String,String> env = new Hashtable<String,String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
        env.put(Context.PROVIDER_URL, url);
        return new InitialContext(env);
    }when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.

    when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.This is Java 101:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rtrb_classload_viewer.html
    You've got to have the WebLogic JAR that contains the necessary .class files in your CLASSPATH when you run.
    Don't use a CLASSPATH environment variable; use the -classpath option when you run.
    %

  • Exception in thread "JMF thread???

    I try to write a very simple project which just play a local media in an Applet, although this example can be found in a lot of places, I met an Exception which kind of strange, Can anyone met this before? My Code is very simple.
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.*;
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.*;
    import javax.swing.*;
    public class test1 extends Applet{
         URL url;
         Player player=null;
         public void init(){
              setLayout( new BorderLayout() );
              try {
                   URL mediaURL = new URL(getDocumentBase(), "A Perfect Indian.mp3");
                   System.out.println(mediaURL);
                   player = Manager.createRealizedPlayer(mediaURL);
              }catch(Exception e){
                   System.out.println("problems here 1");
                   e.printStackTrace();
    Exception in thread "JMF thread: com.sun.media.amovie.AMController@7c6768[ com.sun.media.amovie.AMController@7c6768 ] ( realizeThread)" java.lang.UnsatisfiedLinkError: com.sun.media.amovie.ActiveMovie.openFile(Ljava/lang/String;)Z
         at com.sun.media.amovie.ActiveMovie.openFile(Native Method)
         at com.sun.media.amovie.ActiveMovie.<init>(ActiveMovie.java:47)
         at com.sun.media.amovie.AMController.createActiveMovie(AMController.java:293)
         at com.sun.media.amovie.AMController.doRealize(AMController.java:416)
         at com.sun.media.RealizeWorkThread.process(BasicController.java:1400)
         at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)

    An unsatisfied link error occurs when the JVM cannot find a class in a library that it was expecting to be able to find.
    In this instance, it sounds like you (1) didn't include JMF.jar in your applet's classpath, and/or (2) didn't include the MP3 plugin to your applet's classpath...

  • Workflow is Canceled instantly - System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    I am trying to solve some issues and strange behaviour with an important workflow hooked up with an InfoPath 2010 list in SharePoint 2010. Everything worked fine until now.
    One workflow item has ended prematurely with the workflow history messages "An error has occurred in workflowname" followed by some init text message I added, and finally "Could not start workflowname"
    (not sure of the exact translation but something like that). Status is still "On Going" (again not sure of translation).
    The workflows after this has gotten the status "Canceled" with no further error messages. However the first init text I added is visible in their workflow history but no other messages are displayed, neither my custom ones nor
    the built in.
    Please help me out, any hints or pointers to help debug this is very appreciated! I do not have other than "view" access so I will have to tell the IT-department to check logs and perform changes if needed.
    /Jesper Wilfing
    Edit: The IT guys sent me the error message from the log file:
    Workflow Infrastructure       72fq
     Unexpected Start Workflow: System.Threading.ThreadAbortException: Thread was being aborted.

    Hi,
    Thank you for sharing and it will help others who meet the same issue.
    Best regards,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint

    Hi,
    I have an application jar file which is run from a .sh file.
    The application uses ridc api to checkin a document on UCM.
    I have placed jars for supporting the application on the folder where we have kept the application jar
    also we have mentioned the supporting jar file names in the Manifest.mf file of the application jar.
    The necessary jar files which we have placed are:
    com.lnt.ucm.integrationutility.ucm.Client
    log4j-1.2.16.jar
    oracle.ucm.ridc-11.1.1.jar
    poi-2.5.1.jar
    commons-codec-1.2.jar
    commons-httpclient-3.1.jar
    commons-logging-1.0.4.jar
    mail.jar
    jxl-2.6.10.jar
    com.bea.core.antlr.runtime_2.7.7.jar
    com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar
    jrf.jar
    org.eclipse.persistence_1.1.0.0_2-1.jar
    weblogic.jar
    wlfullclient.jar
    wseeclient.jar
    jaxws-rt-2.1.4.jar
    we are getting below exception when we run the jar from the .sh file.
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint
    at weblogic.wsee.jaxws.spi.WLSProvider.<clinit>(WLSProvider.java:90)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:31)
    at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
    at javax.xml.ws.spi.Provider.provider(Provider.java:83)
    at javax.xml.ws.Service.<init>(Service.java:56)
    at com.abc.ucm.proxy.JDEUCMManagerService.<init>(JDEUCMManagerService.java:66)
    at com.abc.ucm.integrationutility.ucm.Client.executeUtilty(Client.java:50)
    at com.abc.ucm.integrationutility.ucm.Client.main(Client.java:540)
    I'm not able to find any jar for weblogic/diagnostics/instrumentation/JoinPoint can you please tell me which jar needs to be added.
    Regards,
    Tejaswini L

    914897 wrote:
    I encounter the similar error. Anyone knows how to fix it?By providing a configuration file which validates with the corresponding XSDs found in coherence.jar. Sorry, but can't point you to the specific issue without seeing the erroneous configuration file.
    Best regards,
    Robert

  • Creating Threads : New thread doesn't run( )

    Hello !
    Can anyone please check the error in this code. It does not start the new thread.
    God bless you.
    NADEEM.
    // Create a second thread
    class NewThread implements Runnable {
      Thread t ;
      NewThread() {
      try {
       t = new Thread(this.t , "New Thread");           // Create a new, second thread.
       System.out.println("Child Thread : " + t);
       t.start();                                        // start the thread.
       }catch (IllegalThreadStateException e) {
         System.out.println("Exception : " + e);
      //Entry point for the second thread.
      public void run() {
       try {
        for(int i = 5; i > 0; i--) {
        System.out.println("Child Thread  : " + i);
        Thread.sleep(500);
       }catch (InterruptedException e) {
         System.out.println("Child Thread interrupted ");
       System.out.println("Exiting Child Thread... ");
    class CreatingThread {
    public static void main(String args[]) {
       new NewThread();    // Create a new Thread
       try {
        for(int i = 5; i > 0; i--) {
         System.out.println("Main Thread : " + i);
         Thread.sleep(1000);
       } catch (InterruptedException e) {
         System.out.println("Main Thread interrupted ");
       System.out.println("Exiting main thread ");

    are you sure Nadeem...i compiled and ran the below code and it works as you designed it...what errors do u get when u try to compile?...
    class NewThread implements Runnable {
      Thread t ;
      NewThread() {
      try {
       t = new Thread(this , "New Thread");           // Create a new, second thread.
       System.out.println("Child Thread : " + t);
       t.start();                                        // start the thread.
       }catch (IllegalThreadStateException e) {
         System.out.println("Exception : " + e);
      //Entry point for the second thread.
      public void run() {
       try {
        for(int i = 5; i > 0; i--) {
        System.out.println("Child Thread  : " + i);
        Thread.sleep(500);
       }catch (InterruptedException e) {
         System.out.println("Child Thread interrupted ");
       System.out.println("Exiting Child Thread... ");
    class CreatingThread {
    public static void main(String args[]) {
       new NewThread();    // Create a new Thread
       try {
        for(int i = 5; i > 0; i--) {
         System.out.println("Main Thread : " + i);
         Thread.sleep(1000);
       } catch (InterruptedException e) {
         System.out.println("Main Thread interrupted ");
       System.out.println("Exiting main thread ");
    }

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: start

    Hi
    I am Migrating my app from weblogic 8.1 to 10.3 . I am trying to run the startWeblogic.sh file its failing with below error .Please suggest me am unable to resolve
    CLASSPATH=:/opt/bea/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/bea/jrockit_160_14/lib/tools.jar:/opt/bea/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/bea/wlserver_10.3/server/lib/weblogic.jar:/opt/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/opt/bea/wlserver_10.3/server/lib/webservices.jar:/opt/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/opt/bea/wlserver_10.3/common/eval/pointbase/lib/pbclient57.jar:/opt/bea/wlserver_10.3/server/lib/xqrl.jar::
    PATH=/opt/bea/wlserver_10.3/server/bin:/opt/bea/modules/org.apache.ant_1.6.5/bin:/opt/bea/jrockit_160_14/jre/bin:/opt/bea/jrockit_160_14/bin:/usr/local/bin:/bin:/usr/bin:/home/quoteapp/bin:/prod/qcquoting/bin:/home/quoteapp/bin/apache-ant-1.6.5/bin:/opt/bea/jrockit_160_14/bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http://hostname:port/console *
    starting weblogic with Java version:
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    BEA JRockit(R) (build R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-x86_64, compiled mode)
    Starting WLS with line:
    /opt/bea/jrockit_160_14/bin/java -jrockit -Xms256m -Xmx512m -Xverify:none -da -Dplatform.home=/opt/bea/wlserver_10.3 -Dwls.home=/opt/bea/wlserver_10.3/server -Dweblogic.home=/opt/bea/wlserver_10.3/server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/opt/bea/patch_wlw1030/profiles/default/sysext_manifest_classpath:/opt/bea/patch_wls1030/profiles/default/sysext_manifest_classpath:/opt/bea/patch_cie660/profiles/default/sysext_manifest_classpath -Dweblogic.Name=quoting -Djava.security.policy=/opt/bea/wlserver_10.3/server/lib/weblogic.policy start weblogic.Server
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: start
    Could not find the main class: start. Program will exit.
    am attaching my sh file aslo below
    !/bin/sh
    # WARNING: This file is created by the Configuration Wizard.
    # Any changes to this script may be lost when adding extensions to this configuration.
    # --- Start Functions ---
    stopAll()
         # We separate the stop commands into a function so we are able to use the trap command in Unix (calling a function) to stop these services
         if [ "X${ALREADY_STOPPED}" != "X" ] ; then
              exit
         fi
         # STOP POINTBASE (only if we started it)
         if [ "${POINTBASE_FLAG}" = "true" ] ; then
              echo "Stopping PointBase server..."
              ${WL_HOME}/common/bin/stopPointBase.sh -port=${POINTBASE_PORT} -name=${POINTBASE_DBNAME} >"${DOMAIN_HOME}/pointbaseShutdown.log" 2>&1
              echo "PointBase server stopped."
         fi
         ALREADY_STOPPED="true"
         # Restore IP configuration the node manager starts IP Migration
         if [ "${SERVER_IP}" != "" ] ; then
              ${WL_HOME}/common/bin/wlsifconfig.sh -removeif "${IFNAME}" "${SERVER_IP}"
         fi
    # --- End Functions ---
    # This script is used to start WebLogic Server for this domain.
    # To create your own start script for your domain, you can initialize the
    # environment by calling @USERDOMAINHOME/setDomainEnv.
    # setDomainEnv initializes or calls commEnv to initialize the following variables:
    # BEA_HOME - The BEA home directory of your WebLogic installation.
    # JAVA_HOME - Location of the version of Java used to start WebLogic
    # Server.
    # JAVA_VENDOR - Vendor of the JVM (i.e. BEA, HP, IBM, Sun, etc.)
    # PATH - JDK and WebLogic directories are added to system path.
    # WEBLOGIC_CLASSPATH
    # - Classpath needed to start WebLogic Server.
    # PATCH_CLASSPATH - Classpath used for patches
    # PATCH_LIBPATH - Library path used for patches
    # PATCH_PATH - Path used for patches
    # WEBLOGIC_EXTENSION_DIRS - Extension dirs for WebLogic classpath patch
    # JAVA_VM - The java arg specifying the VM to run. (i.e.
    # - server, -hotspot, etc.)
    # USER_MEM_ARGS - The variable to override the standard memory arguments
    # passed to java.
    # PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
    # POINTBASE_HOME - Point Base home directory.
    # POINTBASE_CLASSPATH
    # - Classpath needed to start PointBase.
    # Other variables used in this script include:
    # SERVER_NAME - Name of the weblogic server.
    # JAVA_OPTIONS - Java command-line options for running the server. (These
    # will be tagged on to the end of the JAVA_VM and
    # MEM_ARGS)
    # For additional information, refer to the WebLogic Server Administration
    # Console Online Help(http://e-docs.bea.com/wls/docs103/ConsoleHelp/startstop.html).
    # Call setDomainEnv here.
    DOMAIN_HOME=/prod/qcquoting/int/builds/qoaquoting
    . ${DOMAIN_HOME}/bin/setDomainEnv.sh $*
    SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}"
    SAVE_CLASSPATH="${CLASSPATH}"
    # Start PointBase
    PB_DEBUG_LEVEL="0"
    if [ "${POINTBASE_FLAG}" = "true" ] ; then
         ${WL_HOME}/common/bin/startPointBase.sh -port=${POINTBASE_PORT} -debug=${PB_DEBUG_LEVEL} -console=false -background=true -ini=${DOMAIN_HOME}/pointbase.ini >"${DOMAIN_HOME}/pointbase.log" 2>&1
    fi
    JAVA_OPTIONS="${SAVE_JAVA_OPTIONS}"
    SAVE_JAVA_OPTIONS=""
    CLASSPATH="${SAVE_CLASSPATH}"
    SAVE_CLASSPATH=""
    trap 'stopAll' 1 2 3 15
    if [ "${PRODUCTION_MODE}" = "true" ] ; then
         WLS_DISPLAY_MODE="Production"
    else
         WLS_DISPLAY_MODE="Development"
    fi
    if [ "${WLS_USER}" != "" ] ; then
         JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.username=${WLS_USER}"
    fi
    if [ "${WLS_PW}" != "" ] ; then
         JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.management.password=${WLS_PW}"
    fi
    CLASSPATH="${CLASSPATH}${CLASSPATHSEP}${MEDREC_WEBLOGIC_CLASSPATH}"
    CLASSPATH="${CLASSPATH}${CLASSPATHSEP}./config/order_properties/"
    echo "."
    echo "."
    echo "JAVA Memory arguments: ${MEM_ARGS}"
    echo "."
    echo "WLS Start Mode=${WLS_DISPLAY_MODE}"
    echo "."
    echo "CLASSPATH=${CLASSPATH}"
    echo "."
    echo "PATH=${PATH}"
    echo "."
    echo "***************************************************"
    echo "* To start WebLogic Server, use a username and *"
    echo "* password assigned to an admin-level user. For *"
    echo "* server administration, use the WebLogic Server *"
    echo "* console at http://hostname:port/console *"
    echo "***************************************************"
    # Set up IP Migration related variables.
    # Set interface name.
    if [ "${Interface}" != "" ] ; then
         IFNAME="${Interface}"
    else
         IFNAME=""
    fi
    # Set IP Mask.
    if [ "${NetMask}" != "" ] ; then
         IPMASK="${NetMask}"
    else
         IPMASK=""
    fi
    # Perform IP Migration if SERVER_IP is set by node manager.
    if [ "${SERVER_IP}" != "" ] ; then
         ${WL_HOME}/common/bin/wlsifconfig.sh -addif "${IFNAME}" "${SERVER_IP}" "${IPMASK}"
    fi
    # START WEBLOGIC
    echo "starting weblogic with Java version:"
    ${JAVA_HOME}/bin/java ${JAVA_VM} -version
    if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
         echo "Starting WLS with line:"
         echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${PROXY_SETTINGS} ${SERVER_CLASS}"
         ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${PROXY_SETTINGS} ${SERVER_CLASS}
    else
         echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
         ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
    fi
    stopAll
    popd
    # Exit this script only if we have been told to exit.
    if [ "${doExitFlag}" = "true" ] ; then
         exit
    fi

    I can not see main class weblogic.jar file in your class path.
    Under MW_HOME there is a file by name configure.cmd/sh, run it to set acl and class path. Then try to start weblogic server. U can edit the startWeblogic.sh/cmd so that every time it will execute after calling configure.sh/cmd file.

  • Collection not in context? java.lang.Exception: java.lang.Thread.dumpStack(Thread.java:1342)

    Hi
    I am using JDev12c. I have an isolated taskflow that is consuming three more taskflow as a region.
    This is the scenario: I have a viewObject showing UserDetails. So I have make a taskflow to show the user details in a form. Now, the userDetalsVO has a ViewLink with itself (Managers having employees under their supervision).
    LoggedInUser (userVO)
         - Employees (userVO)
    I have created the list of employee using the Employees Iterator. However, every time I select an employee the console throw the following error:
    <The row key or row index of a UIXCollection component is being changed outside of the components context. Changing the key or index of a collection when the collection is not currently being visited, invoked on, broadcasting an event or processing a lifecycle method, is not valid. Data corruption and errors may result from this call. Turn on fine level logging for a stack trace of this call. Component ID: {0}>
    java.lang.Exception: Stack trace:
    at java.lang.Thread.dumpStack(Thread.java:1342)
      at org.apache.myfaces.trinidad.component.UIXCollection._verifyComponentInContext(UIXCollection.java:2212)
      at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:524)
      at oracle.adf.view.rich.component.rich.data.RichListView.visitChildren(RichListView.java:112)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at oracle.adf.view.rich.component.fragment.UIXRegion.visitChildren(UIXRegion.java:952)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at oracle.adf.view.rich.component.fragment.UIXRegion.visitChildren(UIXRegion.java:952)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXShowOne.visitTree(UIXShowOne.java:135)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._deliverPostRestoreStateEvents(LifecycleImpl.java:852)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:791)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    The front end behaves fine though but that error in the console is bugging me.
    Any Ideas??
    Regards

    Well, have you run the app with logging set to fine as the message suggested?
    Turn on fine level logging for a stack trace of this call. Component ID: {0}
    Then a test case and a detailed description on how to reproduce the error, built on the hr  schema, can help.
    Timo

  • JpegImagesToMovie - Exception in thread "JMF thread: SendEventQueue: com.su

    I am trying to create a movie file from a bunch of images I have using Sun's JpegImagesToMovie class found here:
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html
    I can't post all 500 lines of the sample code here but it's unchanged from the download page above. The error is happening at the following line, almost at the end:
    raFile = new RandomAccessFile(imageFile, "r");Here is what happens when I run it. I have to hit CTRL+C in order to get it to come back to the prompt once it breaks. Any ideas?
    C:\Users\admin\workspace\Tester\bin>java JpegImagesToMovie -w 320 -h 240 -f 5 -o
    file:/c:/images/movie.mov file:/c:/images/picture1.jpg file:/c:/images/picture2.jpg file:/c:/images/picture3.jpg file:/c:/images/picture4.jpg file:/c:/images/picture5.jpg file:/c:/images/picture6.jpg file:/c:/images/picture7.jpg
    file:/c:/images/picture8.jpg file:/c:/images/picture9.jpg file:/c:/images/picture10.jpg file:/c:/images/picture11.jpg file:/c:/images/picture12.jpg file:/c:/images/picture13.jpg file:/c:/images/picture14.jpg file:/c:/images/picture15.jpg
    file:/c:/images/picture16.jpg file:/c:/images/picture17.jpg file:/c:/images/picture18.jpg file:/c:/images/picture19.jpg file:/c:/images/picture20.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:/c:/images/movie.mov
    start processing...
      - reading image file: file:/c:/images/picture1.jpg
      - reading image file: file:/c:/images/picture2.jpg
      - reading image file: file:/c:/images/picture3.jpg
      - reading image file: file:/c:/images/picture4.jpg
      - reading image file: file:/c:/images/picture5.jpg
      - reading image file: file:/c:/images/picture6.jpg
      - reading image file: file:/c:/images/picture7.jpg
      - reading image file: file:/c:/images/picture8.jpg
      - reading image file: file:/c:/images/picture9.jpg
      - reading image file: file:/c:/images/picture10.jpg
      - reading image file: file:/c:/images/picture11.jpg
      - reading image file: file:/c:/images/picture12.jpg
      - reading image file: file:/c:/images/picture13.jpg
      - reading image file: file:/c:/images/picture14.jpg
      - reading image file: file:/c:/images/picture15.jpg
      - reading image file: file:/c:/images/picture16.jpg
      - reading image file: file:/c:/images/picture17.jpg
      - reading image file: file:/c:/images/picture18.jpg
      - reading image file: file:/c:/images/picture19.jpg
      - reading image file: file:/c:/images/picture20.jpg
    Done reading all images.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.NullPointerException
            at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescript
    ion(QuicktimeMux.java:936)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.j
    ava:925)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.j
    ava:905)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.j
    ava:806)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.j
    ava:727)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.j
    ava:644)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.j
    ava:582)
            at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux
    .java:519)
            at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
            at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
            at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
            at com.sun.media.BasicController.close(BasicController.java:261)
            at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
            at com.sun.media.BasicController.close(BasicController.java:261)
            at JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:230)
            at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254
            at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
            at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
            at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)

    Damn, give me enough time and I might figure this out myself.
    So after a little searching I figured out you don't have to put the file prefix in front of the image locations so I retried it with the following and it seemed to have worked:
    C:\Users\admin\workspace\Tester\bin>java JpegImagesToMovie -w 320 -h 240 -f 5 -o file:/c:/images/movie2.mov
    c:/images/picture1.jpg c:/images/picture2.jpg c:/images/picture3.jpg c:/images/picture4.jpg c:/images/picture5.jpg
    c:/images/picture6.jpg c:/images/picture7.jpg c:/images/picture8.jpg c:/images/picture9.jpg
    c:/images/picture10.jpg c:/images/picture11.jpg c:/images/picture12.jpg c:/images/picture13.jpg c:/images/picture14.jpg
    c:/images/picture15.jpg c:/images/picture16.jpg c:/images/picture17.jpg c:/images/picture18.jpg c:/images/picture19.jpg
    c:/images/picture20.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:/c:/images/movie2.mov
    start processing...
      - reading image file: c:/images/picture1.jpg
        read 19298 bytes.
      - reading image file: c:/images/picture2.jpg
        read 19316 bytes.
      - reading image file: c:/images/picture3.jpg
        read 19282 bytes.
      - reading image file: c:/images/picture4.jpg
        read 19260 bytes.
      - reading image file: c:/images/picture5.jpg
        read 19270 bytes.
      - reading image file: c:/images/picture6.jpg
        read 19301 bytes.
      - reading image file: c:/images/picture7.jpg
        read 19283 bytes.
      - reading image file: c:/images/picture8.jpg
        read 19319 bytes.
      - reading image file: c:/images/picture9.jpg
        read 19222 bytes.
      - reading image file: c:/images/picture10.jpg
        read 19141 bytes.
      - reading image file: c:/images/picture11.jpg
        read 19009 bytes.
      - reading image file: c:/images/picture12.jpg
        read 19016 bytes.
      - reading image file: c:/images/picture13.jpg
        read 18985 bytes.
      - reading image file: c:/images/picture14.jpg
        read 18902 bytes.
      - reading image file: c:/images/picture15.jpg
        read 18865 bytes.
      - reading image file: c:/images/picture16.jpg
        read 18884 bytes.
      - reading image file: c:/images/picture17.jpg
        read 18923 bytes.
      - reading image file: c:/images/picture18.jpg
        read 19031 bytes.
      - reading image file: c:/images/picture19.jpg
        read 19290 bytes.
      - reading image file: c:/images/picture20.jpg
        read 19474 bytes.
    Done reading all images.
    ...done processing.However, when I try to play the movie2.mov output file in either Windows Media Player or Quicktime, both of them crash before playing anything.
    Edited by: DeX on Feb 26, 2008 12:50 PM

  • Constant Safari crashes while using flash: Exception Type:  EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000002078 Crashed Thread:  0  Thread 0 Crashed: 0   ...lashPlayer-10.4-10.5.plugin     0x1c2a5245 NP_Initialize   1564

    I keep reporting this to Apple...I'm using a Macbook Pro with OS 10.5.8 (I have a DVD here with 10.6, but the mac sees this as a blank DVD, so I can't update the OS, and this DVD came with my purchase; that's one issue). The other big issue are the constant crashes while using Safari. It's happening several times a day, usually when Flash is involved:
    Exception Type:  EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000002078
    Crashed Thread:  0
    Thread 0 Crashed:
    0   ...lashPlayer-10.4-10.5.plugin          0x1c2a5245 NP_Initialize + 1564869
    1   ...lashPlayer-10.4-10.5.plugin          0x1c2a8af8 NP_Initialize + 1579384
    2   ...lashPlayer-10.4-10.5.plugin          0x1c29a2ed NP_Initialize + 1519981
    3   ...lashPlayer-10.4-10.5.plugin          0x1c1213d7 unregister_ShockwaveFlash + 444951
    4   ...lashPlayer-10.4-10.5.plugin          0x1c121865 unregister_ShockwaveFlash + 446117
    etc....

    Yeah, I've already updated to latest version of Flash.

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/

    hi,
    I am getting error message when i run HttpClient in my java class. Will the HttpClient will work in weblogic.
    HttpClient httpclient = new HttpClient();
    I added "commons-httpclient-3.1.jar" in the class path also.
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/kernel/KernelLogManager
         at weblogic.logging.commons.LogImpl.<init>(LogImpl.java:14)
         at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:21)
         at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:18)
         at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66)
    Thanks
    Manu

    Again you need to make a difference between what runs within the weblogic container to what runs in a vanilla JVM. Understanding this is crucial to your problem.
    1. web service -> client -> another web service
    The webservice will always run within the weblogic container and you should never get the ClassnotFound because weblogic.jar is always available there. Any subsequent clients loaded into the same JVM will presumably be in the same classloader and wont have problems either
    2. client -> web service;
    If you are using a standalone client in a JVM you shouldnt have any dependency on weblogic and commons-httpclient will work just fine as would commons-logging. However if you include some weblogic jars in the classpath, when you launch the client JVM you would need to include the jars mentioned in the other post because they reference other weblogic classes. But this isn't necessary if you just clean up your classpath to only have the jars you need.

  • Executing threads in threads

    Hello everyone!
    I'm not sure, so that's way I would like to ask you for help. What's going to happen if I create new object of my class A and in that object create a Thread which is waiting for connection from the Internet. After it gets the connection and parses it, that Thread needs to execute function from existing object of class B, in which function, the new Thread serving that connection is created. What's going to happen if I create a thread (Thread A), in that thread I'm gonna create another Thread (Thread B) and A has nothing to do? Is it going to exist permamently only because of existing and working Thread B?
    Thanks for your help
    M

    I looked at the site and I don't think its exactly what you need cause it isn't specified to Java. I haven't heard of a 'parent' thread in Java. Threads don't have a parent-child relation. I tested the following program:
    public class ThreadA implements Runnable {
         public static void main(String... args) {
              Thread thread = new Thread(new ThreadA());
              thread.start();
         public void run() {
              System.out.println("Thread A working...");
              Thread threadB = new Thread(new ThreadB());
              threadB.start();
              try {
                   Thread.sleep(2000);
              } catch (InterruptedException e) {
              System.out.println("Thread A exited.");
    public class ThreadB implements Runnable {
         public void run() {
              System.out.println("Thread B working...");
              try {
                   Thread.sleep(3000);
              } catch (InterruptedException e) {
              System.out.println("Thread B exited.");
    }Which gives the following output:
    Thread A working...
    Thread B working...
    Thread A exited.
    Thread B exited.
    Note that in fact there are three threads active here: the main thread, the A thread and the B thread.
    One thing I do want to add: its best to make sure that all threads are finished (using thread.join()) so that nothing keeps hanging around. The design is the most essential part of a threaded program.

  • How to get thread by thread id

    I can get threadID of any thread. But how to choose any thread with id of it for waiting.

    Hi,
    from Java5 on, getting IDs of all Threads is possible using ThreadMXBean.getAllThreadIds().
    Apart from that, I do not know a way of getting the Thread from its ID. As Peter mentioned, if you have to wait for one Thread, it should only be one that you created yourself and that you retained a reference to...
    Bye.

  • Thread Problem - (Thread Blocking Problems?)

    Hi Friends
    In my program while using thread i found a problem in this code .
    In this whlie running the 'msg' was printen only after all 5 inputs are given .
    why i was not getting output after one input.why the thread out was waiting for remaining threads input.
    my code is
    import java.io.*;
    class MyThread extends Thread
      BufferedReader bin;
       MyThread()
         super();
         start();
       public void run()
          try
           bin=new BufferedReader(new InputStreamReader(System.in));
           String msg=bin.readLine();
           System.out.println(msg);
          catch(IOException e)
             System.out.println(e);
    public class Threads
         public static void main(String args[])
              for(int i=0;i<5;i++)
                new MyThread();
    }

    Hi Friends
    In my program while using thread i found a problem
    em in this code .
    In this whlie running the 'msg' was printen only
    after all 5 inputs are given .
    why i was not getting output after one input.why
    hy the thread out was waiting for remaining threads
    input.Probably because of how the scheduler was rotating among the threads while waiting for input and queueing up output.
    When you call readLine, that thread blocks until a line is available. So it probably goes to the next thread's readLine, and so on. All threads are probably blocked waiting for input before you enter a single character.
    Something inside the VM has to coordinate the interaction with the console, and between that and your threads, the out stuff just doesn't get a chance to display right away.
    In general, you can't predict the order of execution of separate threads.

  • Data transfer from thread to thread?

    Hi everyone,
    I have the following problem: I have a program that has a thread that is receiving and sending data using NIO. When data arrives, the NIO thead passes the data to my main thread, who's doing a lot with it. The problem is, that the NIO thead has to wait till the data is processed (the method returns) in the main thread. How can I get arround this? I want my NIO thread to not wait on anything just pass data to somewhere and return immediately.
    I was thinking of a kind of cubby hole class where the nio thread could pass the data and then notify the main thread that data is available. The only problem with this is, that I can't send my main thead to sleep with wait() since it's also responsible for the interface! Do I really need another thread, a helper thread, that waits for the data and passes it to my main thread or am I thinking totally wrong here?
    Thanks for any help!
    best regards,
    Chris

    Thanks for your answers, I'm trying to clarify a few things:
    My programm is a dual server. It has to talk to one client on one side and to multiple clients on the other (2 different ports ;). My thread architecture is as follows: In my main class (with the main method) I'm building the guy and starting the 2 server threads. One is using normal blocking IO and is responsible for the single client (which is a billing server) and the other thread is using NIO to handle the other clients. For each client there's also a client thread which handles some external scripts which display some information remotely to the clients (the clients are just some old 486 which are only used as displays). The client threads are handled by an object in the main object.
    Right now whenever I receive something from a client, I'm passing it to my main object. The main object displays the information using tables (I have my own tablemodel classes too) and then, depending on what data I got, it has to start some actions on the client threads. So the data arrives, goes to the main threads, is displayed and goes to the client thread it belongs too. And while this happens, the nio thread has to wait.
    The problem is that I think that sometimes it takes to long for the whole data processing and my clients time out (10 secs). I have a timer running on the NIO thread which checks for a ping every 10 seconds and sends out a new one if the old one came back. Otherwhise the connection is closed.
    Thanks for reading :)
    Chris

  • The pacman 3.5 thread (merged threads)

    Today "pacman -Syu" offered to upgrade pacman, but failed with a dependency error ":: perl-xyne-arch: requires pacman<3.5".
    pacman 3.4.3-1 is installed from [base] and was trying to upgrade to 3.5.0-1 from [testing].
    perl-xyne-arch 2011.02.06.1-2 is installed from [community]
    Haven't found anything by searching - is this really a bug, or do I have a configuration issue? 
    Thanks for any hints.
    Jack
    # Edit: all of the related threads have been merged here...
    Last edited by jasonwryan (2011-03-26 05:24:54)

    Folks I'm on the same problem as you.
    Do you want to remove these packages? [Y/n] y
    (1/1) removing yaourt [################################################] 100%
    [root@isengard imanewbie]# pacman -Syu
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    multilib is up to date
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] y
    resolving dependencies...
    looking for inter-conflicts...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: package-query: requires pacman<3.5
    [root@isengard imanewbie]# pacman -S yaourt
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] y
    resolving dependencies...
    looking for inter-conflicts...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: package-query: requires pacman<3.5
    [root@isengard imanewbie]# pacman -S yaourt
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] n
    error: 'yaourt': could not find or read package
    [root@isengard imanewbie]# pacman -S yaourt
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] n
    error: 'yaourt': could not find or read package
    [root@isengard imanewbie]# pacman -S yaourt
    :: The following packages should be upgraded first :
    pacman
    :: Do you want to cancel the current operation
    :: and upgrade these packages now? [Y/n] y
    resolving dependencies...
    looking for inter-conflicts...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: package-query: requires pacman<3.5
    And now I cant re-install yaourt (no major fuzz I dont plan to install anything new for now). But I'm afraid of removing package-query and mangle my system. What should I do from now?

Maybe you are looking for

  • Reversing A/P Invoice posted with wrong date and inventory cost adjustment

    Here's the situation: We had a PO dated 9/1/09 for items with a cost of $14.50, a Goods Receipt was entered 9/15/09 for the items with the same cost on the PO of $14.50.  Somehow the order got lost in the mix and the AP invoice wasn't entered until t

  • Can enum type be used in web service

    I am confused about how to use a enum type in web service interface, please do me the favor

  • BC Gallery Module question

    Hi, i want to modify the layout of the standard BC gallery module but can not find it anywhere, Can someone point me in the right direction? I want to remove the table layout and add  my own responsive layout. Thanks

  • Workflow -Inconsistent behavior of wf_engine.setitemattrdate

    I have customized HR self service workflow for termination. I am using wf_engine.setitemattrdate to set the value for all the custom attributes, sometimes the attributes do not come through in the notification, though they are derived; they work as e

  • Cant log in

    I had to restart my computer and it asked me for my password to login. I havent had to use my password in years and when I put it in it it says it is wrong. Also at the top it says MacBookPro (2)  Is that right? HELP i need my computer for work!