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.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) 
            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(SelectNode.java:293)
             
             
            at
             
org.eclipse.persistence.internal.jpa.parsing.ParseTree.validate(ParseTree.java:201)
             
             
            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:216)
             
             
            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:579)
             
             
            at
             
org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:539)
             
             
            at
             
org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:2173)
             
             
             
            at
             
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:414)
             
             
             
            at
             
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:680)
             
             
             
            at
             
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:628)
             
             
             
            at
             
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:233)
             
             
            at
             
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394)
             
             
             
            at
             
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:185)
             
             
             
            at
             
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:242)
             
             
             
            at
             
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:237)
             
             
            _/*at
            com.ibm.ws.jpa.management.JPAEMPool.getEntityManager(JPAEMPool.java:140)
             
            at
             
com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(JPATxEntityManager.java:235)
             
             
             
            at
             
com.ibm.ws.jpa.management.JPAEntityManager.createNamedQuery(JPAEntityManager.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] On Behalf
              Of Tom Ware
               
              Sent: 01 November 2011 17:35
               
              To: 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] 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] On
              Behalf Of Tom Ware
               
               
              > Sent: 01 November 2011 13:21
               
               
              > To: 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>
               
               
              >>
              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
              <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
             
           
          _______________________________________________
           
          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
         
       
      _______________________________________________
       
      eclipselink-users mailing list
       
      eclipselink-users@xxxxxxxxxxx
       
      https://dev.eclipse.org/mailman/listinfo/eclipselink-users
       
       
     
  
 |