Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

jasperException

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting JasperException when I want to call by useBean.

code:

<use:Bean id="db" class="com.mob.JdbcConnectionBean" scope="page"/>


<%
Connection con=null;
try{
con=db.connectionCreate();
}
catch(Exception e)
{
out.println(e);
}
%>

In connectionCreate is method:
class JdbcConnectionBean{
Connection con=null;
public Connection connectionCreate() throws Exception,SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
con=DriverManager.getConnection("jdbc:odbc:MobileX","user","user");
return con;

}
}


I am using Tomcat5.0.1 and JDK 1.5.

How to solve this ?
[ April 07, 2007: Message edited by: amit bhadre ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Jasper exception are you getting?
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
set class path for jasper.jar which is available at common/lib in your tomcat. i think it will work
 
Sheriff
Posts: 67750
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

Originally posted by Narasimha Raju Naidu:
set class path for jasper.jar which is available at common/lib in your tomcat. i think it will work



Tomcat completely ignores the system classpath.

Besides, since we don't even know what the problem is yet, it's impossible to say what a solution would be.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<use:Bean id="db" class="com.mob.JdbcConnectionBean" scope="page"/>


Try:
<jsp:useBean .../>
 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Its typing mistake use:Bean ...it should be <jsp:useBean>


Thank you....
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did that fix your problem?
 
reply
    Bookmark Topic Watch Topic
  • New Topic