ssException:,IllegalArgumentException,occurred,while,calling,setter,of,com.web.dcr.DCRIncidentId.dcrRef" /> Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.web.dcr.DCRIncidentId.dcrRef - Problems and solutions to issues related to Software : Business, Database, Firewalls, Office, Graphics, Security, System, Server.

Question : Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.web.dcr.DCRIncidentId.dcrRef


HI All,

i am getting two exception [marked in the lines of  code]

attached all src.

Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.web.dcr.DCRIncidentId.dcrRef
      at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104)
      at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
      at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
      at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3566)
      at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
      at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
      at org.hibernate.loader.Loader.doQuery(Loader.java:729)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
      at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
      at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
      at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
      at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
      at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
      at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
      at org.hibernate.collection.PersistentSet.toString(PersistentSet.java:309)
      at java.lang.String.valueOf(String.java:2615)
      at java.io.PrintStream.print(PrintStream.java:616)
      at java.io.PrintStream.println(PrintStream.java:753)
      at com.web.test.DCRTest.main(DCRTest.java:34)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      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 org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
      ... 19 more



Exception in thread "main" org.hibernate.MappingException: Unknown entity: DCRDetailsId
      at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
      at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68)
      at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
      at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
      at com.web.dao.DCRDetailsDAO.findById(DCRDetailsDAO.java:59)
      at com.web.test.DCRTest.main(DCRTest.java:28)

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
/**
 * 
 */
package com.web.test;

import java.util.List;

import com.web.dao.DCRDetailsDAO;
import com.web.dcr.DCRDetailsId;




/**
 * @author kishorekumarn
 *
 */
public class DCRTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
             /*exception 1
Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.web.dcr.DCRIncidentId.dcrRef
            */
             List<DCRDetailsId> dcr = dd.findAll();
		
		DCRDetailsId dcrD = dcr.get(0);
		System.out.println(dcrD.getIncdSet());



                /* exception 2
Exception in thread "main" org.hibernate.MappingException: Unknown entity: DCRDetailsId
                  */
		DCRDetailsDAO dd = new DCRDetailsDAO();
		DCRDetailsId id = new DCRDetailsId();
		id.setDcrRef("4901");
		DCRDetailsId dr = dd.findById(id);
		System.out.println("----------> "+dr.getDcrRemarks());
		
		
		
		
	}
}
Attachments:
 
 
 
 
 
 

Answer : Exception in thread "main" org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.web.dcr.DCRIncidentId.dcrRef

cisco 1841 is comming default with 64Mb flash and 256 Mb ram and IP BASE, 12.4(15)T

so it can be upgraded to c1841-advipservicesk9-mz.124-12.bin that required only
minimun 128MB ram and 32 MB flash
Random Solutions  
 
programming4us programming4us