Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

D/B connectivity problem

 
Ganesh Kumar Kalamadugu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  •  
    Ganesh Kumar Kalamadugu
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 4864
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 2
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi
    use just put the classes12.jar file in the server lib directory.

    Pankaj
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic