Solved

Struts connect with oracle 9i

Posted on 2006-06-17
5
413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 10

Accepted Solution

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


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

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


0
 
LVL 10

Expert Comment

by:jagadeesh_motamarri
ID: 16926714
0
 
LVL 16

Assisted Solution

by:suprapto45
suprapto45 earned 250 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

739 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