Can HotCache use Hibernate

I have been teaching myself the new Oracle Coherence HotCache technology & am playing around with it.
I have a question about the JPA implementation. From what I have read, HotCache is built on TopLink & uses the JPA mappings metadat to update the cache from the database. Does that mean that the application using it HAS to be using TopLink. Would something like Hibernate work?
Thanks!
Nidhi

Of course, you can use Hibernate as the CacheStore / CacheLoader of Coherence, or you can use Coherence as the second layer cache of Hibernate.

Similar Messages

  • 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

  • Can i use Hibernate for this?

    Hi all,
    I have this use case which i want to optimize. Any help is really appreciated.
    Say a user "on average" has 100 records in user_info table. I do almost 50 queries on user_info table for that user,
    usually selecting aggregate of a value column with different group criterion based upon other columns. this is a
    problem when there are a number of concurrent users in that i 'll be doing a lot of database activity.
    My requirement:
    replicate those user records in main memory of a jvm so that i can do the select queries on those records in main
    memory instead of hitting the database 50 times for a single user.
    So in memory records has to be some java objects. Is there any framework in place that helps in storing these
    records efficiently in main memory. From a programmer's view, i don't want to do all the 200 object creations/user
    and again how can i "efficiently" use queries like these on those objects?
    select sum(column 1) from user_info group by column2, column 3 where column4 = user1
    So 2 things:
    Efficient way to store those records for a user as java objects in the Main memory
    The efficient query language on those objects equivalent to db sql
    Also, different users have different "set of objects" in main memory. So, if a user 1 logs in we have to query
    against his related objects.
    can hibernate address this issue?
    thanks in advance

    Hi
    i do not want to cache the database results ... but the data itself...that too a user specific...and many users may be there.
    and the tool(hibernate etc.,) should hopefully query against those objects (that are created already by the tool from selecting those 100 recs 1 time ofcourse) that are specific to that user...sorta like accepting a unique user id and performing the previous 50 sql ops on these objects.
    thanks

  • 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

  • How can configure weblogic for use Hibernate

    Hello everybody, my question is how can I configureit weblogic for use hibernate.
    I'm using JDeveloper 11g but I did not show any error when I run my jsp page, the page shows me all, but it is as if it never made the connection. the data of my table are empty.
    Thanks for your answers.

    thanks for answer. The jar was wrong, now I get not error, but also does not show me anything on my board ADF. seems to not connect. this is what I get in your log JDeveloper:
    C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m
    WLS Start Mode=Development
    CLASSPATH=;C:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.5/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\Middleware\jdeveloper\modules\features\adf.share_11.1.1.jar;;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;;
    PATH=C:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\native;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\Oracle\MIDDLE~1\patch_cie660\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.5\bin;C:\Oracle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\Intel\DMIX;C:\Archivos de programa\Java\jdk1.6.0\bin;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=48m -XX:MaxPermSize=128m -Xmx512m -Djbo.34010=false -Xverify:none -da -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=C:\Oracle\MIDDLE~1\JDEVEL~1\system\SYSTEM~1.88\DEFAUL~1 -Doracle.home=C:\Oracle\Middleware\jdeveloper -Doracle.security.jps.config=C:\Oracle\MIDDLE~1\JDEVEL~1\system\SYSTEM~1.88\DEFAUL~1\config\oracle\jps-config.xml -Doracle.dms.context=OFF -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1030\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_cie660\profiles\default\sysext_manifest_classpath -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy weblogic.Server
    <06-02-2009 10:50:27 AM VET> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\antlr-2.7.6.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\asm.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\cglib-2.1.3.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\commons-collections-3.2.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\commons-logging-1.0.4.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\dom4j-1.6.1.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\hibernate3.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\jdom.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\jta.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\jtds-1.2.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\log4j-1.2.14.jar;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\lib\mysql-connector-java-3.1.7-bin.jar;C:\Oracle\Middleware\patch_wls1030\profiles\default\sysext_manifest_classpath\weblogic_ext_patch.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\beehive_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\p13n_wls_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\testclient_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\tuxedocontrol_zh_TW.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ja.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_ko.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_CN.jar;C:\Oracle\Middleware\wlserver_10.3\L10N\workshop_zh_TW.jar>
    <06-02-2009 10:50:28 AM VET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 10.0-b19 from Sun Microsystems Inc.>
    <06-02-2009 10:50:28 AM VET> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for CR380042 Thu Sep 11 13:33:40 PDT 2008
    WebLogic Server Temporary Patch for 7372756 Fri Sep 12 17:05:44 EDT 2008
    WebLogic Server Temporary Patch for CR381265 Wed Oct 08 10:15:58 PDT 2008
    WebLogic Server Temporary Patch for CR380913 Wed Oct 15 13:24:22 PDT 2008
    WebLogic Server Temporary Patch for CR381739 Tue Oct 21 14:06:14 IST 2008
    WebLogic Server 10.3 Mon Aug 18 22:39:18 EDT 2008 1142987 >
    <06-02-2009 10:50:29 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <06-02-2009 10:50:29 AM VET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <06-02-2009 10:50:29 AM VET> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain\servers\DefaultServer\logs\DefaultServer.log is opened. All server side log events will be written to this file.>
    <06-02-2009 10:50:32 AM VET> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <06-02-2009 10:50:36 AM VET> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddi was not deployed. Error: [Deployer:149158]No application files exist at 'C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddi.war'.>
    <06-02-2009 10:50:36 AM VET> <Warning> <Deployer> <BEA-149617> <Non-critical internal application uddiexplorer was not deployed. Error: [Deployer:149158]No application files exist at 'C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\uddiexplorer.war'.>
    <06-02-2009 10:50:37 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <06-02-2009 10:50:37 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <06-02-2009 10:50:38 AM VET> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <06-02-2009 10:50:38 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <06-02-2009 10:50:38 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <06-02-2009 10:50:38 AM VET> <Warning> <Server> <BEA-002611> <Hostname "FAMILIA_KAWAIDA.mshome.net", maps to multiple IP addresses: 10.0.0.1, 201.222.105.26, 127.0.0.1>
    <06-02-2009 10:50:38 AM VET> <Warning> <Server> <BEA-002611> <Hostname "FAMILIA_KAWAIDA", maps to multiple IP addresses: 10.0.0.1, 201.222.105.26, 127.0.0.1>
    <06-02-2009 10:50:38 AM VET> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 10.0.0.1, 201.222.105.26, 127.0.0.1>
    <06-02-2009 10:50:38 AM VET> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <06-02-2009 10:50:38 AM VET> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 201.222.105.26:7101 for protocols iiop, t3, ldap, snmp, http.>
    <06-02-2009 10:50:38 AM VET> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <06-02-2009 10:50:38 AM VET> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <06-02-2009 10:50:38 AM VET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <06-02-2009 10:50:38 AM VET> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    DefaultServer startup time: 16953 ms.
    DefaultServer started.
    [Running application TVB on Server Instance DefaultServer...]
    ---- Deployment started. ---- Feb 6, 2009 10:50:43 AM
    Target platform is (Weblogic 10.3).
    Running dependency analysis...
    2009-02-06 10:50:43.64: Writing WAR file to C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\TVB\TVB-TVB-webapp
    2009-02-06 10:50:43.687: Wrote WAR file to C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\TVB\TVB-TVB-webapp
    2009-02-06 10:50:43.906: Writing EAR file to C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\TVB
    2009-02-06 10:50:43.921: Wrote EAR file to C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\o.j2ee\drs\TVB
    Deploying Application...
    <06-02-2009 10:50:47 AM VET> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application TVB is not versioned.>
    06-02-2009 10:50:47 AM oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
    INFO: Cleaning up application state
    ADF Library non-OC4J post-deployment (millis): 16
    06-02-2009 10:51:08 AM oracle.adfinternal.view.faces.partition.FeatureUtils _addFeatures
    ADVERTENCIA: A duplicate definition for the feature "AdfDvtGraph" has been found at zip:C:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/TVB/6mq9lg/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 3. A feature with the same name was originally defined at zip:C:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 3. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    06-02-2009 10:51:08 AM oracle.adfinternal.view.faces.partition.FeatureUtils _addFeatures
    ADVERTENCIA: A duplicate definition for the feature "AdfDvtGauge" has been found at zip:C:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/TVB/6mq9lg/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 7. A feature with the same name was originally defined at zip:C:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 7. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    06-02-2009 10:51:08 AM oracle.adfinternal.view.faces.partition.FeatureUtils _addFeatures
    ADVERTENCIA: A duplicate definition for the feature "AdfRichPivotTable" has been found at zip:C:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/TVB/6mq9lg/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 11. A feature with the same name was originally defined at zip:C:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 11. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    Application Deployed Successfully.
    Elapsed time for deployment: 26 seconds
    ---- Deployment finished. ---- Feb 6, 2009 10:51:09 AM
    Run startup time: 26766 ms.
    [Application TVB deployed to Server Instance DefaultServer]
    Target URL -- http://127.0.0.1:7101/TVB-TVB-context-root/faces/seguridad/grupo.jspx
    06-02-2009 10:51:17 AM oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl setLifecycleContextBuilder
    ADVERTENCIA: ADFc: Sustituyendo la implementación del ciclo de vida de la página de ADF por 'oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder'.
    06-02-2009 10:51:17 AM oracle.as.jmx.framework.PortableMBeanFactory setJMXFrameworkProviderClass
    INFO: Marco portátil JMX inicializado con el SPI de plataforma "class oracle.as.jmx.framework.wls.spi.JMXFrameworkProviderImpl"
    06-02-2009 10:51:17 AM oracle.adfinternal.controller.util.model.AdfmInterface initialize
    INFO: ADFc: BindingContext está presente, utilizando las API de ADFm para DataControlFrames.
    06-02-2009 10:51:17 AM oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider <init>
    INFO: ADFc: Almacenamiento de recursos de metadatos de MDS en la caché del controlador ACTIVADO.
    06-02-2009 10:51:17 AM oracle.adf.controller.internal.metadata.MetadataService$Bootstrap add
    INFO: ADFc: Cargando metadatos de inicialización de '/WEB-INF/adfc-config.xml'.
    thanks in advance for your response.

  • When we use jsf can we also use hibernate or ejb for database visting.

    when we use jsf can we also use hibernate or ejb for database visting.

    http://blog.exadel.com/?p=8
    http://java.sys-con.com/read/46977.htm
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html
    http://www.jroller.com/page/ksevindik/?anchor=lookup_tables_with_hibernate_and
    Sergey : http://jsfTutorials.net

  • Using Hibernate Functionality and pass it on to the JCAPS Oracle eWay

    Hi All,
    I need to use the Existing Hibernate API's and pass it on to the JCAPS oracle eWay to persist the Data.
    As the present Application is using the Hibernate for persisting the Data as we have parent child relation with multiple tables , so we need to push the whole thing in to JCAPS.
    Thanks & regards
    Srikanth

    narayanaa wrote:
    Hi,
    You cannot use hibernate using oracle or any other database eWays. If you want to leverage the same or the existing code you have for the Data Access you use JCD.
    So what you can do is have the required jars available for the application and then use the available classes with in the JCD.
    Thanks,
    NarayanaaI don't think that is secesarily true. You can use oracle eWay to handle the database connection, pooling and XA transactions. You just retrieve the java.sql.Connection object from the eWay and use that in you hibernate code.
    -Mario

  • About using hibernate with mysql

    hi all,
    i have used hibernate with hsqldb(database given by default) and it works fine.but when i tried to use it with mysql then i have encountered a problem
    xception
    org.hibernate.TransactionException: Transaction not successfully started
         org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:149)
         events.EventManagerServlet.doGet(EventManagerServlet.java:63)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    though i have put jar file of mysql in lib directory and changed the driver name in hibernate.cfg.xml.
    can any one place some example illustrating the steps involving.thanx

    Hi smogura,
    Thanks for the message. Ok I did as you told. I believe I went to the right place:
    Resource->JDBC Connection pools. However I wasn't sure how exactly to go about setting connection pools,
    so I went to the web and did a search and I managed to get hold of this
    website:http://www.albeesonline.com/blog/2008/08/06/creating-and-configuring-a-mysql-datasource-in-
    glassfish-application-server/
    I followed from steps 4 onwards. However at step 14, I did not get a sucesfull ping. The values I used are as follows:
    General:
    Name:               MySQL
    Datasource Classname:     com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    Resource Type:           javax.sql.ConnectionPoolDataSource
    Advanced Properties:
    databaseName:      ebooking
    ServerName:     GlassFish
    URL          jdbc:mysql://localhost:3306/ebooking
    password          *****
    user:          1234
    I am not sure what is wrong, by the way, I am using Glassfish V3 that comes bundled with netbeans. Any idea what's wrong or missing? Thanks
    regards

  • Program error in using Hibernate in MyEclipse IDE

    Hi,
    I have two classes student and staff.I am trying for student class only.And the database tables are student and staff. I am using 10g database.
    Student(studentId,name,email,password).
    I want delete a row from the database using hibernate. I am testing it in TestClient program. when adding a record it is adding correctly and placing it in database but when deleting and listing it is giving an error. The following error is coming.
    Hibernate: select max(studentid) from student
    Successfully inserted the record.
    Hibernate: insert into student (name, email, password, studentid) values (?, ?, ?, ?)
    Exception in thread "main" java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.IdentNode
    +-[IDENT] IdentNode: 'studentid' {originalText=studentid}
         at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:145)
         at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:712)
         at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:536)
         at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645)
         at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
         at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
         at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
         at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
         at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
         at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
         at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
         at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
         at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
         at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
         at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
         at com.client.TestClient.listStudentByGroupId(TestClient.java:72)
         at com.client.TestClient.main(TestClient.java:88)
    Can anyone help how to solve this. I am using MyEclipse IDE.
    Thanks

    I am using MyEclipse IDE.Doesn't matter.
    Have you looked at the Hibernate Docs, website, and forums?

  • Using Hibernate as a CacheStore for Coherence

    I am trying understand the coherence function for my project new requirement.
    I've developed small application Using Hibernate as a CacheStore for Coherence
    (http://wiki.tangosol.com/display/COH34UG/Using+Hibernate+as+a+CacheStore+for+Coherence)
    I tried to remove the object from cache Using NamedCache.remove(Object) method.But object got removed from database and cache as well.
    I don't want to remove from database table.
    Is there way to remove the object only from cache and retain in the table???
    Thanks
    Kaleem

    Sure -- you can extend built-in HibernateCacheStore and override erase/eraseAll methods as no-ops.
    - Aleks

  • How can i use param in my select query ( see code)

    Hi ,
    I need to use the param instead of hardcoding the value in the select query , when i did that it is working .
    I think the limit of args is only till the end of main and my select query is in a method called Load() .
    How can i use the param in my select query .
    public static void main(String[] args){
    name = args[0];
    class= args[1];
    new Load();
    }//end of main
    public Load()
              try {
                   Class.forName(JDBC_DRIVER);
                   connection = DriverManager.getConnection(DATABASE_URL,"username","pw");
                   statement = connection.createStatement();
                   //First Query : pin and ticket number
                   ResultSet resultSet = statement.executeQuery("SELECT pin , ticketnumber from airport ,year where "+                                                                      "year.year_name= Here i need to use the param (instead of hardcoding) and year.class_year= Here too i need to use param");
    }// end of method Load()Edited by: 1sai on Sep 24, 2008 7:34 AM
    Edited by: 1sai on Sep 24, 2008 7:35 AM

    Might I suggest you change the structure of your program to the following:
    public class Load {
      private Connection conn;
      private PreparedStatement statement;
      public Load(String sql) {
        init(sql);
      protected void init(String sql) throws Exception {
        Class.forName(JDBC_DRIVER);
        conn = DriverManager.getConnection(DATABASE_URL, "username", "pw");
        statement = conn.prepareStatement(sql);
      public ResultSet execute(String p1, String p2) throws Exception {
        statement.setString(1, p1);
        statement.setString(2, p2);
        return statement.executeQuery();
      public void close() throws Exception {
        if (statement != null)
          statement.close();
        statement = null;
        if (conn != null)
          conn.close();
        conn = null;
      public static void main(String[] args) throws Exception {
        String sql = args[0];
        String param1 = args[1];
        String param2 = args[2];
        Load load = new Load(sql);
        ResultSet rs = load.execute(param1, param2);
        while (rs.next())
          System.out.println(rs.get(0));
        rs.close();
        load.close();
    }This allows you to use the same "Load" object for multiple queries with different parameters.
    I do not recommend you actually use the code above in any sort of production application. You should really take a look at Spring Framework along with an ORM tool like Hibernate or Ibatis to simplify your DAO layer.
    Hope this helps,
    David

  • Stroing Image file in MS-SQL Database using Hibernate

    Hi, I am trying to store the image files(.jpg,.gif) into MS-SQL DB, and I have column type image in MS-SQL ,when I regenerate the Hibernate mapping it took as String, so Now problem is if I change to BLOB, its throwing excpetion that MS-SQL 2000 driver not support BLOB,
    I need some solution how to map and store the images in MS-SQL DB using Hibernate,
    It will hlpe lot.
    Thanks
    Srikanth

    Hi,
    Can any one help me solve out this problem?
    thanks
    Uma

  • Can I Use Oracle DB 11g Express Edition with Atomikos  Transactions.

    Hi,
    Any Help is appreciated.
    Im able to use Oracle 11g Standard/Enterprise Edition with Atomikos for XA transactions.(XADMS).
    My question is Can I Use Oracle DB 11g Express Edition with Atomikos for XA Transactions.
    Thanks,
    kensuser

    Hi,
    Thanks for the answer.What jdbc drivers should I use. Because still Im getting exception when using Oracle 11g XE.
    But the same application runs with Oracle 11g Standard/Enterprise Edition.
    Here is my Exception trace: Sorry, I'm a first time user, so pasting the exception as it is, will find out how to format the same, as use this forum. ant help is appreciated. Thanks in Advance
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UIToolAdminkit': Invocation of init method failed; nested exception is com.atomikos.datasource.ResourceException: XA resource 'EXXADBMS': resume for XID '3139322E3136382E35352E31382E746D30303030313030313937:3139322E3136382E35352E31382E746D31' raised -3: the XA resource detected an internal error
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:393)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1437)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
         at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
         at org.apache.catalina.core.StandardService.start(StandardService.java:525)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Caused by: com.atomikos.datasource.ResourceException: XA resource 'EXXADBMS': resume for XID '3139322E3136382E35352E31382E746D30303030313030313937:3139322E3136382E35352E31382E746D31' raised -3: the XA resource detected an internal error
         at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:500)
         at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:57)
         at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:66)
         at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:85)
         at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:176)
         at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:204)
         at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:138)
         at $Proxy13.prepareStatement(Unknown Source)
         at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
         at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
         at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
         at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
         at org.hibernate.loader.Loader.doQuery(Loader.java:696)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
         at org.hibernate.loader.Loader.doList(Loader.java:2228)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
         at org.hibernate.loader.Loader.list(Loader.java:2120)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:935)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
         at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
         at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:1)
         at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
         at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:904)
         at com.kensho.common.UIbundlDAOImpl.findAll(UIbundlDAOImpl.java:13)
         at com.kensho.common.UIbundlDAOImpl$$FastClassByCGLIB$$6f2db14b.invoke(<generated>)
         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
         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:622)
         at com.kensho.common.UIbundlDAOImpl$$EnhancerByCGLIB$$8797972a.findAll(<generated>)
         at com.kensho.common.UIToolKitAdminBBean.getAllBundleItems(UIToolKitAdminBBean.java:37)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
         ... 29 more

  • Calling Stored Proc returning count of records(int value) using hibernate

    Hi ,
    I am a newbie in hibernate. i have a store proc that returns the count of amtchin records, i want to call the store proc using hibernat.Can anyone help me out in this.
    Thanks ,
    Dilip

    http://asktom.oracle.com/pls/ask/f?p=4950:8:6003223320663969737::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:246014735810,

  • How can I use pen pressure with synaptics active pen (Acer switch 10 FHD)?

    Like this, I can't use pen pressure.
    How can I fix it?

    tomeq,
    Try this:
    Open Power Options by swiping in from the right edge of the screen, tapping Search (or if you're using a mouse, pointing to the upper-right corner of the screen, moving the mouse pointer down, and then clicking Search), entering Power options in the search box, and tapping or clicking Power options.
    Tap or click Choose what the power button does and under Shutdown settings, select Hibernate (if it's available).

Maybe you are looking for

  • Need suggestion on Active data guard or Logical Stand by

    Hi All, Need a suggestion of on below scenario. We have a production database ( oracle version 11g R2 ) and planning to have a Logical standby or physical standy (Active data guard). Our usage of the standby database is below. 1) Planning to run onli

  • Just got a new macbook pro on Friday

    I've just purchased a new macbook pro and since then I've been uploading pictures to facebook, a couple yesterday and a couple the day before. While I was doing that my safari froze each day and I would have to force quit safari. Is this something I

  • Can't update to 2.1    (Error Message -19)

    As the subject line suggests, I am havng difficulty "upgrading" to 2.1. I am running iTunes 8 on a Windows XP machine. The update process begins and successfully makes it through the "extracting software" step, but it is hanging up in the "backing up

  • Invoice batch variant and printing

    Hi Friends, How can I find out that how many & which batch jobs are there currently which creates Invoices & prints? In those batch jobs what is the variant and which invoice documents are picked & printed and at which location? Any pointers. Thanks

  • Maven : Generate html report

    Hi all! I would like to know how to generate the html report with the maven plugin. It's said that "Currently, FlexPMD produces a XML report by default, plus an HTML report when invoked by the Maven site plugin." I added the section correponding to t