Problems with Hibernate/JPA in our current Netweaver project

Hi together,
currently we are trying to migrate our Glassfish project to run under Netweaver. Til now, we have used Hibernate as the JPA Implementation.
If we are trying to deploy our EAR, we get the failure that the EntityManager (Persistance Unit) can not be created.
Here is our persistence-context.xml
     <persistence-unit name="soiPersistenceUnit" transaction-type="JTA">
          <provider>org.hibernate.ejb.HibernatePersistence</provider>
          <jta-data-source>SOI_DB</jta-data-source>
          <class>de.hr.ec.hai.ejb.entity.Project</class>
          <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.SAPDBDialect" />
               <property name="hibernate.hbm2ddl.auto" value="update" />
               <property name="hibernate.show_sql" value="true" />
               <property name="hibernate.query.substitutions" value="true '1', false '0'" />
               <property name="hibernate.current_session_context_class" value="jta" />
               <property name="hibernate.transaction.manager_lookup_class" value="de.hr.ec.hai.ejb.service.SAPWebASTransactionManagerLookup" />
               <property name="hibernate.jdbc.batch.size" value="1" />
          </properties>
     </persistence-unit>
Has anyone an good hint to solve the problem?

Hi,
In SAP NetWeaver, you should use the persistence.xml file to configure the persistence unit.
More information: http://help.sap.com/saphelp_nwce711/helpdata/en/46/96ec3c33621e5ce10000000a1553f6/frameset.htm
Moreover, the properties you have are Hibernate-specific, which is perhaps one of the basic reasons for the problems you experience.
The SAP JPA platform supports all standard JPA properties (as per the EJB 3.0 specification) + the SAP-specific properties.
More information: http://help.sap.com/saphelp_nwce711/helpdata/en/77/fe0955fde340b3ab5220182d62b203/frameset.htm
Not least, you may need to consider the overall Java persistence infrastructure @ SAP.
More information: http://help.sap.com/saphelp_nwce711/helpdata/en/2d/23b32e8c0152469edf07909703fe03/frameset.htm
I hope that helps.
Best,
Yordan
P.S. I assume you want to migrate your application to SAP enhancement package 1 for SAP NetWeaver CE 7.1.

Similar Messages

  • We have a mac laptop and dont have any problems with pdf files but our imac will not open them.  any suggestions

    we have a mac laptop and dont have any problems with pdf files but our imac will not open them.  any suggestions?

    Back up all data.
    In the Finder, select Go ▹ Go to Folder from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Has anyone had a problem with fcp x not playing back a project since installing 10.0.9 update?

    Has anyone had a problem with fcp x not playing back a project since installing 10.0.9 update?

    Not here;  updated three systems without issues.
    Can you provide more details on your system specs, the projects you're referring to, and what kind of behavior you're encountering?
    Russ

  • 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

  • Problems with hibernate

    Hi.
    My MBP doesn't hibernate. The Energy-Preferences are set to 1 Min.
    No USB or firewire devices connected. Even when I close all applications
    my MAC doesn't hibernate. When I close my notebook lid - it sleeps.
    I resetted PMU, PRAM, restarted, deleted com.apple.powermanagement.libs
    etc.
    I don't know what to do. 3 weeks ago it hibernated always. Doesn't matter
    which programm ran.
    Any ideas?
    Problems with Mac OS X 10.4.9???
    Problems with battery update 3 weeks ago?

    The "normal" mode is sleep when the lid is closed. Hibernate mode must be specifically set by you. You can set the mode using the Terminal application in your Utilities folder. See the following:
    Description and modification of the different hibernate modes
    When the computer goes into sleeping mode, its behavior depends on a power management variable called hibernate mode. The hibernate mode can be set to different values:
    * 0 : Default sleep behavior on most Apple computers. RAM is still powered on while sleeping. Wake up is fast. Safe sleep is disabled.
    * 1 : Hibernation behavior. System is totally shut down while sleeping. RAM contents are dumped to disk. Wake up is slow.
    * 3 : Default behavior on Powerbook HD computers. RAM is still powered on while sleeping. Wake up is fast. Safe sleep is enabled, so RAM contents are also dumped to disk before going to sleep.
    Only a single mode can be activated at a time. In order to check what hibernate mode is currently active, the following command can be used in the Terminal application:
    pmset -g | grep hibernatemode
    In addition, users with administrator privileges can choose the hibernate mode. In order to do so, the following command can be used:
    sudo pmset -a hibernatemode X
    with X replaced by the value of the hibernate mode to set. You will be asked to enter your admin password. It will not be echoed.

  • Weblogic 10.3.5.0 problem with hibernate criteria

    Hi,
    I have problim with using Hibernate Criteria on Weblogic server. Everithing works fine on Tomcat.
    On weblogic I can execute this on Weblogic :
    Query query = sessionFactory.getCurrentSession().createSQLQuery("select sysdate from dual");//To get string date
    String result = query.uniqueResult().toString();
    ,but I have problem with executing criteria which work on tomcat:
         Criteria crit=sessionFactory.getCurrentSession().createCriteria(MyclassWithHibernate.class);
         crit.setFirstResult(0);
         crit.setMaxResults(1);
         return (MyclassWithHibernate) crit.uniqueResult();
    On weblogic, same criteria return me null and I get this exception:
    java.lang.NullPointerException
         at test.Rasa.getValueTest(Rasa.java:68)
         at test.Rasa$$FastClassByCGLIB$$b6e6c0b9.invoke(<generated>)
         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
         at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
         at test.Rasa$$EnhancerByCGLIB$$e20363db.getValueTest(<generated>)
         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:597)
         at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:418)
         at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
         at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)
         at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
         at flex.messaging.endpoints.AbstractEndpoint$$FastClassByCGLIB$$1a3ef066.invoke(<generated>)
         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
         at org.springframework.flex.core.MessageInterceptionAdvice.invoke(MessageInterceptionAdvice.java:66)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
         at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
         at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:576)
         at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$64941f01.serviceMessage(<generated>)
         at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
         at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
         at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
         at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
         at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
         at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
         at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$64941f01.service(<generated>)
         at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:101)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Enwironment is :
    WebLogic Server 10.3.5.0
    Hibernate 3.x
    Spring 3.x
    I am using this configuration i application context:
    <bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
    <property name="connectionCachingEnabled" value="true" />
    <property name="URL" value="jdbc:oracle:thin:@address:port:db" />
         <property name="user" value="myuser"></property>
         <property name="password" value="mypass"></property>
    <property name="connectionCacheProperties">
    <props merge="default">
    <prop key="MinLimit">3</prop>
    <prop key="MaxLimit">20</prop>
    </props>
    </property>
    </bean>
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref ="dataSource"/>
              <property name="packagesToScan" value="test*" />
    <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
              <property name="hibernateProperties">
                        <props>
                        <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
    <prop key="hibernate.show_sql">true</prop>
                        <prop key="hibernate.format_sql">true</prop>
                        <prop key="hibernate.use_sql_comments">true</prop>
                        <prop key="hibernate.generate_statistics">true</prop>
    </props>
              </property>
    </bean>
    Thanks for any help.

    Which code snippet is throwing the nullpointerexception?
    Does Spring create the SessionFactory?
    Maybe it is related but when running Hibernate on WebLogic you have to take care of a classloading issue with the antlr libary,
    more information can be found here: http://middlewaremagic.com/weblogic/?p=5861

  • Problem with Hibernate/WL 10.3/Eclipse while deploying

    Hello
    We have an enterprise application project with Eclipse. We use hibernate for persistence. While deploying I get the folowing error:
    weblogic.deployment.EnvironmentException: Error processing persitence unit AwarePU of module TemplateStorage-ejb.jar: Error instantiating the Persistence Provider class org.hibernate.ejb.HibernatePersistence of the PersistenceUnit AwarePU: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence
    I understand that WL 10.3 has Kodo - BEA’s former JPA implementation and is not shipped with hibernate. There might be an easy way to resolve this. Any reply would be highly appreciated.....
    Thanks

    Thanks. I did inchude hibernate-entitymanager.jar into /root/bea/user_projects/domains/<project_name>/lib
    and get the following error:
    An error occurred during activation of changes, please see the log for details.
    org.hibernate.proxy.EntityNotFoundDelegate
    An error occurred during activation of changes, please see the log for details.
    Could not initialize class org.hibernate.ejb.Ejb3Configuration
    I am deploying an enterprise app with a few EJB modules.
    Thanks

  • I am having problems with certain pages on our churches website. It is the pages where pictures are posted. Any ideas what can cause this?

    Our church website has 2 links with pictures. I am not able to click on the link and see them. This is the only site I have a problem with. I have tried to change my settings but nothing seems to help.

    Do you ave ad-blocking software or use an extension like Adblock Plus?
    If a link has '''ads''' (uplo'''ads''') in the file path then that is the first to check.
    See [[Images or animations do not show]]

  • Problems with Image Matte not staying connected to project.

    System: Dell
    Model: XPS 8300
    Processor: Intel Core i7-2600 CPU @ 3.40 GHz
    RAM: 16 GB
    System Type: Windows 7 Home Premium; Service Pack 1; 64 Bit Operating System
    I've been having problems with my image matte(s) staying connected in my projects. It happens when I reload any project that has it. It's a real simple vignette used on black video. The image file is on the root of the project folder, so I don't see why it won't stay connected. Scratching my head on this one. Let me know if you need any more information.
    - NHerman

    It's going offline and wants me to relink it again.
    Hard drive is a standard drive. It hold 2 TBs of storage.
    If it helps, I am also using a templated folder system that I copy for each project I do. This folder has this same file in it.

  • Problems with iMovie 6.0.3 corrupting old projects?

    Hi everyone
    This is my first post, and I have a very big problem which I hope you can help me with.
    In a nutshell, ever since installing iMovie 6.0.3 I have had some very strange problems with opening certain old projects. On opening a project I get the standard "this is an old project, do you want to convert" message, and then a number of things happen. Either iMovie opens with absolutely nothing in the Clips pane or the timeline (and this is in a project with several gigabytes of clips); or, a couple of random clips appear in the trash, but nothing else; and/or, I get a blank project which seems to be in NTSC format, whereas all my projects are in PAL.
    All the original clips are there in the Media folder, but are not recognised if I try to import them (Error during import; Quicktime couldn't parse it: -199).
    I have tried re-installing both iMovie 4 and 5, but no joy. So, I can't open the 'bad' projects in either the old iMovie formats or the new one. The wierd thing is that some (newer) projects do work.
    Following some old threads here I have tried using Lennart's File Fixer - didn't help. Also tried moving the .mov file and opening project. Again, didn't help.
    Sooo...any ideas? I am really desperate! The old files are there, it's just that nothing seems to be able to read them.
    Thanks for your help.
    Andy
    eMac 1Ghz 1Gb RAM   Mac OS X (10.4.8)  

    still having the aboved mentioned problems, freezing of video during transitions, any help?

  • Problem with Message bundle using more than one project

    Hi:
    I'm not sure about if i'm doing something wrong or maybe could be a bug in JDeveloper 9.0.2....
    I have three projects: A Project_A with BC4J packages (controlling BC4J entitties, views and AM's. In order words, only controlling the business rules side); a Project_B with a JClient programs using the AM's defined in Project_A and; a Project_C with a JSP_UIX using the AM's defined in Project_A.
    Everything works fine....until i note Message bundle is not working in Project_B and Project_C (not show my customizing message errors), only works fine in Project_A (using the AM tester because i don't control the client side here).
    How can i solve the problem?
    Regards.
    Marco

    I have the same project structure.
    My purpose is to have a different message bundle for JClient app and Struts/ADF app.
    When I register following customized message bundle in the common model project:
    public class CustomBC4JExceptionBundle extends ListResourceBundle {
    private static final Object[][] sMessageStrings = new String[][] {
    { CSMessageBundle.EXC_VAL_ATTR_MANDATORY, "This field is required" },
    protected Object[][] getContents() {
    return sMessageStrings;
    I get the message in both JClient and Struts app.
    But when I register that bundle in the 2 "client" projects and remove this custom bundle from my model project.
    I get the original message in my Struts app and not the message above.
    Question howto set up a different customized bundle for JClient project and Web project based on same model project in same application?
    Thanks
    Fred

  • 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?

  • Problem with Hibernate Connection and MySQL

    I have the following setup:
    J2EE web-application, Java Servlets, Jsp, Hibernate for DB persistence, MySQL 4 (InnoDB tables)
    I have not specified any connection pool parameters (c3p0) in my hibernate.cfg.xml, as the default settings should suffice for my purposes.
    I use the SessionFactory object as follows.
    In my database access class, I have a static declaration that initialises the new SessionFactory.
    Then, I use Session session = sessionFactory.getSession(); and session.close(); to do my DB access.
    Likewise, when storing data into the DB, I use a Transaction object, and use transaction.commit(); at the end of database access.
    The problem is:
    When I store data into the database, the changes do not occur on the website. In other words, the data gets stored into the tables (I check that via phpMyAdmin) but when accessing it, it only gets the old data. This is a serious problem as I am developing a website with attached CMS that will be used to update the pages.
    The OTHER problem is:
    Instead of having a static initialisation of the SessionFactory object, I created a new one every time I needed to access the database. Although I had a sessionFactory.close(); statement at the end of the database acccess, I got an exception:
    "java.sql.SQLException: User db_user already has more than 'max_user_connections' active connections"
    At the very moment I don't have access to my code.
    If somebody has a suggestion or a solution to the problem, please reply.
    Also, I will supply any code that is necessary to identify the problem.
    Anders

    Thanks for the tip, but how do you mean to update the object?
    Here is the code that stores the data into the database:
    'sessionFactory' is a static SessionFactory object.
         public static int saveOrUpdate ( Object object ) {
              int flag = 0; // 0 is true
              LOG.info("CMSLogic >>> saveOrUpdate() - object: " + object );
              Session session = null;
              Transaction transaction = null;
              try {
                   session = sessionFactory.openSession();
                   transaction = session.beginTransaction();
                   LOG.info("CMSLogic >>> saveOrUpdate() - object to save or update: " + object );
                   session.saveOrUpdate(object);
                   // Flush the session
                   if ( session!= null )
                        session.flush();
                   transaction.commit();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   transaction.rollback();
                   flag = 1;
              } finally {
                   try{
                        if (session != null) {
                             session.close();
                   } catch (Exception e) {
                        LOG.error("CMSLogic >>> saveOrUpdate() - threw exception: " + e);
              return flag;
         }Further, here is the code that fetches the data from the DB:
         public static Item getItemByURL ( String url ) {
              // Verify the URL
              if ( url.charAt(0) == '/' ) url = url.substring (1);
              String [] urlArr = url.split( "/" );
              LOG.info("BusinessLogic >>> getItemByURL() - split url: urlArr.length: " + urlArr.length );
              for ( int i = 0; i < urlArr.length; i++ )
                   System.out.println ( urlArr[i] + ", " );
              if ( urlArr == null ) return null;
              if ( urlArr.length == 0 ) return null;
              if ( urlArr.length > 4 ) return null; // If the path depth is more than 3 levels, abort
              // Fetch data from DB
              List<Item> items = null;
              Session session = null;
              Query query = null;
              try {
                   session = sessionFactory.openSession();
                   if ( urlArr.length == 1 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE 'root' " +
                             "AND filename LIKE '" + urlArr[0] + "'" );
                   else if ( urlArr.length == 2 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[1] + "'" );
                   else if ( urlArr.length == 3 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[2] + "'" );
                   else { // if ( urlArr.length == 4 ) {
                        query = session.createQuery(
                             "FROM Item WHERE section.sectionKey LIKE '" + urlArr[2] + "' " +
                             "AND section.parentSection.sectionKey LIKE '" + urlArr[1] + "' " +
                             "AND section.parentSection.parentSection.sectionKey LIKE '" + urlArr[0] + "' " +
                             "AND filename LIKE '" + urlArr[3] + "'" );
                   items = query.list();
                   LOG.info("BusinessLogic >>> getItemByURL() - items = query.list(): " + items );
                   // Load the related revisions, too
                   if ( !items.isEmpty() ) {
                        Hibernate.initialize ( items.get(0).getRevisions() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised revisions for item." );
                        Hibernate.initialize ( items.get(0).getRevisions().get(0).getTemplate() );
                        LOG.info("BusinessLogic >>> getItemByURL() - initialised template for first revision." );
                   // Flush the session
                   if ( session!= null )
                        session.flush();
              } catch ( Exception e ) {
                   e.printStackTrace ();
                   LOG.error("BusinessLogic >>> getItemByURL() - threw exception: " + e );
              } finally {
                   session.close();
                   //sessionFactory.close(); // !!!???
              // Return query results
              if ( items == null ) return null;
              else if ( items.isEmpty() == true ) return null;
              else {
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().size(): " + items.get(0).getRevisions().size() );
                   LOG.info("BusinessLogic >>> getItemByURL() - items.get(0).getRevisions().get(0): " + items.get(0).getRevisions().get(0) );
                   return items.get(0);
         }Any constructive suggestions and helpful comments are more than welcome.
    I have been struggling with this problem for a while now.
    Anders

  • Problem with standalone JPA

    I have a stand-alone, non-WLS, utility Spring-JPA jar (jar contains its own META-INF/persistence.xml) that I use across several non-WLS applications. It's using the Toplink provider and works fine. When I attempt to use this jar within a Weblogic 10 war/ear environment, I see random behaviours. Specifically, upon start up of the server environment sometimes the Spring context appears to load all the Toplink entityManager/provider components, and sometimes it does not - in those cases, it appears that an OpenJPA entityManager gets loaded first and nothing works (many errors related to missing openjpa properties). When the Toplink pieces successfully load, all works as expected. It's almost as if the application is experiencing some race condition on what entityManager/provider is being loaded upon startup/deployment of the application.
    Please help - I'm at a loss as to how to resolve this issue.
    Thanks,
    [email protected]

    Hello,
    Does this work if you set the <exclude-unlisted-classes> tag to true and list your classes in the persistence.xml as described in:
    http://www.oracle.com/technology/products/ias/toplink/jpa/howto/java-se-usage.html
    If it works, the problem might be with searching the persistence context for entities using a non-url classloader.
    Best Regards,
    Chris

  • Strange problem with Hibernate - JDBC

    Hello, company where I work, has a customer with installed a web application that use Hibernate 3.2.6GA and "Oracle Database 10g Release 10.1.0.3.0 - Production" for persistent data.
    O.S. is RedHat Enterprise with kernel 2.6.9-5 and
    Java has version "1.6.0_01"
    Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
    Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode)
    after an update of JVM with:
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
    my application began a strange behaviour, when I save a double value on DB, it was rounded i.e. 1,32 became 1.40.
    I haven't updated other package.
    The application server that I use is Tomcat 6.0.14 and oracle driver is "Oracle JDBC driver, version: 10.1.0.2.0"
    When I revert configuration to return to previous JVM application restarted work correctly.
    It can come from a Jdbc bug/ compatibility problem?
    Thanks for Help.

    my application began a strange behaviour, when I save a double value on DB, it was rounded i.e. 1,32 became 1.40.That's not proper rounding by any rule I know of.
    I haven't updated other package.Your code is wrong.
    The application server that I use is Tomcat 6.0.14 and oracle driver is "Oracle JDBC driver, version: 10.1.0.2.0"
    When I revert configuration to return to previous JVM application restarted work correctly.I don't believe you. Something else is wrong. You just haven't found it.
    No insult intended, it's just more likely to be your stuff than the JDK or Oracle. They write better code than you or I do.
    It can come from a Jdbc bug/ compatibility problem? Nope, it's your code for sure.
    %

Maybe you are looking for

  • Connecting Your IBOOK to your Car

    Hello peoples, I'm just wondering if anyone in the 'ibook' world has ever connected their ibook with their vehicles. What I mean by connecting, is setting up it so it is secured somehow, so it doesn't bounce around while you drive, using your car ste

  • Enormous size of /var/log

    Hello, this is my first post in the forums, and im fairly new to archlinux. I couldn't login to gnome today, due to /etc/gdm/Xsession: Beginning session setup... /etc/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- /usr/bin/gnome-sessio

  • Very slow openbox startup after boot

    Hi. My computer is being very laggy lately in some specific cases. (In contrast,  windows installation works really fast, so its really a linux issue). One of the issues I'm trying to resolve now is the following: My #openbox installation starts up r

  • Business group

    Hi, Cany any one tell me what acutally is a business group in HRMS module.How to create new business group. Kindly suggest me how to implement simple HRMS module. Thanks, Mannu

  • Please help with backing up library

    OK, this has maybe been addressed before but I'm new here and haven't really found an answer on the forums... My work is saved as monthly projects and I want to export them to an external HD with metadata and adjustments etc but retain a referenced v