Ok, then you either have two versions of that class, either the same class is loaded by different classloaders. Can you get the class's classloader's classname and again the instance hashcode?

On 6-dec-05, at 15:07, Raoul Pierre wrote:

Geert,

Can you output the both values of com.uwyn.ecalendar.elements.Version.class.hashcode() ?

There are different:
[com.uwyn.rife.jumpstart.elements.pub.Home] popsuite version class, direct hashcode: 5884890 [com.uwyn.rife.jumpstart.elements.pub.Home] popsuite version class, bean hashcode: 22445676

Pierre

On 6-dec-05, at 13:35, Raoul Pierre wrote:

Hello

Seems that for Spring "A" is not "A"...

Any idea?

Pierre

(The code is after the exception)

/org.springframework.beans.factory.BeanNotOfRequiredTypeException/

*Bean named 'appVersionTarget' must be of type [com.uwyn.ecalendar.elements.Version], but was actually of type [com.uwyn.ecalendar.elements.Version]*

at org.springframework.beans.factory.support.AbstractBeanFactory getBean ( AbstractBeanFactory.java : 245 ) at org.springframework.beans.factory.support.AbstractBeanFactory getBean ( AbstractBeanFactory.java : 151 ) at org.springframework.context.support.AbstractApplicationContext getBean ( AbstractApplicationContext.java : 552 ) at com.uwyn.rife.jumpstart.elements.pub.Home processElement ( Home.java : 20 ) at com.uwyn.rife.engine.ElementContext processContext ( ElementContext.java : 587 ) at com.uwyn.rife.engine.RequestState service ( RequestState.java : 212 ) at com.uwyn.rife.engine.Gate handleRequest ( Gate.java : 422 ) at com.uwyn.rife.engine.Gate handleRequest ( Gate.java : 240 ) at sun.reflect.NativeMethodAccessorImpl invoke0 ( NativeMethodAccessorImpl.java ) at sun.reflect.NativeMethodAccessorImpl invoke ( NativeMethodAccessorImpl.java : 39 ) at sun.reflect.DelegatingMethodAccessorImpl invoke ( DelegatingMethodAccessorImpl.java : 25 ) at java.lang.reflect.Method invoke ( Method.java : 585 ) at com.uwyn.rife.servlet.RifeFilter doFilter ( RifeFilter.java : 112 ) at org.mortbay.jetty.servlet.WebApplicationHandler $CachedChain doFilter ( WebApplicationHandler.java : 823 ) at org.mortbay.jetty.servlet.WebApplicationHandler dispatch ( WebApplicationHandler.java : 473 ) at org.mortbay.jetty.servlet.ServletHandler handle ( ServletHandler.java : 567 ) at org.mortbay.http.HttpContext handle ( HttpContext.java : 1565 )

*9 more ...*


package com.uwyn.rife.jumpstart.elements.pub;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.uwyn.ecalendar.elements.Version;
import com.uwyn.rife.engine.Element;
import com.uwyn.rife.template.Template;

public class Home extends Element {
   public void processElement() {
ApplicationContext ctx = new FileSystemXmlApplicationContext("c:/ DEV/Rife/rife-popsuite/web/WEB-INF/applicationContext2.xml");

Version v = (Version) ctx.getBean("appVersionTarget", Version.class); System.out.println("[com.uwyn.rife.jumpstart.elements.pub.Home] popsuite version class name: "+v.getClass().getName());
       Template template = getHtmlTemplate("pub.home");
       print(template);
   }
}

with applicationContext2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http:// www.springframework.org/dtd/spring-beans.dtd">

<beans>

<bean id="appVersionTarget"
     class="com.uwyn.ecalendar.elements.Version"/>
</beans>




_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users






_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to