Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:28:36+00:00 2026-05-20T00:28:36+00:00

I tried many times to get the connection between my web application and Derby

  • 0

I tried many times to get the connection between my web application and Derby and I received these error messages in the eclipse console:

INFO: Server startup in 3772 ms

ERROR: Cannot load JDBC driver class 'org.apache.derby.jdbc.ClientDriver'

ERROR: Cannot load JDBC driver class 'org.apache.derby.jdbc.ClientDriver'

11/02/2011 19:08:53 org.apache.catalina.core.StandardContext reload 


My class and database definition is showed bellow:

// Obtain our environment naming context            
javax.naming.Context initCtx = new InitialContext();

javax.naming.Context envCtx = (Context) initCtx.lookup("java:comp/env");


// Look up our data source by the name we gave it when we created it.
// In this case that's "jdbc/customer".
javax.sql.DataSource ds = (DataSource) envCtx.lookup("jdbc/customer");

conn = ds.getConnection();

And my web.xml and context are showed bellow.

in context.xml ...

Resource name="jdbc/customer" 
auth="Container"
type="javax.sql.DataSource"
username="qwert"
password="asdf"
driverClassName="org.apache.derby.jdbc.ClientDriver"
url="jdbc:derby://localhost:1527/C:\\testes_db\\customer;create=true;"
       maxActive="8"

and in the web.xml ...

res-ref-name jdbc/customer

res-type javax.sql.DataSource

res-auth Container


-- my second attempt 

resource-env-ref-name jdbc/customer

resource-env-ref-type javax.sql.DataSource

I’m using tomcat 6 with eclipse wtp (europa) in windows. And I already put derby.jar and derbclinet.jar inside of WEB_INF\lib directory …

There are something that I can do to solve this issue?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:28:37+00:00Added an answer on May 20, 2026 at 12:28 am

    Since you’re configuring the DataSource in context.xml, it’s Tomcat that manages this, not your webapp.

    You have to place the JDBC driver, derbyclient.jar, in your $TOMCAT_HOME/lib/ directory, not yourwebapp/WEB-INF/lib/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried decoding this base64 string so many times but every time i get
Hello friends I have tried many times but I am not successful than please
I know similar questions have been asked before, but I've tried many times and
I'm trying to create a table and I've tried so many times to figure
I don't want to submit this app to AppStore. I've tried for many times
I've made the same mistake many times: I've tried to use a Stream that
I tried many things but I always get cannot convert string to membershipuser from
I have a few specific questions. I have tried googling these but I get
I am trying to add margin to a cell. I have tried many times
Similar question has been asked many times. But I still don't get why I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.