Grassi Fabio wrote:
Where do you put you iBatis jar files? In common/lib, server/lib or
WEB-INF/lib?
WEB-INF/lib in the .war file - so iBatis is not shared. Some of our
applications run with old iBatis and some with the new version.
Thanks,
Baldur
> -----Messaggio originale-----
> Da: Baldur Norddahl [mailto:[EMAIL PROTECTED]]
> Inviato: giovedì 7 aprile 2005 15:36
> A: [email protected]
> Oggetto: class cast exception
>
>
> Hi,
>
> In some of our projects we are haunted by a strange class cast
> exception. I suspect it is a class loader issue. Just after
> restarting
> the application server everything works fine, and it may continue
to
> work fine for hours or days. Until suddenly it stops working
> with this
> kind of errors:
>
> 2005-04-07 14:39:15,564 [TP-Processor112] ERROR
> com.ibatis.db.sqlmap.MappedStatement - Error executing
> 'getGameIdByContentId' in 'com/xentive/shopdb/webshop.xml'. Check
the
> Parameter Map (or inline parameters). Check the 'value' property.
> Cause: java.lang.ClassCastException: java.lang.String
> java.lang.ClassCastException: java.lang.String
> at
> com.ibatis.db.sqlmap.MappedStatement.runQueryForObject(Unknown
Source)
> at
> com.ibatis.db.sqlmap.MappedStatement.executeQueryForObject(Unk
> nown Source)
> at
> com.ibatis.db.sqlmap.MappedStatement.executeQueryForObject(Unk
> nown Source)
> at
> com.ibatis.db.sqlmap.SqlMap.executeQueryForObject(Unknown Source)
> at
> com.xentive.shopdb.OrderHandler.doGet(OrderHandler.java:123)
>
>
> The statement looks like this:
>
>
> result-class="java.lang.String">
> select game_id as value from webshop.game where id=#value#
>
>
> And the code that invokes it:
>
> String gameId =
> SqlConfig.webshop.executeQueryForObject("getGameIdByContentId"
> ,contentid.toString()).toString();
>
> Restarting the application server always fixes the problem
> for a while.
>
> Usually we can "fix" the problem applications by converting
> everything
> to strings. That did not work in this case though.
>
> We are using:
>
> postgresql 7.4.3
> tomcat 5.0.27
> jdk 1.5.0
>
> The datasource is a global shared pool:
>
>
>
factory-class="com.ibatis.db.sqlmap.datasource.JndiDataSourceFactory"
> name="webshop" default="true">
>
> value="java:comp/env/jdbc/db"/>
>
>
> I hope somebody got an idea for me how I can go about fixing this.
>
> Thanks,
>
> Baldur
>
>
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute
in questo messaggio sono riservate ed a uso esclusivo del destinatario.
Qualora il messaggio in parola Le fosse pervenuto per errore, La
invitiamo ad eliminarlo senza copiarlo e a non inoltrarlo a terzi,
dandocene gentilmente comunicazione. Grazie.
Pursuant to Legislative Decree No. 196/2003, you are hereby informed
that this message contains confidential information intended only for
the use of the addressee. If you are not the addressee, and have
received this message by mistake, please delete it and immediately
notify us. You may not copy or disseminate this message to anyone.
Thank you.
|