OC4J-hibernate

Hello,
I have made a simple datagrid wich should be populated with
data from an oracle DB using hibernate.
I get an error when executing the DataService.fill method.
I'm using rtmp protocol.
I checked all my config files and everything looks ok. Do I
need to configure something in order to be able to use the RTMP
protocol ?
Hereby the logtext from the flashlog.txt :
14:16:24.859 [INFO] mx.messaging.Producer
'cds-producer-nierob.presentation.hibernate-null' producer set
destination to 'nierob.presentation.hibernate'.
14:16:24.859 [INFO] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer set
destination to 'nierob.presentation.hibernate'.
14:16:24.875 [DEBUG]
mx.data.DataService.nierob.presentation.hibernate Configuration for
destination='nierob.presentation.hibernate':
<properties>
<metadata>
<identity property="id"/>
</metadata>
<network>
<paging enabled="false" pageSize="10"/>
</network>
</properties>
14:16:24.906 [DEBUG]
mx.data.DataService.nierob.presentation.hibernate
cds-producer-nierob.presentation.hibernate-null New DataManager
destination='nierob.presentation.hibernate'
14:16:24.906 [INFO] mx.messaging.Producer
'E14A248B-A07B-4C61-CD53-261DB24AD79E' producer set destination to
'nierob.presentation.hibernate'.
14:16:24.921 [DEBUG]
mx.data.DataService.nierob.presentation.hibernate
cds-producer-nierob.presentation.hibernate-null DataService.fill()
called with 2 arguments.
(Array)#0
[0] "all.presentations"
[1] (Array)#1
14:16:24.937 [WARN] mx.messaging.Consumer Client ID specified
in subscribe is ignored when a session is assigned.
14:16:24.937 [INFO] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer
subscribe.
14:16:24.953 [INFO] mx.messaging.Channel 'nierob-rtmp'
channel endpoint set to rtmp://localhost:2039
14:16:24.953 [INFO] mx.messaging.Channel 'nierob-rtmp'
channel settings are:
<channel id="nierob-rtmp"
type="mx.messaging.channels.RTMPChannel">
<endpoint uri="rtmp://localhost:2039"/>
<properties/>
</channel>
14:16:24.984 [INFO] mx.messaging.Producer
'cds-producer-nierob.presentation.hibernate-null' producer sending
message '1A37B4C2-1B88-B2E8-FD92-261DB2984D75'
14:16:26.203 [DEBUG] mx.messaging.Channel 'nierob-rtmp'
channel got status. (Object)#0
code = "NetConnection.Connect.Failed"
level = "error"
14:16:26.234 [INFO] mx.messaging.Channel 'nierob-rtmp'
channel polling stopped.
14:16:26.250 [ERROR] mx.messaging.Channel 'nierob-rtmp'
channel connect failed.
14:16:26.250 [WARN] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer channel
faulted with Channel.Connect.Failed null
14:16:26.265 [DEBUG] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer starting
resubscribe timer.
14:16:26.281 [WARN] mx.messaging.Producer
'cds-producer-nierob.presentation.hibernate-null' producer channel
faulted with Channel.Connect.Failed null
14:16:26.296 [ERROR] mx.messaging.Producer
'cds-producer-nierob.presentation.hibernate-null' producer fault
for '1A37B4C2-1B88-B2E8-FD92-261DB2984D75'.
[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error null"]
at mx.data::ConcreteDataService/
http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at ::DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at mx.messaging::ChannelSet/::faultPendingSends()
at mx.messaging::ChannelSet/channelFaultHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.messaging::Channel/mx.messaging:Channel::connectFailed()
at
mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed ()
at
mx.messaging.channels::RTMPChannel/mx.messaging.channels:RTMPChannel::statusHandler()
14:16:27.796 [DEBUG] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer trying
to resubscribe.
14:16:28.828 [DEBUG] mx.messaging.Channel 'nierob-rtmp'
channel got status. (Object)#0
code = "NetConnection.Connect.Failed"
level = "error"
14:16:28.859 [INFO] mx.messaging.Channel 'nierob-rtmp'
channel polling stopped.
14:16:28.875 [ERROR] mx.messaging.Channel 'nierob-rtmp'
channel connect failed.
14:16:28.890 [WARN] mx.messaging.Consumer
'cds-consumer-nierob.presentation.hibernate-null' consumer channel
faulted with Channel.Connect.Failed null
14:16:28.890 [WARN] mx.messaging.Producer
'cds-producer-nierob.presentation.hibernate-null' producer channel
faulted with Channel.Connect.Failed null

I don't know if this is possible for you, but we ended up using 9.2 instead. The restriction that prevents you from accessing the UserTransaction is relatively new.
The proper fix will probably involve creating an OC4JTransactionManagerLookup once the "correct" way to get hold of the OC4J transactions is found... The problem being that J2EE doesn't specify how this should be done.

Similar Messages

  • 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                                                                                                                                                                                                                                               

  • 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

  • Problems with deploy on OC4J 10.1.3.2 with hibernate persistence.xml

    Hi all,
    I can't deploy an EAR/WAR into oc4j 10.3.2.0 stand-alone, I have the following error message :
    2008-03-26 19:50:38.721 NOTIFICATION Binding opsky-webapp-1.0-SNAPSHOT web-module for application opsky to site default-web-site under context root /opsky
    08/03/26 19:50:38 oracle.oc4j.admin.internal.DeployerException: [opsky:opsky-webapp-1.0-SNAPSHOT] - Exception creating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence unit ApplicationEntityManager.
    08/03/26 19:50:38 at com.evermind.server.ejb.exception.DeploymentException.exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
    08/03/26 19:50:38 at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
    08/03/26 19:50:38 at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:733)
    08/03/26 19:50:38 at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
    08/03/26 19:50:38 at com.evermind.server.Application.getHttpApplication(Application.java:571)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1909)
    08/03/26 19:50:38 at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1606)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
    08/03/26 19:50:38 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    08/03/26 19:50:38 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    08/03/26 19:50:38 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    08/03/26 19:50:38 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    08/03/26 19:50:38 at java.lang.Thread.run(Thread.java:619)
    2008-03-26 19:50:38.987 NOTIFICATION Application Deployer for opsky FAILED.
    2008-03-26 19:50:38.987 NOTIFICATION Application UnDeployer for opsky STARTS.
    I'm using hibernate 3 with spring, here is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
    <persistence-unit name="ApplicationEntityManager" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <class>org.appfuse.model.User</class>
    <class>org.appfuse.model.Role</class>
    </persistence-unit>
    </persistence>
    Does enyone know anything about this issue?

    Hi,
    It would be helpful if you copied and pasted the error messages you get.
    For what its worth, it probably isn't a bug, just a configuration problem. You may need to alter more than your application.xml file.
    If you developed the EJBs with JDeveloper, you can create a deployment descriptor that adds the necessary configuration files for the OAS platform, and package them into a WAR or EAR. Use Enterprise Manager to deploy the WAR/EAR to the OAS OC4J and everything will be placed where its needed.
    More info in the JDeveloper and OAS 10.1.3 documentation.
    Jim

  • 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

  • During hibernate query error in OC4J 10.1.3.4

    Hi friends,
    We get following error during one of Transaction execution..
    Anyone has idea abt this please let me know..
    2010-01-05 14:01:17,933(?:?) FATAL - java.lang.ClassCastException: oracle.jdbc.driver.T4CVarcharAccessor incompatible with java.io.Serializable
         at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:1088)
         at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:554)
         at org.hibernate.loader.Loader.doQuery(Loader.java:689)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
         at org.hibernate.loader.Loader.doList(Loader.java:2145)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
         at org.hibernate.loader.Loader.list(Loader.java:2024)
         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    Hello friends,
    I am in a big trouble due to resultset behaviour....
    In my application during one hibernate query execution sometimes resultset.wasnull method stop returning any value.
    I have try to check same issue but no one i think have face this before.
    Sometime when I start OC4j application server, query get executed successfully.. only using connection pooling the same query fails
    even somtime ..
    I need a permenant solution for this. On debugging I come ot know that call to resultset.wasnull under
    hibernate class nullsafegettype somehow not returns any value..
    Return value set to oracle.jdbc.driver.T4CVarcharAccessor which creates problem.
    In my application I am using following versions.
    Oracle database. 10.1.0.5
    Application Server OC4j 10.1.3
    Hibernate Version 3.1
    Oracle JDBC Driver 10.1.0.5.0
    Thanks & Regards
    Edited by: user10313756 on 2010/01/20 18:34

    I am facing same issue ,have you get any work around

  • Eclipse Tomcat Hibernate Struts - JDeveloper OC4J migration problem.

    In my current project, everybody uses Eclipse and Tomcat as development environment. I decide to try JDeveloper in this project. Not that this configuration works with eclipse WPT.
    When I try to open project, I get an error as below.
    Target URL -- http://127.0.0.1:8988/PSSO/index.html
    30.Haz.2008 21:50:03 oracle.classloader.util.ClassLoadLogger log
    WARNING: Code-source D:\atilla\projects\javaProjects\meteksan\EclipseWorkspace_RTUK\BuildScripts\DirectoryThirdPartyLibraries\jta.jar (from <classpath> in D:\atilla\projects\javaProjects\meteksan\EclipseWorkspace_RTUK\PSSO\WebContent) has the same filename but is not identical to /E:/downloads/tools/jdevstudiobase1111/j2ee/home/lib/jta.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in E:\downloads\tools\jdevstudiobase1111\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.PSSO:0.0.0.
    30.Haz.2008 21:50:03 oracle.classloader.util.ClassLoadLogger log
    WARNING: Code-source E:\downloads\tools\jdevstudiobase1111\jakarta-struts\lib\struts.jar (from <classpath> in D:\atilla\projects\javaProjects\meteksan\EclipseWorkspace_RTUK\PSSO\WebContent) has the same filename but is not identical to /D:/atilla/projects/javaProjects/meteksan/EclipseWorkspace_RTUK/BuildScripts/DirectoryThirdPartyLibraries/struts.jar (from <classpath> in D:\atilla\projects\javaProjects\meteksan\EclipseWorkspace_RTUK\PSSO\WebContent). 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.PSSO:0.0.0.
    08/06/30 21:50:17 Hibernate: select t.name, sa.value from RTUK_PSSO.ytk_sistem_attribute sa, RTUK_PSSO.ytk_attribute t where sa.attribute_id = t.id
    21:50:20,687 ERROR ActionServlet:364 - Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
    javax.servlet.ServletException: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from tr.com.meteksan.genel.gnlKurumOrganizasyon.GnlKurumOrganizasyon ko order by ko.organizasyonKodu]
    at tr.com.meteksan.web.plugin.InitSozlukDegerleriPlugIn.init(InitSozlukDegerleriPlugIn.java:49)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
    what is interesting is that
    first query with hibernate works, but second query does not works.
    My JDeveloper as below
    CVS Version Internal to Oracle JDeveloper 11g Technology Preview 4 (client-only)
    Java(TM) Platform 1.5.0_15
    Oracle IDE 11.1.1.0.22.49.49
    Versioning Support 11.1.1.0.22.49.49
    I wonder if it is related to struts and jta jars defined twice.

    There might be a problem with the OC4J not finding the hibernate library you are trying to use.
    Try setting the library also in the tools->embedded OC4J preferences.

  • Oc4j standalone + hibernate 3.2 problem

    Hi all,
    I am working on a j2ee application with Oracle 9i Database as a backend, Struts as a MVC framework and Hibernate 3.2 for persistence layer.
    I have developed my application in jdeveloper 10.1.3.3 and when i deploy it on the embedded oc4j it all works fine. However when I deploy a War file with my application to a standalone oc4j server I get the following error:
    500 Internal Server Error
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    in the logs i get the following:
    07/09/26 15:33:29.796 10.1.3.3.0 Started
    07/09/26 15:33:37.390 GLM: Error preloading servlet
    javax.servlet.ServletException: Error instantiating servlet 'HibernateServlet'. Servlet class org.monsoon.glm.servlets.HibernateServlet not found in web-application GLM
         at com.evermind.server.http.HttpApplication.servletClassNotFound(HttpApplication.java:4880)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4846)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4748)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4936)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1145)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
         at com.evermind.server.Application.getHttpApplication(Application.java:570)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1906)
         at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1603)
         at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
         at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
         at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
         at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
         at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
         at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
         at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    07/09/26 15:33:37.390 GLM: 10.1.3.3.0 Started
    07/09/26 15:34:23.531 GLM: Servlet error
    java.lang.RuntimeException: org.hibernate.HibernateException: Could not find datasource
         at org.monsoon.glm.dao.util.ConnectionFactory.<init>(ConnectionFactory.java:24)
         at org.monsoon.glm.dao.util.ConnectionFactory.getInstance(ConnectionFactory.java:30)
         at org.monsoon.glm.dao.UserDao.getUser(UserDao.java:42)
         at org.monsoon.glm.controller.LoginAction.execute(LoginAction.java:75)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].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:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: org.hibernate.HibernateException: Could not find datasource
         at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
         at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
         at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
         at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
         at org.monsoon.glm.dao.util.ConnectionFactory.<init>(ConnectionFactory.java:18)
         ... 22 more
    Caused by: javax.naming.NameNotFoundException: java:comp/env/jdbc/DBConnMilofDS not found in GLM
         at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:225)
         at com.oracle.naming.J2EEContext.lookup(J2EEContext.java:172)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookupInJavaContext(ApplicationContext.java:308)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:232)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookup(ApplicationContext.java:197)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
         ... 29 more
    I have tried disabling toplink, but it still doesnt work.
    I am pretty new to oc4j and at this point I dont know how to set it up to recognize my hibernate and db connection.
    Thank you in advance :),
    Sizzla

    The reason why it works in JDeveloper might be that you have defined the Database Connection in JDev. If so, you have two options:
    1. Configure OC4J through the Application Server Control (eg localhost:8888/em)
    2. Create an EAR which includes the JDev database connections and deploy it
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using Hibernate on OC4J 10.1.3

    How can I use hibernate in my application server, anyone has a reference?
    Thanks.

    There's an easy way if you don't need hibernate to be working behind the scene (e.g, replacing TopLink as the JPA implementation).
    Basically, you just need to initialize hibernate SessionFactory once on startup, and put it somewhere accessible from your business logic code.
    On servlet container, usually you would want to attach a ContextLoaderListener and initialize hibernate there and put it in ServletContext. You can then get sessionFactory from your servlets using httpServletRequest.getSession().getServletContext().
    Same idea for ejb. I'm not sure how to accomplish that though. Maybe instantiating the sessionFactory in a startup listener and register it on JNDI. I'm not sure, still learning all these EJB stuff.
    Rudi

  • Hibernate + java + SQL server2000 + OC4j server

    hi java / hibernate Experts,
    I am new in using hibernate3 version for
    executing stored procdure in SQLserver 2000.
    I have started working on this by learining from www.hibernate.org.
    I am getting below error and could not rectify from few days.
    Could any one add your comments for Stored procedure execution for SQL server 2000.
    Where can i get information regarding execution of Stored procedures for SQL server in hibernat3
    XML Mapping for Calling Stored Procedure
    <sql-query name="sp_test1_SP" callable="true">
    <return alias="metrics" class="com.utc.pw.acs.hibernate.model.Usermetrics">
    <return-property name="firstlogin" column="FIRSTLOGIN"/>
    <return-property name="lastactive" column="LASTACTIVE"/>
    </return>
    { ? = call sp_test1() }
    </sql-query>
    SQL Server Stored Procedure
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO
    ALTER PROC sp_test1 @sowcursor cursor varying OUT AS
    DECLARE s CURSOR
    LOCAL
    FOR SELECT * FROM acs.dbo.Usermetrics
    OPEN s
    SET @sowcursor=s
    RETURN(0)
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO
    Calling procedure in DAO
    hbSession = (Session)CSessionFactory.getSession();
    SQLQuery query = (SQLQuery)hbSession.getNamedQuery("sp_test1_SP");List results = query.list();
    Exception:
    06/03/21 18:00:58 Closing hibernate Session of this thread.
    org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
    ava:65)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
    er.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:2153)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:117)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1607)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:
    121)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:169)
    at com.utc.pw.acs.hibernate.dao.CMainMenuDAO.getMetrics(CMainMenuDAO.jav
    a:76)
    at com.utc.pw.acs.action.CMainMenuAction.loadMainMenu(CMainMenuAction.ja
    va:203)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchActio
    n.java:274)
    at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:
    194)
    at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:419)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
    6)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:317)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequ
    estDispatcher.java:220)
    at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetPa
    rametersRequestDispatcher.java:257)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.
    java:1062)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques
    tProcessor.java:386)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:229)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
    6)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:317)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Inv
    alid parameter binding(s).
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Unkn
    own Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Unkn
    own Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.preImplExecute(Unknown
    Source)
    at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at com.microsoft.jdbc.base.BaseStatement.executeInternal(Unknown Source)
    at com.microsoft.jdbc.base.BasePreparedStatement.execute(Unknown Source)
    at org.hibernate.dialect.SybaseDialect.getResultSet(SybaseDialect.java:1
    49)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:
    146)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1666)
    at org.hibernate.loader.Loader.doQuery(Loader.java:662)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
    ader.java:224)
    at org.hibernate.loader.Loader.doList(Loader.java:2150)
    ... 38 more

    Hello,
    I think that you do not need ? = in your xxx.hbm.xml file.
    === Orignal XML
    XML Mapping for Calling Stored Procedure
    <sql-query name="sp_test1_SP" callable="true">
    <return alias="metrics" class="com.utc.pw.acs.hibernate.model.Usermetrics">
    <return-property name="firstlogin" column="FIRSTLOGIN"/>
    <return-property name="lastactive" column="LASTACTIVE"/>
    </return>
    { ? = call sp_test1() }
    </sql-query>
    ==== Change the last call store procedure
    { call sp_test1() }

  • Application running in OC4J (10.1.3.4)Getting issue in OC4J (10.1.3.5) Ver.

    Hi,
    Below log issue appearing while deploying same application running in OC4J (10.1.3.4 Getting issue in with OC4J (10.1.3.5) .
    Tried importing relevant jar files into our application library
    backport-util-concurrent-3.1.jar
    com.springsource.edu.emory.mathcs.backport-sources-2.2.0.jar
    clover-2.4.2.jar
    js-14.jar
    Still issue is not resolved, Any one please advice, We are using Spring, Struts 1.2 and Hibernate 3.0 in this applicaiton.
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@07:49:28 DEBUG (ClassUtils.java:164) - Class [edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap] or one of its dependencies is not present: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap
    Dependent class: org.springframework.util.ClassUtils
    Loader: fzgpdtp.web.fzgpdtp:0.0.0
    Code-Source: /u01/app/oracle/product/oas/1013/j2ee/FZGPExternal/applications/fzgpdtp/fzgpdtp/WEB-INF/lib/spring-2.5.2.jar
    Configuration: WEB-INF/lib/ directory in /u01/app/oracle/product/oas/1013/j2ee/FZGPExternal/applications/fzgpdtp/fzgpdtp/WEB-INF/lib
    This load was initiated at fzgpdtp.web.fzgpdtp:0.0.0 using the loadClass() method.
    The missing class is not available from any code-source or loader in the system.
    02-14@07:49:28 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@07:49:28 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]18d085a: display name [Root WebApplicationContext]; startup date [Tue Feb 14 07:49:28 GST 2012]; root of context hierarchy
    02-14@07:49:28 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]
    02-14@07:49:29 ERROR (ContextLoader.java:214) - Context initialization failed
    java.lang.NullPointerException: name
    at java.util.zip.ZipFile.getEntry(ZipFile.java:247)
    at java.util.jar.JarFile.getEntry(JarFile.java:204)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:187)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:213)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1113)
    at java.lang.ClassLoader.getResource(ClassLoader.java:974)
    at oracle.classloader.PolicyClassLoader.findJREResource(PolicyClassLoader.java:1233)
    at oracle.classloader.JVMSearchPolicy.findResource(JVMSearchPolicy.java:36)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.getResource(PolicyClassLoader.java:1763)
    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:139)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:322)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1279)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1833)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:304)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:120)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:92)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:825)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:276)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@08:17:17 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@08:17:17 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]f20d33: display name [Root WebApplicationContext]; startup date [Tue Feb 14 08:17:17 GST 2012]; root of context hierarchy
    02-14@08:17:18 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]
    02-14@08:17:18 ERROR (ContextLoader.java:214) - Context initialization failed
    java.lang.NullPointerException: name
    at java.util.zip.ZipFile.getEntry(ZipFile.java:247)
    at java.util.jar.JarFile.getEntry(JarFile.java:204)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:187)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:213)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1113)
    at java.lang.ClassLoader.getResource(ClassLoader.java:974)
    at oracle.classloader.PolicyClassLoader.findJREResource(PolicyClassLoader.java:1233)
    at oracle.classloader.JVMSearchPolicy.findResource(JVMSearchPolicy.java:36)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.getResource(PolicyClassLoader.java:1763)
    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:139)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:322)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1279)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1833)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:304)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:120)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:92)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:825)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:276)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@08:26:01 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@08:26:02 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]125560f: display name [Root WebApplicationContext]; startup date [Tue Feb 14 08:26:02 GST 2012]; root of context hierarchy
    02-14@08:26:02 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]

    Hi there,
    Check for jars you are importing with JVM. The version of jre and its compatibility with imported jars.
    Hope it helps !
    Reg,
    MS

  • How can i use Hibernate 3.2 as my ejb3 persistence manager

    I get issues when i try to use Hibernate 3.2 as my ejb3 persistence manager in OC4J 10.1.3. I have included a persistence.xml file in META-INF/ of my ejb-jar.
    My classes are well annotated and would otherwise work with toplink, however i need to use hibernate.
    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="default" transaction-type="JTA">
         <provider>org.hibernate.ejb.HibernatePersistence</provider>
         <jta-data-source>appsconnDS</jta-data-source>
    <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
    </properties>
    </persistence-unit>
    </persistence>
    I get the following error when i deploy the jar.
    06/08/13 14:06:28 WARNING: DeployerRunnable.run java.lang.InstantiationException
    : Error initializing ejb-modules: nulloracle.oc4j.admin.internal.DeployerExcepti
    on: java.lang.InstantiationException: Error initializing ejb-modules: null
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
    (OC4JDeployerRunnable.java:52)
    ... 4 more
    Caused by: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at com.evermind.server.ejb.persistence.PersistenceUnitInfoImpl.addProper
    ty(PersistenceUnitInfoImpl.java:346)
    at com.evermind.server.ejb.persistence.PersistenceUnitInfoXMLFactory.par
    seProperties(PersistenceUnitInfoXMLFactory.java:126)
    2006-08-13 14:06:28.984 WARNING java.lang.InstantiationException: Error initiali
    zing ejb-modules: null

    Hi. I am also experiencing the same error as you are and would be interested in knowing how you solved it. thanks in advance

  • Error coming while running  Hibernate HQL  select query in jdeveloper

    Hi ,
    I have created hibernate application with just create query its running fine, i also writeen HQL select query below exception is coming,
    CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
    i also checked org.hibernate.hql.ast.HqlToken , its thr in jar file, eventhough it is throwing error.
    plz give sollution

    Hi dvohra,
    I have written below code
    List l1=new ArrayList();
    try{
    HibClass hib = new HibClass();
    Session session = hib.currentSession();
    Transaction tx = session.beginTransaction();
    Manager m;
    System.out.println("server------------------------");
    //Using from Clause
    String SQL_QUERY ="from Manager manager";
    Query query = session.createQuery(SQL_QUERY);
    List list = query.list();
    for (int i = 0; i < list.size();
    i++) {
    Manager manager =
    (Manager) list.get(i);
    System.out.println(
    "MId " +
    manager.getMid() +
    " Manager Name: " +
    manager.getMname());
    m=new Manager();
    m.setMid(manager.getMid());
    m.setMname(manager.getMname());
    l1.add(m);
    session.close();
    }catch(Exception e){
    System.out.println("helo-------------error---------"+e.getMessage());
    }finally{
    return l1;
    still below exception is coming
    CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
    oc4j is shutting down
    i am trying from 4 days , help me

  • Oc4j 10.1.3.0.0Prev4 does not load libs in WEB-INF/lib

    Hi,
    trying to use an existing application with oc4j I have serious problems.
    When trying to deploy I get exceptions (ClassNotFound) of classes that are in libs that are in the WEB-INF/lib folder of the war file I want to deploy:
    05/09/23 17:20:21 CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
    This class is in hibernate3.jar which is included in the war-file.
    When I place all the libs into the applib folder it does deploy. But then it crashes at runtime telling me the classes are duplicate (one in the war, one in applib).
    Any suggestions what I can do would be greatly appreciated.
    Norbert

    Hello,
    Instead of simply dropping the Jar file in the applib directory you should create shared libraries that will give you better control of what is happening at the classloader level (System, Application and Web Application)
    Please take a look to the 10.1.3 How tos about shared library. (Swapping XML parser and JDBC driver), and also to the documentation, chapter 7 "Using Shared Libraries" of the OC4J Configuration and Administration Guide
    Regards
    Tugdual Grall

  • 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