Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2937

GAE 1.2.0 ISSUES - Result class is simple, but field value [Ljava.lang.Object;@135afd61 not convertible into that;

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Invalid
    • Affects Version/s: 1.2.0.M1, 1.2.0.RC1
    • Fix Version/s: None
    • Component/s: GAE, WEB MVC
    • Labels:
      None

      Description

      roo.sh

      // Spring Roo 1.2.0.RC1 [rev dcaa483] log opened at 2011-11-28 13:42:10
      project --topLevelPackage com.pets
      jpa setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
      entity jpa --class com.pets.Pet --serializable
      field string --fieldName name --notNull --sizeMin 4
      controller scaffold --class ~.web.PetController
      quit
      // Spring Roo 1.2.0.RC1 [rev dcaa483] log closed at 2011-11-28 13:43:59

      mvn gae:run

      PROBLEM 1:

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.419s
      [INFO] Finished at: Mon Nov 28 13:44:32 PST 2011
      [INFO] Final Memory: 5M/81M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal on project pets: Could not resolve dependencies for project com.pets:pets:war:0.1.0.BUILD-SNAPSHOT: Failure to find javax.jdo:jdo-api:jar:3.0 in http://www.datanucleus.org/downloads/maven2

          • FIX -> Delete javax.jdo from pom. Why is this there anyhow?

      <dependency>
      <groupId>javax.jdo</groupId>
      <artifactId>jdo-api</artifactId>
      <version>3.0</version>
      </dependency>

      mvn gae:run

      http://localhost:8080/pets?page=1&size=10

      PROBLEM 2:

      Data access failure

      No results for query: SELECT COUNT(o) FROM Pet o

      org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:294)
      org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9(JpaExceptionTranslatorAspect.aj:15)
      com.pets.Pet_Roo_Jpa_ActiveRecord.countPets_aroundBody2(Pet_Roo_Jpa_ActiveRecord.aj:63)
      com.pets.Pet_Roo_Jpa_ActiveRecord.ajc$interMethod$com_pets_Pet_Roo_Jpa_ActiveRecord$com_pets_Pet$countPets(Pet_Roo_Jpa_ActiveRecord.aj:1)
      com.pets.Pet.countPets(Pet.java:1)
      com.pets.Pet_Roo_Jpa_ActiveRecord.ajc$interMethodDispatch1$com_pets_Pet_Roo_Jpa_ActiveRecord$com_pets_Pet$countPets(Pet_Roo_Jpa_ActiveRecord.aj)
      com.pets.web.PetController_Roo_Controller.ajc$interMethod$com_pets_web_PetController_Roo_Controller$com_pets_web_PetController$list(PetController_Roo_Controller.aj:53)
      com.pets.web.PetController.list(PetController.java:1)

      Create a Pet
      http://localhost:8080/pets?form

      name = Fido

      works!

      http://localhost:8080/pets

      works

      Click List all Pets link:

      http://localhost:8080/pets?page=1&size=10

      Problem 3:

      Data access failure

      Result class is simple, but field value [Ljava.lang.Object;@201787a6 not convertible into that; nested exception is javax.persistence.PersistenceException: Result class is simple, but field value [Ljava.lang.Object;@201787a6 not convertible into that

      org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:311)
      org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9(JpaExceptionTranslatorAspect.aj:15)
      com.test.Pet_Roo_Jpa_ActiveRecord.countPets_aroundBody2(Pet_Roo_Jpa_ActiveRecord.aj:63)
      com.test.Pet_Roo_Jpa_ActiveRecord.ajc$interMethod$com_test_Pet_Roo_Jpa_ActiveRecord$com_test_Pet$countPets(Pet_Roo_Jpa_ActiveRecord.aj:1)
      com.test.Pet.countPets(Pet.java:1)
      com.test.Pet_Roo_Jpa_ActiveRecord.ajc$interMethodDispatch1$com_test_Pet_Roo_Jpa_ActiveRecord$com_test_Pet$countPets(Pet_Roo_Jpa_ActiveRecord.aj)
      com.test.PetController_Roo_Controller.ajc$interMethod$com_test_PetController_Roo_Controller$com_test_PetController$list(PetController_Roo_Controller.aj:53)
      com.test.PetController.list(PetController.java:1)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
      org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
      org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            sdmurphy Scott Murphy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: