Announcement Announcement Module
Collapse
No announcement yet.
Spring Roo with GWT - Query class name cannot be resolved Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo with GWT - Query class name cannot be resolved

    Hi,
    I am trying to create a simple roo application with gwt (using the latest versions , OS - Windows 7 64-bit).

    I get an exception

    Code:
    The Query contains a class-name "Groups" (candidate class, result class, parameter, or variable) yet this cannot be resolved. Please check the name, and the imports for the Query.
    Caused by: org.springframework.orm.jpa.JpaSystemException: The Query contains a class-name "Groups" (candidate class, result class, parameter, or variable) yet this cannot be resolved. Please check the name, and the imports for the Query.; nested exception is javax.persistence.PersistenceException: The Query contains a class-name "Groups" (candidate class, result class, parameter, or variable) yet this cannot be resolved. Please check the name, and the imports for the Query.
    	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:312)
    	at org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9(JpaExceptionTranslatorAspect.aj:15)
    	at com.sample.testapplication.domain.server.Groups_Roo_Entity.findGroupsEntries_aroundBody8(Groups_Roo_Entity.aj:100)
    	at com.sample.testapplication.domain.server.Groups_Roo_Entity.ajc$interMethod$com_sample_testapplication_domain_server_Groups_Roo_Entity$com_sample_testapplication_domain_server_Groups$findGroupsEntries(Groups_Roo_Entity.aj:1)
    	at com.sample.testapplication.domain.server.Groups.findGroupsEntries(Groups.java:1)
    	... 47 more
    Caused by: javax.persistence.PersistenceException: The Query contains a class-name "Groups" (candidate class, result class, parameter, or variable) yet this cannot be resolved. Please check the name, and the imports for the Query.
    	at org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException(NucleusJPAHelper.java:264)
    	at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:179)
    	... 50 more
    Caused by: org.datanucleus.exceptions.NucleusUserException: The Query contains a class-name "Groups" (candidate class, result class, parameter, or variable) yet this cannot be resolved. Please check the name, and the imports for the Query.
    	at org.datanucleus.store.query.Query.resolveClassDeclaration(Query.java:1331)
    	at org.datanucleus.store.query.AbstractJPQLQuery.resolveClassDeclaration(AbstractJPQLQuery.java:328)
    	at org.datanucleus.store.rdbms.query.JPQLQueryCompiler.compileFromExpression(JPQLQueryCompiler.java:467)
    	at org.datanucleus.store.rdbms.query.JPQLQueryCompiler.compileFrom(JPQLQueryCompiler.java:347)
    	at org.datanucleus.store.rdbms.query.JPQLQueryCompiler.compileCandidates(JPQLQueryCompiler.java:263)
    	at org.datanucleus.store.rdbms.query.QueryCompiler.executionCompile(QueryCompiler.java:312)
    	at org.datanucleus.store.rdbms.query.QueryCompiler.compile(QueryCompiler.java:260)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:168)
    	at org.datanucleus.store.query.Query.executeQuery(Query.java:1457)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.executeQuery(JPQLQuery.java:239)
    	at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398)
    	at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163)
    	... 50 more
    Here - "Groups" is the name of my model class.

    Can someone help me to fix the issue.
    Thanks.

  • #2
    Not sure what your problem is, but is it intentional that you name your class plurally "Groups" rather than "Group"?

    Comment


    • #3
      I face the same issue, using DATANUCLEUS as provider and MSSQL Server as database. If anyone has a workaround please post it.

      Thanks
      Shri

      Comment


      • #4
        How did you create the class Groups? did you use "roo class ..." or
        "roo entity ..." ?

        Comment


        • #5
          Sorry to hijack OP's thread, but I created it using "entity".

          Comment


          • #6
            That was my only suggestion... My roo knowledge is pretty small currently.

            Comment


            • #7
              Urgent!

              I have the same problem!

              Please, has someone solved this problem?

              Comment

              Working...
              X