Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6179378

An object could be constructed and returned without proper initializing fields in the constructor.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2_05
    • Fix Version/s: 1.4.2_05
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      solaris_9

      Description

      We found the bug in the application server MDB environment:

      platform solaris9 x86
      Application server 8.1ee b32
      mq FCS-6
      jdk 1.4.2_05

      java version "1.4.2_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
      Java HotSpot(TM) Server VM (build 1.4.2_05-b04, mixed mode)

      Code snippet and the exception stack trace are provided below. Related java classes are attached.

      We believe that private variable "queue" in SessionQueue object cannot be null in a healthy JVM.

      QA were able to reproduce this bug three times during app server MDB stress tests. Please see "see also" for detail description for the related bugs.

      <SessionImpl>
          public SessionImpl (ConnectionImpl connection, boolean isTransacted, int
                 acknowledgeMode, boolean allowJMSExtension, ManagedConnection mc)
                 throws JMSException {

              sessionQueue = new SessionQueue();//line #291
              sessionQueue.validateQueue(); //line #292
          }
      </SessionImpl>

      <SessionQueue>
          
          private MessageQueue queue = null;

          public SessionQueue() {
                  queue = new PriorityQueue();
          }

          protected synchronized void validateQueue() {
              if ( queue == null ) {
                  throw new java.lang.Error //line #91
                  ("JVM Error. Message Queue is null.");
              }
          }

      </SessionQueue>


      The following is the stack trace when the error occurred (from bug 6177455).

      ==============================================================================

      [#|2004-10-13T05:13:00.740+0530|INFO|sun-appserver-ee8.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=43;|MDB00037: [XATStress:XAT
      StressMDB2]: Message-driven bean invocation exception: [javax.ejb.EJBException]|#]

      [#|2004-10-13T05:13:00.741+0530|INFO|sun-appserver-ee8.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=43;|javax.ejb.EJBException
      javax.ejb.EJBException
              at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:2800)
              at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2706)
              at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2514)
              at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1071)
              at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1042)
              at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:46)
              at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:105)
              at $Proxy17.afterDelivery(Unknown Source)
              at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:228)
              at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
              at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:398)
      Caused by: java.lang.Error: JVM Error. Message Queue is null. Create time: 1097624580268 duration: 0
              at com.sun.messaging.jmq.jmsclient.SessionQueue.validateQueue(SessionQueue.java:91)
              at com.sun.messaging.jmq.jmsclient.SessionImpl.<init>(SessionImpl.java:292)
              at com.sun.messaging.jmq.jmsclient.SessionImpl.<init>(SessionImpl.java:271)
              at com.sun.messaging.jmq.jmsclient.UnifiedSessionImpl.<init>(UnifiedSessionImpl.java:45)
              at com.sun.messaging.jmq.jmsclient.XASessionImpl.<init>(XASessionImpl.java:65)
              at com.sun.messaging.jmq.jmsclient.XATopicSessionImpl.<init>(XATopicSessionImpl.java:61)
              at com.sun.messaging.jmq.jmsclient.XAConnectionImpl.createTopicSession(XAConnectionImpl.java:154)
              at com.sun.messaging.jms.ra.ConnectionAdapter.createTopicSession(ConnectionAdapter.java:398)
              at XATStressMDB2.onMessage(XATStressMDB2.java:166)
              at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:149)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
              at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:154)
              at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:956)
              at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:42)
              at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:130)
              at $Proxy17.onMessage(Unknown Source)
              at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:173)
              ... 2 more
      -----------------------------------------------------------------------
      ###@###.### 10/14/04 19:58 GMT


      Correction: The VM option used was client VM, not server VM:

      java version "1.4.2_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
      Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
      ###@###.### 10/19/04 05:46 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: