The moose likes Struts and the fly likes D/B connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "D/B connectivity problem" Watch "D/B connectivity problem" New topic

D/B connectivity problem

Ganesh Kumar Kalamadugu

Joined: Jan 14, 2006
Posts: 4
Hi frends,

i am not able to connnect to d/b(oracle) through servlets,jsp,struts

i am using winxp professional,i set classpath for oracledriver upto classes12.jar

if i am using normal JDBC the programs are running successfully,but if i use in servlets or struts causing problem

is XP compatible to run Struts using datasource

can anybody help to overcome this problem
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Win XP definitely supports the use of DataSources in J2EE. We're going to need more information, though, in order to help you solve this problem:

  • What application server are you using?
  • How are you defining the DataSource? Show us the XML
  • What error messages are you getting?

  • Merrill
    Consultant, Sima Solutions
    Ganesh Kumar Kalamadugu

    Joined: Jan 14, 2006
    Posts: 4
    i am including this in struts-config.xml

    <set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
    <set-property property="url" value="jdbc racle:thin:@localhost:1521 urga" />
    <set-property property="maxCount" value="5"/>
    <set-property property="minCount" value="1"/>
    <set-property property="user" value="scott"/>
    <set-property property="password" value="tiger"/>

    i hav set the classpath upto L:\oracle\ora92\jdbc\lib\classes12.jar

    i am using tomcat 4.1, i m getting the error:java.sql.ClassNotFoundException-oracl.jdbc.driver.OracleDriver Not found

    normal struts programs are runnnig
    Merrill Higginson
    Ranch Hand

    Joined: Feb 15, 2005
    Posts: 4864
    I'd strongly suggest that you define your dataSource through Tomcat's mechanism, rather than through Struts. The one from Struts is there only if your App Server doesn't provide it.

    Here's a link on how to set it up in Tomcat.

    Poulome Ray

    Joined: Jan 17, 2006
    Posts: 2
    use just put the classes12.jar file in the server lib directory.

    It is sorta covered in the JavaRanch Style Guide.
    subject: D/B connectivity problem
    Similar Threads
    D/B connectivity problem
    JSTL and Struts Tags
    Configurting all errors to single page
    Database connectivity in struts 2
    Double Iteration