Skip to Content
0
Former Member
Nov 25, 2006 at 08:02 AM

Data Source not found

49 Views

Hi EveryBody

I deploy jtds sql server2000 driver successfully

then I deploy datasource providing drivername successfully

after that I am using it in my web/hibernate application.

I use it in hibernate.cfg.xml file like

<property name="connection.datasource">java:comp/env/YTSQLS2K</property>

where "YTSQLS2K" is the name of deployed datasource.

When I start to deploy the application on the SAP jee 5 Server. The exception is produce in the file in following location

C:\SAP\SS1\JC00\j2ee\cluster\server0\log\defaultTrace.0.trc

-


Caused by: org.hibernate.HibernateException: Could not find datasource

at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)

at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)

at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)

at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)

at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)

at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)

at com.yousifi.hibernate.util.HibernateUtil.<clinit>(HibernateUtil.java:21)

... 47 more

Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of YTSQLS2K.

at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:650)

at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344)

at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:266)

at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:286)

at javax.naming.InitialContext.lookup(InitialContext.java:351)

at javax.naming.InitialContext.lookup(InitialContext.java:351)

at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)

... 54 more

Is there any entry require in the web.xml file or anywhere else to find "YTSQLS2K"(DataSource).

Thank You,

Best Regards,

Syed Saifuddin