• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Websphere 6.1 Issue : java.lang.NoSuchMethodError: Ljava/sql/Dat

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am using RAD - 7. Most of the times when i deploy my application i get the below mentioned error. Sometimes it works fine after frequent restarting of the server.

i am trying to get the date from the back end (Db2). Sometimes i used to get the same error for Float and String. Any idea what might be the problem.




[2/28/07 11:17:21:111 EST] 00000029 WebApp E [Servlet Error]-[ProcessLogonForm]: java.lang.NoSuchMethodError: com/ibm/db2/jcc/c/b.a([BILjava/lang/String;Ljava/sql/Date Ljava/sql/Date;
at com.ibm.db2.jcc.a.o.o(o.java:529)
at com.ibm.db2.jcc.a.o.J(o.java:1035)
at com.ibm.db2.jcc.a.cc.getDate(cc.java:732)
at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getDate(WSJdbcResultSet.java:1090)
at com.sample.security.LogonInfoManager.getLogonInfo(LogonInfoManager.java:75)
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No such method error tells me it's a classloader problem.

You've got a class deployed twice to the JVM. One version has the method, the other doesn't. Depending upon which version the classloader loads, it may or may not call the class with the correct method.

Don't you love classloaders?

Here's a little article I wrote on J2EE and WebSphere Classloaders, and the very type of NoSuchMethod exceptions you are talking about:

Understanding and Demystifying WebSphere and J2EE Classloaders

I hope this help.

-Cameron
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to run classloader traces to find out what is really happening. I think which classloader is important because it will indicate the scope for potential conflicts.

Alternatively you can enter following option in the Generic JVM arguments under JVM which would/should give you clear info. on where the class is getting loaded from.

-Dibm.cl.verbose=NameOfTheClassIncludingPackagName

Ex.
-Dibm.cl.verbose=com.abc.utilities.NameOfTheClass


Cheers,
H. Kanthi
[ February 28, 2007: Message edited by: Hanumanth Kanthi ]
 
The City calls upon her steadfast protectors. Now for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic