All entities are mapped by annotations on the fields
      with no exceptions 
      All jpa mappings are on classes with no exceptions - package is
      just called interface as its in a shared jar between client and
      server side 
      We deploy an ear file that contains about 12 jars, these classes 
      are in a different jar to the one where the persistence.xml is
      defined - but it is referenced in the persistence.xml 
       
      nb - auditFields has no @Embedded annotation for some reason in
      the PortfolioGroupMemberAudit entity, seems it got missed off in
      about 30% of the codebase for some reason - it must infer it
      somehow or they wouldnt work at all - we'll make sure they get put
      in... 
      BUT - some of the other classes  in the original stack traces with
      the bug do reference embedded fields which are annotated correctly
      in ALL entities -  
      eg CreditLineMaker sometime fails with 
       
      Exception Description: Error compiling
        the query
        [CreditLineMaker.findSummaryMaker: SELECT NEW
        biz.wss.interfaces.entities.foureyes.auditmaker.SummaryRow(
        a.makerFields.auditDateTime, a.makerFields.state, a.lineId,
        a.statusField.status, a.makerFields.makerUser) FROM
        CreditLineMaker a ORDER BY
        a.makerFields.auditDateTime], line 1, column 134: unknown state
        or association
        field [statusField] of class
[biz.wss.interfaces.entities.credit.lines.foureyes.CreditLineMaker].
       
     
    <persistence version="1.0"
        xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> 
            <persistence-unit name="WSSJPA"
        transaction-type="JTA"> 
               
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> 
               
        <jta-data-source>jdbc/WSSJPADATASOURCE</jta-data-source> 
               
        <mapping-file>META-INF/orm-wssjpa.xml</mapping-file> 
               
        <jar-file>Bedrock.interfaces.entities.jar</jar-file> 
               
        <jar-file>Bedrock.server.services.local.jar</jar-file> 
               
        <jar-file>Bedrock.server.services.bo.jar</jar-file> 
               
        <jar-file>Bedrock.server.services.position.jar</jar-file> 
         
       
    @Entity 
        @NamedQueries({            //CLASS NAME 
           
        @NamedQuery(name=NamedQueryNames.PORTFOLIOGROUPMEMBERAUDIT_GET_LAST_ACCEPTED_AUDIT,
         
                    query="SELECT a " + 
                    "FROM PortfolioGroupMemberAudit a " + 
                    "WHERE a.auditId.id = :id " +  
                    "AND a.auditId.auditDateTime < :auditTime " + 
                    "AND a.auditFields.state = '0' " + 
                    "ORDER BY a.auditId.auditDateTime DESC") 
                     
        })             
        @Table(name = TableNames.WBR_SD_PFGRPMEMBERADT) 
        public class PortfolioGroupMemberAudit  extends
        PortfolioGroupMemberTahoe implements Serializable,
        AuditIdAccess,   AuditFieldAccess, StatusFieldAccess { 
          private AuditFields auditFields = new
        AuditFields(); 
      .... 
      } 
       
      @Embeddable 
        public class AuditFields implements Serializable{ 
         
            private static final long serialVersionUID =
        6546269842599786936L; 
             
            private String auditUser; 
             
            private Timestamp auditLastDateTime; 
             
            private Timestamp auditNextDateTime; 
             
            @Column(name="CURRENTSTATE") 
            private String state; 
             
            private Timestamp effectiveFromDateTime; 
             
            private String sourceTID = " ";     
       
        @Entity 
        @Table(name=TableNames.WBR_CRLINEMKR) 
        @NamedQueries({ 
           
        @NamedQuery(name=NamedQueryNames.CREDITLINEMAKER_FIND_SUMMARY_MAKER,
         
                    query="SELECT NEW " + SummaryRow.CLASSPATH + "(
        a.makerFields.auditDateTime, " + 
                    " a.makerFields.state, a.lineId, " +              
                    "a.statusField.status, a.makerFields.makerUser) " + 
                    "FROM CreditLineMaker a " + 
                    "ORDER BY a.makerFields.auditDateTime"), 
                     
        @NamedQuery(name=NamedQueryNames.CREDITLINEMAKER_IS_MAKER_EXISTING,
         
                query="SELECT COUNT(a) " +  
                "FROM CreditLineMaker a " + 
                "WHERE a.lineId = :key"), 
                 
@NamedQuery(name=NamedQueryNames.CREDITLINETAHOE_GET_LINE_ALLOCATIONS, 
                query="SELECT a FROM LineAllocationLive a WHERE
        a.line.lineId = ?1")     
                 
         
        }) 
        public class CreditLineMaker extends CreditLineTahoe implements
        MakerFieldAccess, StatusFieldAccess { 
         
             
            private static final long serialVersionUID =
        802982889993446568L; 
         
            @Id 
            @Column(name="ID") 
            private String lineId; 
             
            @Embedded 
            private MakerFields makerFields = new MakerFields(); 
             
            @Embedded 
            private StatusField statusField = new StatusField(); 
         
        ... 
      } 
         
        @Embeddable 
        public class StatusField implements Serializable { 
         
         
            private static final long serialVersionUID =
        -4208550668300726222L; 
             
            private String status; 
     
    [11/1/11 12:16:36:933 UTC] 00000026 SystemOut O [EL Severe]:
    2011-11-01
    12:16:36.913--ServerSession(217124081)--Local Exception Stack:
    Exception [EclipseLink-8030] (Eclipse Persistence Services -
    2.2.1.v20110721-r9766):
    org.eclipse.persistence.exceptions.JPQLException
    Exception Description: Error compiling the query
    [DataElementGroupAudit.checkPrevAuditsByNaturalKey: SELECT NEW
    biz.wss.interfaces.entities.foureyes.auditmaker.AuditStateUser(a.auditFields.currentState,
a.auditFields.auditUser)
    FROM DataElementGroupAudit a WHERE a.code = :code
    ORDER BY a.auditFields.auditDateTime DESC], line 1, column 76:
    unknown state or
    association field [auditFields] of class
    [biz.wss.interfaces.entities.bo.dataelement.group.foureyes.DataElementGroupAudit].
    at
    org.eclipse.persistence.exceptions.JPQLException.unknownAttribute(JPQLException.java:457)
    at
org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:88)
     
    On 02/11/2011 17:07, Tom Ware wrote:
    The
      fact that the same error remains with the property suggests that
      the issue is not related to multi-threading.
       
       
      I guess we have to figure out why it is not finding that
      particular field.
       
       
      How is PortfolioGroupMemberAudit mapped?  Does it use annotations
      or orm.xml? If orm.xml is the orm.xml co-located with the class
      file?  (i.e. is it in the same jar)
       
       
      How does PortfolioGroupMemberAudit declare its auditFields
      property.  How is that mapped?  What is the target?  How is that
      mapped?
       
       
      I notice the package contains the word "interfaces".  Are the
      mappings to interfaces?  Are those in separate jars?
       
       
      Are you deploying in a war?  An ear?  Where are the various parts
      of your persistence unit packaged?
       
       
       
      -Tom
       
       
      On 02/11/2011 12:59 PM, Nathan Drew wrote:
       
      Hi Tom,
         
         
        I tried again and the following errors are present, and looking
        higher up the
         
        startup logs I saw a similar exception to without the
         
        eclipselink.deploy-on-startup set to true:
         
         
        [11/2/11 16:39:07:181 UTC] 0000000e SystemOut O [EL Severe]:
        2011-11-02
         
        16:39:07.163--ServerSession(1019952331)--Local Exception Stack:
         
         
        Exception [EclipseLink-8030] (Eclipse Persistence Services -
         
        2.3.1.v20111018-r10243):
        org.eclipse.persistence.exceptions.JPQLException
         
         
        Exception Description: Error compiling the query
         
        [PortfolioGroupMemberAudit.getLastAcceptedAudit: SELECT a FROM
         
        PortfolioGroupMemberAudit a WHERE a.auditId.id = :id AND
        a.auditId.auditDateTime
         
        < :auditTime AND a.auditFields.state = '0' ORDER BY
        a.auditId.auditDateTime
         
        DESC], line 1, column 114: unknown state or association field
        [auditFields] of
         
        class
        [biz.wss.interfaces.entities.pfolio.foureyes.PortfolioGroupMemberAudit].
         
         
        at
         
org.eclipse.persistence.exceptions.JPQLException.unknownAttribute(JPQLException.java:457)
         
         
        at
org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:87) 
         
        at
org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:72) 
         
        at
        org.eclipse.persistence.internal.jpa.parsing.Node.validate(Node.java:92)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode.validate(BinaryOperatorNode.java:34)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.EqualsNode.validate(EqualsNode.java:41)
         
         
        at
        org.eclipse.persistence.internal.jpa.parsing.Node.validate(Node.java:95)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.LogicalOperatorNode.validate(LogicalOperatorNode.java:39)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.WhereNode.validate(WhereNode.java:34)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:207)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:183)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:173)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateReadQueryInternal(JPQLParseTree.java:110)
         
         
        at
         
org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateQuery(JPQLParseTree.java:84)
         
         
        at
         
org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:219)
         
         
        at
org.eclipse.persistence.internal.jpa.JPAQuery.processJPQLQuery(JPAQuery.java:106) 
         
        at
        org.eclipse.persistence.internal.jpa.JPAQuery.prepare(JPAQuery.java:90)
         
         
        at
         
org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:613)
         
         
        at
         
org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:575)
         
         
        at
         
org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:2161)
         
         
        at
         
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:442)
         
         
        at
         
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:676)
         
         
        at
         
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:621)
         
         
        at
         
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
         
         
        at
         
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
         
         
        at
         
org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
         
         
        at
         
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:485)
         
         
        at
         
org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:243)
         
         
        at
com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1498) 
         
        at
         
com.ibm.ws.jpa.management.JPAPUnitInfo.createEntityManagerFactory(JPAPUnitInfo.java:1332)
         
         
        at
         
com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits(JPAPxmlInfo.java:393)
         
         
        at
         
com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit(JPAScopeInfo.java:140)
         
         
        at
com.ibm.ws.jpa.management.JPAApplInfo.processModulePUs(JPAApplInfo.java:169) 
         
        at
         
com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule(JPAComponentImpl.java:895)
         
         
        at
         
com.ibm.ws.jpa.management.JPAComponentImpl.stateChanged(JPAComponentImpl.java:748)
         
         
        at
         
com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1075)
         
         
        at
         
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1302)
         
         
        at
         
com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:221)
         
         
        at
         
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:607)
         
         
        at
         
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
         
         
        at
         
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:726)
         
         
        at
         
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2048)
         
         
        at
         
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:441)
         
         
        at
         
com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
         
         
        at
         
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:384)
         
         
        at
         
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:112)
         
         
        at
         
com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:951)
         
         
        at
         
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
         
         
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
         
         
        Then:
         
         
        [11/2/11 16:39:19:456 UTC] 00000000 JMXConnectors I ADMC0058I:
        The JMX JSR160RMI
         
        connector is available at port 2005
         
         
        [11/2/11 16:39:19:564 UTC] 00000022 FfdcProvider W
         
        com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC
        Incident emitted
         
        on
         
/rndvm/java/profiles/AppSrvRNDVM/logs/ffdc/server1_6d766d76_11.11.02_16.39.19.3755386114168158446905.txt
         
        com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject
        408
         
         
        [11/2/11 16:39:19:612 UTC] 00000022 InjectionBind E CWNEN0030E:
        The
         
        com.ibm.ws.util.JPAJndiLookupObjectFactory@22882288 factory
        encountered a
         
        problem getting the object instance Reference Class Name:
         
        javax.persistence.EntityManager
         
         
        Type: JPAJndiLookupInfo
         
         
        Content:
        PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA,
         
Bedrock-EAR#Bedrock.server.services.local.jar#FotDAOEJB#biz.wss.server.services.local.fx.pricing.fotinfo.FotDAOEJB/em,
         
        isFactory=false, isSFSB=false,
        PersistenceContextType=Transaction, properties=[]
         
         
        binding object.
         
         
        [11/2/11 16:39:19:671 UTC] 00000022 DMAdapter I
        com.ibm.ws.ffdc.impl.DMAdapter
         
        getAnalysisEngine FFDC1009I: Analysis Engine using data base:
         
/rndvm/java/profiles/AppSrvRNDVM/properties/logbr/ffdc/adv/ffdcdb.xml
         
         
        [11/2/11 16:39:20:684 UTC] 00000000 WsServerImpl A WSVR0001I:
        Server server1
         
        open for e-business
         
         
        [11/2/11 16:39:20:381 UTC] 00000022 FfdcProvider W
         
        com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC
        Incident emitted
         
        on
         
/rndvm/java/profiles/AppSrvRNDVM/logs/ffdc/server1_6d766d76_11.11.02_16.39.19.6315144406007327184821.txt
         
        com.ibm.ejs.container.StatelessBeanO.<init> 282
         
         
        [11/2/11 16:39:21:295 UTC] 00000024 InjectionBind E CWNEN0030E:
        The
         
        com.ibm.ws.util.JPAJndiLookupObjectFactory@37ce37ce factory
        encountered a
         
        problem getting the object instance Reference Class Name:
         
        javax.persistence.EntityManager
         
         
        Type: JPAJndiLookupInfo
         
         
        Content:
        PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA,
         
Bedrock-EAR#Bedrock.server.services.local.jar#ParameterDaoEjb#biz.wss.server.services.local.dao.readers.wss.ParameterDaoEjb/em,
         
        isFactory=false, isSFSB=false,
        PersistenceContextType=Transaction, properties=[]
         
         
        binding object.
         
         
        [11/2/11 16:39:22:593 UTC] 00000024 FfdcProvider W
         
        com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC
        Incident emitted
         
        on
         
/rndvm/java/profiles/AppSrvRNDVM/logs/ffdc/server1_54d254d2_11.11.02_16.39.21.2996421930134207096469.txt
         
        com.ibm.ejs.container.EJSHome.createBeanO 1023
         
         
        [11/2/11 16:39:21:684 UTC] 00000025 InjectionBind E CWNEN0030E:
        The
         
        com.ibm.ws.util.JPAJndiLookupObjectFactory@28f028f0 factory
        encountered a
         
        problem getting the object instance Reference Class Name:
         
        javax.persistence.EntityManager
         
         
        Type: JPAJndiLookupInfo
         
         
        Content:
        PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA,
         
Bedrock-EAR#Bedrock.server.services.local.jar#TimerSchedulerEJB#biz.wss.server.services.local.scheduler.TimerSchedulerEJB/entityManager,
         
        isFactory=false, isSFSB=false,
        PersistenceContextType=Transaction, properties=[]
         
         
        binding object.
         
         
        [11/2/11 16:39:21:686 UTC] 00000022 BusinessExcep E CNTR0019E:
        EJB threw an
         
        unexpected (non-declared) exception during invocation of method
        "getConfig".
         
        Exception data: javax.ejb.EJBException: Injection failure;
        nested exception is:
         
        java.lang.IllegalStateException: EntityManagerFactory has not
        been created for
         
        PU : PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
        java.lang.IllegalStateException: EntityManagerFactory has not
        been created for
         
        PU : PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
        at
         
com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1369)
         
         
        at
         
com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1577)
         
         
        at
com.ibm.ws.jpa.management.JPATxEntityManager.<init>(JPATxEntityManager.java:156) 
         
        at
         
com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1053)
         
         
        at
         
com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151)
         
         
        at
         
com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject(InjectionBinding.java:659)
         
         
        at
         
com.ibm.wsspi.injectionengine.InjectionTargetField.inject(InjectionTargetField.java:245)
         
         
        at
         
com.ibm.ws.injectionengine.InjectionEngineImpl.inject(InjectionEngineImpl.java:620)
         
         
        at
        com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:287)
         
         
        at
         
com.ibm.ejs.container.CMStatelessBeanOFactory.create(CMStatelessBeanOFactory.java:45)
         
         
        at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1031)
         
         
        at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1141)
         
         
        at
         
com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:84)
         
         
        at
com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:599) 
         
        at
com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java:3964) 
         
        at
        com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:3349)
         
         
        at
         
biz.wss.interfaces.services.fx.pricing.fotinfo.EJSLocal0SLFotDAOEJB_73eeba3d.getConfig(EJSLocal0SLFotDAOEJB_73eeba3d.java)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotRepository.initialise(FotRepository.java:72)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotInitialiser.start(FotInitialiser.java:80)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotInitialiser.onMessage(FotInitialiser.java:65)
         
         
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         
         
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 
         
        at
         
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
         
         
        at java.lang.reflect.Method.invoke(Method.java:611)
         
         
        at
        com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5874)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:586)
         
         
        at
         
biz.wss.server.services.logging.analysis.MethodTimerInterceptor.intercept(MethodTimerInterceptor.java:161)
         
         
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         
         
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 
         
        at
         
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
         
         
        at java.lang.reflect.Method.invoke(Method.java:611)
         
         
        at
         
com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:566)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:217)
         
         
        at
         
com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1080)
         
         
        at
         
com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:778)
         
         
        at $Proxy42.onMessage(Unknown Source)
         
         
        at
         
com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEndpointInvokerImpl.java:233)
         
         
        at
com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:900) 
         
        at
         
com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:552)
         
         
        at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399)
         
         
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
         
         
        javax.ejb.EJBException: Injection failure; nested exception is:
         
        java.lang.IllegalStateException: EntityManagerFactory has not
        been created for
         
        PU : PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
        Caused by: java.lang.IllegalStateException: EntityManagerFactory
        has not been
         
        created for PU :
        PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
        at
         
com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1369)
         
         
        at
         
com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1577)
         
         
        at
com.ibm.ws.jpa.management.JPATxEntityManager.<init>(JPATxEntityManager.java:156) 
         
        at
         
com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1053)
         
         
        at
         
com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151)
         
         
        at
         
com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject(InjectionBinding.java:659)
         
         
        at
         
com.ibm.wsspi.injectionengine.InjectionTargetField.inject(InjectionTargetField.java:245)
         
         
        at
         
com.ibm.ws.injectionengine.InjectionEngineImpl.inject(InjectionEngineImpl.java:620)
         
         
        at
        com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:287)
         
         
        at
         
com.ibm.ejs.container.CMStatelessBeanOFactory.create(CMStatelessBeanOFactory.java:45)
         
         
        at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1031)
         
         
        at com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1141)
         
         
        at
         
com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(UncachedActivationStrategy.java:84)
         
         
        at
com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:599) 
         
        at
com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java:3964) 
         
        at
        com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:3349)
         
         
        at
         
biz.wss.interfaces.services.fx.pricing.fotinfo.EJSLocal0SLFotDAOEJB_73eeba3d.getConfig(EJSLocal0SLFotDAOEJB_73eeba3d.java)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotRepository.initialise(FotRepository.java:72)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotInitialiser.start(FotInitialiser.java:80)
         
         
        at
         
biz.wss.server.services.local.fx.pricing.fotinfo.FotInitialiser.onMessage(FotInitialiser.java:65)
         
         
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         
         
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 
         
        at
         
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
         
         
        at java.lang.reflect.Method.invoke(Method.java:611)
         
         
        at
        com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5874)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:586)
         
         
        at
         
biz.wss.server.services.logging.analysis.MethodTimerInterceptor.intercept(MethodTimerInterceptor.java:161)
         
         
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         
         
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) 
         
        at
         
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
         
         
        at java.lang.reflect.Method.invoke(Method.java:611)
         
         
        at
         
com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:566)
         
         
        at
         
com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:217)
         
         
        at
         
com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1080)
         
         
        at
         
com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:778)
         
         
        at $Proxy42.onMessage(Unknown Source)
         
         
        at
         
com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEndpointInvokerImpl.java:233)
         
         
        at
com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:900) 
         
        at
         
com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:552)
         
         
        at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399)
         
         
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
         
         
        On another attempt it’s again a different query that it
        complains about, it just
         
        still happens earlier on in the server startup cycle:
         
         
        [11/2/11 16:51:01:230 UTC] 00000010 SystemOut O [EL Severe]:
        2011-11-02
         
        16:51:01.211--ServerSession(422517039)--Local Exception Stack:
         
         
        Exception [EclipseLink-8030] (Eclipse Persistence Services -
         
        2.3.1.v20111018-r10243):
        org.eclipse.persistence.exceptions.JPQLException
         
         
        Exception Description: Error compiling the query
         
        [InstrumentClassLimitAudit.checkPrevAudits: SELECT NEW
         
        biz.wss.interfaces.entities.foureyes.auditmaker.AuditStateUser(
         
        a.auditFields.state, a.auditFields.auditUser) FROM
        InstrumentClassLimitAudit a
         
        WHERE a.auditId.id = :id ORDER BY a.auditId.auditDateTime DESC],
        line 1, column
         
        77: unknown state or association field [auditFields] of class
         
[biz.wss.interfaces.entities.credit.instrumentclass.foureyes.InstrumentClassLimitAudit].
         
         
        *WebSphere_7 in persistence.xml*
         
         
        As suggested in another thread of the emails by Michael O'Brien,
        I tried
         
        WebSphere_7 (I have a feeling I've tried this before also) but
        get the same thing:
         
         
        [11/2/11 16:57:57:507 UTC] 0000000e SystemOut O [EL Severe]:
        2011-11-02
         
        16:57:57.481--ServerSession(141166698)--Local Exception Stack:
         
         
        Exception [EclipseLink-8030] (Eclipse Persistence Services -
         
        2.3.1.v20111018-r10243):
        org.eclipse.persistence.exceptions.JPQLException
         
         
        Exception Description: Error compiling the query
         
        [RuleSetICQAAudit.checkPrevAuditsByNaturalKey: SELECT NEW
         
biz.wss.interfaces.entities.foureyes.auditmaker.AuditStateUser(a.auditFields.currentState,
         
        a.auditFields.auditUser) FROM RuleSetICQAAudit a WHERE
        a.settleCentreId =
         
        :settleCentreId AND ((a.boProductCategoryId =
        :boProductCategoryId AND NOT
         
        :boProductCategoryId IS NULL) OR (:boProductCategoryId IS NULL
        AND
         
        a.boProductCategoryId IS NULL)) AND ((a.boProductId =
        :boProductId AND NOT
         
        :boProductId IS NULL) OR (:boProductId IS NULL AND a.boProductId
        IS NULL)) AND
         
        ((a.ccyId = :ccyId AND LENGTH(:ccyId) > 0) OR (LENGTH(:ccyId)
        = 0 AND a.ccyId IS
         
        NULL)) ORDER BY a.auditFields.auditDateTime DESC], line 1,
        column 76: unknown
         
        state or association field [auditFields] of class
         
[biz.wss.interfaces.entities.bo.rules.icqa.foureyes.RuleSetICQAAudit].
         
         
        at
         
org.eclipse.persistence.exceptions.JPQLException.unknownAttribute(JPQLException.java:457)
         
         
        at
org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:87) 
         
        at
org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.java:72) 
         
        Kind Regards
         
         
        Nathan
         
         
        -----Original Message-----
         
        From: eclipselink-users-bounces@xxxxxxxxxxx
         
        [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Tom
        Ware
         
        Sent: 02 November 2011 14:48
         
        To: eclipselink-users@xxxxxxxxxxx
         
        Subject: Re: [eclipselink-users] Bug 362564 - WebSphere specific
         
        randomisedorg.eclipse.persistence.exceptions.JPQLException error
        on startup
         
         
        I am surprised that error message does not have any
         
        EclipseLink-specific-information in it. Is there any other error
        message? Do you
         
        see and EclipseLink logging in any of the logs? (if not, try
         
         
        eclipselink.logging.level=FINEST)
         
         
        Does turning off weaving help? (eclipselink.weaving=false)
         
         
        -Tom
         
         
        On 02/11/2011 10:39 AM, Nathan Drew wrote:
         
         
         > I think I tried this previously while researching the
        issue and this
         
         
         > is the results (from trying it just now); the
        EntityManager doesn’t
         
         
         > get created or injected - and everything else after that
        fails.
         
         
         >
         
         
         > 2011-11-02 14:34:53,332 ERROR
         
         
         >
        biz.wss.server.services.local.fx.pricing.fotinfo.FotInitialiser
         
         
         > [SIBJMSRAThreadPool : 1] (FotInitialiser.java:82) -
         
         
         > javax.ejb.EJBTransactionRolledbackException: nested
        exception is:
         
         
         > javax.ejb.EJBException: Injection failure; nested
        exception is:
         
         
         > java.lang.IllegalStateException: EntityManagerFactory has
        not been
         
         
         > created for PU :
         
         
         > PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
         >
         
         
         > 2011-11-02 14:34:52,573 ERROR
         
         
         >
        biz.wss.server.services.local.scheduler.TimerSchedulerInitialiser
         
         
         > [SIBJMSRAThreadPool : 4]
        (TimerSchedulerInitialiser.java:179) -
         
         
         > TimerSchedulerInitializer: initialization failed
         
         
         >
         
         
         > javax.ejb.EJBTransactionRolledbackException: nested
        exception is:
         
         
         > javax.ejb.EJBException: Injection failure; nested
        exception is:
         
         
         > java.lang.IllegalStateException: EntityManagerFactory has
        not been
         
         
         > created for PU :
         
         
         > PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA
         
         
         >
         
         
         > *javax.ejb.EJBException: Injection failure; nested
        exception is:
         
         
         > java.lang.IllegalStateException: EntityManagerFactory has
        not been
         
         
         > created for PU :
         
         
         > PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA*
         
         
         >
         
         
         > *java.lang.IllegalStateException: EntityManagerFactory has
        not been
         
         
         > created for PU :
         
         
         > PuId=Bedrock-EAR#Bedrock.server.services.local.jar#WSSJPA*
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUni
         
         
         > tInfo.java:1369)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitIn
         
         
         > fo.java:1577)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
com.ibm.ws.jpa.management.JPATxEntityManager.<init>(JPATxEntityManager 
         
         > .java:156)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPACompone
         
         
         > ntImpl.java:1053)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLo
         
         
         > okupObjectFactory.java:151)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject(Inje
         
         
         > ctionBinding.java:659)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.wsspi.injectionengine.InjectionTargetField.inject(InjectionTar
         
         
         > getField.java:245)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.injectionengine.InjectionEngineImpl.inject(InjectionEngineI
         
         
         > mpl.java:620)
         
         
         > ~[na:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.StatelessBeanO.initialize(StatelessBeanO.java:28
         
         
         > 7)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.CMStatelessBeanOFactory.create(CMStatelessBeanOF
         
         
         > actory.java:45)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
        com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1031)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
        com.ibm.ejs.container.EJSHome.createBeanO(EJSHome.java:1141)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.activator.UncachedActivationStrategy.atActivate(
         
         
         > UncachedActivationStrategy.java:84)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.activator.Activator.activateBean(Activator.java:
         
         
         > 599)
         
         
         > ~[com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.EJSContainer.preInvokeActivate(EJSContainer.java
         
         
         > :3964)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.EJSContainer.EjbPreInvoke(EJSContainer.java:3349
         
         
         > )
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        biz.wss.interfaces.services.scheduler.EJSLocal0SLTimerSchedulerEJB_299
         
         
         > ec695.refresh(EJSLocal0SLTimerSchedulerEJB_299ec695.java)
         
         
         > ~[na:DEV-r314855]
         
         
         >
         
         
         > at
         
         
         >
        biz.wss.server.services.local.scheduler.TimerSchedulerInitialiser.star
         
         
         > t(TimerSchedulerInitialiser.java:123)
         
         
         > [Bedrock.server.services.local.jar:DEV-r314855]
         
         
         >
         
         
         > at
         
         
         >
        biz.wss.server.services.local.scheduler.TimerSchedulerInitialiser.onMe
         
         
         > ssage(TimerSchedulerInitialiser.java:94)
         
         
         > [Bedrock.server.services.local.jar:DEV-r314855]
         
         
         >
         
         
         > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
        Method)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
         
         
         > ava:60)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
         
         
         > orImpl.java:37)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at java.lang.reflect.Method.invoke(Method.java:611)
        ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:587
         
         
         > 4)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(Invoc
         
         
         > ationContextImpl.java:586)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        biz.wss.server.services.logging.analysis.MethodTimerInterceptor.interc
         
         
         > ept(MethodTimerInterceptor.java:161)
         
         
         > [Bedrock.server.services.exception.jar:DEV-r314855]
         
         
         >
         
         
         > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
        Method)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
         
         
         > ava:60)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
         
         
         > orImpl.java:37)
         
         
         > ~[na:1.6.0]
         
         
         >
         
         
         > at java.lang.reflect.Method.invoke(Method.java:611)
        ~[na:1.6.0]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(
         
         
         > InterceptorProxy.java:227)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(Invoc
         
         
         > ationContextImpl.java:566)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvok
         
         
         > e(InvocationContextImpl.java:217)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEn
         
         
         > dpointHandler.java:1080)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHan
         
         
         > dler.java:778)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at $Proxy42.onMessage(Unknown Source) [na:na]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint
         
         
         > (JmsJcaEndpointInvokerImpl.java:233)
         
         
         > [com.ibm.ws.sib.server.jar:1.0.0]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatche
         
         
         > r.java:900) [com.ibm.ws.sib.server.jar:1.0.0]
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.ru
         
         
         > n(SibRaSingleProcessListener.java:552)
         
         
         > [com.ibm.ws.sib.server.jar:1.0.0]
         
         
         >
         
         
         > at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:399)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > at
        com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
         
         
         > [com.ibm.ws.runtime.jar:na]
         
         
         >
         
         
         > Kind Regards
         
         
         >
         
         
         > Nathan
         
         
         >
         
         
         > *From:*eclipselink-users-bounces@xxxxxxxxxxx
         
         
         > [mailto:eclipselink-users-bounces@xxxxxxxxxxx]
         
        <mailto:[mailto:eclipselink-users-bounces@xxxxxxxxxxx]>
        *On Behalf Of *Tim
         
         
         > Martin
         
         
         > *Sent:* 02 November 2011 14:21
         
         
         > *To:* EclipseLink User Discussions
         
         
         > *Subject:* Re: [eclipselink-users] Bug 362564 - WebSphere
        specific
         
         
         > randomisedorg.eclipse.persistence.exceptions.JPQLException
        error on
         
         
         > startup
         
         
         >
         
         
         > Nathan will be trying it shortly...
         
         
         >
         
         
         > it's all container managed - injected with
         
         
         >
         
         
         >
         
         
         > @PersistenceContext(unitName = "WSSJPA") protected
        EntityManager em;
         
         
         >
         
         
         > On 02/11/2011 14:15, Tom Ware wrote:
         
         
         >
         
         
         > What about the other questions below? What about the
         
         
         > eclipselink.deploy-on-startup property?
         
         
         >
         
         
         > On 02/11/2011 10:01 AM, Tim Martin wrote:
         
         
         >
         
         
         > we have a servlet context listener that sends out some
        msgs on a few
         
         
         > jms queues which are received by some mdb's to initialise
        caches and
         
         
         > bits of static data, the mdbs can and sometimes do run
        concurrently....
         
         
         >
         
         
         > On 02/11/2011 13:13, Tom Ware wrote:
         
         
         >
         
         
         > How is your startup multi-threaded?
         
         
         >
         
         
         > Is you EntityManager container managed or application
        managed? Is it
         
         
         > injected, or do you obtain it some other way?
         
         
         >
         
         
         > One thing you could try is to set the following
        persistence unit property:
         
         
         >
         
         
         > eclipselink.deploy-on-startup=true
         
         
         >
         
         
         > That property should ensure that all the initialization
        happens as
         
         
         > soon as the first entity manager factory is instantiated.
         
         
         >
         
         
         > -Tom
         
         
         >
         
         
         > On 02/11/2011 7:21 AM, Tim Martin wrote:
         
         
         >
         
         
         > these errors all occur during application start up - ie
        when all the
         
         
         > named queries are validated/ compiled when the first named
        query is
         
         
         > created, we have several queries in different threads that
        would run
         
         
         > during application startup at about the same time
         
         
         >
         
         
         > could it be some race condition where 2or more threads are
        trying
         
         
         > dothe same thing that should only happen once ???
         
         
         >
         
         
         > eg in the stack trace below it goes into /thru some
        websphere specific
         
         
         > code to get the entity manager / create named query ?
         
         
         >
         
         
         > [11/1/11 12:16:36:933 UTC] 00000026 SystemOut O [EL
        Severe]:
         
         
         > 2011-11-01 12:16:36.913--ServerSession(217124081)--Local
        Exception
         
         
         > Stack: Exception [EclipseLink-8030] (Eclipse Persistence
        Services -
         
        2.2.1.v20110721-r9766):
         
         
         > org.eclipse.persistence.exceptions.JPQLException Exception
         
         
         > Description: Error compiling the query
         
         
         > [DataElementGroupAudit.checkPrevAuditsByNaturalKey: SELECT
        NEW
         
         
         >
        biz.wss.interfaces.entities.foureyes.auditmaker.AuditStateUser(a.audit
         
         
         > Fields.currentState,
         
         
         >
         
         
         >
         
         
         > a.auditFields.auditUser) FROM DataElementGroupAudit a
        WHERE a.code =
         
         
         > :code ORDER BY a.auditFields.auditDateTime DESC], line 1,
        column 76:
         
         
         > unknown state or association field [auditFields] of class
         
         
         >
         
[biz.wss.interfaces.entities.bo.dataelement.group.foureyes.DataElementGroupAudit].
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.exceptions.JPQLException.unknownAttribute(JPQL
         
         
         > Exception.java:457)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.
         
         
         > java:88) at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.DotNode.validate(DotNode.
         
         
         > java:73)
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.ConstructorNode.validate(
         
         
         > ConstructorNode.java:73)
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.SelectNode.validate(Selec
         
         
         > tNode.java:293)
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseT
         
         
         > ree.java:201)
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseT
         
         
         > ree.java:183)
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseT
         
         
         > ree.java:173)
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateRea
         
         
         > dQueryInternal(JPQLParseTree.java:110)
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateQue
         
         
         > ry(JPQLParseTree.java:84)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQu
         
         
         > ery(EJBQueryImpl.java:216)
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.JPAQuery.processJPQLQuery(JPAQuer
         
         
         > y.java:106) at
         
         
         >
        org.eclipse.persistence.internal.jpa.JPAQuery.prepare(JPAQuery.java:90
         
         
         > )
         
         
         > at
         
         
         >
        org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQue
         
         
         > ry.java:579)
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQue
         
         
         > ry.java:539)
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQu
         
         
         > eries(AbstractSession.java:2173)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initiali
         
         
         > zeDescriptors(DatabaseSessionImpl.java:414)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConn
         
         
         > ectDatasource(DatabaseSessionImpl.java:680)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAnd
         
         
         > DetectDatasource(DatabaseSessionImpl.java:628)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.logi
         
         
         > n(EntityManagerFactoryProvider.java:233)
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(Ent
         
         
         > ityManagerSetupImpl.java:394)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServe
         
         
         > rSession(EntityManagerFactoryImpl.java:185)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEn
         
         
         > tityManagerImpl(EntityManagerFactoryImpl.java:242)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEn
         
         
         > tityManager(EntityManagerFactoryImpl.java:237)
         
         
         >
         
         
         >
         
         
         > _/*at
         
         
         >
        com.ibm.ws.jpa.management.JPAEMPool.getEntityManager(JPAEMPool.java:14
         
         
         > 0)
         
         
         > at
         
         
         >
        com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(JPATx
         
         
         > EntityManager.java:235)
         
         
         >
         
         
         >
         
         
         >
         
         
         > at
         
         
         >
        com.ibm.ws.jpa.management.JPAEntityManager.createNamedQuery(JPAEntityM
         
         
         > anager.java:302)
         
         
         >
         
         
         >
         
         
         > */_
         
         
         > at biz.wss.jpa.DbType.createNamedQuery(DbType.java:62)
         
         
         >
         
         
         > On 02/11/2011 11:05, Nathan Drew wrote:
         
         
         >
         
         
         >
         
         
         > Hi Tom,
         
         
         >
         
         
         > Glad to know it's not something glaringly obvious we're
        missing (at
         
         
         > least for now anyway!) - it is indeed a confusing issue
        since it works
         
         
         > on two out of the three JEE server platforms we develop
        for without issue.
         
         
         >
         
         
         > In answer to your questions:
         
         
         >
         
         
         > ·Is the packaging the same on all the different servers
        you are running on?
         
         
         >
         
         
         > oIt should be, yes, our ANT scripts only do JEE platform
        specific
         
         
         > things such as use specific libraries and perhaps include
        specific WAR
         
         
         > files according to the type
         
         
         >
         
         
         > ·How is your persistence unit packaged and deployed?
         
         
         >
         
         
         > oWe have a single persistence.xml configured inside one of
        our Jar files.
         
         
         >
         
         
         > oThe mapping file is stored within the same JAR
         
         
         >
         
         
         > ·Are all the classes in the same jar?
         
         
         >
         
         
         > oNo, the persistence.xml references 4 <jar-files>
         
         
         >
         
         
         > ·Are the classes dependent on classes from other jars?
         
         
         >
         
         
         > oThe ones that it is complaining about exist within one of
        the
         
         
         > specified <jar-files> and don't
         
         
         >
         
         
         > ·Is there a chance that some of the dependencies are not
        properly loaded?
         
         
         >
         
         
         > oI think TopLink Essentials would have had a similar
        problem if this
         
         
         > was the case.
         
         
         >
         
         
         > ·Is there anything in common between queries that do not
        seem to work?
         
         
         >
         
         
         > oOne thing I do notice about the queries it complains
        about is that
         
         
         > they all seem to be of the type "SELECT NEW … FROM …" not
        sure how relevant
         
        that is.
         
         
         >
         
         
         > ·(inherited fields?)
         
         
         >
         
         
         > oThe entity classes that are complained about do extend
        other classes
         
         
         > that are defined as @MappedSuperclass, which in turn
        extend an
         
         
         > abstract class (and those aren't annotated as
        @MappedSuperclass)
         
         
         >
         
         
         > oIt always seems to reference @Embedded fields
         
         
         >
         
         
         > ·Is there a chance that queries of the same name are
        defined in
         
         
         > multiple places?
         
         
         >
         
         
         > oI don't believe so - we've recently added a JUnit test to
        check for
         
         
         > this, plus I manually checked via grep and an Excel spread
        sheet.
         
         
         >
         
         
         > I'm not sure if that answers all of your questions,
        specifically about
         
         
         > the packaging so please let me know if you need more
        detail.
         
         
         >
         
         
         > We were operating TopLink Essentials without any problems
        with
         
         
         > WebSphere - which is why we think it might be a bug within
        EclipseLink somehow.
         
         
         >
         
         
         > Kind Regards
         
         
         >
         
         
         > Nathan
         
         
         >
         
         
         > -----Original Message-----
         
         
         > From: eclipselink-users-bounces@xxxxxxxxxxx
         
         
         > <mailto:eclipselink-users-bounces@xxxxxxxxxxx>
         
         
         > [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf
        Of Tom Ware
         
         
         > Sent: 01 November 2011 17:35
         
         
         > To: eclipselink-users@xxxxxxxxxxx
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > Subject: Re: [eclipselink-users] Bug 362564 - WebSphere
        specific
         
         
         > randomisedorg.eclipse.persistence.exceptions.JPQLException
        error on
         
         
         > startup
         
         
         >
         
         
         > I have to admit that I am as confused about this issue as
        you appear to be.
         
         
         >
         
         
         > The only theory I can come up with is that there is some
        issue with
         
         
         > all the queries and that the error is different for
        different
         
         
         > deployments because they are instantiated parsed into the
        EclipseLink
         
        metadata in a random order.
         
         
         >
         
         
         > Since deployment is working on other application servers,
        this leads
         
         
         > me to believe that this is somehow a packaging issue.
         
         
         >
         
         
         > Is the packaging the same on all the different servers you
        are running on?
         
         
         >
         
         
         > How is your persistence unit packaged and deployed?
         
         
         >
         
         
         > Are all the classes in the same jar?
         
         
         >
         
         
         > Are the classes dependent on classes from other jars?
         
         
         >
         
         
         > Is there a chance that some of the dependencies are not
        properly loaded?
         
         
         >
         
         
         > Is there anything in common between queries that do not
        seem to work?
         
         
         >
         
         
         > (inherited fields?)
         
         
         >
         
         
         > Is there a chance that queries of the same name are
        defined in multiple places?
         
         
         >
         
         
         > -Tom
         
         
         >
         
         
         > On 01/11/2011 10:54 AM, Nathan Drew wrote:
         
         
         >
         
         
         > > Hi Tom,
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > I've retried with another example stack trace added
        to the ticket
         
         
         > for
         
         
         >
         
         
         > > eclipselink version 2.3.1-RC1
        (2.3.1.v20111018-r10243)
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > Kind Regards
         
         
         >
         
         
         > > Nathan
         
         
         >
         
         
         > >
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > -----Original Message-----
         
         
         >
         
         
         > > From: eclipselink-users-bounces@xxxxxxxxxxx
         
         
         > <mailto:eclipselink-users-bounces@xxxxxxxxxxx>
         
         
         >
         
         
         > > [mailto:eclipselink-users-bounces@xxxxxxxxxxx]
         
        <mailto:[mailto:eclipselink-users-bounces@xxxxxxxxxxx]> On
        Behalf Of Nathan
         
         
         >
         
         
         > > Drew
         
         
         >
         
         
         > > Sent: 01 November 2011 13:49
         
         
         >
         
         
         > > To: EclipseLink User Discussions
         
         
         >
         
         
         > > Subject: Re: [eclipselink-users] Bug 362564 -
        WebSphere specific
         
         
         >
         
         
         > >
        randomisedorg.eclipse.persistence.exceptions.JPQLException error
        on
         
         
         >
         
         
         > > startup
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > Will do - just noticed in the trace that it had the
        old 2.2.1
         
         
         > library
         
         
         >
         
         
         > > running, will retry and update the ticket and let you
        know.
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > Kind Regards
         
         
         >
         
         
         > > Nathan
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > -----Original Message-----
         
         
         >
         
         
         > > From: eclipselink-users-bounces@xxxxxxxxxxx
         
         
         > <mailto:eclipselink-users-bounces@xxxxxxxxxxx>
         
         
         >
         
         
         > > [mailto:eclipselink-users-bounces@xxxxxxxxxxx]
         
        <mailto:[mailto:eclipselink-users-bounces@xxxxxxxxxxx]> On
        Behalf Of Tom
         
         
         > Ware
         
         
         >
         
         
         > > Sent: 01 November 2011 13:21
         
         
         >
         
         
         > > To: eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > > Subject: Re: [eclipselink-users] Bug 362564 -
        WebSphere specific
         
         
         >
         
         
         > > randomised
        org.eclipse.persistence.exceptions.JPQLException error
         
         
         > on
         
         
         >
         
         
         > > startup
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > Can you try the latest 2.3.1 milestone (RC1)?
         
         
         >
         
         
         > >
         
         
         >
         
         
         > >
        http://www.eclipse.org/eclipselink/downloads/milestones.php
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > -Tom
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > On 01/11/2011 9:07 AM, Nathan Drew wrote:
         
         
         >
         
         
         > >> Hi,
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >> Has anyone seen anything similar in WAS only?
        GlassFish and
         
         
         > WebLogic
         
         
         >
         
         
         > >> both seem to run without ever hitting this
        "random" JPQL exception
         
         
         > on
         
         
         >
         
         
         > >> startup - see
         
         
         >
         
         
         > >>
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=362564 for
        details.
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >> Many Thanks
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >> Nathan
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >>
         
         
         >
         
         
         > >> _______________________________________________
         
         
         >
         
         
         > >> eclipselink-users mailing list
         
         
         >
         
         
         > >> eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > >>
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > > _______________________________________________
         
         
         >
         
         
         > > eclipselink-users mailing list
         
         
         >
         
         
         > > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > >
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > >
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > _______________________________________________
         
         
         >
         
         
         > > eclipselink-users mailing list
         
         
         >
         
         
         > > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > >
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > >
         
         
         >
         
         
         > >
         
         
         >
         
         
         > > _______________________________________________
         
         
         >
         
         
         > > eclipselink-users mailing list
         
         
         >
         
         
         > > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > >
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > _______________________________________________
         
         
         >
         
         
         > eclipselink-users mailing list
         
         
         >
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         >
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         >
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         >
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         >
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         >
         
         
         >
         
         
         >
         
         
         > _______________________________________________
         
         
         > eclipselink-users mailing list
         
         
         > eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
         > https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
        _______________________________________________
         
         
        eclipselink-users mailing list
         
         
        eclipselink-users@xxxxxxxxxxx
        <mailto:eclipselink-users@xxxxxxxxxxx>
         
         
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
         
         
         
        _______________________________________________
         
        eclipselink-users mailing list
         
        eclipselink-users@xxxxxxxxxxx
         
        https://dev.eclipse.org/mailman/listinfo/eclipselink-users
         
       
      _______________________________________________
       
      eclipselink-users mailing list
       
      eclipselink-users@xxxxxxxxxxx
       
      https://dev.eclipse.org/mailman/listinfo/eclipselink-users
       
       
     
  
 |