Topic
8 replies Latest Post - ‏2012-11-18T06:46:29Z by huahsin68
huahsin68
huahsin68
12 Posts
ACCEPTED ANSWER

Pinned topic TransactionManager thrown NullPointerException duing startup.

‏2012-10-03T04:59:34Z |
When I start up my WAS Liberty Profile, I see this error in my Eclipse console. I am totally running out of clue why this could happen. Before this it is working fine, it just happen suddenly without any symptom. Hope you guys could help.

Here is the console output
Launching PFM (wlp-1.0.0.20120428-1251/websphere-kernel_1.0.0) on Java HotSpot(TM) Client VM, version 1.6.0_30-b12 (en_US)
AUDIT CWWKE0001I: The server MyProject has been launched.
ERROR TransactionManager The activate method has thrown an exception Bundle:com.ibm.ws.transaction(id=47) java.lang.NullPointerException
ERROR TransactionManager Failed creating the component instance; see log for reason Bundle:com.ibm.ws.transaction(id=47)
ERROR http://com.ibm.ws.jca.connector Cannot create component instance due to failure to bind reference embeddableWebSphereTransactionManager Bundle:com.ibm.ws.jdbc(id=54)
ERROR TransactionManager The activate method has thrown an exception Bundle:com.ibm.ws.transaction(id=47) java.lang.NullPointerException
ERROR TransactionManager Failed creating the component instance; see log for reason Bundle:com.ibm.ws.transaction(id=47)
ERROR http://com.ibm.ws.jca.connector Component instance could not be created, activation failed Bundle:com.ibm.ws.jdbc(id=54)
AUDIT CWWKZ0058I: Monitoring dropins for applications.
AUDIT CWWKF0011I: The server MyProject is ready to run a smarter planet.
  • JonHawkes
    JonHawkes
    2 Posts
    ACCEPTED ANSWER

    Re: TransactionManager thrown NullPointerException duing startup.

    ‏2012-10-03T08:00:09Z  in response to huahsin68
    There should be an FFDC in your server's logs/ffdc directory containing the stack trace of the NullPointerException. Could you post that please?
    • huahsin68
      huahsin68
      12 Posts
      ACCEPTED ANSWER

      Re: TransactionManager thrown NullPointerException duing startup.

      ‏2012-10-08T05:38:42Z  in response to JonHawkes
      hi all, sorry for my late reply. This is the ffdc log.

      ------Start of DE processing------ = 10/4/12 9:36:33:803 SGT
      Exception = java.lang.NullPointerException
      Source = com.ibm.ws.config.internal.cm.ManagedServiceTracker
      probeid = aSyncReadNupdate. Exception thrown while trying to read configuration and update ManagedService. Exception = java.lang.NullPointerException
      Stack Dump = java.lang.NullPointerException
      at com.ibm.ws.app.manager.internal.monitor.ApplicationMonitorConfig.updated(ApplicationMonitorConfig.java:54)
      at com.ibm.ws.config.internal.cm.ManagedServiceTracker.callDeleted(ManagedServiceTracker.java:381)
      at com.ibm.ws.config.internal.cm.ManagedServiceTracker.access$100(ManagedServiceTracker.java:48)
      at com.ibm.ws.config.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:216)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)

      Dump of callerThis
      null
      Dump of objectArray[0]
      null
      Dump of objectArray[1]
      Object type = com.ibm.ws.app.manager.internal.monitor.ApplicationMonitorConfig
      _pollingRate = class java.util.concurrent.atomic.AtomicLong@b1bed2
      serialVersionUID = 1927816293512124184
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      VM_SUPPORTS_LONG_CAS = true
      value = 500
      serialVersionUID = -8742448824652078965
      _location = class java.util.concurrent.atomic.AtomicReference@76f1f4
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = "dropins"
      _updateTrigger = class java.util.concurrent.atomic.AtomicReference@10704e1
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      theUnsafe = class sun.misc.Unsafe@1bef4c6
      INVALID_FIELD_OFFSET = -1
      valueOffset = 8
      value = class com.ibm.ws.app.manager.internal.monitor.UpdateTrigger@17e6064
      POLLED = class com.ibm.ws.app.manager.internal.monitor.UpdateTrigger@17e6064
      MBEAN = class com.ibm.ws.app.manager.internal.monitor.UpdateTrigger@112bd54
      DISABLED = class com.ibm.ws.app.manager.internal.monitor.UpdateTrigger@14c0275
      $VALUES = class com.ibm.ws.app.manager.internal.monitor.UpdateTrigger[3]
      serialVersionUID = 6553498188329344818
      $$$tc$$$ = class com.ibm.websphere.ras.TraceComponent@1fe1e26
      name = "POLLED"
      ordinal = 0
      _dropinsMonitoring = class java.util.concurrent.atomic.AtomicReference@1d18084
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = true
      _listeners = class java.util.concurrent.CopyOnWriteArrayList@14c7deb
      serialVersionUID = 8673264195747942595
      lock = class java.util.concurrent.locks.ReentrantLock@e265f5
      serialVersionUID = 7373984872572414699
      sync = class java.util.concurrent.locks.ReentrantLock$NonfairSync@1672113
      array = class java.lang.Object[1]
      array[0] = class com.ibm.ws.app.manager.internal.monitor.ApplicationMonitor$1@18feca1
      unsafe = class sun.misc.Unsafe@1bef4c6
      lockOffset = 8
      ms = class com.ibm.ws.app.manager.internal.lifecycle.ServiceReg@deeebd
      _reg = class java.util.concurrent.atomic.AtomicReference@66998f
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = class org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl@fdb413
      _state = class java.util.concurrent.atomic.AtomicReference@1ebba10
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = null
      _props = class java.util.concurrent.atomic.AtomicReference@104a4b6
      serialVersionUID = -1848883965231344442
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = class java.util.Hashtable@8d0a11
      _additionalProps = class java.util.concurrent.ConcurrentHashMap@1d9d55b
      serialVersionUID = 7249069246763182397
      DEFAULT_INITIAL_CAPACITY = 16
      DEFAULT_LOAD_FACTOR = 0.75
      DEFAULT_CONCURRENCY_LEVEL = 16
      MAXIMUM_CAPACITY = 1073741824
      MAX_SEGMENTS = 65536
      RETRIES_BEFORE_LOCK = 2
      segmentMask = 15
      segmentShift = 28
      segments = class java.util.concurrent.ConcurrentHashMap$Segment16
      keySet = null
      entrySet = class java.util.concurrent.ConcurrentHashMap$EntrySet@117a4c6
      values = null
      keySet = null
      values = null
      _dirty = class java.util.concurrent.atomic.AtomicBoolean@4683c2
      serialVersionUID = 4654671469794556979
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = 0
      _registering = class java.util.concurrent.atomic.AtomicBoolean@1743ff4
      serialVersionUID = 4654671469794556979
      unsafe = class sun.misc.Unsafe@1bef4c6
      valueOffset = 8
      value = 0
      serialVersionUID = -167025591435441058
      $$$tc$$$ = class com.ibm.websphere.ras.TraceComponent@38fb59
      name = "com.ibm.ws.app.manager.internal.lifecycle.ServiceReg"
      groups = "http://app.manager"
      bundle = "com.ibm.ws.app.manager.internal.resources.AppManagerMessages"
      logger = "null"
      serialVersionUID = -3160599289561608726
      $$$tc$$$ = class com.ibm.websphere.ras.TraceComponent@9801f4
      name = "com.ibm.ws.app.manager.internal.monitor.ApplicationMonitorConfig"
      groups = "http://app.manager"
      bundle = "com.ibm.ws.app.manager.internal.resources.AppManagerMessages"
      logger = "null"

      Dump of objectArray[2]
      Object type = org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl
      registration = class org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl@fdb413
      framework = class org.eclipse.osgi.framework.internal.core.Framework@1c737be
      PROP_CONTEXTCLASSLOADER_PARENT = "osgi.contextClassLoaderParent"
      CONTEXTCLASSLOADER_PARENT_APP = "app"
      CONTEXTCLASSLOADER_PARENT_EXT = "ext"
      CONTEXTCLASSLOADER_PARENT_BOOT = "boot"
      CONTEXTCLASSLOADER_PARENT_FWK = "fwk"
      PROP_FRAMEWORK_THREAD = "osgi.framework.activeThreadType"
      THREAD_NORMAL = "normal"
      PROP_EQUINOX_SECURITY = "eclipse.security"
      SECURITY_OSGI = "osgi"
      J2SE = "J2SE-"
      JAVASE = "JavaSE-"
      PROFILE_EXT = ".profile"
      adaptor = class org.eclipse.osgi.baseadaptor.BaseAdaptor@6e8f94
      properties = class java.util.Properties@187b5ff
      active = true
      shutdownEvent = class org.osgi.framework.FrameworkEvent[1]
      bundles = class org.eclipse.osgi.framework.internal.core.BundleRepository@1d433c1
      packageAdmin = class org.eclipse.osgi.framework.internal.core.PackageAdminImpl@92015d
      securityAdmin = class org.eclipse.osgi.internal.permadmin.SecurityAdmin@197871d
      startLevelManager = class org.eclipse.osgi.framework.internal.core.StartLevelManager@127a49c
      serviceRegistry = class org.eclipse.osgi.internal.serviceregistry.ServiceRegistry@1ca203
      allBundleListeners = class java.util.HashMap@1a82e92
      BUNDLEEVENT = 1
      allSyncBundleListeners = class java.util.HashMap@898587
      BUNDLEEVENTSYNC = 2
      allFrameworkListeners = class java.util.HashMap@9d9edd
      FRAMEWORKEVENT = 4
      BATCHEVENT_BEGIN = -2147483647
      BATCHEVENT_END = -2147483648
      eventHookName = "org.osgi.framework.hooks.bundle.EventHook"
      findHookName = "org.osgi.framework.hooks.bundle.FindHook"
      eventManager = class org.eclipse.osgi.framework.eventmgr.EventManager@28df48
      installLock = class java.util.HashMap@15b2043
      systemBundle = class org.eclipse.osgi.framework.internal.core.InternalSystemBundle@1ebf4ff
      bootDelegation = class java.lang.String[1]
      bootDelegationStems = class java.lang.String[7]
      bootDelegateAll = false
      contextBootDelegation = true
      compatibiltyBootDelegation = false
      allowDuplicateBSNVersion = false
      allowRefreshDuplicateBSN = true
      delegateHooks = interface org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook[0]
      forcedRestart = false
      aliasMapper = class org.eclipse.osgi.framework.internal.core.AliasMapper@43b5bb
      secureAction = class org.eclipse.osgi.framework.util.SecureAction@15023d2
      adminPermissions = class java.util.HashMap@5fbbf3
      streamHandlerFactory = class org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory@12c55e4
      contentHandlerFactory = class org.eclipse.osgi.framework.internal.protocol.ContentHandlerFactory@1bb03ee
      signedContentFactory = class org.osgi.util.tracker.ServiceTracker@ff0239
      contextFinder = class org.eclipse.core.runtime.internal.adaptor.ContextFinder@1eaefc5
      class$0 = class java.lang.Class@fced4
      class$1 = class java.lang.Class@6355dc
      class$2 = class java.lang.Class@126f827
      class$3 = class java.lang.Class@1a99347
      class$4 = class java.lang.Class@20f443
      class$5 = null
      class$6 = null
      class$7 = null
      class$8 = null
      class$9 = null
      class$10 = null
      class$11 = null
      class$12 = null
      registry = class org.eclipse.osgi.internal.serviceregistry.ServiceRegistry@1ca203
      SERVICEEVENT = 3
      findHookName = "org.osgi.framework.hooks.service.FindHook"
      eventHookName = "org.osgi.framework.hooks.service.EventHook"
      eventListenerHookName = "org.osgi.framework.hooks.service.EventListenerHook"
      listenerHookName = "org.osgi.framework.hooks.service.ListenerHook"
      publishedServicesByClass = class java.util.HashMap@1d56bbe
      allPublishedServices = class java.util.ArrayList@94a28e
      publishedServicesByContext = class java.util.HashMap@3c40f0
      serviceid = 164
      serviceEventListeners = class java.util.HashMap@71d29a
      initialCapacity = 50
      initialSubCapacity = 10
      framework = class org.eclipse.osgi.framework.internal.core.Framework@1c737be
      $assertionsDisabled = true
      class$0 = class java.lang.Class@4bf53e
      class$1 = class java.lang.Class@c68a98
      class$2 = class java.lang.Class@354749
      class$3 = class java.lang.Class@167d7fb
      context = class org.eclipse.osgi.framework.internal.core.BundleContextImpl@105562b
      SET_TCCL = true
      valid = true
      bundle = class org.eclipse.osgi.framework.internal.core.BundleHost@11f139b
      framework = class org.eclipse.osgi.framework.internal.core.Framework@1c737be
      servicesInUse = class java.util.HashMap@e9c592
      activator = class com.ibm.ws.app.manager.internal.lifecycle.AppManagerLifecycle@1a9fcea
      contextLock = class java.lang.Object@11b99c4
      bundle = class org.eclipse.osgi.framework.internal.core.BundleHost@11f139b
      LAZY_TRIGGER = 1073741824
      proxy = class org.eclipse.osgi.internal.loader.BundleLoaderProxy@1991ba7
      context = class org.eclipse.osgi.framework.internal.core.BundleContextImpl@105562b
      fragments = null
      STATE_CHANGE_TIMEOUT = 5000
      framework = class org.eclipse.osgi.framework.internal.core.Framework@1c737be
      state = 8
      stateChanging = class org.eclipse.osgi.framework.eventmgr.EventManager$EventThread@e674d6
      bundledata = class org.eclipse.osgi.baseadaptor.BaseData@b925
      statechangeLock = class java.lang.Object@17b6074
      domain = null
      manifestLocalization = class org.eclipse.osgi.framework.internal.core.ManifestLocalization@f97d27
      class$0 = class java.lang.Class@16dc861
      class$1 = class java.lang.Class@1b5391b
      class$2 = class java.lang.Class@951a0
      clazzes = class java.lang.String[1]
      clazzes[0] = "org.osgi.service.cm.ManagedService"
      service = class com.ibm.ws.app.manager.internal.monitor.ApplicationMonitorConfig@14c8822
      _pollingRate = class java.util.concurrent.atomic.AtomicLong@b1bed2
      _location = class java.util.concurrent.atomic.AtomicReference@76f1f4
      _updateTrigger = class java.util.concurrent.atomic.AtomicReference@10704e1
      _dropinsMonitoring = class java.util.concurrent.atomic.AtomicReference@1d18084
      _listeners = class java.util.concurrent.CopyOnWriteArrayList@14c7deb
      ms = class com.ibm.ws.app.manager.internal.lifecycle.ServiceReg@deeebd
      serialVersionUID = -3160599289561608726
      $$$tc$$$ = class com.ibm.websphere.ras.TraceComponent@9801f4
      reference = class org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl@8d1749
      contextsUsing = class java.util.ArrayList@f3cf72
      serialVersionUID = 8683452581122892189
      elementData = class java.lang.Object10
      size = 2
      modCount = 2
      properties = class org.eclipse.osgi.internal.serviceregistry.ServiceProperties@b8501d
      readOnly = true
      headers = class java.lang.Object[3]
      values = class java.lang.Object[3]
      size = 3
      serviceid = 162
      serviceranking = 0
      registrationLock = class java.lang.Object@93a985
      state = 0
      REGISTERED = 0
      UNREGISTERING = 1
      UNREGISTERED = 2
      $assertionsDisabled = true
      • JonHawkes
        JonHawkes
        2 Posts
        ACCEPTED ANSWER

        Re: TransactionManager thrown NullPointerException duing startup.

        ‏2012-10-09T10:43:28Z  in response to huahsin68
        It is not obvious from the FFDC log what the cause of this problem is.

        I recommend you raise a PMR to have this issue investigated further.
        • Jacek_Laskowski
          Jacek_Laskowski
          133 Posts
          ACCEPTED ANSWER

          Re: TransactionManager thrown NullPointerException duing startup.

          ‏2012-10-10T14:22:31Z  in response to JonHawkes
          Hi,

          I don't have access to the sources, but someone who does would likely have to start digging in around the 54th line of the ApplicationMonitorConfig class as shown below in the stack trace:
          
          Stack Dump = java.lang.NullPointerException at com.ibm.ws.app.manager.internal.monitor.ApplicationMonitorConfig.updated(ApplicationMonitorConfig.java:54) at com.ibm.ws.config.internal.cm.ManagedServiceTracker.callDeleted(ManagedServiceTracker.java:381) at com.ibm.ws.config.internal.cm.ManagedServiceTracker.access$100(ManagedServiceTracker.java:48) at com.ibm.ws.config.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:216) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
          

          Jacek
          Japila :: verba docent, exempla trahunt
          • SystemAdmin
            SystemAdmin
            590 Posts
            ACCEPTED ANSWER

            Re: TransactionManager thrown NullPointerException duing startup.

            ‏2012-10-10T14:31:49Z  in response to Jacek_Laskowski
            Hi,

            Can you try doing a clean start? From the command line do server start <server name> --clean. From the tools right click on the server and check the box named something similar to "Clean Server on next start". Does that clear up the issue?

            Thanks
            Alasdair
            • huahsin68
              huahsin68
              12 Posts
              ACCEPTED ANSWER

              Re: TransactionManager thrown NullPointerException duing startup.

              ‏2012-11-18T06:46:29Z  in response to SystemAdmin
              Sorry for my late reply as I was totally forget about this problem. I did "Clean the server on next start" but it still failed. I have no clue to cure it. Thus I just recreate the server again every time it crash. Apparently I have the problem solved.
  • Jacek_Laskowski
    Jacek_Laskowski
    133 Posts
    ACCEPTED ANSWER

    Re: TransactionManager thrown NullPointerException duing startup.

    ‏2012-10-03T22:11:54Z  in response to huahsin68
    Hi,

    Beside the FFDC, I would love having a look at the server.xml.

    Jacek
    Japila :: verba docent, exempla trahunt
    • huahsin68
      huahsin68
      12 Posts
      ACCEPTED ANSWER

      Re: TransactionManager thrown NullPointerException duing startup.

      ‏2012-10-08T05:42:02Z  in response to Jacek_Laskowski
      And this is my server.xml content. Please ignore the data source setting as currently I am using direct connection in Hibernate.cfg.xml.

      <server description="new server">

      <!-- Enable features -->
      <featureManager>
      <feature>jsp-2.2</feature>
      <feature>jndi-1.0</feature>
      <feature>jdbc-4.0</feature>
      <feature>servlet-3.0</feature>
      <feature>localConnector-1.0</feature>
      <feature>jsf-2.0</feature>
      </featureManager>

      <httpEndpoint host="*" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" virtualHost="default_host"/>
      <applicationMonitor updateTrigger="mbean"/>
      <jdbcDriver id="db2Driver">
      <library>
      <fileset dir="${wlp.user.dir}/servers/lib" id="db2lib" includes="db2java.jar, db2jcc.jar, db2jcc_javax.jar, db2jcc_license_cu.jar"/>
      </library>
      </jdbcDriver>
      <dataSource id="myProjectDatasource" jdbcDriverRef="db2Driver" jndiName="jdbc/myProject">
      <properties.db2.jcc databaseName="MYDB" password="{xor}Pj08Ow==" portNumber="51001" serverName="128.230.60.74" user="sfaappmy"/>
      </dataSource>

      <application context-root="ProjectA" id="MyProject" location="MyProject.war" name="MyProject" type="war"/>
      </server>