| Beginner | 
				 
							
					  | 
				 
							 
				
					 Joined: Tue Aug 10, 2004 8:59 am Posts: 47				
			 | 
			
				
				
					| 
					
						 Hibernate version: 2.1 
 
 I have a class called ManipulativePropertyRight which has a column called Validator which stores a serializable object of type Validator. I have several subtypes of Validator, e.g. a StringValidator. I am able to persist an instance of ManipulativePropertyRight containing a validator of type StringValidator but when I reload the ManipulativePropertyRight I get the exception below, stating that there is a mismatch between the type stored and the type which the setter method is able to set.
 
 In my hbm.xml I have
 <property name="validator" type="dk.rockit.puls.omnipresent.validator.Validator"/>
 
 And my setter method sets values of type dk.rockit.puls.omnipresent.validator.Validator
 
 I have also tried to put the following in hbm.xml
 <property name="validator" type="serializable"/>
 but the same problem occurs.
 
 If you have any clues I would be greatful.
 
 Thanks.
 Randahl
 
 
 
 
 Caused by: net.sf.hibernate.PropertyAccessException: IllegalArgumentException oc
 curred while calling setter of dk.rockit.puls.server.entity.security.right.Manip
 ulativePropertyRight.validator
         at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(Basic
 PropertyAccessor.java:68)
         at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(
 AbstractEntityPersister.java:221)
         at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2
 206)
         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
 (Loader.java:133)
         at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:915)
         at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:890)
         at net.sf.hibernate.loader.CollectionLoader.initialize(CollectionLoader.
 java:83)
         at net.sf.hibernate.collection.AbstractCollectionPersister.initialize(Ab
 stractCollectionPersister.java:284)
         at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.ja
 va:3264)
         at net.sf.hibernate.collection.PersistentCollection.forceInitialization(
 PersistentCollection.java:336)
         at net.sf.hibernate.impl.SessionImpl.initializeNonLazyCollections(Sessio
 nImpl.java:3119)
         at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
 (Loader.java:138)
         at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
         at net.sf.hibernate.loader.Loader.list(Loader.java:946)
         at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1520)
         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1516)
         at dk.rockit.puls.server.value.terminal.ValueTerminal.getRole(ValueTermi
 nal.java:92)
         at dk.rockit.puls.server.value.terminal.ValueTerminal.query(ValueTermina
 l.java:251)
         at dk.rockit.puls.server.service.value.ValueServiceBean.query(ValueServi
 ceBean.java:61)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
 tatelessSessionContainer.java:683)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
 ke(CachedConnectionInterceptor.java:185)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
 elessSessionInstanceInterceptor.java:72)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
 rceptor.java:84)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
 torCMT.java:315)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
 48)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
 java:120)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
 ryFinderInterceptor.java:122)
         at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
 onContainer.java:331)
         at org.jboss.ejb.Container.invoke(Container.java:723)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
 java:60)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
 java:185)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
 360)
         at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
 60)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
 .java:701)
         at java.lang.Thread.run(Thread.java:595)
 Caused by: java.lang.IllegalArgumentException: argument type mismatch
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
					
  
						
					 | 
				 
				 
			 |