-
FEATURED COMPONENTS
First time here? Check out the FAQ!
***SOLVED***
Hi,
When I deploy our application on Apache Tomcat, the application work well.
But if I stop/start or restart the Apache Tomcat service. At one of page I get this error. Then the only thing I could do to stop getting this error is redeploy again.
What is causing that ? ZK ? Hibernate ? Why ?
Is there another way to avoid redeploying after this error ?
What can I do to avoid that error?
I use Tomcat 5.5 and ZK 3.6.1
Thank you for your help
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of actifs.Actif.noActif org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:195) org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:206) org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3619) org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3335) org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:204) org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:241) org.hibernate.type.EntityType.getIdentifier(EntityType.java:430) org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:265) org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:619) org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3151) org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:501) org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:227) org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:150) org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58) org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589) org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306) bonDeTravails.BonDeTravailDAO.findNextNoBon(BonDeTravailDAO.java:54) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) bsh.Reflect.invokeMethod(Unknown Source) bsh.Reflect.invokeObjectMethod(Unknown Source) bsh.Name.invokeMethod(Unknown Source) bsh.BSHMethodInvocation.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHArguments.getArguments(Unknown Source) bsh.BSHMethodInvocation.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHBlock.evalBlock(Unknown Source) bsh.BSHBlock.eval(Unknown Source) bsh.BshMethod.invokeImpl(Unknown Source) bsh.BshMethod.invoke(Unknown Source) bsh.BshMethod.invoke(Unknown Source) bsh.Name.invokeLocalMethod(Unknown Source) bsh.Name.invokeMethod(Unknown Source) bsh.BSHMethodInvocation.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHBlock.evalBlock(Unknown Source) bsh.BSHBlock.eval(Unknown Source) bsh.BSHBlock.eval(Unknown Source) bsh.BSHIfStatement.eval(Unknown Source) bsh.BSHBlock.evalBlock(Unknown Source) bsh.BSHBlock.eval(Unknown Source) bsh.BshMethod.invokeImpl(Unknown Source) bsh.BshMethod.invoke(Unknown Source) bsh.BshMethod.invoke(Unknown Source) bsh.Name.invokeLocalMethod(Unknown Source) bsh.Name.invokeMethod(Unknown Source) bsh.BSHMethodInvocation.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.BSHPrimaryExpression.eval(Unknown Source) bsh.Interpreter.eval(Unknown Source) bsh.Interpreter.eval(Unknown Source) org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:108) org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:771) org.zkoss.zk.ui.impl.UiEngineImpl.execNonComponent(UiEngineImpl.java:730) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:549) org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:559) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:527) org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:494) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:375) org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:296) org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229) org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:166) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
Hi,
Have you tried to google it with "IllegalArgumentException occurred calling getter..."?
Because there are too many unpredictable issue.
From the error log, I suppose it is not a ZK issue.
/Jumper
I got this explication on the web...
public class PropertyAccessException extends HibernateException A problem occurred accessing a property of an instance of a persistent class by reflection, or via CGLIB. There are a number of possible underlying causes, including failure of a security check an exception occurring inside the getter or setter method a nullable database column was mapped to a primitive-type property the Hibernate type was not castable to the property type (or vice-versa) http://www.hibernate.org/hib_docs/v3/api/org/hibernate/PropertyAccessException.html
Hmmmmm,
i can see that after a re-publish in my eclipse environment i need not to logged in new. So it seems that the sessionId it's the same as before new starting??
Hmmm, what do you do on starting that there are BeanShell-Logs?
...
bsh.BSHAssignment.eval(Unknown Source)
...
Stephan
PS: Search the forum for Desktop cleaning. It's a zk.xml listener.
Thank you Stephan,
I don't know what do "bsh.BSHAssignment.eval(Unknown Source)", so I can't help you about that, its maybe some zscript evaluation.
The only thing I do in all the stack exception is calling this method
bonDeTravails.BonDeTravailDAO.findNextNoBon(BonDeTravailDAO.java:54)
public String findNextNoBon( String debutNo ){ String nouveauNo; Session sess = currentSession(); Criteria criteria = sess.createCriteria(BonDeTravail.class); criteria.add(Restrictions.like("noBon", debutNo+"%")); criteria.addOrder(Order.desc("noBon")); if (criteria.list().size() != 0){ String noDernierBonStr = ((BonDeTravail)criteria.list().get(0)).getNoBon(); // <--- line 54 int noDernierBonint = Integer.parseInt(noDernierBonStr.substring(debutNo.length()+1)); DecimalFormat df = new DecimalFormat("0000"); nouveauNo = debutNo + df.format(noDernierBonint+1); } else nouveauNo = debutNo + "0001"; return (nouveauNo); }
Hi,
what is this for a class: actifs.Actif.noActif
--> Seems that the getter is missing. getNoActif
Please show us the Modelclasses.
Have you set a breakpoint in the getNoBon and debug it?
here are the code from the sessionCleaning:
web.xml
... <!-- ZKoss --> <listener> <description>Used to cleanup when a session is destroyed</description> <display-name>ZK Session Cleaner</display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> ...
Stephan
The getter isn't missing and the application work well until I restart the Tomcat service on the server.
For the breakpoint I don't know how to do since this exception happen only on the deployed application never in eclipse.
I will try with the sessionCleaning code.
Thank you,
it looks like hibernate issue ,
IllegalArgumentException means wrong argument when calling this method (Actif.getNoActif)
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of actifs.Actif.noActif org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:195) org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:206)
but I am wondering why this line didn't throw exception,
if (criteria.list().size() != 0){
String noDernierBonStr = ((BonDeTravail)criteria.list().get(0)).getNoBon(); // <--- line 54
criteria.list() be called twice, maybe you can keep the list() only once to see if it still happen or not.
Asked: 2009-05-08 20:05:04 +0800
Seen: 437 times
Last updated: May 12 '09