Steps To Resolve Error When Creating Session Factory Org.hibernate.hibernateexception Could Not Find Data Source

Steps To Resolve Error When Creating Session Factory Org.hibernate.hibernateexception Could Not Find Data Source

This article is meant to help you when you get an error while creating sessionfactory org.hibernate.hibernateexception “Unable to find data source”.

Now I’m trying to solve this problem by stopping once, I . Mr. Using an API to provide individual and group access. It works well with providers (in jdbc OsUser.xml and PropertySet.When xml)

Now I try to use com.opensymphony.user.provider.hibernate.It hibernatecredentialsprovider shows some errors:

 Net in .sf.hibernate.HibernateException: Could not find data source: Could not bind name jdbc2 in this context To net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:47)  on net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:75)  direction net.sf.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:144)  at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:571)  located in com.opensymphony.user.provider.hibernate.dao.SessionManager.(SessionManager.java:34)  at com.opensymphony.user.provider.hibernate.impl.OSUserHibernateConfigurationProviderImpl.setupConfiguration(OSUserHibernateConfigurationProviderImpl.java:101)  Refers to com.opensymphony.user.provider.hibernate.HibernateBaseProvider.init(HibernateBaseProvider.java:83)  at com.opensymphony.user.provider.hibernate.HibernateProfileProvider.init(HibernateProfileProvider.java:98)  located at Com address.opensymphony.user.util.ConfigLoader.addProvider(ConfigLoader.java:113)  in com.opensymphony.user.util.ConfigLoader.access$100 (ConfigLoader.java:39)  with com.opensymphony.user.util.ConfigLoader$ConfigHandler.endElement(ConfigLoader.java:144)  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)  from com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1742)  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2900)  while com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)  via com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) can be found at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)  available at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)  Found in javax.xml.parsers.SAXParser.parse(SAXParser.java:195)  at com.opensymphony.user.util.ConfigLoader.load(ConfigLoader.java:61)  in com.opensymphony.user.UserManager.(UserManager.java:108)  in com.opensymphony.user.UserManager.(UserManager.java:60)  from com.opensymphony.user.UserManager.getInstance(UserManager.java:127)  to com.fhl.LoginPage$1.onSubmit(LoginPage.java:28) located at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1157)  at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1152)at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)  at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)  available at Org at.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1150)  at org.apache.wicket.markup.html.form.Form.process(Form.java:803)  via org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:728)  at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:670)  here at sun.reflect.NativeMethodAccessorImpl. (native invoke0 method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  near sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  in java.lang.reflect.Method.invoke(Method.java:601)  closest org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)  at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)  any org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179)  at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165) Found at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)  at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)  with org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)  at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)  at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)  at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)  inside org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)  via org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)  just org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)  organization found at address at.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)  via org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)  via org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  on java.lang.Thread.run(Thread.java:722)Caused only: javax.naming.NameNotFoundException: Jdbc2 name is not always visible in context  only org on.apache.naming.NamingContext.lookup(NamingContext.java:803)  at org.apache.naming.NamingContext.lookup(NamingContext.java:159) next to org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)  at javax.naming.InitialContext.lookup(InitialContext.java:411)  Found in net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:43)

On the console it looks like thisthe datasource type currently doesn’t find the datasource even though I have an extra hibernate.cfg.xml file in the classpath and it’s strange that the datasource still works fine for a JDBC connection.

            
error creating sessionfactory org.hibernate.hibernateexception could not find datasource
org.hibernate.dialect. mysqldialect Name="connection com.mysql.jdbc.Driver Name="connection

jdbc:mysql://localhost/tmpDb2 Name="connection

root

fhl Name="c3p0

3 5 Name="c3p0

1800 Disable org.hibernate.cache.NoCacheProvider Name="cache false Name="cache false 3 SQL
error creating sessionfactory org.hibernate.hibernateexception could not find datasource
true true Name="hbm2ddl

createYou are Stream

Previous post Najlepszy Sposób Na Rozwiązanie Problemów Z Powolną Przeglądarką Internetową PS3
Next post FIX: Taakbeheer Wordt Onjuist Weergegeven