JPA on OC4J 10.1.3.0

Hi,
Does anyone know which of the following options is preferred when using JPA/TopLink Essentials on OC4J 10.1.3.0:
1. Delete persistency.jar from the OC4J installation and include the latest TopLink Essentials jar-files to the libs of the application.
2. Use the persistency.jar of OC4J 10.1.3.0, which is an implementation of the draft version of JPA.
Thanks,
Ronald

Using TopLink Essentials now in 10.1.3.0 will require no changes to your application when you upgrade to 10.1.3.1 since you're not changing persistence providers, just containers. The only optional change you may want to make is switching to use container managed persistence instead of application managed as you'll have to do in 10.1.3.0 with Essentials. There are API and annotations in the preview that were changed in the final spec and so they differ from TopLink Essentials. If you use the preview you'll have to update your application to use the spec compliant APIs and annotations.
Again, there may be other issues that influence your decision but using TopLink Essentials now will give you a smooth upgrade path going forward to 10.1.3.1.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Crucial question about Toplink Essentials JPA in OC4J 10.1.3.3

    Hi all!
    I'm developing an EJB 3.0 service which will be deployed to an OracleAS 10.1.3.3 and even after I've read lots of docs and articles, I still got an unanswered question:
    I know JPA leaves concurrent data access to the application's responsibility (or the vendor implementation's), that Oracle explicitly recommends using @Version to enable JPA's standard optimistic locking and also that Toplink Essentials JPA is OC4J's default persistence provider for EJB 3.0 modules. Considering this last important fact, what will be the default locking mode assumed by Toplink Essentials if I don't use @Version?
    Looking at Toplink Essentials JPA extensions doc preview for OC4J 11g (http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html), I found that I can use @OptimisticLocking to define the locking policy when defining an entity and use a lock type that doesn't require me to define a @Version field. But that annotation doesn't exist in version 10.1.3.3. Is there another way to define locking policy and type (on global or per entity basis) in version 10.1.3.3?
    Any help will be really welcome!
    TIA,
    Eduardo.

    Quoting Mr. Doug Clarke:
    "Eduardo,
    The only way to ensure that concurrent writers to the database don't overwrite one another is to either lock optimistically or pessimistically (i.e.: SELECT ... FOR UPDATE). Both of these approaches are supported by Oracle TopLink as well as TopLink Essentials. If neither is used then no locking is applied and the last writer will succeed leaving the database in a potentially corrupted state. Also note that minimal writes are used so each thread only updates the columns it changes so the resulting state of the database could be a combination of the two concurrent writes. Users of JPA are strongly recommended to use optimistic locking to ensure concurrent writing scenarios do not produce unexpected result in their database.
    Our JPA implementation in 10.1.3.3 is TopLink Essentials which is the Open Source references implementation of JPA derived from Oracle TopLink developed in GlassFish. This edition of TopLink only has support for JPA's @Version annotation as you noted. This approach does require a dedicated column in the database table for comparison on write to detect changes made since this thread's version of the original data was read.
    In Oracle TopLink 11g we have implemented JPA 1.0 in our product. This means that full capabilities of TopLink are available through JPA along with some custom annotations to assist in configuring them. This includes the additional optimistic locking policies provided for schemas where adding version columns is not possible. These capabilities are not included in TopLink Essentials. Customers can access these capabilities in the 11gR1 technology previews as well as in the new Eclipse Persistence Services Project "EclipseLink" which is the full functionality of Oracle TopLink developed as an open source solution. Oracle TopLink 11g and its distribution of EclipseLink are not yet available in a supported release."

  • Spring and TopLink/JPA on OC4J 10.1.3.4.0

    Our configuration worked fine on OC4J 10.1.3.1 (linux) and 10.1.3.3 (windows). We have a problem with JPA (toplink essentials--not eclipselink) on OC4J 10.1.3.4.0 using Spring (2.0.7 and 2.5.6). We found that it was trying to connect to the default OracleDS data source(there were 2 connections in toplink essentials for some reason), but once we defined an OracleDS, it gave us this error:
    javax.servlet.ServletException: javax.faces.el.EvaluationException: Error getting property 'experiments' from bean of type gov.llnl.nif.dataviz.mssar.web.ExperimentListBean: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException:
    Exception Description: Cannot use an EntityTransaction while using JTA.
    Our persistence.xml looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <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">
         <persistence-unit name="mssar">
              <class>gov.llnl.nif.dataviz.mssar.model.ExperimentInfo</class>
              <class>gov.llnl.nif.dataviz.mssar.model.UsePlan</class>
         <properties>
         <property name="toplink.cache.shared.gov.llnl.nif.dataviz.mssar.model.ExperimentInfo" value="false"/>
         <property name="toplink.cache.shared.gov.llnl.nif.dataviz.mssar.model.UsePlan" value="false"/>
         </properties>
         </persistence-unit>
    </persistence>
    Our orm.xml looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
    </entity-mappings>
    Our spring configuration looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
         default-autowire="byName">
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="jpaVendorAdapter">
    <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
    <property name="showSql" value="true"/>
    <property name="databasePlatform" value="oracle.toplink.essentials.platform.database.oracle.OraclePlatform"/>
    </bean>
    </property>
    <property name="loadTimeWeaver">
         <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
    </property>
    </bean>
    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/SSARDS"/>
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
         <property name="dataSource" ref="dataSource" />
    </bean>
         <bean id="experimentsQueryBuilder" class="gov.llnl.nif.dataviz.mssar.dao.jpa.ExperimentsQueryBuilderJpa"/>
         <bean id="experimentsDao" class="gov.llnl.nif.dataviz.mssar.dao.jpa.ExperimentsDaoJpa"/>
         <bean id="experimentListManager" class="gov.llnl.nif.dataviz.mssar.service.impl.ExperimentListManagerImpl"/>
    </beans>
    ExperimentInfo.java mapping looks like:
    @Entity
    @Table(name = "EXPERIMENT_IDS")
    public class ExperimentInfo implements ExperimentInformation {
         @Id
         @Column(name="EXPERIMENT_ID")
         String experimentId;
         @Column(name="EXPERIMENT_DESCRIPTION")
         String expDescription;
         @Column(name="STATUS")
         String status;
         @Column(name="EXPERIMENT_PI")
         String expPI;
         //Date lpomDate;
         //Date settingsDate;
         @Column(name="LPOM_DATE")
         Timestamp lpomDate;
         @Column(name="SETTINGS_DATE")
         Timestamp settingsDate;     
    UsePlan.java looks like:
    @Entity
    @Table(name="USE_PLAN")
    public class UsePlan extends BasePlan implements PlanData, Serializable {
         static final long serialVersionUID = -1555327955428351924L;
         @Id
         @Column(name="EXP_SHOT_ID")
         String expShotId;
         @Id
         @Column(name="LOCATION")
         String location;
         @Id
         @Column(name="INFO_VAR")
         String infoVar;
         @Id
         @Column(name="USE_ITEM_NAME")
         String useItemName;
         @Column(name="USE_PRIORITY")
         String usePriority;
    ExperimentListManagerImpl looks like:
    @Transactional(readOnly=true)
    public class ExperimentListManagerImpl implements ExperimentListManager {
    This is a read-only app but it should not use the cache.
    Our Dao Looks like:
    public class ExperimentsDaoJpa extends JpaDaoSupport implements ExperimentsDao {
    private QueryBuilder experimentsQueryBuilder;
    public List<ExperimentInfo> shotsByQueryBean(ExperimentsQueryBean queryBean, String sortColumn, boolean ascending) {
         try {
              getJpaTemplate().flush();
              experimentsQueryBuilder.buildQuery(queryBean);
         experimentsQueryBuilder.setSortColumn(sortColumn, ascending);
         List<ExperimentInfo> result = getJpaTemplate().findByNamedParams(experimentsQueryBuilder.getQuery().toString(), experimentsQueryBuilder.getParams());
         // pull new results from database
         /*for (ExperimentInfo ei : result) {
              getJpaTemplate().refresh(ei);
         return result;
         } catch (Throwable t) {
              t.printStackTrace();
              return null;
         public void setExperimentsQueryBuilder(QueryBuilder experimentsQueryBuilder) {
              this.experimentsQueryBuilder = experimentsQueryBuilder;
    Thanks,
    John Carlson

    We also had this problem. We have changed the TransactionManager.
    Replace the JPATransactionManager with the JTATransactionManager.
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" />
    If you are using JTA you can't use the JPA Transaction Manager. It doesn't support JTA.
    Found it on a forum of Spring. (http://forum.springframework.org/showthread.php?t=48191)
    Dennis

  • Jpa (toplink) + oc4j: oracle.oc4j.rmi.OracleRemoteException

    Hi Brains, :P
    I'm trying create a query with javax.persistence.Query im my Stateless in the OC4J.
    Query query = em.createQuery("my string query");
    This line throw the exception oracle.oc4j.rmi.OracleRemoteException:
    2009-03-06 13:02:38.484 ERROR J2EE EJB-08006 [MyClass:public java.util.List my.package.ejb.session.MyClass.myMethod] exceção ao chamar método: oracle.oc4j.rmi.OracleRemoteException: java.lang.NoClassDefFoundError; nested exception is:
         java.lang.NoClassDefFoundError
    I'd like to thank all the attention.

    Hi Chris,
    I solved this question.
    I had a problem with an entity bean. And the strange that it is not part of the query. :S.
    Thanks a lot.
    ;)

  • JPA OC4J Entity Manager query.getResultList

    Hello All,
    I am using JPA with OC4J version 10.1.3.3. I am trying to query the database useing enitityManager.createQuery() and requirementList = requirementQuery.getResultList();. It is freezs on executing this statement and i can not see any errors in the log files. I verified the following log files in OC4J
    1)$ORACLE_HOME/j2ee/RMS/application-deployments/RMS/RMS_default_group_1/application.log
    2)$ORACLE_HOME/j2ee/RMS/log/RMS_default_group_1/oc4j/log.xml
    3)$ORACLE_HOME/opmn/logs/default_group~RMS~default_group~1.log
    Please find the peice of code i am using below. It prints the debug statement log.debug("test 411"); in the log file.
    Please some body help me to resolve this issue.
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    private List<Requirement> getLatestRequirementsForRequest(Request request) throws RMSApplicationException,
    RMSSystemException,
    Exception {
    log.debug("\n\n\n###############################\n\ninside getLatestRequirementsForRequest 1");
    String latestRqmtQry =
    //" and rqmt.reqmt_timestamp = :requestReceived " +
    // " and rqmt.reqmtClientReference is null" +
    // " and req.requestContract in ( " + contractNumbers + " )" +
    // " or req.request_proposal in ( " + contractNumbers + " )" +
    " select rqmt from Requirement rqmt, Request request " +
    " where request.parent.requestId = :requestId" +
    " and rqmt.reqmt_timestamp = request.requestReceived " +
    " and rqmt.requirementStatus.reqmtStatusName ='Outstanding' " +
    " and rqmt.reqmtType = 1 " +
    " and request.requestStatus.requestStatusName not in ( 'Completed' ,'Cancelled' )";
    log.debug("sal: qry for rqmtlist " + latestRqmtQry);
    List<Requirement> requirementList = new ArrayList<Requirement>();
    try {
    log.debug("sTest41");
    Query requirementQuery = entityManager.createQuery(latestRqmtQry);
    log.debug("requesId="+request.getRequestId());
    requirementQuery.setParameter("requestId", request.getRequestId());
    log.debug("test 411");
    // requirementQuery.setFlushMode()
    requirementList = requirementQuery.getResultList();
    // requirementList =(List)em.createNamedQuery("Requirement.findLatestRqmtsForContracts").setParameter("contractNumbers",contractNumbers);
    log.debug("requirementList.size = " + requirementList.size());
    log.debug("requirementList = " + requirementList);
    } catch (RuntimeException e) {
    //ctx.setRollbackOnly();
    log.error("Runtime Exception while getting the requirements:",e);
    throw e;
    } catch(Exception e){
    log.error("Exception while getting the requirements:",e);
    throw e;
    log.debug("Test71");
    return requirementList;
    }

    SQL Query is select query using 4 tables. I verified with the data base when i get encounter this problem there are no locks on any of the tables. I also see that the session to the data base completes smoothly. So it proves there is no problem with data base.
    Please note that this kind of behaviour i am seeing with only perticular cases around 2 to 5% of cases. This code i am using from last 6 months.
    Could you please let me know how to get stack dump?

  • Injecting EntityManager

    Hi,
    I tried to get the entity manager injected into my servlet context listener class but with no success.
    I am using JPA with Toplink and deploying on Sun Application Server.
    The servlet is a simple servlet which has a field of type EntityManager and with @PersistenceContext annotation.
    I also tried to get the EntityManagerFactory injected. Even it is null.
    Is it at all possible to inject EntityManager into a normal servlet?
    Please help.
    Thanks in advance.
    Regards,
    Anand.

    Hi,
    Try verifying that all configuration details are set for OC4J.
    You may refer the to following end-to-end quickstart enterprise application tutorial that contains the same @PersistenceContext injection on a stateless session ejb bean.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial
    specifically
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Perform_a_JPQL_query
    and code
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.oc4j.enterpriseEJB/ejbModule/org/eclipse/persistence/example/jpa/server/business/ApplicationService.java
    If configurations match between both apps, then we can triage further.
    thank you
    /michael
    www.eclipselink.org

  • Injecting EntityManager into Interceptor class, naming exception

    Hello , I try the code below :
    class MyInterceptor {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    @AroundInvoke
    doIntercept....
    but I got a naming exception , oc4j told me ....failed to inject the resource.....
    Anyone know ,why ?
    Anyway I resolved to make a special name into context :
    class MySessioBean { // this bean use MyInterceptor
    @PersistenceContext(name ="AdminPC",unitName="Model")
    private EntityManager em;
    and on MyInterceptor :
    class MyInterceptor{
    @AroundInvoke
    public Object doIntercept(InvocationContext ic)throws BusinessException{
    try {
    InitialContext ctx = new InitialContext();
    EntityManager temp = (EntityManager)ctx.lookup("java:comp/env/AdminPC");
    em =temp;
    } catch (NamingException e) {
    // TODO
    }

    Hi,
    Try verifying that all configuration details are set for OC4J.
    You may refer the to following end-to-end quickstart enterprise application tutorial that contains the same @PersistenceContext injection on a stateless session ejb bean.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial
    specifically
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Perform_a_JPQL_query
    and code
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.oc4j.enterpriseEJB/ejbModule/org/eclipse/persistence/example/jpa/server/business/ApplicationService.java
    If configurations match between both apps, then we can triage further.
    thank you
    /michael
    www.eclipselink.org

  • OC4J 10.1.3.2, JPA and Hibernate 3.2 Exception on Deployment

    I can't get my simple web application to deploy in my standalone oc4j container. The European organization that I working for wants to use the new technologies out there. Part of the testing is getting oc4j working with hibernate. My web application works just fine with Toplink, but not with Hibernate3. The same web application in Tomcat works for both. The error that oc4j generates is shown below and really doesn't say much that I can do. I followed this blog instructions.
    http://debupanda.blogspot.com/2007/01/using-hibernate-as-pluggable-ejb-3-jpa.html
    2007-04-23 11:48:57.477 NOTIFICATION Starting application : TestJPA
    2007-04-23 11:48:57.477 NOTIFICATION Initializing ClassLoader(s)
    2007-04-23 11:48:57.477 NOTIFICATION Initializing EJB container
    2007-04-23 11:48:57.477 NOTIFICATION Loading connector(s)
    2007-04-23 11:48:57.524 NOTIFICATION Starting up resource adapters
    2007-04-23 11:48:57.524 NOTIFICATION Initializing EJB sessions
    2007-04-23 11:48:57.524 NOTIFICATION Committing ClassLoader(s)
    2007-04-23 11:48:57.524 NOTIFICATION Initialize TestJPA begins...
    2007-04-23 11:48:57.539 NOTIFICATION Initialize TestJPA ends...
    2007-04-23 11:48:57.539 NOTIFICATION Started application : TestJPA
    2007-04-23 11:48:57.555 NOTIFICATION Binding web application(s) to site default-
    web-site begins...
    2007-04-23 11:48:57.571 NOTIFICATION Binding TestJPA web-module for application
    TestJPA to site default-web-site under context root jpa
    07/04/23 11:48:57 oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA
    ] - Exception creating EntityManagerFactory using PersistenceProvider class org.
    hibernate.ejb.HibernatePersistence for persistence unit TestPU.
    07/04/23 11:48:57 at com.evermind.server.ejb.exception.DeploymentException
    .exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:19
    7)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
    nagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
    07/04/23 11:48:57 at com.evermind.server.http.HttpApplication.<init>(HttpA
    pplication.java:733)
    07/04/23 11:48:57 at com.evermind.server.ApplicationStateRunning.getHttpAp
    plication(ApplicationStateRunning.java:414)
    07/04/23 11:48:57 at com.evermind.server.Application.getHttpApplication(Ap
    plication.java:571)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
    imeReference.createHttpApplicationFromReference(HttpSite.java:1990)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
    imeReference.<init>(HttpSite.java:1909)
    07/04/23 11:48:57 at com.evermind.server.http.HttpSite.addHttpApplication(
    HttpSite.java:1606)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
    ebApp(WebApplicationBinder.java:238)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
    ebApp(WebApplicationBinder.java:99)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWe
    bApp(ApplicationDeployer.java:547)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.doDepl
    oy(ApplicationDeployer.java:202)
    07/04/23 11:48:57 at oracle.oc4j.admin.internal.DeployerBase.execute(Deplo
    yerBase.java:93)
    07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeploy
    erRunnable.doRun(OC4JDeployerRunnable.java:52)
    07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRu
    nnable.run(DeployerRunnable.java:81)
    07/04/23 11:48:57 at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:298)
    07/04/23 11:48:57 at java.lang.Thread.run(Unknown Source)
    2007-04-23 11:48:57.726 NOTIFICATION Application Deployer for TestJPA FAILED.
    2007-04-23 11:48:57.726 NOTIFICATION Application UnDeployer for TestJPA STARTS.
    2007-04-23 11:48:57.742 NOTIFICATION Removing all web binding(s) for application
    TestJPA from all web site(s)
    07/04/23 11:48:57 SEVERE: ProgressObjectImpl.reportError [TestJPA:TestJPA] - Exc
    eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
    te.ejb.HibernatePersistence for persistence unit TestPU.oracle.oc4j.admin.jmx.sh
    ared.exceptions.InternalException: [TestJPA:TestJPA] - Exception creating Entity
    ManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersis
    tence for persistence unit TestPU.
    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(Unknown Source)
    Caused by: oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA] - Exc
    eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
    te.ejb.HibernatePersistence for persistence unit TestPU.
    at com.evermind.server.ejb.exception.DeploymentException.exceptionCreati
    ngEntityManagerFactory(DeploymentException.java:130)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.create
    ContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
    lizePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
    lize(PersistenceUnitManagerImpl.java:86)
    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
    2007-04-23 11:48:58.225 NOTIFICATION Application UnDeployer for TestJPA COMPLETE
    S.
    07/04/23 11:48:58 WARNING: DeployerRunnable.run [TestJPA:TestJPA] - Exception cr
    eating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.Hi
    bernatePersistence for persistence unit TestPU.oracle.oc4j.admin.internal.Deploy
    erException: [TestJPA:TestJPA] - Exception creating EntityManagerFactory using P
    ersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence
    unit TestPU.
    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(Unknown Source)

    I am not using JDeveloper, the project was created in Netbeans 5.5. I only use the WAR created and Deploy it using the web administration of Oracle 10.1.3.2

  • Deployement problem in oc4j with hibernate + JPA and Spring

    Dear All,
    From last 2 days I am facing a problem in deployment of our application in oc4j client of oracle app server.
    I am getting the following exception
    Operation failed with error: [mkclsets:mkclsets] - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit mkclsetsPersistenceUnit.When I am deploying the same application in tomcat app server its working fine. But I am unable to deploy the same in oc4j.
    I am using the following technologies
    Spring 2.0
    Struts 2.0
    Hibernate 3.3
    JPA 1.0
    OC4J 10.1.3.3.0
    IDE : my eclipse 6.0
    My persistence.xml
    <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="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
              <!-- jta-data-source>mkclDS</jta-data-source-->
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <!-- properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
              </properties-->
         </persistence-unit>
    </persistence>Datasource-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
         <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
         <!--  following code is for using oracle -->
            <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>oracle.jdbc.driver.OracleDriver</value>
              </property>
              <property name="url">
                   <value>jdbc:oracle:thin:@//xxxx.xxxx.xxxx.xxxx:1521/mydb</value>
              </property>
              <property name="username">
                   <value>tpsadmin</value>
              </property>
              <property name="password">
                   <value>tpsadmin</value>
              </property>
         </bean>
         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
              <property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
              <property name="dataSource" ref="dataSource"/>
              <property name="jpaVendorAdapter">
                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
                        <property name="database" value="ORACLE"/>               
                        <property name="showSql" value="true"/>
                   </bean>
              </property>
         </bean>
         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
              <property name="entityManagerFactory" ref="entityManagerFactory"></property>
         </bean>
         <tx:annotation-driven transaction-manager="transactionManager"/>     
    </beans>Server.xml (oc4j/j2ee/home/config)
    <?xml version="1.0"?>
    <application-server  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd"  application-directory="../applications"
    check-for-updates="adminClientOnly"
    deployment-directory="../application-deployments"
    connector-directory="../connectors"
    schema-major-version="10" schema-minor-version="0" >
         <shared-library name="global.libraries" version="1.0" library-compatible="true">
              <code-source path="../applib"/>
         </shared-library>
         <shared-library name="global.tag.libraries" version="1.0" library-compatible="true">
              <code-source path="../../home/jsp/lib/taglib/"/>
              <code-source path="../../../j2ee/home/jsp/lib/taglib/"/>
              <code-source path="../../../lib/dsv2.jar"/>
              <import-shared-library name="oracle.xml"/>
              <import-shared-library name="oracle.jdbc"/>
              <import-shared-library name="oracle.cache"/>
              <import-shared-library name="soap"/>
         </shared-library>
         <shared-library name="oracle.persistence" version="1.0" library-compatible="true">
              <code-source path="../../../toplink/jlib/toplink-essentials.jar"/>
              <import-shared-library name="oracle.jdbc"/>
         </shared-library>
         <shared-library name="hibernatejpa" version="1.0">
              <code-source path="ejb3-persistence.jar"/>
              <code-source path="hibernate3.jar"/>
              <code-source path="hibernate-annotations.jar"/>
              <code-source path="hibernate-commons-annotations.jar"/>
              <code-source path="hibernate-entitymanager.jar"/>
              <code-source path="jboss-archive-browsing.jar"/>
              <code-source path="jta.jar"/>
         </shared-library>
         <shared-library name="db" version="1.0">
              <code-source path="ojdbc14.jar"/>
         </shared-library>
         <shared-library name="displaytab" version="1.0">
              <code-source path="commons-beanutils-1.7.0.jar"/>
              <code-source path="commons-lang-2.3.jar"/>
              <code-source path="displaytag-1.1.1.jar"/>
         </shared-library>
         <shared-library name="ehCache" version="1.0">
              <code-source path="backport-util-concurrent.jar"/>
              <code-source path="ehcache-1.4.0-beta2.jar"/>
              <code-source path="jsr107cache-1.0.jar"/>
         </shared-library>
         <shared-library name="json" version="1.0">
              <code-source path="ezmorph-1.0.4.jar"/>
              <code-source path="json.jar"/>
         </shared-library>
         <shared-library name="other_sets" version="1.0">
              <code-source path="commons-fileupload-1.1.jar"/>
              <code-source path="dom4j-1.6.1.jar"/>
              <code-source path="dwr.jar"/>
              <code-source path="javassist.jar"/>
              <code-source path="log4j-1.2.13.jar"/>
         </shared-library>
         <shared-library name="spring2" version="1.0">
              <code-source path="aspectjrt.jar"/>
              <code-source path="aspectjweaver.jar"/>
              <code-source path="cglib-nodep-2.1_3.jar"/>
              <code-source path="spring.jar"/>
         </shared-library>
         <shared-library name="struts2" version="1.0">
              <code-source path="antlr-2.7.2.jar"/>
              <code-source path="commons-collections.jar"/>
              <code-source path="commons-io-1.1.jar"/>
              <code-source path="commons-logging-1.0.4.jar"/>
              <code-source path="freemarker-2.3.8.jar"/>
              <code-source path="ognl-2.6.11.jar"/>
              <code-source path="struts2-core-2.0.9.jar"/>
              <code-source path="struts2-spring-plugin-2.0.9.jar"/>
              <code-source path="xwork-2.0.4.jar"/>
         </shared-library>
         <rmi-config path="./rmi.xml" />
         <jms-config path="./jms.xml" />
         <javacache-config path="../../../javacache/admin/javacache.xml" />
         <j2ee-logging-config path="./j2ee-logging.xml" />
         <log>
              <file path="../log/server.log" />
         </log>
         <java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" extdirs="C:\Program Files\Java\jdk1.5.0_07\jre\lib\ext" />
         <global-application name="default" path="application.xml" parent="system" start="true" />
         <application name="javasso" path="../../home/applications/javasso.ear" parent="default" start="false" />
         <application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" />
         <application name="Test" path="../applications\Test.ear" parent="default" start="true" />
         <application name="OraTest" path="../applications\OraTest.ear" parent="default" start="true" />
         <global-web-app-config path="global-web-application.xml" />
         <transaction-manager-config path="transaction-manager.xml" />
         <web-site default="true" path="./default-web-site.xml" />
         <cluster  id="6745699755968" />
    </application-server>Orion-application.xml (oc4j/j2ee/home/config)
    <?xml version="1.0"?>
    <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.1.0" default-data-source="jdbc/OracleDS" component-classification="external"
    schema-major-version="10" schema-minor-version="0" >
    <imported-shared-libraries>
         <import-shared-library name="hibernatejpa"/>
         <import-shared-library name="db"/>
         <import-shared-library name="displaytab"/>
         <import-shared-library name="ehCache"/>
         <import-shared-library name="json"/>
         <import-shared-library name="other_sets"/>
         <import-shared-library name="spring2"/>
         <import-shared-library name="struts2"/>
    </imported-shared-libraries>
    </orion-application>Please help to deploy my application, I created one application with struts2 and spring2 and that is working fine, but when I try to add JPA with hibernate 3.3 I am unable to deploy it.
    Thanks a lot in advance.
    With best regards,
    Ishaan

    Hi,
    Thank you very much for your reply. the previous Exception has gone but now I get the following one.
    Exception: NoClassDefFoundError: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0.
    [Jun 2, 2008 10:57:17 AM] Operation failed with error: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0. with bset regards,
    ishaan

  • Toplink JPA Deployment problem  in OC4J

    Hi all ,
    we are having problem in deployment for an toplink JPA program in OC4J 10.1.3 .. We are using toplink essesntial and our deployed EAR structure is
    aaplication.xml
    rmwtoplink.war
    the content of application.xml is as
    <display-name>rmwtoplink</display-name>
    <module>
    <web>
    <web-uri>rmwtoplink.war</web-uri>
    <context-root>rmwapplist</context-root>
    </web>
    </module>
    the content of war file as below :
    web-inf\web.xml
    web-inf\classes\META-INF\persistence.xml
    web-inf\classes\<classes>
    web-inf\gnf\<jsp pages>
    when ever a pages are called those do not use entity manager / jpa call are loading perfectly , but the pages which have used jpa are nt diplayed , we check the error messages , it just halts after following codes :
    EntityManagerFactory emf =
    Persistence.createEntityManagerFactory(jpaSource);
    It seems there is no exception that is even thrown in page or opmn log .
    The same program is running fine in Jdveloper 10.1.3 /
    Is there any way where we can get the actual error message ?
    we are using toplink.jdbc.url for connecting the database .

    Here is little more insight for the problem , further check reveals that :
    start connecting rmwtest
    exception occured for connection test , Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    The Connection descriptor used by the client was:
    //localhost:1521/ORCL
    we do not have any idea how is localhost:1521/ORCL picked up , in our persistence.xml we have
    where as rmwtest defined in persistence.xml as
    <persistence-unit name="rmwtest" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <class>rmw.gnf.entity.ServSesnUser</class>
    <class>rmw.gnf.entity.RmwData</class>
    <class>rmw.gnf.entity.GnfData</class>
    <properties>
    <property name="toplink.logging.level" value="FINEST"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@middb.1dc.com:1621:ukdbins"/>
    <property name="toplink.jdbc.user" value="****"/>
    <property name="toplink.jdbc.password" value="********"/>
    </properties>
    </persistence-unit>

  • How to use (toplink essentials)JPA with EJB 2.1 spec in oc4j 10.1.3.2

    I have an application that uses EJB 2.1 spec with SLSB (no entity beans) and uses DAO pattern with hibernate2 for persistence. I want to replace hibernate with toplink-essentials (JPA). I cannot upgrade the EJB spec version as we use some thirdparty beans. The application uses DAO pattern so I should be able to hook in a new toplink DAO impl. What I am struggling with is how do I get hold of the EntityManagerFactory in my EJB 2.1 SLSB. Also I need CMT with XA transactions as our application interacts with jms and database using MDBs and SLSBs.
    Prantor

    You should be able to use Persistence.createEntityManagerFactory(<your-persistence-unit-name>, properties), and create your EntityManager from that.
    To have TopLink integrated with JTA, in your persistence.xml (or properties) you need to use a JTA DataSource, and set the ServerPlatform for your JEE server.

  • How to get Hibernate 3.2.5 running on OracleAS 10.1.3.1 / OC4J 10.1.3.2

    Hi all,
    I have installed the OracleAS 10.1.3.0 patched to OracleAS 10.1.3.1/OC4J 10.1.3.2.
    I am trying to get Hibernate 3.2.5 with Hibernate EntityManager 3.3.1 running on the server, but I am not able to succeed.
    I want to provide Hibernate as a shared lib, because I´ll have several applications using it. Actualyl I´ll have many EJB-JAR deployed, that will use Hibernate as the underlying implementation of EJB3.0/JPA specification.
    I tried to copy the Hibernate JARs to home/applib directory and also register Hibernate as a shared lib through EM, but both failed when I deployed my application.
    I am trying to deploy my EJB-JAR in two different manners:
    1) Via EM, deploying the EJB-JAR file and checking Hibernate lib as dependency
    2) Copying the EJB-JAR file into home/applications directory and add ejb-module tag to application.xml
    Both fail.
    How can get Hibernate for JPA running on OracleAS 10.1.3.1 / OC4J 10.1.3.2, in order to make it available for many differente application modules (ejb-jars) ?
    Note: I prefer deploying EJB-JAR directly into home/applications in order the have the classes shared over for all application, so they can communicate to each other. Instead of deploying my ejb-jar within EARs and making each module isolated from each other.
    Thanks

    Check Debu's blog for this:
    http://debupanda.blogspot.com/2007/01/using-hibernate-as-pluggable-ejb-3-jpa.html
    --olaf                                                                                                                                                                                                                                               

  • How do I use toplink with Spring 2.5 and oc4j 10.1.2?

    Our existing java server environment is limited to Oc4j 10.1.2 due to being tied to Oracle Forms.
    We've added a java 6 jdk to the machine and linked it to a specific container to examine some newer java features since this version of the application server only comes with java 1.4.2.
    Does anyone have some configuration steps for getting toplink essentials and spring to work with oc4j 10.1.2? Even with oc4j 10.1.3 in jdev 10.1.3.4 I'm having problems trying to figure out what needs placed in the persistence.xml file verses what needs placed in the spring-beans.xml file.
    I'm trying to either use the J2SE option of keeping the connection information in the persistence.xml file (which doesn't work) - it tries to connect to //localhost:1521/orcl. If I try to define a datasource within Spring's xml file, I'm not sure how to tie that into the persistence.xml file. Could I use the oc4j 10.1.2 container provided datasource?
    It seems like I'm at a loss as to how to get this working. If you'd like me to post some files, I can do that later on today when I get back to work.
    The configuration that I'm trying to do is based on a modified workspace from an ibm developerworks article with websphere, mixing in the ideas from a JPA with Spring 2.0 article from Mike Keith and Rod Johnson. (That article goes pretty far in the configuration information but never provided an example to download...)
    Any help appreciated.
    Eric (hbg, pa)

    I'm still at a loss with this. Rather than worry about the older version, for now, I just want to see JPA in action. So, I've decided on just running the Spring 2.5.6 petclinic example out of the samples folder. When I try to do this, after only tweaking the web.xml to use the applicationContext-jpa.xml file, the application does not initialize properly. Here's the stack trace I get:
    Target URL -- http://192.168.0.2:8988/petclinic/index.jsp
    09/05/11 23:26:05 Oracle Containers for J2EE 10g (10.1.3.4.0)  initialized
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\connector.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/connector.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\jta.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/jta.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\persistence.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/persistence.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\toplink-essentials.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/toplink/jlib/toplink-essentials.jar (from <code-source> in /C:/jdev10134/jdev/system/oracle.j2ee.10.1.3.42.70/embedded-oc4j/config/server.xml). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    09/05/11 23:26:24 log4j: Reading configuration from URL file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/log4j.properties
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    2009-05-11 23:26:24,593 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization started>
    2009-05-11 23:26:24,687 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@eeb406: display name [Root WebApplicationContext]; startup date [Mon May 11 23:26:24 EDT 2009]; root of context hierarchy>
    2009-05-11 23:26:24,828 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/applicationContext-jpa.xml]>
    2009-05-11 23:26:25,281 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@eeb406]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:25,734 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [jdbc.properties]>
    2009-05-11 23:26:25,796 INFO [org.springframework.context.weaving.DefaultContextLoadTimeWeaver] - <Determined server-specific load-time weaver: org.springframework.instrument.classloading.oc4j.OC4JLoadTimeWeaver>
    2009-05-11 23:26:28,296 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#c25ae3' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,359 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,437 INFO [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] - <Building JPA container EntityManagerFactory for persistence unit 'PetClinic'>
    2009-05-11 23:26:28,468 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'entityManagerFactory' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,562 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,org.springframework.context.config.internalBeanConfigurerAspect,loadTimeWeaver,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.transaction.config.internalTransactionAspect,org.springframework.samples.petclinic.aspects.UsageLogAspect#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,clinic]; root of factory hierarchy>
    2009-05-11 23:26:29,671 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization completed in 5078 ms>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization started>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c00e55: display name [WebApplicationContext for namespace 'petclinic-servlet']; startup date [Mon May 11 23:26:29 EDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@eeb406>
    2009-05-11 23:26:29,734 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/petclinic-servlet.xml]>
    2009-05-11 23:26:30,171 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c00e55]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b>
    2009-05-11 23:26:30,375 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b: defining beans [addOwnerForm,addPetForm,addVisitForm,clinicController,editOwnerForm,editPetForm,findOwnersForm,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,messageSource]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:31,828 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization completed in 2094 ms>
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.transaction
    WARNING: PersistenceUnitInfo PetClinic has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: Server: unknown
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.connection
    CONFIG: connecting(DatabaseLogin(
            platform=>EssentialsHSQLPlatformWithNativeSequence
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    May 11, 2009 11:27:03 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    SEVERE:
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Error Code: 17002
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:150)
            at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:233)
            at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:242)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:309)
            at oracle.toplink.essentials.threetier.ConnectionPool.buildConnection(ConnectionPool.java:117)
            at oracle.toplink.essentials.threetier.ExternalConnectionPool.startUp(ExternalConnectionPool.java:135)
            at oracle.toplink.essentials.threetier.ServerSession.connect(ServerSession.java:451)
            at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:616)
            at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:282)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
            at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
            at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
            at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:220)
            at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
            at org.springframework.samples.petclinic.jpa.EntityManagerClinic.getVets(EntityManagerClinic.java:39)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            at $Proxy19.getVets(Unknown Source)
            at org.springframework.samples.petclinic.web.ClinicController.vetsHandler(ClinicController.java:53)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
            at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
            at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
            at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
            at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
            at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
            at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
            at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
            at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
            at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1398)
            at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
            at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
            at oracle.j2ee.connector.ConnectionPoolImpl$NonePoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1211)
            at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
            at oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
            at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1596)
            at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1541)
            at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1486)
            at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
            at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:145)
            ... 60 moreAny ideas? I'd really like to see JPA, Spring and oc4j working together?
    Thanks,
    Eric

  • Can JPA invoke a stored procedure with a cursor type output parameter?

    i use JPA ,i hope get a result set by a stored procedure ,
    how to solve it ?

    thank you!i try to do,but i get a ClassCastException
    below is the sesion ejb :
    @PersistenceContext(unitName = "Model")
    private EntityManager em;
    ((oracle.toplink.ejb.cmp3.EntityManager)em).getActiveSession().executeQuery(query);
    i am getting the following ClassCastException:
    07/05/24 15:49:40 [110] DCBindingContainer.reportException :oracle.jbo.JboException
    07/05/24 15:49:40 [111] oracle.jbo.JboException: JBO-29000: java.lang.ClassCastException: com.evermind.server.ejb.persistence.EntityManagerProxy; nested exception is: java.lang.ClassCastException: com.evermind.server.ejb.persistence.EntityManagerProxy
         at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:533)
         at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1795)
         at oracle.adf.model.generic.DCGenericDataControl.invokeMethod(DCGenericDataControl.java:248)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:219)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
         at oracle.adf.model.generic.DCGenericDataControl.invokeOperation(DCGenericDataControl.java:266)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:305)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:627)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:378)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:128)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:89)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1087)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:204)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at com.zspost.xin.view.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:45)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    null

  • Deployement problem in Oracle App Serv with hibernate + JPA and Spring

    Dear All,
         I am facing a problem in deployment of a web application in oracle application server 10g. but the same is working fine with Tomcat. The following Exception. Is being thrown.
         Failed to deploy web application "OraTest". Failed to deploy web application OraTest". . Nested exception Resolution:
    Base Exception:
    java.rmi.RemoteException
    deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version. deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version     I am using the following technologies
    1.     Spring 2.0.7
    2.     Struts 2.0.9
    3.     Hibernate 3.3
    4.     JPA 1.0
    5.     Oracle App Server 10.1.2.0.2
    Web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <display-name>My Application</display-name>
         <filter>
              <filter-name>struts2</filter-name>
              <filter-class>
                   org.apache.struts2.dispatcher.FilterDispatcher
              </filter-class>
         </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>
              <welcome-file>/index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>dwr-invoker</servlet-name>
              <servlet-class>
                   org.directwebremoting.servlet.DwrServlet
              </servlet-class>
              <init-param>
                   <param-name>debug</param-name>
                   <param-value>true</param-value>
              </init-param>
         </servlet>
         <servlet-mapping>
              <servlet-name>dwr-invoker</servlet-name>
              <url-pattern>/dwr/*</url-pattern>
         </servlet-mapping>
         <listener>
              <listener-class>
                   org.springframework.web.context.ContextLoaderListener
              </listener-class>
         </listener>
         <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>
                   /WEB-INF/conf/spring/datasource-context.xml,
                   /WEB-INF/conf/spring/aop-context.xml          
              </param-value>
         </context-param>
    </web-app>
    /Datasource-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
         <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
         <!--  following code is for using oracle -->
            <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>oracle.jdbc.driver.OracleDriver</value>
              </property>
              <property name="url">
                   <value>jdbc:oracle:thin:@//xxx.xxx.xxx.xxx/mydb</value>
              </property>
              <property name="username">
                   <value>admin</value>
              </property>
              <property name="password">
                   <value>admin</value>
              </property>
         </bean>
         <!--  following code is for using mysql -->
         <!--
         <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>org.gjt.mm.mysql.Driver</value>
              </property>
              <property name="url">
                   <value>jdbc:mysql://192.168.10.157:3306/tpsadmin</value>
              </property>
              <property name="username">
                   <value>tpsadmin</value>
              </property>
              <property name="password">
                   <value>tpsadmin</value>+
              </property>
         </bean>
         -->
         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
              <property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
              <property name="dataSource" ref="dataSource"/>
              <property name="jpaVendorAdapter">
                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
                        <property name="database" value="ORACLE"/>               
                        <property name="showSql" value="true"/>
                   </bean>
              </property>
         </bean>
         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
              <property name="entityManagerFactory" ref="entityManagerFactory"></property>
         </bean>
         <tx:annotation-driven transaction-manager="transactionManager"/>     
    </beans>Aop-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    <!--  Bean Definition of all the required Interceptors -->
         <bean id="methodLoggingAdvice" class="com.mkcl.sets.common.interceptor.MehodLogInterceptor"/>
         <!--
         <bean id="appCacheManager" class="net.sf.ehcache.CacheManager">
              <constructor-arg index="0" type="java.net.URL" value="classpath:country-ehcache.xml"/>
         </bean>     
         -->
          <!--bean id="methodCacheInterceptor" -->
         <bean id="methodCachingAdvice"
              class="com.mkcl.sets.common.interceptor.MethodCacheInterceptor">
              <property name="cache">
                   <ref local="methodCache" />
              </property>
         </bean>
         <bean id="cacheManager"
              class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
              <property name="configLocation">
                   <value>WEB-INF/conf/other/ehcache.xml</value>
              </property>
         </bean>     
         <bean id="methodCache"
              class="org.springframework.cache.ehcache.EhCacheFactoryBean">
              <property name="cacheManager">
                   <ref local="cacheManager" />
              </property>
              <property name="cacheName">
                   <value>mkclSetsCache</value>
              </property>
         </bean>      
         <!--
         <bean id="methodCachingAdvice" class="interceptor.MethodCachingInterceptor"/>
          -->
         <aop:config>
              <aop:pointcut id="getCountriesPointCut" expression="execution(* com.mkcl.sets.dao.master.impl.LocationDAOImpl.getCountries())"/>          
              <!-- <aop:pointcut id="methodLogPointCut" expression="execution(* com.mkcl.sets.service.master.impl.CategoryServiceImpl.getAllCategories(..))"/> -->
              <aop:pointcut id="methodLogPointCutDao" expression="execution(* com.mkcl.sets.dao..*.*(..))"/>
              <aop:pointcut id="methodLogPointCutService" expression="execution(* com.mkcl.sets.service..*.*(..))"/>
              <aop:advisor id="methodCachingAdvisor" advice-ref="methodCachingAdvice" pointcut-ref="getCountriesPointCut"/>          
              <aop:advisor id="methodLoggingAdvisorDao" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutDao"/>
              <aop:advisor id="methodLoggingAdvisorService" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutService"/>
         </aop:config>
    </beans>Persistence.xml
    <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="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
              <!-- jta-data-source>mkclDS</jta-data-source-->
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <!-- properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
              </properties-->
         </persistence-unit>
    </persistence>Do I need to add some other configuration in the existing files or do I need to add some other configuration files ? Please help to deploy my application.
    Thanks a lot in advance.
    With Best Regards,
    Ishaan
    null

    Did you ever find a solution to this Ishaan?
    I imagine you ended up having to upgrade 10gR2 to 10gR3 at least. Correct?

Maybe you are looking for

  • Transfer posting from one plant to another plant

    Friends i want to transfer goods from one plant to another plant of same company code and iam trying this one in transaction migo if post for this it gives an error       "posting only possible in periods 2006/05 and 2006/04 in company code" what err

  • Connecting Samsung 913n monitor to ibook -screen resolution?

    Hi, I've bought a new monitor - Samsung 913n - and want to connect it to my ibook. No joy so far! I have the adaptor and there seems to be a link between them, as the monitor says I've lost the signal when I unplug the adaptor. One possibility seems

  • How to print a PDF within OpenEdge.  PDDoc worked with Adobe 5 but not with Adobe xi

    Hello The routine we use to print PDF files no longer works now that we upgraded to Adobe XI.  Can someone please point me in the right direction for resolving this.  The command is failing at the following command. CREATE "AcroExch.PDDoc" g_comhAcro

  • SCORM compliance from individual learning interactions

    Hey Guys, I'm working on a online learning lesson where the quiz is interlaced in the lesson content So i'm adding individual quiz components within the lesson, however I'm not able to get a quiz score out of the LMS or dynamically through flash >> 

  • SAP GRC

    Hi gurus, Can you tell me what is sap grc. How to connect the third party tools to sap and what is the signification of the third party tools.