wood burning stoves*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "D/B connectivity problem" Watch "D/B connectivity problem" New topic
Author

D/B connectivity problem

Ganesh Kumar Kalamadugu
Greenhorn

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
    Greenhorn

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

    <data-sources>
    <data-source>
    <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"/>
    </data-source>
    </data-sources>

    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.

    http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    Poulome Ray
    Greenhorn

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

    Pankaj
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: D/B connectivity problem
     
    Similar Threads
    Double Iteration
    Database connectivity in struts 2
    D/B connectivity problem
    JSTL and Struts Tags
    Configurting all errors to single page