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

Similar Messages

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

  • 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

  • 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

  • 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

  • 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

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

  • How to access Dictionary Structure in web dynpro(Where are you GS?) ?

    i had made one person Structure in Local dictionary.
    i had already this type of value node in my context.
    now i want to make an object of that type by code
           IPersonElement person =wdThis.wdGetContext().createPersonElement();
    Then it is giving me error <i><u>type can not be resolved</u></i>.
    Please Help Me....
    Regards
    Sunny.

    I am learning WebDynpro from tutorials i have
      in that once they said me to create three views.
             1.Start View
             2.Table View.
             3.Detail View.
    In start view 's context there are four elements
          Variable Name               Type
      1. First_Name                    String
      2.Last_name                      String
      3.Date_Begin                     Date
      4.Date_End                        Date
    then In Controller 's Context I had also created all above elements with same type.
    then i mapped all views with controller 's context.
    start view 's all elements i map with contoller 's context.
    then  i had created one structure in local data dictionary.
    Name of Structure is Person.
    and all above four attributes are also there.
    Now i create one value node in Table View  type of that is person.
    now i had also created binding of table with first_name and last_name.
    then in coding
    <i>
    Public Void onPlugfromStartView( )
    //@@begin onPlugfromStartView(ServerEvent)
    String firstname =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_firstname();
    String lastname =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_lastname();
    Date date_begin =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_dateBegin();
    Date date_end =
    wdThis.wdGetExc_UIController().wdGetContext().
    currentContextElement().getCmpCtx_dateEnd();
    IPersonElement person =
    wdThis.wdGetContext().createPersonElement();
    <u><b>Above line is giving me Error that person can not be resolved</b></u>
    person.setFIRSTNAME(firstname);
    person.setLASTNAME(lastname);
    person.setDATE_BEGIN(date_begin);
    person.setDATE_END(date_end);
    wdThis.wdGetContext().nodePerson().addElement(person);
    //@@end
    </i>
    Please Help Me Sir.

  • Problem show web dynpro in EP, with iViews

    Hi all,
    I'm working with Sap Netweaver Developer Studio Version: 2.0.4 and with Web AS j2ee 6.30.
    I have make an Email web service in Web dynpro with Netweaver Developer Studio and the deploy is good. I can show in the navigator of internet in:
    "http://sap470:50100/webdynpro/dispatcher/local/WebDynpro_EmailWS/EmailWSApp"
    I have make the application in the host "sap470" but my EP 60 SR1 i have in another machine(Netweaver).
    In the portal i have created a system for Web Dynpro, but i don't know sure if i have put the WAS where the application web dynpro run or where run the portal.
    I have put the WAS of application web dynpro where it run, but i am not sure that put in the path, i have put /webdynpro/dispatcher. I have created the iView in the EP, a page and rool, and i have assiciated the web dynpro to this iView.
    In the propieties of iView, i have put:
    Name of application: Name of the application web dynpro.
    System: System that i have create before.
    Name of Area: This option i'm not sure that put. Any idea?
    Type of Web dynpro: Java
    When i go to presentation get a error.
    Any idea?
    Thanks in advance

    Did you take a look at this?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to create web dynpro based iview.pdf
    based on your url, you need
    App Name : EmailWSApp
    Namespace : local/WebDynpro_EmailWS
    System: sap470

  • Saving adobe forms in DMS through web dynpro application

    Hi all,
            I have a requirement in web dynpro where the user enters few data and clicks a generate button. On click of this button i have to generate pdf forms and save it in DMS. I have already designed the adobe form, but i do not know how to save it in DMS. So, please let me know asap how this can be done.
    Thanks and Regards,
    Vinod

    Hi,
    You will have to use the function module BAPI_DOCUMENT_CHECKIN_REPLACE2.
    First save the PDF file on application server.
    Then use above function module.
    Regards,
    Girishkumar Hegde
    Edited by: Girishkumar Hegde on Feb 23, 2010 3:42 PM

  • Web Dynpro ABAP: How to access the content of a mime object?

    Hi everyone,
    does anybody know how to access the content of a mime object of a Web Dynpro component? I added a XML file as mime object to a web dynpro component. Now I want to read the content of this xml file within a method of the component controller. The code would look something like:
    DATA: xml_content type xstring.
    xml_content = read_mime_object("test_123.xml").
    Any ideas?
    Regards,
    Nils

    dude here's the modification that i've done but I can't still access the content of the properties...
               Mail mail = new Mail();
               String message2 = sqlException.getMessage();
               File file = new File("Add.properties");
               Properties props = new Properties();
               props.load(new FileInputStream(file));
               String[] emailadd = {props.getProperty("emailadd","defaultValue")};
               mail.postMail(emailadd,"An error has occurred, Auto-archive was unsuccessful.", message2,"[email protected]");
               Message was edited by:
    ryshi1264

  • Web Dynpro to EJB

    Hi all
    I built a small application in Web dynpro which takes an XDP and XML and renders it with a limited set of Reader Rights which works great.. What I trying to do now is to port the code to an EJB with a Web Services so that this can be accessed by other systems..
    When I call my web service i get the following error.. any ideas...
    Regards
    Kev
    Caused by: java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/adsproxy/types/p1/RpData
         at com.sap.tc.webdynpro.pdfobject.api.WDPDFObjectFactory.getPDFObject(WDPDFObjectFactory.java:43)
         at com.adobe.consulting.eon.RenderServiceBean.eonRenderPDFObject(RenderServiceBean.java:154)
         at com.adobe.consulting.eon.RenderServiceLocalLocalObjectImpl0_0.eonRenderPDFObject(RenderServiceLocalLocalObjectImpl0_0.java:103)
         ... 25 more

    Thanks for your reply Charan,
    I am fairly new to EJB. I have created only one session bean (called TrainingBean) and created all the business methods inside it.
    Here is my database schema, with the following 5 tables
    Courses
    CourseSchedules
    Students
    Registrations
    Competencies
    Here are the session bean business methods:
    changeCourse(String)
    changeStartDate(String)
    createCourse()
    createCourseSchedule()
    getCourses()
    getCourseSchedules()
    registerStudent(String)
    unRegisterStudent(String)
    Is this good way to implement EJB, or should I create multiple session beans and multiple corresponding Data access command beans  ?
    Thanks a lot
    Srinivas

  • How to create remote SAP j2ee web dynpro system

    I have a J2EE web dynpro on another J2EE instance than the portal.  I want to take advantage of logon tickets from Portal J2EE to this other system.   But creating the system connection in the portal, I'm not sure what system type to select.  If I choose to create an IView for J2EE Web Dynpro, it seems to assume that the app is on the portal instance.
    I could just do a straight URL type IView, but then I don't think that I could make logon tickets work with that.

    Thank you, that was helpful.
    I followed the instructions to create a system and then web dynpro iview, putting in the relevant parameters.
    Our remote webdynpro iview URL is:
    http://<host>/webdynpro/dispatcher/sap.com/<namespace>/<app>?SAPtestId=83
    SO, in the iview entry, i gave values:
    namespace: sap.com/<namespace>
    app: <app>
    parameters: SAPTestId=83
    When I preview it, I get a J2EE exception:
    Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.sapportals.portal.prt.registry.PortalRegistryFactory [Root exception is java.lang.ClassNotFoundException: com.sapportals.portal.prt.registry.PortalRegistryFactory
    Found in negative cache

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

Maybe you are looking for

  • Help needed in retrieving parent child relationship values

    Hi, I have a requirement to get parent child relationship values as below. Ex: Address table cont cont_code state state_code C1 10 S1 1 C1 10 S2 2 C1 10 S3 3 C2 20 S4 4 C2 20 S5 5 C3 30 S6 6 C3 30 S7 7 C3 30 S8 8 I want a result of country/state and

  • HT1414 Is it possible backup pics from my Iphone after restoring??please help!!

    Is it possible to backup all pics on my Iphone 4s after restoring? I got back contacts, but how to backup my pics and videos?Please help!!

  • CCM Publisher issue

    wh have CCM version5.1 and the publisher keeps on rebooting. Any idea why this could be happening or has anyone come across this problem before

  • Problem in starting services after rebooting the sap server.

    Hi , I got a problem in starting SAP services files in SAP BI system on windows 2003 server. Whenever I reboot the system all sap services failed to start throw a message u201CCould not start SAPBDJ_00 service on local computer. Error 1069: The servi

  • How to move from one page to another page

    hi all we have a report,in that if i click on user name he has to go to another page, in that page i have created one prompt and one report ,there he has to select groups(prompt) and in that page only he has to see the report how to provide like to p