1 Reply Latest reply on Jun 10, 2010 11:06 AM by Pablo Martín

    Deploy to OC4J problem!

    Pablo Martín Newbie
      Hi.

      I'm having problems deploying an application to an OC4J server. I follow de doc from http://docs.jboss.org/seam/2.0.2.SP1/reference/en-US/html/oc4j.html but I cant make my app works.

      This is the error I've now:


      10/06/10 16:55:54 GRAVE: ProgressObjectImpl.reportError [matriculasReservadas:ma
      triculasReservadas]: Excepci¾n al cargar/analizar el archivo xml: META-INF/persi
      stence.xmloracle.oc4j.admin.jmx.shared.exceptions.InternalException: [matriculas
      Reservadas:matriculasReservadas]: Excepci¾n al cargar/analizar el archivo xml: M
      ETA-INF/persistence.xml
              at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(Notif
      icationUserData.java:107)
              at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
              at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123
      )
              at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
      (OC4JDeployerRunnable.java:52)
              at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
      yerRunnable.java:81)
              at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
      sableResourcePooledExecutor.java:298)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: oracle.oc4j.admin.internal.DeployerException: [matriculasReservadas:m
      atriculasReservadas]: Excepci¾n al cargar/analizar el archivo xml: META-INF/pers
      istence.xml
              at com.evermind.server.ejb.exception.DeploymentException.exceptionParsin
      gXml(DeploymentException.java:32)
              at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.readPe
      rsistenceXml(PersistenceUnitManagerImpl.java:105)
              at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
      lize(PersistenceUnitManagerImpl.java:69)
              at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
      733)
              at com.evermind.server.ApplicationStateRunning.getHttpApplication(Applic
      ationStateRunning.java:414)
              at com.evermind.server.Application.getHttpApplication(Application.java:5
      71)
              at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.cre
      ateHttpApplicationFromReference(HttpSite.java:1990)
              at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<in
      it>(HttpSite.java:1909)
              at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:16
      06)
              at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
      tionBinder.java:238)
              at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
      tionBinder.java:99)
              at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(Application
      Deployer.java:547)
              at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDe
      ployer.java:202)
              at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)

              ... 4 more

      2010-06-10 16:55:56.503 NOTIFICATION Se ha terminado Application UnDeployer para
      matriculasReservadas.
      10/06/10 16:55:56 ADVERTENCIA: DeployerRunnable.run [matriculasReservadas:matric
      ulasReservadas]: Excepci¾n al cargar/analizar el archivo xml: META-INF/persisten
      ce.xmloracle.oc4j.admin.internal.DeployerException: [matriculasReservadas:matric
      ulasReservadas]: Excepci¾n al cargar/analizar el archivo xml: META-INF/persisten
      ce.xml
              at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126
      )
              at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
      (OC4JDeployerRunnable.java:52)
              at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
      yerRunnable.java:81)
              at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
      sableResourcePooledExecutor.java:298)
              at java.lang.Thread.run(Thread.java:619)




      Here is my persistence.xml:


      <?xml version="1.0" encoding="UTF-8"?>
      <persistence 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"
                   version="1.0">
         <persistence-unit name="bookingDatabase">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>java:/bookingDatasource</jta-data-source>
            <properties>
               <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
               <property name="hibernate.show_sql" value="true"/>
               <!-- These are the default for JBoss EJB3, but not for HEM: -->
               <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookºup"/>
            </properties>
         </persistence-unit>
      </persistence>



      Please! I need some help!

        • 1. Re: Deploy to OC4J problem!
          Pablo Martín Newbie
          <blockquote>
          <?xml version="1.0" encoding="UTF-8"?>
          <persistence 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"
                       version="1.0">
             <persistence-unit name="bookingDatabase">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <jta-data-source>java:/bookingDatasource</jta-data-source>
                <properties>
                   <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                   <property name="hibernate.show_sql" value="true"/>
                   <!-- These are the default for JBoss EJB3, but not for HEM: -->
                   <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
                   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookºup"/>
                </properties>
             </persistence-unit>
          </persistence>
          </blockquote>


          Wrong code..this is the right one:

          <?xml version="1.0" encoding="UTF-8"?>
          <!-- Persistence deployment descriptor for dev profile -->
          <persistence 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"
                       version="1.0">
             <persistence-unit name="matriculasReservadas" transaction-type="JTA">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <jta-data-source>jdbc/matriculasReservadasDatasource</jta-data-source>
                <properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                   <property name="hibernate.hbm2ddl.auto" value="none"/>
                   <property name="hibernate.show_sql" value="true"/>
                   <property name="hibernate.format_sql" value="true"/>
                   <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" />
                     <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OrionTransactionManagerLookup" />
                     <property name="hibernate.transaction.flush_before_completion" value="true"/>
                     <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
                </properties>
             </persistence-unit>
          </persistence>