ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: ClassCastException building SqlMap instance
Date Fri, 01 Apr 2005 13:42:14 GMT
John Fereira wrote:

> At 12:55 PM 4/1/2005 +0100, Kris Jenkins wrote:
>
>>> If you're looking for the library which contains the offending class 
>>> here's a trick I use.  Go into the directories that your classloader 
>>> will use to find jar files (common/lib, server/lib, etc).  If you're 
>>> using using some version of unix run the bourne shell (/bin/sh) or 
>>> bash and execute the following:
>>>
>>> for name in *.jar
>>> do
>>>    echo LIBRARY: $name >> classlist
>>>    jar tvf $name >> classlist
>>> done
>>>
>>>
>>> Now you can look in the classlist file and search for the class name 
>>> that is causing the casting exception.  Scroll up until you find the 
>>> name of the class which contains it.
>>> John Fereira
>>> jaf30@cornell.edu
>>> Ithaca, NY
>>
>>
>> As it's Friday, anyone for a game of *nix golf?
>>
>>    find . -name \*.jar -print -exec jar tvf {} \;
>
>
> That would work too, although to be useful you'd want to pipe the 
> output to a file for subsequent class name lookups.

Okay, give me par 52:

find . -name \*.jar -print -exec jar tvf {} \;|vi -

:-)


Mime
View raw message