Thread hang?

hi all,
currently working on an applet (a large applet which contain other sub applet) which used thread, it seem to hang the application, but it does not have any error information. i've check the possible loop in the code section, should no problem but only once, as below:
//*** partial of the code
Thread t = new Thread(){
   public void run(){
      while ( !stop ){
         // do something here
         System.out.println("testing here...");
         wait(); //*** here cause the problem ***//
         System.out.println("finished testing here...");
         //*** other part down here ...
t.start();above thread creation is in the "init()" method, it seem to hang at the "wait()" state if there are large number of result to process, but if the result to process is small this applet work just fine, any idea? thanks a lot.

Here has more details:
java weblogic.version: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967
SERVICE NAME VERSION INFORMATION
============ ===================
Kernel Commonj WorkManager v1.1
TimerService Commonj TimerManager v1.1
CorbaService CORBA 2.3, IIOP 1.2, RMI-IIOP SFV2, OTS 1.2, CSIv2 Level 0 + Stateful
XMLService XML 1.1
Transaction Service JTA 1.0.1B
JDBCService JSR-114, JDBC 3.0
CustomResourceServerService 1.0.0.0
Servlet Container Servlet 2.5, JSP 2.1
WebServices JSR-173, JAX-RPC, JSR-109, WSDL, WS-Addressing, WS-Policy, JAX-B, JAX-R, UDDI, WS-Management(HP), JAXP-1.3, WS-Security
Pre Admin Singleton Services S 1.0
Singleton Services Batch Manag 1.0
EJB Container EJB 3.0
MDBService EJB 3.0
EJBTimerService EJB 3.0
J2EE Connector 1.5
JMS Service JMS 1.1

Similar Messages

  • Event Dispatch Thread Hangs, what is wrong?

    The Event Dispatch Thread Hangs when showing a modal dialog while running a
    SwingWorker Thread.
    I have included my code at the bottom of the page. There are three classes. I have posted a bug report to red hat. But I want to make sure my code is correct.
    My test case just puts the SwingWorker to sleep
    but the problem occurs if I do something real, like connect to a database, etc.
    Also I have tried little different variations of the logic calling
    setVisible(true)/(false) in different places and the same problem occurs.
    It seems to work with Sun JDK, note I am using IcedTea with Fedora Core 8.
    Version-Release number of selected component (if applicable):
    [szakrews@tuxtel ~]$ java -version
    java version "1.7.0"
    IcedTea Runtime Environment (build 1.7.0-b21)
    IcedTea Client VM (build 1.7.0-b21, mixed mode)How reproducible:
    Every couple times.
    javac TestClass2
    java TestClass2eventually it will hang. If it doesn't try again.
    You don't have to wait for the program to finish either.
    The program runs the Dialog 10 times but it never works or fails in the middle, it will either work or fail from the first dialog displayed.
    I have included a thread dump. That is about the most informative information I can get. Neither tracing nor writing a custom ThreadQueue or Drawing Manager to trace events produces any helpful information.
    Actual results:
    The JProccessBar won't move, and the SwingWorker finishes but the done() method is never run. The PROGRAM is not hung however because if I close the dialog then it will continue.
    Expected results:
    The JProccessBar should always move and the SwingWorker should always run the done() method.
    Additional info:
    java thread dump after freeze, taken with kill -s SIGQUIT <pid>
    2008-06-25 12:25:50
    Full thread dump IcedTea Client VM (1.7.0-b21 mixed mode):
    "DestroyJavaVM" prio=10 tid=0x938afc00 nid=0x1419 waiting on condition
    [0x00000000..0x0018a074]
       java.lang.Thread.State: RUNNABLE
    "AWT-EventQueue-0" prio=10 tid=0x938ae400 nid=0x1429 in Object.wait()
    [0x07f96000..0x07f96f04]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x96748f80> (a java.awt.EventQueue)
            at java.lang.Object.wait(Object.java:503)
            at java.awt.EventQueue.getNextEvent(EventQueue.java:485)
            - locked <0x96748f80> (a java.awt.EventQueue)
            at
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:248)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
            at java.awt.Dialog$1.run(Dialog.java:1073)
            at java.awt.Dialog$3.run(Dialog.java:1127)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Dialog.show(Dialog.java:1125)
            at java.awt.Component.show(Component.java:1456)
            at java.awt.Component.setVisible(Component.java:1408)
            at java.awt.Window.setVisible(Window.java:871)
            at java.awt.Dialog.setVisible(Dialog.java:1012)
            at net.xtel.production.WaitDialog.showWaitDialog(WaitDialog.java:72)
            at net.xtel.production.WaitDialog.showWaitDialog(WaitDialog.java:102)
            at TestClass2.showWait(TestClass2.java:79)
            at TestClass2.createAndShowGUI(TestClass2.java:126)
            at TestClass2.access$0(TestClass2.java:114)
            at TestClass2$3.run(TestClass2.java:138)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:227)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:603)
            at
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
            at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
            at
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
    "AWT-Shutdown" prio=10 tid=0x938ad000 nid=0x1428 in Object.wait()
    [0x03ea7000..0x03ea7f84]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x96749268> (a java.lang.Object)
            at java.lang.Object.wait(Object.java:503)
            at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:281)
            - locked <0x96749268> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:675)
    "AWT-XAWT" daemon prio=10 tid=0x938a8400 nid=0x1423 runnable
    [0x02ccc000..0x02ccd104]
       java.lang.Thread.State: RUNNABLE
            at sun.awt.X11.XToolkit.waitForEvents(Native Method)
            at sun.awt.X11.XToolkit.run(XToolkit.java:550)
            at sun.awt.X11.XToolkit.run(XToolkit.java:525)
            at java.lang.Thread.run(Thread.java:675)
    "Java2D Disposer" daemon prio=10 tid=0x93854000 nid=0x1421 in Object.wait()
    [0x07aea000..0x07aead84]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e7010> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            - locked <0x966e7010> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:150)
            at sun.java2d.Disposer.run(Disposer.java:143)
            at java.lang.Thread.run(Thread.java:675)
    "Low Memory Detector" daemon prio=10 tid=0x93c15000 nid=0x141f runnable
    [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=10 tid=0x93c13400 nid=0x141e waiting on condition
    [0x00000000..0x03a8a954]
       java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x93c11c00 nid=0x141d waiting on
    condition [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=10 tid=0x095e7000 nid=0x141c in Object.wait()
    [0x005d2000..0x005d3004]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e71d8> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            - locked <0x966e71d8> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:150)
            at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)
    "Reference Handler" daemon prio=10 tid=0x095e2400 nid=0x141b in Object.wait()
    [0x00581000..0x00582084]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x966e7260> (a java.lang.ref.Reference$Lock)
            at java.lang.Object.wait(Object.java:503)
            at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:134)
            - locked <0x966e7260> (a java.lang.ref.Reference$Lock)
    "VM Thread" prio=10 tid=0x095dec00 nid=0x141a runnable
    "VM Periodic Task Thread" prio=10 tid=0x93c17400 nid=0x1420 waiting on condition
    JNI global references: 836
    Heap
    def new generation   total 960K, used 152K [0x93f40000, 0x94040000, 0x966a0000)
      eden space 896K,   9% used [0x93f40000, 0x93f56148, 0x94020000)
      from space 64K, 100% used [0x94020000, 0x94030000, 0x94030000)
      to   space 64K,   0% used [0x94030000, 0x94030000, 0x94040000)
    tenured generation   total 4096K, used 1088K [0x966a0000, 0x96aa0000, 0xb3f40000)
       the space 4096K,  26% used [0x966a0000, 0x967b01b0, 0x967b0200, 0x96aa0000)
    compacting perm gen  total 12288K, used 9169K [0xb3f40000, 0xb4b40000, 0xb7f40000)
       the space 12288K,  74% used [0xb3f40000, 0xb4834740, 0xb4834800, 0xb4b40000)
    No shared spaces configured.CLASS1:
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.sql.SQLException;
    import java.util.concurrent.ExecutionException;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.RepaintManager;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class TestClass2 extends JFrame implements ActionListener {
            /** Action Command for <code>searchbtn</code> */
            public static final String SEARCH_BTN_ACTION = "search_btn_action";
             * Constructor.
            public TestClass2() {
                    setSize(650, 350);
                    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                    setLocation(screenSize.width / 2 - getSize().width / 2,
                                    screenSize.height / 2 - getSize().height / 2);
                    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                    addWindowListener(new WindowAdapter() {
                            @Override
                            public void windowClosing(WindowEvent e) {
                                    exit();
                    JPanel panel = new JPanel();
                    add(panel);
                    setVisible(true);
            @Override
            public void actionPerformed(ActionEvent e) {
                    if (e.getActionCommand().equals(SEARCH_BTN_ACTION)) {
                            JOptionPane.showMessageDialog(this, "Button Pressed");
            public void showWait() {
                    try {
                            WaitDialog.showWaitDialog(this, "Testing...", new SwingWorkerInterface(){
                                    @Override
                                    public Object workToDo() throws Throwable {
                                            Thread.currentThread().sleep(3000);
                                            return null;
                    } catch (InterruptedException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                    } catch (ExecutionException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
             * Exits the program.
            public void exit(){
                    System.exit(0);
             * Create the GUI and show it. For thread safety, this method should be
             * invoked from the event-dispatching thread.
             * @throws UnsupportedLookAndFeelException
             * @throws IllegalAccessException
             * @throws InstantiationException
             * @throws ClassNotFoundException
             * @throws NullInstanceVariableException
             * @throws SQLException
            private static void createAndShowGUI() {
                    // set look and feel
                    try{
                            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                            // Create instance of the ProductCatalog
                            TestClass2 root = new TestClass2();
                            for(int i = 0; i < 10; i++){
                                    root.showWait();
                    }catch(Exception e){
                            e.printStackTrace();
             * @param args
             *            this program does not use arguments
            public static void main(String[] args) {
                    SwingUtilities.invokeLater(new Runnable() {
                            public void run() {
                                    createAndShowGUI();
    }CLASS 2:
    import java.awt.Component;
    import java.awt.Frame;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.util.concurrent.ExecutionException;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    import javax.swing.SwingWorker;
    public class WaitDialog extends JDialog {
            private boolean disposed = false;
            private boolean displayed = false;
            private WorkerThread worker = null;
            WaitDialog(Frame parent, String text, SwingWorkerInterface in){
                    super(parent, true);
                    worker = new WorkerThread(in);
                    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                    addWindowListener(new WindowAdapter() {
                            @Override
                            public void windowOpened(WindowEvent e) {
                                    worker.execute();
                            @Override
                            public void windowClosing(WindowEvent e) {
                                    disposeWaitDialog();
                    this.setResizable(false);
                    JLabel message = new JLabel();
                    message.setText(text);
                    JProgressBar pb = new JProgressBar();
                    pb.setIndeterminate(true);
                    // set size and location
                    setSize(200, 100);
                    setLocationRelativeTo(parent);
                    JPanel panel = new JPanel();
                    panel.add(message);
                    panel.add(pb);
                    add(panel);
            public void showWaitDialog(){
                    if(displayed == true){
                            return;
                    if(disposed == true){
                            disposed = false;
                            return;
                    disposed = false;
                    displayed = true;
                    setVisible(true);
            public void disposeWaitDialog(){
                    if(disposed == true){
                            return;
                    if(displayed == true){
                            displayed = false;
                            setVisible(false);
                            return;
                    disposed = true;
                    displayed = false;
            public static Object showWaitDialog(Component parent, String text, SwingWorkerInterface in) throws InterruptedException, ExecutionException {
                    WaitDialog waitDialog = null;
                    if (parent == null) {
                            waitDialog = new WaitDialog(JOptionPane.getRootFrame(), text, in);
                    } else {
                            waitDialog = new WaitDialog(JOptionPane.getFrameForComponent(parent), text, in);
                    while(!waitDialog.worker.isDone()){
                            System.out.println("about to show");
                            waitDialog.showWaitDialog();
                            System.out.println("done showing");
                    waitDialog.dispose();
                    return waitDialog.worker.get();
            class WorkerThread extends SwingWorker<Throwable, Void> {
                    private SwingWorkerInterface in = null;
                    WorkerThread(SwingWorkerInterface in){
                            this.in = in;
                    public Throwable doInBackground(){
                                    try {
                                            System.out.println("about to do work");
                                            in.workToDo();
                                            System.out.println("done work no exception");
                                    } catch (Throwable e) {
                                            System.out.println("done work with exception");
                                            return e;
                                    return null;
                    public void done(){
                                    System.out.println("about to dispose");
                                    disposeWaitDialog();
                                    System.out.println("disposed");
    }CLASS 3:
    public interface SwingWorkerInterface {
            public Object workToDo() throws Throwable;
    }

    There's nothing directly wrong with it, but it will
    prevent other threads acquiring the class lock - but
    that may be what you want.True. Although the typical case for code that looks like this would be to use wait--usually the various threads in question require the same lock, so you have to use wait in order for the waiting thread to give it up and allow the other thread to do its work. Hard to say for sure though what he's doing.
    Also, if loading is all that the other thread does, and you're waiting for that thread to die, use join. But then, if that's the case, and you're only waiting for a single other thread, then you might as well just put it all in one thread, as already indicated.

  • Thread hangs trying to use MoveChildComponentChange to implement drag-n-dro

    System: JDeveloper 11.1.1.3 Browser: FF 3.6.6
    So I'm trying to implement a drop-n-drop between two components, allowing the user to drag elements between on parent component and another parent component:
    I never make it past the commonComponentParent = moveChildComponentChange.add(..) line as the thread hangs (during debugging i dont get an exception it just hangs!!), but the reason that I'm getting this, i think, is because the system is giving a null ChangeManager (cm). Why is the RequestContext giving me a null cm when I so nicely asked it for a valid one?
    <af:panelGroupLayout id="pgl1" styleClass="appdock appMenu" layout="horizontal" inlineStyle="margin-left: 0px;">
    <af:dropTarget dropListener="#{menuComponent.handleExternalContainerDrag}" actions="MOVE">
    <af:dataFlavor flavorClass="javax.faces.component.UIComponent" />
    </af:dropTarget>
    <tr:outputText value="drop here" />
    </af:panelGroupLayout>
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.datatransfer.DataFlavor;
    import oracle.adf.view.rich.datatransfer.Transferable;
    import oracle.adf.view.rich.dnd.DnDAction;
    import oracle.adf.view.rich.event.DropEvent;
    import org.apache.myfaces.trinidad.change.ChangeManager;
    import org.apache.myfaces.trinidad.change.MoveChildComponentChange;
    import org.apache.myfaces.trinidad.context.RequestContext;
    public class MenuComponent {
    public DnDAction handleExternalContainerDrag(DropEvent dropEvent){
    ChangeManager cm = null;
    cm = RequestContext.getCurrentInstance().getChangeManager();
    UIComponent commonComponentParent = null;
    try {
    commonComponentParent = moveChildComponentChange.add(fctx, cm);
    moveChildComponentChange.changeComponent(commonComponentParent);
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget(commonComponentParent);
    } catch (Exception e){
    e.printStackTrace();
    -Rob

    Hi,
    did you enable change persistence in the ViewLayer project ? The book you have the sample code from mentions this on page 447 "Enabling Change Persistence in ADF Faces RC Projects". To enable this, just double click the view layer project and then select "ADF View". The check the checkbox to "Enable User Customization"
    Frank

  • JDBC Thread Hangs

    Why would this thread hang? (it was in two consecutive dumps several minutes
    apart).
    "ExecuteThread-61" daemon prio=5 tid=0x7b8450 nid=0x21f waiting for monitor
    entry [0x1e04f000..0x1e04fdc0]
    at
    COM.rsa.jsafe.JA_ParseTransformation.getClassList(JA_ParseTransformation.jav
    a)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at weblogic.security.provider.MD5.<init>(MD5.java:15)
    at weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:60)
    at
    weblogic.security.acl.internal.AuthenticatedUser.digest(AuthenticatedUser.ja
    va:77)
    at
    weblogic.security.acl.internal.AuthenticatedUser.verify(AuthenticatedUser.ja
    va:70)
    at weblogic.security.acl.internal.ClusterRealm.getUser(ClusterRealm.java:76)
    at weblogic.jdbcbase.pool.Driver.connect(Driver.java:143)
    at weblogic.jms.server.JDBCStore.getConnectionNoTx(JDBCStore.java:878)
    at weblogic.jms.server.JDBCStore.purgeMessages(JDBCStore.java:822)
    at weblogic.jms.server.JDBCStore.trigger(JDBCStore.java:625)
    at
    weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
    er.java:205)
    at
    weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
    :199)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:60)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Thanks,
    Mica Cooper

    Hi. Please post this to the security newsgroup and also email it to
    [email protected] Although triggered by JDBC it's waiting
    for jsafe stuff to return...
    Joe
    Mica Cooper wrote:
    >
    Why would this thread hang? (it was in two consecutive dumps several minutes
    apart).
    "ExecuteThread-61" daemon prio=5 tid=0x7b8450 nid=0x21f waiting for monitor
    entry [0x1e04f000..0x1e04fdc0]
    at
    COM.rsa.jsafe.JA_ParseTransformation.getClassList(JA_ParseTransformation.jav
    a)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at weblogic.security.provider.MD5.<init>(MD5.java:15)
    at weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:60)
    at
    weblogic.security.acl.internal.AuthenticatedUser.digest(AuthenticatedUser.ja
    va:77)
    at
    weblogic.security.acl.internal.AuthenticatedUser.verify(AuthenticatedUser.ja
    va:70)
    at weblogic.security.acl.internal.ClusterRealm.getUser(ClusterRealm.java:76)
    at weblogic.jdbcbase.pool.Driver.connect(Driver.java:143)
    at weblogic.jms.server.JDBCStore.getConnectionNoTx(JDBCStore.java:878)
    at weblogic.jms.server.JDBCStore.purgeMessages(JDBCStore.java:822)
    at weblogic.jms.server.JDBCStore.trigger(JDBCStore.java:625)
    at
    weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
    er.java:205)
    at
    weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
    :199)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:60)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Thanks,
    Mica Cooper--
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • Oracle 8.1.7 OCI question: Some threads hang in OCIServerAttach indefinetly after rem

    Configuration: MS Win2k SP2, MS Visual C++ 6.0 SP6, Oracle 8.1.7 via OCI
    I have 128 threads doing the following:
    1) Create environment (OCI_THREADED, OCI_ENV_NO_MUTEX), setup handles, try to connect to remote database 2) If connect fails, log the error message and try again after 2 seconds 3) Execute simple stored procedure 4) Disconnect from remote database ( + cleanup of all handles including environment ) 5) ... repeat from 1)
    When I go to the remote database and perform shutdown of the whole operating system (by choosing shutdown in Windows), something peculiar happens. First I get: ORA-12500 and ORA-12541 error messages. Then most of the channels go to ORA-12535 error message and they loop in that message until I exit the application. However, some of the threads remain hanging in OCIServerAttach function and do not allow my application to exit.
    Needless to say, OCIBreak function doesn't help here (I've tried).
    When I attach the debugger to the hanging process, I get the attached stack trace. It looks like some sockets remain hanging - a terrible thing to happen.
    In the attachment are also Oracle error descriptions that I mentioned.
    I would be thankful for any suggestions here...
    -- Tomislav.
    "Real sharpness comes without effort,
    No growth without assistance,
    No action without reaction,
    Now give yourself up and find yourself again."
    "Crouching tiger, hidden dragon"
    NTDLL! 77f827e8()
    MSAFD! 74fd8e33()
    WS2_32! 75031275()
    ORANTCP8! 6470565f()
    ORANTCP8! 64703536()
    ORAN8! 60b78f5a()
    ORAN8! 60b7c8a8()
    ORAN8! 60b44d24()
    ORAN8! 60b3fd0a()
    ORAN8! 60b3f474()
    ORAN8! 60b157a0()
    ORAN8! 60b61c7c()
    ORACLIENT8! 60429b1e()
    ORACLIENT8! 604b4695()
    ORACLIENT8! 604b9ece()
    ORACLIENT8! 604823a3()
    ORACLIENT8! 60429f64()
    ORACLIENT8! 60401340()
    OCI! 015059ab()
    CLibOCI::OCIServerAttach(OCIServer * 0x0dff13e0, OCIError * 0x0dff15d4,
    unsigned char * 0x0de9b810, int 21, unsigned int 0) line 282 + 28 bytes
    FCALLDLL! 014d2c03()
    MSVCRT! 7800a3c0()
    KERNEL32! 77e8758a()
    "TNS-12500 TNS:listener failed to start a dedicated server process
    Cause: The process of starting up a dedicated server process failed. The executable could not be found or the environment may be set up incorrectly.
    Action: Turn on tracing at the ADMIN level and re-execute the operation. Verify that the Oracle Server executable is present and has execute permissions enabled. Ensure that the Oracle environment is specified correctly in LISTENER.ORA. The Oracle Protocol Adapter that is being called may not be installed on the local hard drive. Check that the correct Protocol Adapter are successfully linked. If the error persists, contact Oracle Customer Support.
    TNS-12541 TNS:no listener
    Cause: The connection request could not be completed because the listener is not running.
    Action: Ensure that the supplied destination address matches one of the addresses used by the listener. Compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on the remote machine.
    TNS-12535 TNS:operation timed out
    Cause: The requested connection could not be completed within the timeout period specified by the CONNECT_TIMEOUT parameter in LISTENER.ORA. This error arises from the TNSLSNR.
    Action: Either reconfigure CONNECT_TIMEOUT to be 0, which means wait indefinitely, or reconfigure CONNECT_TIMEOUT to be some higher value. Or, if the timeout is unacceptably long, turn on tracing for further information."

    Hi,
    What is going on in your case is :
    1. Oracle library (OCI) is failing to identify a Dead Connection properly all the time.
    2. According to the errors you have received, all of them seems to be appropriate to what you have described in your message.
    a. TNS failed to start a dedicated server process. This error is returned when the number of server processes are excessive or memory is low etc - I am not sure why this is returned to you
    b. TNS listener is not available - May be the listener has already shutdown, since the system is being shutdown.
    c. TNS operation timed out. This will be returned by your local TNS client library, which says CONNECT(socket operation) failed, since the other end has already SHUTDOWN.
    Getting an error is good for you, since you can always sleep 2 seconds and reconnect.
    The hanging thread is due to a problem that Oracle folks call as DCD(Dead COnnection Detection) logic. The DCD can be turned on by setting sqlnet.expire timeout to be some number of minutes in the sqlnet.ora file. Please check on the Metalink on the DCD issue.
    What I have personally seen is that DCD does not always work, even if turned ON.

  • Thread hang during call EJB 3.0 with Weblogic 10.3 (Urgent)

    Hello,
    We have a java client application call Weblogic Appserver 10.3, EJB 3.0 Service. Occasionally, client application, some step will get hang when try to invoking EJB. When we restart the application server and re-run the client application, it may work or hang on any other step. (Totally, we have around 40 steps to invoking EJB service)
    We did check Google and find similar issue happen on the IBM Websphere appserver. They post a patch to fix this issue (http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK74719), but not Weblogic.
    Is there any Weblogic expert who can help me to solve this issue?
    I have attached two thread dumps (different steps) when they got hang.
    Appreciate your quick help.
    Best wishes,
    Feelyn
    ==========================================================================================================================================
    Thread Dump files.
    NULL ------------------------------------------------------------------------
    0SECTION THREADS subcomponent dump routine
    NULL =================================
    NULL
    1XMCURTHDINFO Current Thread Details
    NULL ----------------------
    NULL
    1XMTHDINFO All Thread Details
    NULL ------------------
    NULL
    2XMFULLTHDDUMP Full thread dump J9 VM (J2RE 6.0 IBM J9 2.4 AIX ppc64-64 build jvmap6460-20090215_2988320090215_029883_BHdSMr, native threads):
    3XMTHREADINFO "main" TID:0x0000000110A64600, j9thread_t:0x000000011011F420, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x125009, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/util/HashMap.findNonNullKeyEntry(HashMap.java:526(Compiled Code))
    4XESTACKTRACE at java/util/HashMap.getEntry(HashMap.java:511(Compiled Code))
    4XESTACKTRACE at java/util/HashMap.get(HashMap.java:497(Compiled Code))
    4XESTACKTRACE at weblogic/utils/collections/SoftHashMap.get(SoftHashMap.java:194(Compiled Code))
    4XESTACKTRACE at weblogic/ejb/container/internal/RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:125(Compiled Code))
    4XESTACKTRACE at weblogic/ejb/container/internal/RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:53(Compiled Code))
    4XESTACKTRACE at $Proxy0.cleanBx001(Bytecode PC:18)
    4XESTACKTRACE at com/tesco/eod/exec/thred/CleanZBx001Thead.cleanBx001(CleanZBx001Thead.java:38)
    4XESTACKTRACE at com/tesco/eod/exec/MainClass.cleanBx001(MainClass.java:1033)
    4XESTACKTRACE at com/tesco/eod/exec/MainClass.main(MainClass.java:1239)
    3XMTHREADINFO "JIT Compilation Thread" TID:0x0000000111CBE200, j9thread_t:0x000000011011FE20, state:CW, prio=10
    3XMTHREADINFO1 (native thread ID:0x127073, native priority:0xB, native policy:UNKNOWN)
    3XMTHREADINFO "Signal Dispatcher" TID:0x0000000111EBEB00, j9thread_t:0x0000000111D5B940, state:R, prio=5
    3XMTHREADINFO1 (native thread ID:0xA4165, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at com/ibm/misc/SignalDispatcher.waitForSignal(Native Method)
    4XESTACKTRACE at com/ibm/misc/SignalDispatcher.run(SignalDispatcher.java:54)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000111EFED00, j9thread_t:0x0000000111EC8340, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xDC0CD, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000111FBBA00, j9thread_t:0x0000000111EC8840, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x27C1D9, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x000000011209AB00, j9thread_t:0x0000000112055AE0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1EA0D5, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x000000011209FD00, j9thread_t:0x0000000112055FE0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x282155, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000112107E00, j9thread_t:0x00000001120564E0, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xFF037, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x0000000112122700, j9thread_t:0x000000011211DD80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x10B1BF, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Gc Slave Thread" TID:0x00000001123E4200, j9thread_t:0x000000011211E280, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x119025, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "Finalizer thread" TID:0x0000000112D5A000, j9thread_t:0x000000011211E780, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0xDE109, native priority:0x5, native policy:UNKNOWN)
    3XMTHREADINFO "ExecuteThread: '0' for queue: 'default'" TID:0x0000000112DEE600, j9thread_t:0x0000000112DD8B80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x25412D, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '1' for queue: 'default'" TID:0x0000000112E23F00, j9thread_t:0x0000000112DD9080, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x2DC15F, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '2' for queue: 'default'" TID:0x0000000112F65E00, j9thread_t:0x0000000112DD9580, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x275171, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:91)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '3' for queue: 'default'" TID:0x0000000112FF2D00, j9thread_t:0x0000000112FBAF80, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1B4199, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167(Compiled Code))
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.waitForRequest(ExecuteThread.java:89(Compiled Code))
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:115)
    3XMTHREADINFO "ExecuteThread: '4' for queue: 'default'" TID:0x00000001130DD800, j9thread_t:0x0000000112FBB480, state:R, prio=5
    3XMTHREADINFO1 (native thread ID:0x245133, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/net/SocketInputStream.socketRead0(Native Method)
    4XESTACKTRACE at java/net/SocketInputStream.read(SocketInputStream.java:140(Compiled Code))
    4XESTACKTRACE at weblogic/socket/SocketMuxer.readReadySocketOnce(SocketMuxer.java:887(Compiled Code))
    4XESTACKTRACE at weblogic/socket/SocketMuxer.readReadySocket(SocketMuxer.java:849(Compiled Code))
    4XESTACKTRACE at weblogic/socket/JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283)
    4XESTACKTRACE at weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    4XESTACKTRACE at weblogic/work/ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    4XESTACKTRACE at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    3XMTHREADINFO "weblogic.timers.TimerThread" TID:0x0000000111DACF00, j9thread_t:0x0000000112FBB980, state:CW, prio=9
    3XMTHREADINFO1 (native thread ID:0xFE11F, native priority:0x9, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:196(Compiled Code))
    4XESTACKTRACE at weblogic/timers/internal/TimerThread$Thread.run(TimerThread.java:267)
    3XMTHREADINFO "Thread-5" TID:0x00000001130E2900, j9thread_t:0x00000001130DC700, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x1E61A9, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:167)
    4XESTACKTRACE at java/util/Timer$TimerImpl.run(Timer.java:210)
    3XMTHREADINFO "weblogic.transaction.TxTimer: '1'" TID:0x00000001132FA300, j9thread_t:0x00000001130DCC00, state:CW, prio=5
    3XMTHREADINFO1 (native thread ID:0x20E10F, native priority:0x5, native policy:UNKNOWN)
    4XESTACKTRACE at java/lang/Object.wait(Native Method)
    4XESTACKTRACE at java/lang/Object.wait(Object.java:196(Compiled Code))
    4XESTACKTRACE at weblogic/transaction/internal/GenericTimer.run(GenericTimer.java:15)
    4XESTACKTRACE at java/lang/Thread.run(Thread.java:735)
    NULL ------------------------------------------------------------------------

    Here has more details:
    java weblogic.version: WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967
    SERVICE NAME VERSION INFORMATION
    ============ ===================
    Kernel Commonj WorkManager v1.1
    TimerService Commonj TimerManager v1.1
    CorbaService CORBA 2.3, IIOP 1.2, RMI-IIOP SFV2, OTS 1.2, CSIv2 Level 0 + Stateful
    XMLService XML 1.1
    Transaction Service JTA 1.0.1B
    JDBCService JSR-114, JDBC 3.0
    CustomResourceServerService 1.0.0.0
    Servlet Container Servlet 2.5, JSP 2.1
    WebServices JSR-173, JAX-RPC, JSR-109, WSDL, WS-Addressing, WS-Policy, JAX-B, JAX-R, UDDI, WS-Management(HP), JAXP-1.3, WS-Security
    Pre Admin Singleton Services S 1.0
    Singleton Services Batch Manag 1.0
    EJB Container EJB 3.0
    MDBService EJB 3.0
    EJBTimerService EJB 3.0
    J2EE Connector 1.5
    JMS Service JMS 1.1

  • Thread hangs java.io.BufferedInputStream.read

    hi,everybody
    threads often hang in socket read
    stack dump like this
    Thread-178 "[STUCK] ExecuteThread: '101' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
        jrockit.net.SocketNativeIO.readBytesPinned(Unknown Source)
        jrockit.net.SocketNativeIO.socketRead(Unknown Source)
        java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
        java.net.SocketInputStream.read(SocketInputStream.java:107)
        java.io.BufferedInputStream.fill(BufferedInputStream.java:189)
        java.io.BufferedInputStream.read(BufferedInputStream.java:234)
        ^-- Holding lock: java.io.BufferedInputStream@974825a[thin lock]JRockit version information as follows
    java version "1.5.0_10"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
    BEA JRockit(R) (build R27.2.0-131-78843-1.5.0_10-20070320-1507-linux-x86_64, compiled mode)
    who can tell me what's reason for this?
    thanks in advance
    :-)

    The thread is waiting for incoming I/O.
    -- Henrik

  • Main thread hangs during sleep

    Hi,
    I have a main thread running forever witht the highest thread priority. The main thread checks the database to create new threads that tranfer data from server to client using ftp. After each check, the main thread sleeps one minute. The main thread runs fine for a couple of days. Then it hangs during sleep and and never wakes up.
    Any idea will be appreciated. The code is running with jdk 1.4.1.
    Mark

    It seems to be a resource problem.
    - Connections - check if your program closes correctly the connections (try ... finally). Ask the DBA if there are "stale" connections - maybe the connections were not being correctly closed sometimes.
    - Memory - check if your program slowly gets more and more memory.
    - FTP - are you closing the FTP sessions after use? Or reusing them? Check if you are running out of FTP connections (you can check it in the FTP server for example).

  • B2B Thread hanged

    i face a problem that the B2B thread is hang after connect/trying to connect to my TP server
    most of the thread just hang and no timeout and nothing happen.
    may i know how can i set the http.sender.timeout setting??
    here is the log
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) DBContext commit: Enter
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) DBContext commit: Transaction.commit()
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) DBContext commit: Leave
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) oracle.tip.adapter.b2b.msgproc.Request:requestRetry Calling send() to transmit the message out
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) Protocol Name: HTTP
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) Version Name: 1.1
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) Endpoint: http://213.139.98.233:4080/exchange/C4NET22EUMY1
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.TransportInterface:send URL: HTTP://213.139.98.233:4080/EXCHANGE/C4NET22EUMY1
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.TransportInterface:send TO Endpoint: 501 http://213.139.98.233:4080/exchange/C4NET22EUMY1
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG)
    Protocol = HTTP
    Version = 1.1
    Transport Header
    Message-ID:<VES527623@B2B>
    Content-Transfer-Encoding:binary
    MIME-version:1.0
    From:B2B
    Receipt-Delivery-Option:http://b2bi.b2b.com.my:4080/b2b/transportServlet
    Disposition-Notification-To:[email protected]
    AS2-To:C4NET22EUMY1
    User-Agent:AS2 Server
    Date:Fri, 22 Feb 2008 00:35:33 GMT
    Disposition-Notification-Options:signed-receipt-protocol=required, pkcs7-signature; signed-receipt-micalg=required, md5
    AS2-From:B2B
    AS2-Version:1.1
    Content-Type:application/pkcs7-mime; smime-type="enveloped-data"
    Connection:close
    Parameters
    -- listing properties --
    http.sender.timeout=0
    2008.02.23 at 12:53:41:828: Thread-14: B2B - (DEBUG) scheme null userName null realm null
    2008.02.23 at 12:53:47:218: RMI TCP Connection(186)-172.30.210.139: B2B - (DEBUG)
    Protocol = HTTP
    Version = 1.1
    Transport Header
    CONTENT-DISPOSITION:attachment; filename="smime.p7m"
    USER-AGENT:Java/1.4.2_04
    FROM:C4NET22EUID1_http
    CONTENT-DESCRIPTION:SMIME Encrypted Message
    AS2-TO:B2B_INDO
    AS2-FROM:C4NET22EUID1
    VIA:1.1 c4-proxy3
    CONTENT-TRANSFER-ENCODING:binary
    ORACLE-ECID:1203742426:172.30.210.139:5056:3096:23,0
    ACCEPT:text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    ACCEPT-TYPE:text/*
    AS2-VERSION:1.1
    CONTENT-LENGTH:2622
    HOST:b2bi.b2b.com.my:4080
    SUBJECT:EDI Message from Carrefour
    DISPOSITION-NOTIFICATION-TO:C4NET22EUID1
    DATE:Sat, 23 Feb 2008 11:27:25 GMT+07:00
    DISPOSITION-NOTIFICATION-OPTIONS:signed-receipt-protocol=optional,pkcs7-signature; signed-receipt-micalg=optional,rsa-sha1
    CONTENT-TYPE:application/pkcs7-mime; name="smime.p7m"; smime-type=enveloped-data
    CONNECTION:close
    MESSAGE-ID:<13a317a_11842bde90e_4410@C4NET22EUID1_host>
    RECEIPT-DELIVERY-OPTION:http://213.139.98.233:4080/exchange/mdn1/C4NET22EUID1
    Parameters
    -- listing properties --
    HTTP.HostName=esupplier
    HTTP.RemoteAddr=213.139.98.234
    HTTP.RemoteHost=213.139.98.234

    Please try the following:
    1) invoke the url from your browser and make sure you can connect to the TP.
    2) if proxy needed in your network, please specify the same in tip.properties
    3) check with TP if they see any trace information for your request
    4) specify http.sender.timeout as part of HTTP server additional header property. If you go to remote TP server details page, you can see this parameter. example:http.sender.timeout=120000
    the value is in mil sec

  • Thread hangs in windows XP with JRE 1.5

    My java application hangs in a windows xp machine with jre 1.5. But it works fine in windows 2000 and in some other windows xp machine.
    I am doing UI updates(like custom listmodels) inside the user spawn thread. I read from forums that we need to use SwingUtilities.invokeLater() in such cases. But how it then works in some windows xp machines and windows 2000 ? Am I missing anything.
    Here is the thread dump :
    Full thread dump Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing):
    "Image Animator 3" daemon prio=4 tid=0x038bab90 nid=0x9cc waiting on condition [
    0x0378f000..0x0378fbe8]
    at java.lang.Thread.sleep(Native Method)
    at sun.awt.image.GifFrame.dispose(Unknown Source)
    at sun.awt.image.GifImageDecoder.readImage(Unknown Source)
    at sun.awt.image.GifImageDecoder.produceImage(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    "Thread-17" prio=7 tid=0x038baa10 nid=0x9a4 waiting for monitor entry [0x0311f00
    0..0x0311fc68]
    at java.awt.Component.setFont(Unknown Source)
    - waiting to lock <0x17e98810> (a java.awt.Component$AWTTreeLock)
    at java.awt.Container.setFont(Unknown Source)
    at javax.swing.JComponent.setFont(Unknown Source)
    at javax.swing.plaf.basic.BasicComboBoxRenderer.getListCellRendererCompo
    nent(Unknown Source)
    at javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
    at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown Sou
    rce)

    Crosspost:
    http://forum.java.sun.com/thread.jspa?threadID=761152&messageID=4345269#4345269

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Most VM Threads hang at Class.forName0 and ZipFile.getEntry calls

    I have production Java (1.4) system which runs on Linux (hyperthreading ON, Linux 2.4.21-27.ELsmp #1 SMP). The "top" command consistently shows "VM Thread" to be the highest CPU user. There is no load on the system and the system used to run just fine in past. The dumps consistently show "VM Thread" to be one of the runnable threads. In almost all dumps we have around 50 runnable threads of the 300 odd threads. Most of them are stuck inside native calls to Class.forName0 or ZipFile.getEntry() waiting on a condition (internal VM condition, I presume)
    I think GC is running too often, but I am unable to understand why should it suddenly behave so? Whenever the issue surfaces the dumps are almost replica of one another. Is there anyone who has faced/ solved such an issue with entire dumps almost full of native Class.forName0() calls and ZipFile.getEntry() calls?
    Please help. Any help appreicated.

    Seems to be this Sun Java6 issue
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212
    (and duplicates) in conjunction with Hibernate's DeserializationHelper.
    Opened Hibernate Bug:
    http://opensource.atlassian.com/projects/hibernate/browse/HHH-2990
    Cheers, Tom.

  • Execution thread hang after OCIBreak

    Hie,
    We have a oci-based interface program for execution stored procedures; each procedure have a maximum execution time. After that amount of time we use OCIBreak to stop execution. Program have number of ordinary execution threads and a separate thread (watcher) for execution monitoring and issuing OCIBreak if required.
    Everything goes well, but sometimes watcher calls OCIBreak and execution thread instead of termination of a database call with error falls into sleeping state until the kill of the whole process.
    Platform solaris 10, sparc, Oracle 10gR2
    truss reports
    read(11, 0x001C1E56, 2064) (sleeping...)
    gdb points somewhere in OCIStmtExecute

    No, I was not able to find a clear description on how to run queries in parallel for nonblocking mode and decided not to use it.

  • Threads hanging

    I had already posted this, but I got no resopnse and I am in a real hurry right now. I am doing a consumer-producer kind of program, but it checks if vertain variables are defined, the read() method will wait for a variable to be difned if it isn't. Every read/write is executed in a different thread.
    The threads are not waking up, and I can't find why. Any help will be greatly appreciated.
    Both methods are inside a threaed.
        private synchronized void read(String varname){
            try{
                while(!variables.containsKey(varname)){            
                      wait();                 
            }catch(InterruptedException ex){
                ex.printStackTrace();  
            String value = (String) variables.get(varname);            
            out.println("command " + command_num + ": " + varname +
                        " read with value \"" + value + "\"");
            out.flush();           
        private synchronized void write(String varname,String value){          
            variables.put(varname,value);
            out.println("command " + command_num + ": " + varname +
                        " written with value\"" + value + "\"");
            out.flush();
            notifyAll();
    al912912

    There is nothing wrong with the code you have here
    except you should return the value in read. The
    problem is how you are using these methods.
    Try getting a thread dump to see where the threads
    are stopping.Thanks a lot Peter. Then I{d better put the whole classes, I really haven't found the problem.
    [code]
    public class RunCmdInter2{
    public static void main(String[] args){    
    BufferedReader stdIn = new BufferedReader(new
    InputStreamReader(System.in));
    try{
    int count = 0;
    while(true){       
    String command = stdIn.readLine();
    if(command.trim().equals("")) /*If it is a blank line*/
    continue;
    CommandInterpreter interp =
    new CommandInterpreter(command,count++);
    interp.start();
    }catch(IOException ex){
    ex.printStackTrace();
    }catch(Exception ex){
    ex.printStackTrace();
    public class CommandInterpreter extends Thread{
    private String usr_input;
    private int command_num;
    private PrintStream out = null;
    private static volatile Hashtable variables = null;
    private static volatile Object mutex = new Object();
    public CommandInterpreter(String usr_input, int command_num){      
    out = System.out;
    this.usr_input = usr_input;
    this.command_num = command_num;
    if(variables == null)
    variables = new Hashtable();
    * Because everything is called inside this method, it is sufficient
    * for this method to be synchronized.
    public synchronized void run(){
    String[] parts = usr_input.split(" ");
    String command = parts[0];
    try{
    if(command.equals("write")){
    write(parts[1],parts[2]);
    }else if(command.equals("deposit")){
    deposit(parts[1],parts[2]);
    }else if(command.equals("read")){
    read(parts[1]);
    }else if(command.equals("consume")){
    consume(parts[1]);
    }else if(command.equals("cswap")){
    cswap(parts[1],parts[2],parts[3]);
    }else if(command.equals("quit")){
    quit();
    }else{
    out.println("Command not recognized: " + command);
    out.flush();
    }catch(ArrayIndexOutOfBoundsException ex){
    out.println("Not enough parameters given for the '" + command +
    "' command.");
    out.flush();
    private synchronized void write(String varname,String value){          
    variables.put(varname,value);
    out.println("command " + command_num + ": " + varname +
    " written with value\"" + value + "\"");
    out.flush();
    notifyAll();
    private synchronized void deposit(String varname,String value){
    try{
    boolean waiting_said = false;
    while(variables.containsKey(varname)){
    /*To prevent the thread from saying the same messagen over
    * and over.*/
    if(!waiting_said){
    out.println("command " + command_num + ": " + varname +
    " not empty: waiting");
    out.flush();
    waiting_said = true;
    wait(); //wait();
    }catch(InterruptedException ex){
    ex.printStackTrace();
    variables.put(varname,value);
    out.println("command " + command_num + ": " + varname +
    " written with value \"" + value + "\"");
    out.flush();
    notifyAll();
    private synchronized void read(String varname){
    try{
    boolean waiting_said = false;
    while(!variables.containsKey(varname)){
    if(!waiting_said){
    out.println("command " + command_num + ": " + varname +
    " not defined yet: waiting");
    out.flush();
    waiting_said = true;
    /*Supposedly, here there should be a wait instead of an sleep,
    but I don't know why it is not working. It won't catch the
    notifys.*/
    wait(); //wait();
    }catch(InterruptedException ex){
    ex.printStackTrace();
    String value = (String) variables.get(varname);
    out.println("command " + command_num + ": " + varname +
    " read with value \"" + value + "\"");
    out.flush();
    private synchronized void consume(String varname){
    try{
    boolean waiting_said = false;
    while(!variables.containsKey(varname)){
    if(!waiting_said){
    out.println("command " + command_num + ": " + varname +
    " not defined yet: waiting");
    waiting_said = true;
    wait(); //wait();
    }catch(InterruptedException ex){
    ex.printStackTrace();
    String value = (String) variables.get(varname);
    variables.remove(varname);
    out.println("command " + command_num + ": " + varname +
    " consumed with value \"" + value + "\"");
    out.flush();
    notifyAll();
    private synchronized void cswap(String varname,String value1,String value2){
    /* I don't know why the homework description said that if they where
    * equal exchange them, but that is what it said.
    if(value1.equals(value2))
    variables.put(varname,value2);
    private synchronized void quit(){
    System.exit(0);

  • Weblogic: threads hang on getConnection()

     

    What about Weblogic 5.1?
    Q Vincent Yin | Repeat
    (416) 271-6432 | delete(next->bug);
    [email protected] | Until 0 = 1;
    Architecture and Component Services, BEA Systems, Inc.
    Joseph Weinstein <[email protected]> wrote in message
    news:[email protected]...
    Hi. We've worked around all references to synchronized DriverManager
    calls in the next service pack, but until then, rename your currentversion
    of weblogic\jdbcbase\jts\Driver.class with a .orig suffix, and put the
    attached version it it's place. Restart the server and let me know...
    Joe
    KB Sriram wrote:
    We are using
    WebLogic Build: 4.5.1 Service Pack 7 02/16/2000 15:17:50 #63218
    The deployment platform is:
    SunOS bucks 5.7 Generic_106541-10 sun4u sparc SUNW,Ultra-4
    The JDK version is:
    java version "1.2.1"
    Solaris VM (build Solaris_JDK_1.2.1_04, native threads, sunwjit)
    The JDBC driver is:
    oracle.jdbc.driver.OracleDriver, (and using the thin driver)
    Database is: Oracle 8i
    Ok. we run some tasks in an appserver, and every once in a while
    (generally
    after a db restart) the tasks stop
    running. Restarting the app-server usually makes everything all right,but
    it seems too heavy-handed
    to have to bounce the thing to make the tasks run again.
    I took a stack dump of the jvm, and here is a representative trace ofone of
    the threads spawned by
    the scheduler. [All the threads spawned by the scheduler are blocked onthe> > getConnection() method.
    "CImageManagerRequestHandler" (TID:0x7c250c, sys_thread_t:0x7c2450,
    state:MW, thread_t: t@996, threadID:0xf6c81dc8, stack_bottom:0xf6c82000,
    stack_size:0x20000) prio=5
    [1] java.sql.DriverManager.getConnection(DriverManager.java:104)
    [2]
    TOPLink.Public.Sessions.DefaultConnector.connect(DefaultConnector.java:56)
    [3] TOPLink.Public.PublicInterface.JDBCLogin.connect(JDBCLogin.java:158)
    [4]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.Ã?(DatabaseAccessor.java)
    [5]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.incrementCalls(DatabaseAcces
    sor.java)
    [6]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeCall(DatabaseAccessor
    .java)
    [7]
    TOPLink.Public.ThreeTier.ServerSession.executeCall(ServerSession.java:321)
    [8]
    TOPLink.Private.QueryFramework.CallQueryMechanism.executeCall(CallQueryMecha
    nism.java:125)
    [9]
    TOPLink.Private.QueryFramework.CallQueryMechanism.executeCall(CallQueryMecha
    nism.java:113)
    Looking at the source code for java.sql.DriverManager, the place wherethese
    threads are hung is
    this piece of code:
    public static synchronized Connection getConnection(String s,Properties
    p)
    throws SQLException
    => ClassLoader cl = getCallerClassLoader();
    return getConnection( s, p, cl );
    Now, getCallerCLassLoader() is a native method, so that's where my chase
    ended.
    Here is what we do to configure the connection pool:
    weblogic.jdbc.connectionPool.oraclePool=\
    url=jdbc:oracle:thin:@XXX:nnnn:XXX,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=4,\
    maxCapacity=1000,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=XXX;password=XXX
    Toplink itself (which we use to provide the O/R mapping layer) uses
    [Database]
    url=jdbc:weblogic:jts:oraclePool
    driver=weblogic.jdbc.jts.Driver
    user=XXX
    password=XXX
    to gain access to the connection pool.
    Has anyone seen such behavior? Any ideas on why this happens?
    Thanks,
    -kb---
    PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positionsfor
    people who want to work with Java and E-Commerce infrastructure products.Send
    resumes to [email protected]
    The Weblogic Application Server from BEA
    JavaWorld Editor's Choice Award: Best Web Application Server
    Java Developer's Journal Editor's Choice Award: Best Web ApplicationServer
    Crossroads A-List Award: Rapid Application Development Tools for Java
    Intelligent Enterprise RealWare: Best Application Using a ComponentArchitecture
    http://weblogic.beasys.com/press/awards/index.htm

Maybe you are looking for

  • Hiding a column in smartform

    Hi, We have a requirement where we should be able to hide columns in smarforms based on input from webdynpro. We can pass info as to which column is to be hidden. But we do not want blank columns in between.Columns are separated by lines. Please help

  • International Preferences cannot be open - System Prefs quit unexpectedly

    Hi, When trying to set Czech Language as the default keyboard input language, I must have changed something or deleted something because since then, i cannot open International Preferences. the small flags are their on the top bar. and I can switch b

  • Why does JButton background color change when  clicking ?

    Hello, I have defined : JButton mybutton = new JButton(Icon xxx) ; with no associated text and I set both foreground and background colors to black, and an empty border. This is because the background color of the container which contents this button

  • The static field should be accessed in a static way

    Hello, I am developing a java app in eclipse and I am getting the error message: The static field Calendar.DAY_OF_WEEK should be accessed in a static way I am trying to get the first day of the first week in the current month, here is my code: Gregor

  • How to Process "Being Created" Sessions

    Dear Experts, Program created sessions are tagged to be "Being Created". Can any one of you explain me how to process these sessions through a program again.? It would be of great help and useful answers are rewarded. Best Regards, Arunkumar S