facebook

Connecting MS Access in Struts…………….

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #266265 Reply

    Hi all!
    I have congifured my struts-config.xml as following:

    <data-sources>
    <data-source key=”A” type=”org.apache.commons.dbcp.BasicDataSource”>
    <set-property property=”driverClassName” value=”sun.jdbc.odbc.JdbcOdbcDriver” />
    <set-property property=”url” value=”jdbc:odbc:sample” />
    <set-property property=”username” value=”trace” />
    <set-property property=”password” value=”trace” />
    <set-property property=”initialSize” value=”10″ />
    <set-property property=”defaultAutoCommit” value=”false” />
    </data-source>
    </data-sources>
    <form-beans >

    But while deploying the war file I get following exceptions…………………..

    org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:868)
    at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1087)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1070)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:893)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3148)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3134)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3109)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5559)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:853)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2012)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2053)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2558)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2483)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2308)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2390)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2302)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2455)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:829)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:538)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:496)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Caused by: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not use ‘(unknown)’; file already in use.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3028)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
    at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1059)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:865)
    … 30 more
    <Feb 18, 2007 12:40:09 AM IST> <Error> <HTTP> <BEA-101216> <Servlet: “action” failed to preload on startup in Web application: “paper”.
    javax.servlet.UnavailableException: Initializing application data source A
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1070)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:893)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3148)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3134)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3109)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5559)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:853)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2012)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2053)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2558)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2483)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2308)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2390)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2302)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2455)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:829)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:538)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:496)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    >

    I have also checked that there is no other war file deployed in the weblogic 8.1 server using the same dsn but problem remains the same. The IDE I am using is Myeclipse. Please help………………
    Sincerely
    Roopesh

    #266311 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Connecting MS Access in Struts…………….

You must be logged in to post in the forum log in