Topic
8 replies Latest Post - ‏2009-06-23T01:21:30Z by Shawn_Jiang
SystemAdmin
SystemAdmin
2233 Posts
ACCEPTED ANSWER

Pinned topic Having problem deploying EAR to Geronimo that's using JPA mapping objects

‏2009-06-18T16:32:39Z |
Hello,

I am new to these open source frameworks. It's a new project for me and no documentations or any instructions left. These applications are using Eclipse 3.4.3, Geronimo 2.1.2, and JPA 1.0.1. There are couple projects that contain these so called the mapping objects or EJB beans. I think the persistence.xml have all the right configurations for StageOneModels project. SSCAPModels project is using hibernate. When I try to deploy the EAR to Geronimo, I keep getting these errors about the Gbean not found. Do any of you know what the error message means? Any help would be appreciated. I tried different things but so far no luck.

My email is: anh@us.ibm.com
Caused by: org.apache.geronimo.kernel.GBeanNotFoundException: No matches for referencePatterns: http://?name=persistence/SSCAPModels#org.apache.geronimo.persistence.PersistenceUnitGBean
at org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:669)
at org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:626)
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.checkForGBean(PersistenceContextRefBuilder.java:200)

org.apache.geronimo.common.DeploymentException: Could not resolve reference at deploy time for query ?name=persistence/SSCAPModels#org.apache.geronimo.persistence.PersistenceUnitGBean. No GBeans found.
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.checkForGBean(PersistenceContextRefBuilder.java:205)
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.buildNaming(PersistenceContextRefBuilder.java:119)
at org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:321)
at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:292)
at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:764)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)

Caused by: org.apache.geronimo.kernel.GBeanNotFoundException: No matches for referencePatterns: http://?name=persistence/StageOneModels#org.apache.geronimo.persistence.PersistenceUnitGBean
at org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:669)
at org.apache.geronimo.kernel.config.Configuration.findGBeanData(Configuration.java:626)
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.checkForGBean(PersistenceContextRefBuilder.java:200)

org.apache.geronimo.common.DeploymentException: Could not resolve reference at deploy time for query ?name=persistence/StageOneModels#org.apache.geronimo.persistence.PersistenceUnitGBean. No GBeans found.
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.checkForGBean(PersistenceContextRefBuilder.java:205)
at org.apache.geronimo.persistence.builder.PersistenceContextRefBuilder.buildNaming(PersistenceContextRefBuilder.java:119)
at org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:321)
at org.apache.geronimo.openejb.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:292)
at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:764)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
Updated on 2009-06-23T01:21:30Z at 2009-06-23T01:21:30Z by Shawn_Jiang
  • Shawn_Jiang
    Shawn_Jiang
    154 Posts
    ACCEPTED ANSWER

    Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

    ‏2009-06-19T03:39:57Z  in response to SystemAdmin
    Before I give you any comments, Can you please post your package structure and the content of deployment plan ? the stucture could be like the sample below:
    EAR
    ---META-INF
    --applicaton.xml
    --geronimo-application.xml
    ----yourEJB.jar
    --META-INF
    --ejb-jar.xml
    --openejb-jar.xml
    --persistence.xml
    --com/jpaFacade/test/*.class
    ----jpaFacadeClient.jar

    If you can attach your ear/war package here, It would be better.
    • Shawn_Jiang
      Shawn_Jiang
      154 Posts
      ACCEPTED ANSWER

      Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

      ‏2009-06-19T03:43:56Z  in response to Shawn_Jiang
      Somehow, The format of structure above is not right after I submit. Here is the right one.
      ---EAR
      -------META-INF
      -----------------applicaton.xml
      -----------------geronimo-application.xml
      -------yourEJB.jar
      -----------------META-INF
      -----------------------ejb-jar.xml
      -----------------------openejb-jar.xml
      -----------------------persistence.xml
      -----------------com/jpaFacade/test/*.java
      -------jpaFacadeClient.jar
      • SystemAdmin
        SystemAdmin
        2233 Posts
        ACCEPTED ANSWER

        Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

        ‏2009-06-19T14:29:47Z  in response to Shawn_Jiang
        Hi Shawn,

        Here is the EAR structure:

        billing.ear
        -Deployment Descriptr
        -Bundle Libraries
        -Library Directory:/lib
        -Modules
        -jms.rar
        -EarContent
        +lib
        -META-INF
        -application.xml
        -geronimo-application.xml
        -MANIFEST.MF

        The ear file also contains war, rar, etc. I've attached here the EAR file. Thank you for your response. Hopefully, you can shed some lights there for me.
        • Shawn_Jiang
          Shawn_Jiang
          154 Posts
          ACCEPTED ANSWER

          Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

          ‏2009-06-19T16:02:51Z  in response to SystemAdmin
          I can't find your attached ear. Please check.
          • SystemAdmin
            SystemAdmin
            2233 Posts
            ACCEPTED ANSWER

            Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

            ‏2009-06-19T18:17:54Z  in response to Shawn_Jiang
            I thought I attached it. Here we go again ...
            • Shawn_Jiang
              Shawn_Jiang
              154 Posts
              ACCEPTED ANSWER

              Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

              ‏2009-06-20T08:25:56Z  in response to SystemAdmin
              Still not seeing the attachment. Anyway, please pay attention to the position of your persistence.xml.

              It should be in META-INF of your ejb jar.

              EAR
              ---META-INF
              ------application.xml
              ---yourejb.jar
              ------META-INF
              -----------persistence.xml
              -----------ejb-jar.xml
              But if you use standalone jar for your jpa classes and persitence.xml. It should be put to

              EAR
              ---lib
              -----yourjpa.jar
              ----------META-INF
              --------------persistence.xml
              -----------jpa classes

              If this can't resolve your problem, please do attach the ear here for further diagnosis.
              • SystemAdmin
                SystemAdmin
                2233 Posts
                ACCEPTED ANSWER

                Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

                ‏2009-06-22T17:25:13Z  in response to Shawn_Jiang
                Hi Shawn,

                I was able to deploy the EAR. The errors are still there during EAR deployment but at least it deployed so I will look at the problem later. I am having a different problem with debugging in Eclipse. What I did was setting up some break points in the code and started Geronimo Server in debug mode. Server never came up saying problem staring server in localhost. I removed the breakpoints and deleted the server, created a new server. This time I just started server without debug, the log said server started but the server continues to start. After 240 ms, the server failed with an error that server cannot start in localhost. I don't know what to change to fix this problem. Is it possible to debug in Eclipse with Geronimo server?

                Thanks for your time and help
                • Shawn_Jiang
                  Shawn_Jiang
                  154 Posts
                  ACCEPTED ANSWER

                  Re: Having problem deploying EAR to Geronimo that's using JPA mapping objec

                  ‏2009-06-23T01:21:30Z  in response to SystemAdmin
                  You might want to try following to resolve the startup problems.

                  1, To restart the OS, this helps when there's port conflict between WASCE and other apps running in your OS.

                  2, To edit WASCE_HOME/var/config/config.xml, find the last lines. There might be your apps that failed to deploy. Sometime, failed app prevents WASCE from starting.So, removing them from config.xml helps.
                  If the options above can't help, please post the log file under WASCE_HOME/var/log/server.log(server.out for linux).