Hi
I am new to
struts , i trying to connect with oracle useing datasource
and i m getting follwoing error.
Error 503--Service Unavailable
javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
at org.apache.struts.action.ActionServlet.initModuleDataSources(Lorg.apache.struts.config.ModuleConfig
V(ActionServlet.java:1091)
at org.apache.struts.action.ActionServlet.init()V(ActionServlet.java:472)
at javax.servlet.GenericServlet.init(Ljavax.servlet.ServletConfig
V(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run()Ljava.lang.Object;(ServletStubImpl.java:1018)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction
Ljava.lang.Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction
Ljava.lang.Object;(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax.servlet.Servlet;(ServletStubImpl.java:894)
at weblogic.servlet.internal.ServletStubImpl.createInstances()V(ServletStubImpl.java:873)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(Lweblogic.servlet.internal.RequestCallback
V(ServletStubImpl.java:812)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(Ljava.lang.String
V(WebAppServletContext.java:3281)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets()V(WebAppServletContext.java:3226)
at weblogic.servlet.internal.WebAppServletContext.preloadResources()V(WebAppServletContext.java:3207)
at weblogic.servlet.internal.WebAppServletContext.setStarted(Z)V(WebAppServletContext.java:5737)
at weblogic.servlet.internal.WebAppModule.start()V(WebAppModule.java:874)
at weblogic.j2ee.J2EEApplicationContainer.start([Lweblogic.j2ee.J2EEApplicationContainer$Component
V(J2EEApplicationContainer.java:2106)
at weblogic.j2ee.J2EEApplicationContainer.activate([Lweblogic.management.configuration.ComponentMBean
V(J2EEApplicationContainer.java:2147)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer()V(SlaveDeployer.java:2434)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit()V(SlaveDeployer.java:2352)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit()V(SlaveDeployer.java:2136)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit()V(SlaveDeployer.java:2235)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare()V(SlaveDeployer.java:2130)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare()V(SlaveDeployer.java:2315)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Lweblogic.management.deploy.OamVersion;Lweblogic.management.runtime.DeploymentTaskRuntimeMBean;Z)V(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(Lweblogic.management.deploy.OamDelta;Lweblogic.management.deploy.OamVersion;ZLjava.lang.StringBuffer
Z(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(Ljava.util.ArrayList;Z)V(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(Lweblogic.kernel.ExecuteThread
V(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread
V(Unknown Source)
my datasource declaration is ...
<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<set-property property="url" value="jdbc
racle:thin:@192.168.5.199:1521:test" />
<set-property property="username" value="sys" />
<set-property property="password" value="sys" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />
<set-property property="validationQuery" value="SELECT COUNT(*) FROM testtable" />
</data-source>
</data-sources>