title: weblogic deployment InternalException : Transaction marked rollback or not expected transaction
body: <p>I have an EAR application, and when i try to deploy it to my weblogic server, i get the following error:</p>
  
  <pre><code>&lt;[STANDBY] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'&gt; &lt;&lt;WLS Kernel&gt;&gt; &lt;&gt; &lt;&gt; &lt;1439994186702&gt; &lt;BEA-149078&gt; &lt;Stack trace for message 149004
  weblogic.application.ModuleException: weblogic.ejb.container.InternalException: Transaction marked rollback or not expected transaction status: 1
      at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
      at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
      at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
  Caused By: weblogic.ejb.container.InternalException: Transaction marked rollback or not expected transaction status: 1
      at weblogic.ejb.container.manager.SingletonSessionManager.handleLifecycleCallbackTx(SingletonSessionManager.java:422)
      at weblogic.ejb.container.manager.SingletonSessionManager.constructAndInitBean(SingletonSessionManager.java:339)
      at weblogic.ejb.container.manager.SingletonSessionManager.access$300(SingletonSessionManager.java:62)
      at weblogic.ejb.container.manager.SingletonSessionManager$SingletonLifecycleManager.doActualInit(SingletonSessionManager.java:753)
      at weblogic.ejb.container.manager.SingletonSessionManager$SingletonLifecycleManager.initInternal(SingletonSessionManager.java:701)
      at weblogic.ejb.container.manager.SingletonSessionManager$SingletonLifecycleManager.init(SingletonSessionManager.java:588)
      at weblogic.ejb.container.manager.SingletonSessionManager.init(SingletonSessionManager.java:255)
      at weblogic.ejb.container.manager.SingletonSessionManager.perhapsInit(SingletonSessionManager.java:251)
      at weblogic.ejb.container.deployer.EJBDeployer.start(EJBDeployer.java:968)
      at weblogic.ejb.container.deployer.EJBModule.start(EJBModule.java:597)
      at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
      at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
      at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
      at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
  &gt; 
  </code></pre>
  
  <p>I have a <code>@Singleton</code> in my application, but it doesn't seem that the problem is there since it's not raised from there.</p>
  
  <p>I looked for in the internet for the same problem, but all the given solutions were not enough for me.</p>
  
  <p>Any help? </p>
  
  <p>Thank you.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>By restarting my local machine (on which the weblogic server was installed), the deployment produced more detailed error info, as it was something like this</p>
  
  <pre><code>javax.ejb.NoSuchEJBException: Singleton MySingleton(Application:MYEAR-3.0.1_C1, EJBComponent: MYEJB.jar) failed to initialize.
  Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception: 
  Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
  Exception Description: Deployment of PersistenceUnit [MyPU] failed. Close all factories for this PersistenceUnit.
  Caused by: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.EntityManagerSetupException
  Exception Description: Deployment of PersistenceUnit [MyPU] failed. Close all factories for this PersistenceUnit.
  Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.JPQLException
  Exception Description: Syntax error parsing [select o from Transaction o where o.internalId = :internalId and (o.validUntil is nullor CURRENT_TIMESTAMP between o.validFrom and o.validUntil)]. 
  [30, 139] The expression is not a valid conditional expression.
  [139, 140] The query contains a malformed ending.
  </code></pre>
  
  <p>It seems that my issue was an error in a <code>@NamedQuery</code>, so i solved it, but i'll leave this question open, as this doesn't answer it: How can someone tell what an <code>weblogic.ejb.container.InternalException</code> is?</p>