<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Problems opening database connection in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903932#M320268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try{&lt;/P&gt;&lt;P&gt;Context ctx = new InitialContext();&lt;/P&gt;&lt;P&gt;DataSource ds = ctx.lookup("jdbc/SAPJ2EDB");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jun 2005 22:05:20 GMT</pubDate>
    <dc:creator>Erin2</dc:creator>
    <dc:date>2005-06-21T22:05:20Z</dc:date>
    <item>
      <title>Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaq-p/903931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In trying to open a database connection, I am using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connection conn = null;&lt;/P&gt;&lt;P&gt;Context ctx = null;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    ctx = new InitialContext(env);&lt;/P&gt;&lt;P&gt;    Object obj = (Object)ctx.lookup("jdbc/SAPJ2EDB");&lt;/P&gt;&lt;P&gt;    DataSource ds = (DataSource)PortableRemoteObject.narrow(obj, DataSource.class);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   conn = ds.getConnection();&lt;/P&gt;&lt;P&gt;   ... &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I call ds.getConnection(), I get the following exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.sql.log.OpenSQLException: Could not instantiate class com.sap.sql.connect.OpenSQLDataSourceImpl.&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:59)&lt;/P&gt;&lt;P&gt;	at com.hubbell.portal.masterminder.material.persistence.MaterialPersistor.persist(MaterialPersistor.java:46)&lt;/P&gt;&lt;P&gt;	at com.hubbell.portal.masterminder.material.persistence.MaterialPersistorTest.testPersistor(MaterialPersistorTest.java:36)&lt;/P&gt;&lt;P&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/P&gt;&lt;P&gt;	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/P&gt;&lt;P&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/P&gt;&lt;P&gt;	at java.lang.reflect.Method.invoke(Method.java:324)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestCase.runTest(TestCase.java:154)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestCase.runBare(TestCase.java:127)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestResult$1.protect(TestResult.java:106)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestResult.runProtected(TestResult.java:124)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestResult.run(TestResult.java:109)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestCase.run(TestCase.java:118)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestSuite.runTest(TestSuite.java:208)&lt;/P&gt;&lt;P&gt;	at junit.framework.TestSuite.run(TestSuite.java:203)&lt;/P&gt;&lt;P&gt;	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)&lt;/P&gt;&lt;P&gt;	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)&lt;/P&gt;&lt;P&gt;	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)&lt;/P&gt;&lt;P&gt;Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.sap.sql.log.OpenSQLException: Could not instantiate class com.sap.sql.connect.OpenSQLDataSourceImpl.&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:188)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.spi.DefaultConnectionManagerImpl.allocateConnection(DefaultConnectionManagerImpl.java:26)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:51)&lt;/P&gt;&lt;P&gt;	... 17 more&lt;/P&gt;&lt;P&gt;Caused by: com.sap.sql.log.OpenSQLException: Could not instantiate class com.sap.sql.connect.OpenSQLDataSourceImpl.&lt;/P&gt;&lt;P&gt;	at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:106)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSource.newInstance(OpenSQLDataSource.java:153)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSource.newInstance(OpenSQLDataSource.java:133)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:102)&lt;/P&gt;&lt;P&gt;	... 19 more&lt;/P&gt;&lt;P&gt;Caused by: com.sap.sql.log.OpenSQLException: Could not instantiate class com.sap.sql.connect.CommonFactoryLib.&lt;/P&gt;&lt;P&gt;	at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:106)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:145)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSourceImpl.&amp;lt;init&amp;gt;(OpenSQLDataSourceImpl.java:128)&lt;/P&gt;&lt;P&gt;	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;/P&gt;&lt;P&gt;	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)&lt;/P&gt;&lt;P&gt;	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)&lt;/P&gt;&lt;P&gt;	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)&lt;/P&gt;&lt;P&gt;	at java.lang.Class.newInstance0(Class.java:308)&lt;/P&gt;&lt;P&gt;	at java.lang.Class.newInstance(Class.java:261)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSource.newInstance(OpenSQLDataSource.java:148)&lt;/P&gt;&lt;P&gt;	... 21 more&lt;/P&gt;&lt;P&gt;Caused by: java.lang.ClassNotFoundException: com.sap.sql.connect.CommonFactoryLib&lt;/P&gt;&lt;P&gt;	at java.net.URLClassLoader$1.run(URLClassLoader.java:199)&lt;/P&gt;&lt;P&gt;	at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;	at java.net.URLClassLoader.findClass(URLClassLoader.java:187)&lt;/P&gt;&lt;P&gt;	at java.lang.ClassLoader.loadClass(ClassLoader.java:289)&lt;/P&gt;&lt;P&gt;	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)&lt;/P&gt;&lt;P&gt;	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)&lt;/P&gt;&lt;P&gt;	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)&lt;/P&gt;&lt;P&gt;	at java.lang.Class.forName0(Native Method)&lt;/P&gt;&lt;P&gt;	at java.lang.Class.forName(Class.java:141)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSourceImpl.&amp;lt;init&amp;gt;(OpenSQLDataSourceImpl.java:121)&lt;/P&gt;&lt;P&gt;	... 28 more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error code: 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQLState: 08003&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the opensqlcore.jar file included in my project's build path so I dont understand why the class loader is having trouble loading CommonFactory.class or OpenSqlDataSourceImpl.class .  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2005 20:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaq-p/903931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-21T20:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903932#M320268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try{&lt;/P&gt;&lt;P&gt;Context ctx = new InitialContext();&lt;/P&gt;&lt;P&gt;DataSource ds = ctx.lookup("jdbc/SAPJ2EDB");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2005 22:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903932#M320268</guid>
      <dc:creator>Erin2</dc:creator>
      <dc:date>2005-06-21T22:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903933#M320269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erin,&lt;/P&gt;&lt;P&gt;I was using the following environment to create the context before:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashtable env = new Hashtable();&lt;/P&gt;&lt;P&gt;        env.put(&lt;/P&gt;&lt;P&gt;            Context.INITIAL_CONTEXT_FACTORY,&lt;/P&gt;&lt;P&gt;            "com.sap.engine.services.jndi.InitialContextFactoryImpl");&lt;/P&gt;&lt;P&gt;        env.put(Context.PROVIDER_URL, "localhost:50004");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then I'd call &lt;/P&gt;&lt;P&gt;Context ctx = new InitialContext( env ); ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried what you suggested:&lt;/P&gt;&lt;P&gt;Context ctx = new InitialContext(); ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a different exception on the constructor for the initial context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, the current exception I am getting is when I call getConnection().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have another suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2005 22:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903933#M320269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-21T22:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903934#M320270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, sorry I mis-read the first post.  Have you tried adding an alias to the SAPJ2EDB data source and connecting to that instead...maybe the j2ee would rather the connections come in via alias...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's probably worth a quick test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Erin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2005 22:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903934#M320270</guid>
      <dc:creator>Erin2</dc:creator>
      <dc:date>2005-06-21T22:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903935#M320271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;opensqlsta.jar contains all those classes related to OpenSQL, so you should include it in your classpath instead of opensqlcore.jar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2005 09:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903935#M320271</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2005-06-22T09:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903936#M320272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ok...I'm getting closer, but I'm not quite there yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got the following error now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caused by: com.sap.security.core.server.secstorefs.FileMissingException: File "SecStore.properties" does not exist although it should.&lt;/P&gt;&lt;P&gt;	at com.sap.security.core.server.secstorefs.StorageHandler.openExistingStore(StorageHandler.java:372)&lt;/P&gt;&lt;P&gt;	at com.sap.security.core.server.secstorefs.SecStoreFS.openExistingStore(SecStoreFS.java:1946)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLConnectInfo.getStore(OpenSQLConnectInfo.java:806)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLConnectInfo.lookup(OpenSQLConnectInfo.java:787)&lt;/P&gt;&lt;P&gt;	at com.sap.sql.connect.OpenSQLDataSourceImpl.setDataSourceName(OpenSQLDataSourceImpl.java:206)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is strange considering I've never touched this automatically generated file.  I belive it looks for this file in \usr\sap\&amp;lt;SID&amp;gt;\SYS\global\security\data.  It's there.  Is there something I am controlling on the java side that's causing it to look for it in the wrong place?  Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2005 15:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903936#M320272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-22T15:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903937#M320273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;were you able to solve this?&lt;/P&gt;&lt;P&gt;I am facing the same issue.&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 20:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903937#M320273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T20:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903938#M320274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakshit,&lt;/P&gt;&lt;P&gt;No I have not gotten past this issue yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2005 20:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903938#M320274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-05T20:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903939#M320275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;java.lang.NoClassDefFoundError: com/sap/sql/connect/OpenSQLDataSource&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:102)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.spi.DefaultConnectionManagerImpl.allocateConnection(DefaultConnectionManagerImpl.java:26)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:51)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I found that opensqlsta.jar may solve this, but &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where to get opensqlsta.jar ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since my NWDS doesn't have this .jar in the plugins directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Ananda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2005 06:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903939#M320275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-30T06:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903940#M320276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jason,&lt;/P&gt;&lt;P&gt;Try out this following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initialcontext ctx = new Initialcontext();&lt;/P&gt;&lt;P&gt;DataSource ds=(DataSource)ctx.lookup(jdbc/sapj2edb);&lt;/P&gt;&lt;P&gt;Connection con=ds.getConnection();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don forget to add the classes12.jar inside the java build path bcoz this throws u some exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nagarajan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2005 13:36:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903940#M320276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-30T13:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problems opening database connection</title>
      <link>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903941#M320277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;has anybody able to fix this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 04:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/problems-opening-database-connection/qaa-p/903941#M320277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T04:23:35Z</dc:date>
    </item>
  </channel>
</rss>

