Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Struts connect with oracle 9i

Posted on 2006-06-17
5
Medium Priority
?
435 Views
Last Modified: 2008-01-09
Hello Expert

I have changed in struts-config.xml as follows for connection of oracle 9i.
and placed classes12.zip file in WEB-INF/lib folder and restart tomcate server.
but when i restart the server I am getting one error on server as given below.
that means i was wrong somewhere.

<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
    <set-property
      property="driverClassName"
      value="oracle.jdbc.OracleDriver" />
    <set-property
      property="url"
      value="jdbc:oracle:thin:@192.168.0.253:1521:ORCL" />
    <set-property
      property="username"
      value="devadasv" />
    <set-property
      property="password"
      value="lthhotels" />
    <set-property
      property="maxActive"
      value="10" />
    <set-property
      property="maxWait"
      value="5000" />
    <set-property
      property="defaultAutoCommit"
      value="false" />
    </data-source>
</data-sources>

Error:
---------
SEVERE: Initializing application data source org.apache.struts.action.DATA_SOURCE
java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
        at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
        at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
        at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:805)
        at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
        at javax.servlet.GenericServlet.init(GenericServlet.java:211)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

pls help me.......
0
Comment
Question by:Atkari
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
jagadeesh_motamarri earned 1000 total points
ID: 16926711
Check this -


change
>>>value="oracle.jdbc.OracleDriver"

to
driverClass="oracle.jdbc.driver.OracleDriver"


0
 
LVL 16

Assisted Solution

by:suprapto45
suprapto45 earned 1000 total points
ID: 16927341
>>"placed classes12.zip file in WEB-INF/lib folder"
Add it to your Tomcat lib as well in CATALINA_HOME/common/lib

David
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Six Sigma Control Plans

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question