Announcement Announcement Module
Collapse
No announcement yet.
Roo on Weblogic 10.3.3 JPA? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo on Weblogic 10.3.3 JPA?

    Hi folks - digging this out from the "EAR creation in Roo" thread as it's off topic for that one. Has anyone been able to successfully deploy a roo project on Weblogic 10.3.x? I am getting the following error:

    Code:
    Caused By: weblogic.deployment.EnvironmentException: Error loading the persisten
    ce descriptor WEB-INF/lib/_wl_cls_gen.jar!/META-INF/persistence.xml from the mod
    ule rooperson.war.  See the following stack trace for nested errors: weblogic.de
    scriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
      C:\Oracle\Middleware\user_projects\domains\base_domain\weblogic.utils.classloa
    ders.GenericClassLoader@1fc840d finder: weblogic.utils.classloaders.CodeGenClass
    Finder@12dd375 annotation: _appsdir_rooperson_war@\WEB-INF\lib\_wl_cls_gen.jar!\
    META-INF\persistence.xml:2:3:2:3: problem: cvc-attribute.4: The value '2.0' does
     not equal the fixed value '1.0' of attribute 'version':<weblogic.utils.classloa
    ders.GenericClassLoader@1fc840d finder: weblogic.utils.classloaders.CodeGenClass
    Finder@12dd375 annotation: _appsdir_rooperson_war@/WEB-INF/lib/_wl_cls_gen.jar!/
    META-INF/persistence.xml:2:3>
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(Mars
    hallerFactory.java:245)
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(Mars
    hallerFactory.java:231)
            at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(Mar
    shallerFactory.java:155)
            at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDesc
    riptorManager.java:323)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescript
    orBeanFromReader(AbstractDescriptorLoader2.java:788)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescr
    iptorBean(AbstractDescriptorLoader2.java:411)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescrip
    torBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescrip
    torBean(AbstractDescriptorLoader2.java:768)
            at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe
    scriptor(AbstractPersistenceUnitRegistry.java:177)
            at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDe
    scriptors(AbstractPersistenceUnitRegistry.java:101)
    Any suggestions - I'm a roo newb. I tried adding a weblogic.xml file to web-inf dir with the following:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    All I'm trying is a simple one-entity roo project with hibernate persistence. OpenJPA produced different errors.

  • #2
    Hi,
    Try using the 1.0 schema version in persistence.xml - JPA 2.0 features will still work except setting new elements/attributes of the 2.0 schema like <shared-cache-mode>NONE</shared-cache-mode> for example.

    -<persistence version="2.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_2_0.xsd">
    +<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">

    thank you
    /michael

    Comment


    • #3
      Roo problem solving

      I wonder if deploying to a different web server is not an option...

      Like tc server or tomcat. I'll save a lot of time/pain.

      I just wonder

      Thx
      jD

      Comment


      • #4
        Good suggestion, but tc server (and enhanced version of Tomcat) and Tomcat are only servlet/jsp containers - they do not run EJB 3.1 or container managed JPA applications. You will need a full EE5/EE6 compliant server like WebLogic, WebSphere, JBoss, GlassFish V3 or even JEUS 6/7 (most of which by the way run the catalina based Tomcat as their Web container).
        thank you
        /michael

        Comment


        • #5
          That is exactly the point...
          You don't need all the stuff mentioned to happily-easily-efficiently deploy a Roo web app.


          Thank you
          jD

          Comment


          • #6
            Yes,
            Good point, if Marc does not need ORM or other non-Web container API's in JEE5/6 then a simple web container will work very well - Spring tc would be one of them.
            Try the following if you would like to run application managed JPA apps using an SE bootstrap (outside of any container support).

            http://wiki.eclipse.org/EclipseLink/...t_Web_Tutorial

            thank you
            /michael

            Comment


            • #7
              Hello Michael,

              A "simple web container" with the right stack on could do amazing things...

              Check it out:
              http://blog.springsource.com/2010/11...e+Team+Blog%29


              I appreciate you share the referred link with me.


              Thank you
              jD

              Comment

              Working...
              X