Solved

Struts connect with oracle 9i

Posted on 2006-06-17
5
395 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now