• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Connecting jsp with derby

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,
I have written a code to connect the DERBY database with a jsp. I am using Netbeans IDE 7.0.1


I get the following exception at runtime


I have created a connection pool and resource. Moreover I have included the following libraries in the project:
Glassfish Server 3.1
derby.jar
Jdk 1.7
jstl 1.1
Please help me resolve this..
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the derby.jar file? It needs to be in a directory where whichever servlet container you're using can find it.
 
Raman Ghai
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
derby.jar file location : F:\Program Files\glassfish-3.1.1\javadb\lib\derby.jar
I have added this jar file manually to the libraries. However this has not helped me.
Additional info :
The xml file for the jdbc resource is as follows :
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope that this is not in production code.

The use of a DB in the presentation layer is considered a poor practice, and even the framers of the JSTL Specification recommend using the JSTL SQL tags only in prototype code and never in production code.
 
Raman Ghai
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:I hope that this is not in production code.


This is not a production code. I have just started learning JSP.
I can easily connect with derby using a simple java class. however, I am not able to figure out the exact problem here using JSP.
 
Tim Moores
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect that the directory where the derby.jar file resides is not part of the runtime classpath. I'm not familier with GlassFish, though.
 
Raman Ghai
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Changed the Server to Apache TomCat
Instead of derby.jar, added derbyClient.jar file in the libraries
Now I can connect to Derby and display the table data
Thanks for replying Tim Moores
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic