Where to place hibernate.cfg.xml in case of a Ear Project

Hi
i am trying to use Hibernate inside EJB 3.0 Bean
When trying to access , EJB from my servlet , i am getting this Exception :
javax.ejb.EJBException: EJB Exception: ; nested exception is:
*     java.lang.NoClassDefFoundError: org/hibernate/Session; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:*
*     java.lang.NoClassDefFoundError: org/hibernate/Session*
By reading previous forums i made some modifications , but still it is not working .
Please tell me where exactly i should place hibernate.cfg.xml ??
Whether inside the EJB Module or inside the Ear ??

the hibernate.cfg.xml needs to be in the root of the classpath. This means that if it ends up in the root of your EJB jar, it should be found.

Similar Messages

  • Web Dynpro: Where put hibernate hibernate.cfg.xml?

    I have seen several people asking about the place to put the config file of Hibernate, but not any conclusive answer until now...
       I created a external library in WAS (I verified using Visual Admin that the lib was correctly deployed). In my Web Dynpro References -> Library Reference I add the library in the format Provider Name/Library Name: "sap.com/hiblibs"
    <b>  Where can I store the hibernate.cfg.xml?</b> I have tried put it in all web dynpro folders!
    Thanks,
    Ivan Garcia
    From Brazil
    <b>  This is my source code:</b> 
      Configuration cfg = new Configuration();
      cfg.configure("hibernate.conf.xml");
    <b>  The error:</b>
      org.hibernate.HibernateException: hibernate.conf.xml not found
        at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
        at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1402)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1424)
    I have read all  forum topics about this, including:
    Where to put config files in webdynpro ?
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf0d57db-0c01-0010-6fa3-83503981eed4
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2ae0614a-0601-0010-a491-a9a635f06613
    Problem in placing hibernate.cfg.xml
    /people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas
    /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
    How to add external jar in web dynpro without going for DC
    Web Dynpro References
    Using External Library in Web Dynpro - Error
    Deploy external jar to WAS 6.40

    Hi Ivan,
    you need to make sure you place the configuration file where the application server's class loader will find it. If you are running Web Dynpros (or any other web application), you may put it under WEB-INF/classes of your web module.
    You may have J2EE applications without any web components - for example if you intend to only provide business logic for web services or rich clients. In this case you may not have any web modules, but will probably have some kind of EJB jars or such. The Hibernate POJOs are a more natural part of such jars rather then WARs (web modules). In this case you can put them under the root of this JAR. The class loader of the SAP J2EE Engine will load any property file placed in the class path of the class loader - whether it's a flat text file or an xml file. WEB-INF/classes or WEB-INF/lib is always in the class path of the (application) class loader.
    There is one thing you have to be aware of though. I do not know which version of Hibernate you are working with, but if you look at the source code of hibernate (the binaries are in the hibernate.jar) you will see that, the method Configuration.configure() without any argument will try to load the hibernate.cfg.xml from the current path - which means, the hibernate.jar and the hibernate.cfg.xml will have to reside under the same folder. But you do not seem to do this, so it is OK. This applies to versions of the NetWeaver 6.40 or 6.40s. Most likely this also applies to the new JEE 5 preview version of the NetWeaver application server also available for download on SDN, since to my knowledge the class loadign concepts have not been changed. But I have not tested this yet.
    Beyond the How-To-Guide about running Hibernate on NetWeaver (or SAP J2EE Engine) 6.40 we have also provided a sample application and its source code as IDE projects. Take a look at them and you will find the hibernate.cfg.xml file in the deployable EAR.
    I hope this answers your question and my comment has been helpful to you.
    Cheers, Goran

  • Problem in placing hibernate.cfg.xml

    Hi,
      I have written one ejb project with hibernate in my net weaver.Now i have a problem in placing hibernate.cfg.xml.so tell me where to place it .Give some examples related to that and some related links.

    Hi,
    you can place it into the root of the EJB project as your EJBs probably access Hibernate as persistence layer. In this case make sure that you pass the string "hibernate.cfg.xml" within the method invocation when retrieving a SessionFactory as follows:
    try
    Configuration cfg = new Configuration();
    sessionFactory = cfg.configure 
         ("hibernate.cfg.xml").buildSessionFactory();
    catch (Throwable ex)
    Otherwise the Configuration file may not be found by the application class loader due to different path syntax.
    For further information you can refer to this https://www.sdn.sap.com/irj/sdn/developerareas/java?rid=/webcontent/uuid/e081a4b6-0801-0010-7fa4-c3c7a0454815#hibernate [original link is broken] [original link is broken], although the hibernate.cfg.xml file is placed in the Web-Project in this example.
    Hope this helps,
    Best regards,
    Robin

  • Why Coherence mandates to name the file as hibernate.cfg.xml ???

    Wondering Why Coherence mandates to name the file as hibernate.cfg.xml , otherwise it wouldn't work
    We use Spring 2.5, Hibernate 3.2, Coherence 3.5
    •     Currently we have created hibernate.cfg.xml to make coherence work whereas we would like to leverage existing spring configuration file
    •     We wrote separate DAO’s i.e. xxxCoherenceDAO in addition to exsisting DAO’s. We would like to inject NamedCache into **CoherenceDAO
    • How to leverage Spring to start the CacheFactory i.e. we would like to avoid the following code in our XXXCoherenceDAO's
    NameCache customerCache = CacheFactory.getCache(com.xx.Customer.class.getName());

    Take a look at the [JavaDoc for HibernateCacheLoader|http://download.oracle.com/otn_hosted_doc/coherence/352/com/tangosol/coherence/hibernate/HibernateCacheLoader.html]. It has several constructors that allow you to either provide the name of the Hibernate configuration or provide a SessionFactory created externally.
    Thanks,
    Patrick

  • Hibernate+10gAS: hibernate.cfg.xml not found in classpath

    Hi
    We are using Hibernate. It requieres a configuration file (hibernate.cfg.xml) to be present
    somewhere in the classpath. That works when running the application in the IDE (JDeveloper
    10g), keeping the file in the WEBINF directory. However, when we deploy the application in 10g
    App Server, the file is not found. We have tried storing it everywhere in the class path, but
    no mather were we put it, it is not found.
    Any clues?
    TIA,
    Brian

    try asking this on the OC4J forum:
    OC4J

  • Hibernate.cfg.xml configuration

    Hi
      I have written hibernate.cfg.xml ,for connecting to the
    data base i am using data sources concept.
      I have one property in hibernate.cfg.xml
      <property name="connection.datasource">.......</property>
      Can any tell how to give the datasource name in the property tag.
      My Data source is residing in another system
    I am using MAXDB as backend
    thanks and regards
    Satyam

    Hi Satyam,
    Check <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bf0d57db-0c01-0010-6fa3-83503981eed4">Run Hibernate on the SAP J2EE Platform</a>
    Best regards, Maksim Rashchynski.

  • Problem parsing configuration/hibernate.cfg.xml

    I am trying to integrate struts with hibernate. I have created a plug-in for that and copied all the necessary jars & xmls to the classpath. I am providing the full stack trace, can any one say what could be the problem
    net.sf.hibernate.HibernateException: problem parsing configuration/hibernate.cfg
    .xml
    at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:963
    at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:902)
    at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:888)
    at com.plugin.HibernatePlugIn.initHibernate(HibernatePlugIn.java:72)
    at com.plugin.HibernatePlugIn.init(HibernatePlugIn.java:54)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle
    t.java:869)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
    java:1029)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:86
    2)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
    t.java:4013)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    357)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
    .java:823)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
    7)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
    loyer.java:277)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
    :349)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Caused by: org.dom4j.DocumentException: hibernate.sourceforge.net Nested excepti
    on: hibernate.sourceforge.net
    at org.dom4j.io.SAXReader.read(SAXReader.java:358)
    at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:958
    )

    Looks like a problem with Hibernate itself parsing the config file?
    Here's a posting from the Hibernate forum that sounds similar:
    http://forums.hibernate.org/viewtopic.php?p=2256871&highlight=&sid=e1090f717891db4535310102c61bec25
    -steve-

  • Guys why is Coherence asking for hibernate.cfg.xml file ???

    Wondering why Coherence could not read/interpret from our hibernate mapping file and ask for hibernate.cfg.xml.
    Wondering if Coherence has been configured to require hibernate.cfg.xml.
    Here is the error i get while running JUnit test
    2009-11-10 11:01:31.302/42.589 Oracle Coherence GE 3.5.1/461p2 <Error> (thread=DistributedCache, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: com.comcast.customer.contract.contract.hibernate.Contract
    2009-11-10 11:01:31.302/42.589 Oracle Coherence GE 3.5.1/461p2 <Error> (thread=DistributedCache, member=1):
    (Wrapped: Failed to instantiate class "com.tangosol.coherence.hibernate.HibernateCacheStore" using sun.misc.Launcher$AppClassLoader@1ab634
    <class-scheme>
      <class-name>com.tangosol.coherence.hibernate.HibernateCacheStore</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>com.comcast.customer.contract.contract.hibernate.Contract</param-value>
        </init-param>
      </init-params>
    </class-scheme>) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2307)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:2959)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:2822)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1458)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1223)
         at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:3457)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.instantiateResourceMap(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.setCacheName(DistributedCache.CDB:27)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConfigListener.entryInserted(DistributedCache.CDB:15)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:206)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:166)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
         at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
         at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
         at com.tangosol.coherence.component.util.collections.WrapperMap.put(WrapperMap.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.put(Grid.CDB:31)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$StorageIdRequest.onReceived(DistributedCache.CDB:45)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2297)
         ... 22 more
    Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
         at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
         at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1405)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1427)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1414)
         at com.tangosol.coherence.hibernate.HibernateCacheLoader.<init>(HibernateCacheLoader.java:72)
         at com.tangosol.coherence.hibernate.HibernateCacheStore.<init>(HibernateCacheStore.java:48)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2297)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:2959)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:2822)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1458)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1223)
         at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:3457)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.instantiateResourceMap(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.setCacheName(DistributedCache.CDB:27)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConfigListener.entryInserted(DistributedCache.CDB:15)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:206)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:166)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
         at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
         at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
         at com.tangosol.coherence.component.util.collections.WrapperMap.put(WrapperMap.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.put(Grid.CDB:31)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$StorageIdRequest.onReceived(DistributedCache.CDB:45)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)

    Hi Tom/Rob,
    Thanks for quick response. As suggested i have added another <init-param> so that HibernateCacheStore picks up my configuration file instead of hibernate.cfg.xml
    Here is the exception
    - Error parsing XML: application-context.xml(6) Document is invalid: no grammar found.
    - Error parsing XML: application-context.xml(6) Document root element "beans", must match DOCTYPE root "null".
    - configuring from resource: application-context.xml
    - Configuration resource: application-context.xml
    - Error parsing XML: application-context.xml(6) Document is invalid: no grammar found.
    - Error parsing XML: application-context.xml(6) Document root element "beans", must match DOCTYPE root "null".
    2009-11-10 13:38:39.254/45.068 Oracle Coherence GE 3.5.1/461p2 <Error> (thread=DistributedCache, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: com.comcast.customer.contract.contract.hibernate.Contract
    2009-11-10 13:38:39.254/45.068 Oracle Coherence GE 3.5.1/461p2 <Error> (thread=DistributedCache, member=1):
    (Wrapped: Failed to instantiate class "com.tangosol.coherence.hibernate.HibernateCacheStore" using sun.misc.Launcher$AppClassLoader@18b634
    <class-scheme>
      <class-name>com.tangosol.coherence.hibernate.HibernateCacheStore</class-name>
      <init-params>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>com.comcast.customer.contract.contract.hibernate.Contract</param-value>
        </init-param>
        <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>application-context.xml</param-value>
        </init-param>
      </init-params>
    </class-scheme>) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2307)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:2959)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:2822)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1458)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1223)
         at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:3457)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.instantiateResourceMap(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.setCacheName(DistributedCache.CDB:27)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ConfigListener.entryInserted(DistributedCache.CDB:15)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:206)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:166)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
         at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
         at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
         at com.tangosol.coherence.component.util.collections.WrapperMap.put(WrapperMap.CDB:1)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ServiceConfigMap.put(Grid.CDB:31)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$StorageIdRequest.onReceived(DistributedCache.CDB:45)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2297)
         ... 22 more
    Caused by: org.hibernate.MappingException: invalid configuration
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1487)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
         at com.tangosol.coherence.hibernate.HibernateCacheLoader.<init>(HibernateCacheLoader.java:94)
         at com.tangosol.coherence.hibernate.HibernateCacheStore.<init>(HibernateCacheStore.java:62)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2297)Please note the addition of
    <init-param>
          <param-type>java.lang.String</param-type>
          <param-value>application-context.xml</param-value>
        </init-param>application-context.xml - is for Spring application context
    META-INF/spring.xml - is for root hibernate configuration File .
    So in the above code snippet i tried replacing"application-context.xml " with "spring.xml" or "META-INF/spring.xml " or "classspath*:META-INF/spring.xml " anything results in the above exception

  • Where to place crossdomain.xml in SAP ECC IDES?

    Hi,
    I have a flex application which uses webservices generated in SAP IDES system. This flex app is stored in portal server. Since the physical servers are involved, I get a security error message, which says, "Security error accessing url". I browsed through the net and found that, we have to place a crossdomain.xml file in the web root folder of the server from where we are fetching the data. In my case, it would be SAP IDES system.
    I wanted to know where do I place this xml file in IDES? What would be it's location and how can I generate a URL to access this xml file?
    Please let me know about this, if anyone has done this before.
    Appreciate your help.
    Thank you,
    Warm regards,
    Deepak

    Hi Durairaj,
    As mentioned in that thread, I created a BSP application in the server and loaded crossdomain.xml. It was accessible from the browser too.
    This is the xml code which is there in crossdomain:
    <?xml version="1.0" ?>
    <cross-domain-policy>
      <allow-access-from domain="*" />
      <site-control permitted-cross-domain-policies="all" />
      <allow-http-request-headers-from domain="*" headers="*" />
      </cross-domain-policy>
    But this did not solve my purpose
    I have my flex application in a server, servera.abc.com and I am using the webservices of another server, serverb.abc.com
    I uploaded the crossdomain.xml in serverb.abc.com, in the following path through a BSP application:
    http://serverb.abc.com:8000/sap/bc/bsp/sap/zroot/crossdomain.xml
    But I still get the 'security accessing url' message in flex. It doesn't load the wsdl.
    I'm also using this piece of code in initialize event of the application in flex:
                           private function initSecurity():void{
                        Security.allowDomain("*");
                        Security.loadPolicyFile("http://serverb.abc.com:8000/sap/bc/bsp/sap/zroot/crossdomain.xml");
                        Alert.show("crossdomain xml loaded....");
    Where am I going wrong here?

  • Web Service java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration

    I have built a EAR file (using ANT build.xml from eclipse) and deploy it to WebLogic server, when I test the web service with a Test Client, I will receive the exception:
    java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
    Anything wrong with my build.xml file below? Why I get this exception?
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="MyWebServices" default="all">  
         <!-- set global properties for this build -->   
         <property name="wls.username" value="weblogic" />   
         <property name="wls.password" value="abcd1234" />   
         <property name="wls.hostname" value="localhost" />   
         <property name="wls.port" value="7001" />   
         <property name="wls.server.name" value="AdminServer" />   
         <property name="ear.deployed.name" value="MyWebServicesEar" />
         <property name="example-output" value="output" />   
         <property name="ear-dir" value="${example-output}/MyWebServicesEar" />   
         <property name="clientclass-dir" value="${example-output}/clientclasses" />   
         <path id="client.class.path">       
              <pathelement path="${clientclass-dir}" />       
              <pathelement path="${java.class.path}" />   
         </path>
         <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />   
         <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />   
         <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" />
         <target name="build-service">       
              <jwsc srcdir="src" destdir="${ear-dir}">
                   <classpath>      
                        <pathelement path="${java.class.path}" />
                        <pathelement path="WebContent/WEB-INF/lib"/>
                   </classpath>
                   <module contextPath="MyWebServices" name="MyWebServicesModule">
                        <jws file="/hk/com/my/webservices/servicefacade/CustomerWS.java" type="JAXWS" />                 
                        <jws file="/hk/com/my/webservices/servicefacade/LoginWS.java" type="JAXWS" />               
                        <jws file="/hk/com/my/webservices/servicefacade/PaymentWS.java" type="JAXWS" />
                        <!-- <jws file="/hk/com/my/webservices/servicefacade/RedemptionWS.java" type="JAXWS" /> -->
                   </module>
              </jwsc>
         </target>   
         <target name="deploy">
              <wldeploy action="deploy" name="${ear.deployed.name}" source="${ear-dir}" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${wls.server.name}" />   
         </target>   
         <target name="undeploy">       
              <wldeploy action="undeploy" name="${ear.deployed.name}" failonerror="false" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${wls.server.name}" />   
         </target>         
         <target name="all" depends="clean,build-service,deploy" />
         <target name="clean" depends="undeploy">       
              <delete dir="${example-output}" />   
         </target> 
         <target name="run">       
              <java classname="hk.com.my.webservices.servicefacade.client.Main" fork="true" failonerror="true">
                   <classpath refid="client.class.path" />                           
                   <arg line="http://${wls.hostname}:${wls.port}/MyServices" />
              </java>   
         </target>
    </project>

    The problem was because I did not include my web-inf into the ear in my build.xml, i added it using the zipfileset tag and it worked like a charm:
    <target name="build-service">          
              <jwsc srcdir="src" destdir="${ear-dir}" debug="on">
                   <!-- "contextPath" is like a folder to contain the Web Services, "name" is the name of the WAR file -->
                   <module contextPath="MyWebServices" name="MyWebServicesModule">
                        <jws file="/my/webservices/servicefacade/CustomerWS.java" type="JAXWS" />          
                        <jws file="/my/webservices/servicefacade/LoginWS.java" type="JAXWS" />                                                                 
                        <!-- include and copy the required files to the ear directory -->
                        <zipfileset dir="WebContent/WEB-INF/lib" prefix="WEB-INF/lib">
                             <include name="*.jar"/>
                        </zipfileset>                              
                   </module>
              </jwsc>
    </target>

  • Marking green screen video to know where to place background images

    My students want to create short green screen movies using a number of background photos that will change as they talk about their topic. How can they mark their green screen video so they will know where to place each photo?  We are using iMovie 11.  Thanks

    If that's the case.  You don't need green screen at all.
    You can shoot the students framed in such a way as to allow room for the photos and then use Picture in Picture.
    Here's a how-to from the MacMost site.  It's for iMovie '09 but is essentially the same for iMovie '11.
    http://macmost.com/imovie-picture-in-picture.html
    Post back if you have further questions.
    Matt

  • Purpose of net-assembler.cfg.xml file

    Hi, all.
    I've tried to deploy the 8.1 EAR to 9.2 weblogic server. I ran weblogic.appc that came with 9.2 to compile the ear and this completed without errors (some warnings about enabling call-by-reference, but those are already present in 8.1). When I tried to deploy the EAR to the server, I get an error that file net-assembler.cfg.xml is missing in my domain directory. What is the purpose of this file? I searched google and dev2dev but found no reference to this file. Does anyone know what to place inside this file?

    You can ignore this file in FusionOrderDemo. It was there from previous versions of the demo but is no longer used.
    Instead, to define data sources in JDeveloper 11g, you should expand the Application Resources accordion, the Connections and Database nodes, and right click and choose properties in order to define the connection that is used.
    Regards,
    Lynn Munsinger
    Oracle JDeveloper & ADF Product Management

  • Where can I find some funny iPhone cases?

    Some examples are in this blog post. Are there even funnier ones? I am planning to give a few of these iPhone 4S cases to my male family members and close guy friends as practical jokes.

    did you try (I'm sure you did...:-) googling it with those tags, go to YouTube, eBay, craigslist  and Amazon?  That's where I look for my Iphone 4 Cases.  There are also stores like Fommy, Cellphons.shop.net, Accessory Geeks - maybe a specialist from one of these places can either offer you a case or give you some advice as to where you might look.  Also, so you have a local flea market?  Have you tried all your local mall kiosks?  Just some things I was thinking of, I hope I at least helped in some way...

  • I have a complaint about my mac book pro being slippery. Why do these expensive computers that we as consumers purchase if you set them on a couch slip off no matter where you place them on the couch?

         Hi, my Mac Book Pro 15 inch lap top if i set it on the couch no matter where I place it slips off and luckily so far I have caught it before it falls onto the floor and gets ruined, of which I am super afraid of, due to what I initially paid for it as the consumer. Also, the couch is not made of slippery material at all. Also, when using it on my lap while watching tv, and multi tasking while doing my college homework, it even slides off of my lap at times. Why is it called a lap top then when it's not working as one? Are we to wear rubber pants that grip your products? Also, Why do you place on your Apple website that in one area a satin cover is available in the teal color, and then in another area it's discontinued? I believe it would be simpler if Apple would just remove the product all together from the purchasing website once any product becomes discontinued. Also, I was sitting here at home waiting for a reply about the satin cover in teal no longer being available period or that it has shipped, but yet I ended up calling Apple altogether myself and finding this all out that the only available color is the black. It would've been nice to have recieved an e-mail or a phone call on why it wasn't going to be shipped, or shipping instead of having to do customer services job and doing the leg work myself. Also, why is it that no one also even tells a consumer about the classes that were offered to a new consumer for 14 days after purchase of paying the $99.00s to learn about their macs of any kind? If I had known about such a program, I surely would've signed right up for it. Now I am being told that I can only take one clas at a time or something?!? I seriously wish I was told about this as a consumer of the Mac Book Pro 15 inch, because I would've purchased that offer right away, and now I am stuck and can no longer do it. Also I have had my computer since October of last year. So, I am in college as becoming a graphic designer within a degree of an Associates of Science and am now still struggling to learn the computer, and the programs I pruchased as well at the time of purchase, along with an Epson printer, the magic mouse, and the one year warranty. As for this all, I do believe that Apple needs to make a better bottom to the Mac Book Pro's within a much better quality for the price we pay as consumers, and all other lap tops and/or Notebooks in making them slide proof. The tiny rubber spots on the bottom of the lap tops or any Apple computer similar to mine just needs a better quality improvement to us consumers I spent good money on this purchase, I think now I deserve a rubberised protective cover for free for the slipperyness, and also since I was never told about the program for the classes of which a consumer  was to pay $99.00s for, I think as a good paying quality consumer for Apple's products, I now deserve these classes for free as well.
    Sincerely,
    Kim

    Hi shldr2thewheel,
         it has been a while since we have last spoke, I would like to let you know, I am still working on getting used to the switch from windows to a Mac/Apple system. I do have a new question for you, I did purchase In Design CS5.5 through journeyed.com through Cuyahoga Community College of which I attend as a student, is there a way to purchase an online book through iTunes to learn that as well? Also, you know me, the struggling student, I would also, when and if the book can be purchased through the iTunes, would need to know if you do know of a much easier book for struggling students like myself and at a reasonable price as well for the In Design CS5.5 program. Our campus bookstore had closed early, and, so did the colleges library and our local library here where I do live, so, I cannot go to either place to purchase a book or to take out a book, plus cash funds are low at this moment as well but, I do have money left on the iTunes account to use, if it can be used. So, can it be used, the iTunes money, towards finding a low priced online book? I am in great need of assistance as I have a project due for my one course for this Tuesday, September 4, 2012.
    Sincerely in need of help once again,
    Kim

  • My iPad no longer recognizes my Zagg keyboard.  Turned it off and on several times.  One suggestion in manual is a dead battery.  Where is a battery on a Zagg case?  The iPad battery is fully charged.

    My iPad 4 no longer recognizes my Zagg keyboard.  Turned it off and on several times.  One suggestion in manual is a dead battery.  Where is a battery on a Zagg case?  The iPad battery is fully charged and Bluetooth is on and the Zaggkeys PROfolio is listed but says NOT CONNECTED.  What else should I try?

    Well, you shoud tap the line where it says not connected, and it should prompt you to enter something.  Regarding Zagg products, http://www.zagg.com/keyboard-cases/index.php?gclid=CIPgv7O_oL0CFQ8OOgodvnoA1w&ef _id=Uo5AsQAABFW6AX3n:20140320063435:s
    is the link to Zagg's website.

Maybe you are looking for

  • I have an iPhone 4S and an iPad2, can i use both chargers in the iPhone and iPad, they have different amperage...

    I have an iPhone 4S and an iPad2, can i use both chargers in the iPhone and iPad, they have different amperage...

  • Strange Character in Menu Bar

    My friend called me with a strange problem on his Mac Mini. He said today when he restarted his Mac all this desktop icons and menu bars have been change. Instead of the normal menus such as File, Edit, View etc... He now sees a bunch of "A" with squ

  • DVD Burn Problem

    I'll just say in advance that I'm sorry if this has been covered, but I haven't found any help with searches in the forums on this... I have been burning video DVDs (built in DVD Studio Pro) in Toast for years now, but recently, I have noticed that w

  • Won't recognise external hard drive.

    Hi there I don't know If this is the right section, If not please forgive me. Right I have a MacBook an I connected my external hard drive to it for time machine. I have windows installed on my laptop an I wanted to transfer a few files between the p

  • Macbook Air constant kernel task and random reboots problem

    Hi my Macbook Air has suddenly started playing up after being fine since purchase. While engaged in photo editing in Photoshop a couple of days ago the fans were screaming flat out (not so unusual) but I had a look in Activity Monitor and noticed an