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]

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

  • 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

  • JDBC query hangs server

    I have a very weird case when a particular JDBC query kills weblogic server. Attached
    is a thread dump. What's weird is:
    1. There is only one client on the system, and I sware the client sends only one
    request. At the same time there are 12 threads trying to execute the same query.
    2. The query is at the start of thread dump and it takes ~9sec to execute on our
    DB from SQL+. It returns ~300 records. If I change parameters it will be executed
    fine. Each time a client wants to execute a query before it is executed it is
    dumped to log, and there is only one query per all threads in the dump.
    3. Looking into DB log there is no sight of the query that is dumped into log
    file. DB does not have a clue... Both DB and WLS are waiting for each other...
    Environment:
    6.1sp2 on solaris
    Oracle 8.1.7
    JDBC driver from Oracle 9i
    [x.txt]

    There were two problems: request got hanging in the database (original) with proxy
    timing out and making situation worse (sending more requests). 9.2.0.1 did not
    have the original problem (statement did not hang), but the price was too high
    (data corruption) :( Also the problem was very touchy - we got only two environments
    which were duplicating it. This last mail was more on the whining side - hope
    that someone seen something similar and can say a-ha! So I guess I'm back in slow
    and painful try to reproduce and then fix mode... Most likely it all will end
    up with SQL tuning, not app level solution...
    "Slava Imeshev" <[email protected]> wrote:
    Mike,
    AFAIR the poblem was not in the driver but in the load balancer
    resubmitting requests. Could you please try to use 9.0.1 driver.
    Regards,
    Slava Imeshev
    "mike" <[email protected]> wrote in message
    news:[email protected]...
    Unfortunately the story is not completely over.
    We found that the new driver in some cases garbles the data. That happenson updates
    when WLS is changing object and the first parameter in the updatestatement is
    string. Sounds weird, so here more details:
    - We found that some strings in the database are garbled.
    - JDBC trace brought us to update statements. It looks like for eachupdate container
    creates prepared statement and sets parameters on it.
    - If the first parameter is a string then it will be garbled (happenswith
    two
    independant objects).
    The problem is defenitely driver-specific. It does not show up withany
    driver
    but 9.2.0.1. All previous drivers work right, but 9.0.1 that we usedbefore had
    the problem described in the thread, and 8.x work at least 10 timesslower
    (no
    kidding).
    Test app which connects to the same oracle instance and executes thestatement
    from JDBC log works fine (sure it does). Adding nls_charset to classpathdoes
    not make any difference. Attempt to create statement from within WLSwas
    not taken.
    Solution was even more bizzare. Since it was happening only when thefirst
    attribute
    was string we shuffled attributes and the problem went away. But Ido not
    believe
    that is a solution - IMHO that just masks the problem.
    Any and all brignt and not-so-much ideas are welcome.

  • JDBC query hangs for 60 seconds

    Hi,
    I'm trying to perform a series of very simple queries on a 8.1.7 database with jdk1.4 and ojdbc14 drivers. Every now and then, a query just hangs for exactly 60 seconds before continuing, without throwing any kind of exception. This sometimes happens after a couple of hundred queries, but it can also be after 4 or five. I thought maybe the database runs out of cursors, but then I would get an exception right? After every query, I close the ResultSet and Statement, so it should work just fine. When I tested the same program on PostgreSQL 7.2, it worked perfectly. Is this a problem with the Oracle JDBC drivers, or am I missing something?
    Here's the code of my simple test app:
    import java.sql.*;
    import java.io.*;
    class JdbcTest {
    public static void main (String args []) throws Exception {
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@foo.bar.com:1521:BLABLA","test", "test");
         for (int i=0;i<500;i++) {
         Statement stmt = conn.createStatement ();
         ResultSet rset = stmt.executeQuery ("SELECT sitenr,omschrijving FROM site");
         while (rset.next ())
              System.out.println (rset.getString (1) + ": " + rset.getString(2));
         rset.close();
         stmt.close();
    conn.close();
    }

    Here's the thread dump:
    "Signal Dispatcher" daemon prio=10 tid=0x009E8118 nid=0xdc4 waiting on condition
    [0..0]
    "Finalizer" daemon prio=9 tid=0x0003E6F0 nid=0xdd4 in Object.wait() [ab1f000..ab
    1fd88]
    at java.lang.Object.wait(Native Method)
    - waiting on <02F81698> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
    - locked <02F81698> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x0003D2C0 nid=0xdd8 in Object.wait() [aa
    df000..aadfd88]
    at java.lang.Object.wait(Native Method)
    - waiting on <02F81700> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:426)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
    - locked <02F81700> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x00034AB8 nid=0xdc8 runnable [7f000..7fc3c]
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at oracle.net.ns.Packet.receive(Unknown Source)
    at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.net.ns.NetInputStream.read(Unknown Source)
    at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
    at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
    at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
    at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:586)
    - locked <02FCA940> (a oracle.jdbc.ttc7.TTC7Protocol)
    at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:385)
    at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConn
    ection.java:772)
    at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.
    java:712)
    - locked <02FCA890> (a oracle.jdbc.driver.OracleConnection)
    at JdbcTest.main(JdbcTest.java:11)
    "VM Thread" prio=5 tid=0x009E5030 nid=0xde0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x009E6E00 nid=0xdd0 waiting on condition
    "Suspend Checker Thread" prio=10 tid=0x009E7750 nid=0xdcc runnable

  • 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

  • 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.

  • Sender JDBC Adapter hang after network problem ?

    Hi,
    I got problem with Sender JDBC Adapter. in the normal condition it is working fine. no problem at all.
    The problem coming after network connection problem within XI and database for about more than 24 hours. After the connection resume the Sender JDBC Adapter doesn't want to pickup the data.
    Communication Channel Log  Showing  (Without finish Processing).
      6/16/08 5:49:04 PM   Processing started
      6/16/08 5:48:04 PM   Processing started
      6/16/08 5:47:04 PM   Processing started
      6/16/08 5:46:04 PM   Processing started
      6/16/08 5:45:04 PM   Processing started
    In normal Communication Channel Showing :
    6/16/08 5:33:39 PM efcbd379-6b57-4922-364f-9c047e82ac1b Polling interval started. Length: 30.0 seconds
    6/16/08 5:33:39 PM efcbd379-6b57-4922-364f-9c047e82ac1b Processing finished successfully
    6/16/08 5:33:39 PM   Processing started
    6/16/08 5:33:09 PM efcbd379-6b57-4922-364f-9c047e82ac1b Polling interval started. Length: 30.0 seconds
    6/16/08 5:33:09 PM efcbd379-6b57-4922-364f-9c047e82ac1b Processing finished successfully
    6/16/08 5:33:09 PM   Processing started
    The problem resolve after restart the whole XI system. is there any other way to solve the problem without restarting the whole xi server. Because i have tried to stop and start the communication channel but still doesn't work until restart the xi. server.
    Please advise.
    Thank you and Best Regards
    Fernand

    Check JDBC FAQ note 831162
    7. Network-Level Connection Problems
    Q: The TCP/IP connection to my database host is running over an unreliable network connection, i.e. the connection is sometimes interrupted. Consequently, I sporadically receive an SQLException regarding a closed connection in the system trace or audit log or the connection as well as the JDBC Adapter channel are hanging.
    How can I work around this connectivity issue?
    A: Enable the "Advanced Mode" for the respective JDBC Adapter channel and select the option "Disconnect from Database After Processing each Message".
    Note that this might put additional load on your DBMS due to the creation of a new database connection for each message.
    If you are connecting to an Oracle database, also refer to question #10 for an alternative solution.

  • JDBC Connection Hangs

    I'm using the connection pooling system from Jakarta commons. My database access works fine most of the time, but for some reason sometimes the database hangs. I will try to access the web-app and the login screen will come up fine, but when I try to log in the app will just sit there trying to access the database forever, and from that point on no database access will work. Here is the code I use to get the connections and access the database. Is there anything I am doing wrong that could be causing this?
    import java.sql.DriverManager;
    import java.sql.Connection;
    import javax.sql.DataSource;
    import java.io.PrintWriter;
    import org.apache.commons.pool.ObjectPool;
    import org.apache.commons.pool.impl.GenericObjectPool;
    import org.apache.commons.dbcp.ConnectionFactory;
    import org.apache.commons.dbcp.PoolingDataSource;
    import org.apache.commons.dbcp.PoolableConnectionFactory;
    import org.apache.commons.dbcp.DriverManagerConnectionFactory;
    public class ConnectionManager {
         private static final ConnectionManager INSTANCE = new ConnectionManager();
         //Name of SQL Driver to load
         private static final String DRIVERNAME = "com.mysql.jdbc.Driver";
         private static final String CONNECTSTRING = "jdbc:mysql:///mysite:admin:mypasswd?autoReconnect=true";
         //The actual pool of Database Connections
         private static DataSource dataSource;
         private static ObjectPool connectionPool;
         // Private constructor supresses
         // default public constructor
         private ConnectionManager( ) {
              // Load the Database SQL Driver
              try{
                   Class.forName(DRIVERNAME);
              } catch (java.lang.ClassNotFoundException e) {System.out.println ("Database SQL Driver not found!");}
              try {
                   // First, we'll need a ObjectPool that serves as the
                   // actual pool of connections.
                   // We'll use a GenericObjectPool instance, although
                   // any ObjectPool implementation will suffice.
                   connectionPool = new GenericObjectPool(null);
                   // Next, we'll create a ConnectionFactory that the
                   // pool will use to create Connections.
                   // We'll use the DriverManagerConnectionFactory,
                   // using the connect string passed in the command line
                   // arguments.
                   ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(CONNECTSTRING,null);
                   // Now we'll create the PoolableConnectionFactory, which wraps
                   // the "real" Connections created by the ConnectionFactory with
                   // the classes that implement the pooling functionality.
                   PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
                   // Finally, we create the PoolingDriver itself,
                   // passing in the object pool we created.
                   // We then save the datasource object to the class for later use in getting connections
                   dataSource = new PoolingDataSource(connectionPool);
                   //System.out.println("Idle: " + connectionPool.getNumIdle() + " - Active: " + connectionPool.getNumActive());
                   } catch (Exception e){}
         //Returns and Instance of the ConnectionManager object (not really necessary)
         public static ConnectionManager getInstance( ) {
              return INSTANCE;
         //Returns a database connection object
         public static Connection getConnection(){
              Connection conn = null;
              try{
                   conn = dataSource.getConnection();
                   } catch(java.sql.SQLException e){
                       System.err.print (e.getStackTrace());
              //System.out.println("Idle: " + connectionPool.getNumIdle() + " - Active: " + connectionPool.getNumActive());
              return conn;
    And here is my database code:
    import java.sql.*;
    import com.mysite.ConnectionManager;
    import java.util.HashMap;
    import java.util.Iterator;
    Manages a database after getting a database connection from a {@url ConnectionManager} object.
    Can do queries and database updates, as well open and close connections.
    public class DatabaseManager {
         private Connection con = null;
         private Statement st;
         private ResultSet rs;
         //The Structure of the Table, used for query operations
         private String[] tableStruct;
         Constructor
         public DatabaseManager(){
         Retrieves a database connection from a {@url ConnectionManager} object.
         @param
         @return
         @see
         public void connect(){
              con = ConnectionManager.getConnection();
         Identifies whether this database connection is still open
         @param
         @return
         @see
         public boolean isClosed() throws java.sql.SQLException{
              return con.isClosed();
         Execute a query on a database connection and get the resultset for that query
         @param queryString A String representing the database query
         @return The results of the query to the database
         @see Statement, ResultSet
         public ResultSet query(String queryString) throws java.sql.SQLException{
              if (con != null){
                   st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   st.executeQuery (queryString);
                   rs = st.getResultSet();
                   return rs;
              else {
                   throw new java.sql.SQLException ("Error has occurred in Datamanager, no Database Connection has been Established.");
         Returns the Number of Rows the last query has executed.
         @return Number of Rows
         public int getRows() throws java.sql.SQLException{
              int count = 0;
              if (rs != null){
                   //get the current row number in case were in the middle of a read and want the size
                   int rowNumber = rs.getRow();
                   rs.beforeFirst();
                   while (rs.next()){
                        count = count + 1;
                   if (rowNumber == 0){
                        rs.beforeFirst();     
                   else {
                        rs.absolute(rowNumber);     
                   return count;
              else {
                   return 0;
         Does a record in a particular table exist.
         @param tableName name of Table to look in
         @param idName Name if Table ID
         @param id value of ID
         @return True if record exists
         @see
         public boolean doesExist(String tableName, String idName, String id) throws java.sql.SQLException{
              query ("SELECT " + idName + " FROM " + tableName + " WHERE " + idName + "='" + id + "';");
              if (getRows() == 1){
                   return true;
              else {
                   return false;
         Update a line (or multiple lines) in the database.
         @param updateString The Update Query String to use to update the database
         @return
         public int update(String updateString) throws SQLException{
              int j = 0;
              try {
                   st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   j = st.executeUpdate (updateString);     
              catch (SQLException e) {
                   throw new SQLException (updateString);
              st.close();
              return j;
         Update a line in the database.
         @param  tableName Name of table to update the line
         @param  items The data to be updated in the table
         @return
         public int update(String tableName, HashMap items, String idname) throws SQLException{
              // UPDATE <tablename> SET name1="value1", name2="value2" WHERE id="idvalue"
              String updateString;
              Iterator keys = items.keySet().iterator();
              Iterator values = items.values().iterator();
              String optionsString = "";
              //Combine the keys into Strings with ,'s separating.
              while (keys.hasNext()){
                   optionsString = optionsString + (String)keys.next() + "=\"" + (String)values.next() + "\",";
              //Chop off the last , in the Strings
              optionsString = optionsString.substring (0, optionsString.length()-1);
              updateString = "UPDATE " + tableName + " SET " + optionsString + " WHERE " + idname + "=" + items.get(idname) + ";";
              return insert (updateString);
         Delete a Record or Records from the database
         @param table Name of the Table to delete data from
         @param whereClause what to delete from the table
         @see
         public void delete(String table, String whereClause) throws SQLException{
              String deleteString;
              deleteString = "DELETE FROM " + table;
              if (whereClause != null) {
                   if (!whereClause.equals("")){
                        deleteString += (" WHERE " + whereClause);
              deleteString += ";";
              st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
              st.execute (deleteString);
              st.close();
         Inserts a line of data into a database connection under a given table
         @param insertString String Containing the query to send with the Insert Data
         @return Number of Rows Affected
         public int insert(String insertString) throws SQLException{
              int j = 0;
              try {
                   st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   j = st.executeUpdate (insertString);     
              catch (SQLException e){
                   throw new SQLException (insertString);
              st.close();
              return j;
         Inserts a line of data into a database connection under a given table
         @param  tableName Name of table to update the line
         @param  items The data to be updated in the table
         @return Number of Rows Affected
         public int insert(String tableName, HashMap items) throws SQLException{
              // REPLACE INTO <tablename> (itemname1, itemname2) VALUES ("value1", "value2");
              String insertString;
              Iterator keys = items.keySet().iterator();
              Iterator values = items.values().iterator();
              String keysString = "";
              String valuesString = "";
              //Combine the keys into Strings with ,'s separating.
              while (keys.hasNext()){
                   keysString = keysString + (String)keys.next() + ",";
                   valuesString = valuesString + "\"" + (String)values.next() + "\",";
              //Chop off the last , in the Strings
              keysString = keysString.substring (0, keysString.length()-1);
              valuesString = valuesString.substring (0, valuesString.length()-1);
              insertString = "REPLACE INTO " + tableName + " (" + keysString + ") VALUES (" + valuesString + ");";
              return insert (insertString);
         Sets the table structure for subsequent operations.
         @param An array of names that represent a table in a database.
         @return
         @see
         public void setStructure(String[] struc){
              tableStruct = struc;
         Flushes the Statement and ResultSet object
         in case any resources are being used when they
         shouldn't be.
         public void flushSources() throws java.sql.SQLException{
              if (rs != null){
                   rs.close();
                   rs = null;
              if (st != null){
                   st.close();
                   st = null;
         Kills the database connection in this object
         public void close() throws java.sql.SQLException{
              flushSources();
              if (con != null){
                   con.close();     
              con = null;     
         }

    How do I do that, it doesn't even report an error. I could try sticking log traces all over the place, but it may not tell me anything about why the problem is happening.

  • 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

  • Increase the JDBC Thread count

    All,
    Please let me know how to increase the Max thread count for JDBC adapter from 5 to 10 and let us know if there are any impact on the performence.
    JDBC_http://sap.com/xi/XI/System.Call.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Recv.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Rqst.maxConsumers 5
    JDBC_http://sap.com/xi/XI/System.Send.maxConsumers 5
    Please help me in this regard.
    Thanks in advance.
    Gary

    hi check the below links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a
    admin manual:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fdb09490-0201-0010-e09e-a76388646ad0
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Why my JDBC UPdate hangs up??

    Hi, Sir::
    I use following simple JDBC Update program to update my table TEST,
    See following code:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    // create table test(Test_ID number, Test_Val varchar(30));
    public class Update {
      public static void main(String args[]) {
        Connection con = null;
        if (args.length != 2) {
          System.out.println("Syntax: <java UpdateApp [number] [string]>");
          return;
        try {
          String driver = "oracle.jdbc.driver.OracleDriver";
          Class.forName(driver).newInstance();
          String url = "jdbc:oracle:thin:@localhost:1521:usa";
          con = DriverManager.getConnection(url, "scott", "tiger");
          Statement s = con.createStatement();
          String test_id = args[0];
          String test_val = args[1];
          int update_count = s.executeUpdate("INSERT INTO test (test_id, test_val) "
                  + "VALUES(" + test_id + ", '" + test_val + "')");
          s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
          System.out.println(update_count + " rows inserted.");
          s.close();
        } catch (Exception e) {
          e.printStackTrace();
        } finally {
          if (con != null) {
            try {
              con.close();
            } catch (SQLException e) {
              e.printStackTrace();
               When I run with command:
    C:\temp\javaCode>java Update 2 MyTest
    It hangs here and did not process, If I remove the statement:
    s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
    it works and insert 1 record into Test Table.
    What is wrong here??
    How to fix it??
    Thanks
    Sunny

    Did you try with another Statement? I would try closing the first statement and creating a new one.
          Class.forName(driver).newInstance();
          String url = "jdbc:oracle:thin:@localhost:1521:usa";
          con = DriverManager.getConnection(url, "scott", "tiger");
          Statement s = con.createStatement();
          String test_id = args[0];
          String test_val = args[1];
          int update_count = s.executeUpdate("INSERT INTO test (test_id, test_val) "
                  + "VALUES(" + test_id + ", '" + test_val + "')");
           // close it and create a new one
           s.close();
           s = con.createStatement();
          s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
    Let me know if it works.

  • Jdbc Statement hangs

    Folks ,
    I have writen some jdbc code and my applications hangs intermittently, we are using oracle database .
    Thanks,
    Manish

    Hi,
    What do you mean by "applications hangs intermittently"?
    But try to put following logic to figure out what is the time taken by jdbc sql query.
    a) get system time before the execution of sql query and store it in temp variable t1
    b) get system time after the execution of sql query and store it in temp variable t2
    c) Find out the difference and print it
    Once you are confident that SQL query is the one taking longer than expected time, check with Oracle experts in your org. for analyzing the log for the query and reasons for taking so much time
    regards,
    ganga

  • Jdbc connection hang?

    I used thin JDBC driver 9.0.1 comes with oracle 9i.
    However, the connection hang in heavy load.
    1. I try to check isClosed(), then reopen is more stable but problem is still exist.
    2. It's more stable than 1. when do.. getConnection, do job and Close it. But another application connect more difficult get some error like 'not found oracle realm' or something.
    Anybody has comment?
    Thanks,
    Kittikun Potivanakul
    [email protected]

    Hi to all and sorry for the delay of my reply.
    I am not using RAC. After setting of the system property +"-Djava.security.egd=file:///dev/random"+ it has solved the +"Connection reset"+ problem, but after about one hour I get +"Connection closed"+ from each connection of the pool when the application uses it.
    The pool uses the implicit cache mechanism of Oracle. Follow the properties of cache:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    <properties>
    <comment> Oracle connection pool configuration file. </comment>
    <!-- Sets how many connections are created in the cache when it is created or reinitialized -->
    <entry key="InitialLimit">0</entry>
    <!-- Sets the minimum number of connections the cache maintains. -->
    <entry key="MinLimit">0</entry>
    <!-- Sets the maximum number of connection instances the cache can hold. If missing no limit-->
    <entry key="MaxLimit">10</entry>
    <!-- Sets the maximum time a physical connection can remain idle in a connection cache.
    An idle connection is one that is not active and does not have a logical handle associated with it. -->
    <entry key="InactivityTimeout">240</entry>
    <!-- Sets the maximum time that a connection can remain unused before the connection is closed and returned to the cache.
         A connection is considered unused if it has not had SQL database activity. -->
    <entry key="AbandonedConnectionTimeout">240</entry>
    <!-- If no connection is returned to the cache before the timeout elapses, then the connection request returns null. -->
    <entry key="ConnectionWaitTimeout">5</entry>
    <!-- If true causes the connection cache to test every connection it retrieves against the underlying database. If a valid connection cannot be retrieved, then an exception is thrown. -->
    <entry key="ValidateConnection">true</entry>
    </properties>
    Edited by: user12098943 on Aug 24, 2011 10:31 AM

Maybe you are looking for

  • AES S-box question

    I am implementing Rijndael Advanced Encryption Standard (AES). In the specification document the S-box used in the transformation routine is presented. Does this mean that the S-box does not need to be kept secret? Or should I generate my own S-box a

  • ABAP list printing

    Hi friends, Developed a report where line size is upto 255. While taking print out the font size becomes very small. Another way is to download list in  notepad and then take printout. But this disturbs the column headings. Is there any option to cha

  • File structure on JTree

    I need to show the file structure of my clients' computer in a JTree, including the Mapped folders (windows OS). The gui part (JTree) is not the problem. I just don't know how to get the data. I belive that to do that I have to get to the registry of

  • Photoshop elements 12 editor stopped working.how can this be fixed.i have windows 8.1 OS.

    photoshop

  • What is wrong with ui4?

    Hello- I have a potentially dumb question for all of you. I have filtered a bug in my program down to what is basically a one line program, which assigns to a ui4 the maximum integer constant a ui4 can hold, type-casted to a ui4. That is, n : ui4; n