-
1. Re: Error during model data update, but no exception in the
pmuir Jun 29, 2006 11:57 AM (in response to free67)Model update is a JSF lifecycle phase, it has nothing to do with entity persistence.
I've found model update errors often occur when the object it refers to is null, but I would suggest using the debugger to find out more
Depending on the setting of hibernate.hbm2ddl.auto in persistence.xml the table will be auto created e.g.<property name="hibernate.hbm2ddl.auto" value="create-drop" />
will result in the database tables being dopped and created according to the EJB3 persistence annotations when the ear is deployed.
JBoss limits apache (tomcat, myfaces) to info as otherwise it is *extremely* verbose. You can alter it in JBOSS_HOME/server/default/conf/log4j.xml -
2. Re: Error during model data update, but no exception in the
free67 Jun 29, 2006 1:05 PM (in response to free67)Model update is a JSF lifecycle phase
I agree with this. But if there is an error in the application (lifecycle, persistence or whatever), I need to see the exception in the log and a stack trace. First for debugging purposes and later for monitoring the application in production. Also limiting a logger category to info should not stop any exception logging.
Thanks for the hbm2ddl.auto tips but I have data in my tables and I like to keep it that way. -
3. Re: Error during model data update, but no exception in the
free67 Jun 29, 2006 3:38 PM (in response to free67)It seems like seam cannot locate my user variable in the contexts. Actualy it seems like it can't even locate the class annotated with @Name("user"):
15:31:18,155 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user 15:31:18,155 DEBUG [org.jboss.seam.Component] seam component not found: user 15:31:18,155 DEBUG [org.apache.myfaces.el.VariableResolverImpl] Variable 'user' could not be resolved. 15:31:18,155 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name 15:31:18,162 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: user 15:31:18,163 DEBUG [org.jboss.seam.Component] seam component not found: user 15:31:18,163 DEBUG [org.apache.myfaces.el.VariableResolverImpl] Variable 'user' could not be resolved. 15:31:18,163 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
Am I reading this right? and if yes, should it not throw an Exception? -
4. Re: Error during model data update, but no exception in the
gavin.king Jun 29, 2006 8:55 PM (in response to free67)"free67" wrote:
Model update is a JSF lifecycle phase
I agree with this. But if there is an error in the application (lifecycle, persistence or whatever), I need to see the exception in the log and a stack trace.
And of course you will. Seam does not swallow any exceptions, and you have not seen it swallow exceptions. Why assume Seam would do something totally evil when you have zero evidence for that? -
5. Re: Error during model data update, but no exception in the
gavin.king Jun 29, 2006 8:56 PM (in response to free67)"free67" wrote:
It seems like seam cannot locate my user variable in the contexts. Actualy it seems like it can't even locate the class annotated with @Name("user"):
Am I reading this right? and if yes, should it not throw an Exception?
Probably Seam has not installed your "user" component. Probably you are missing seam.properties. No, Seam most certainly should not throw an exception. Why should Seam throw an exception when plain JSF, or even plain JSP would not? -
6. Re: Error during model data update, but no exception in the
free67 Jun 29, 2006 11:56 PM (in response to free67)King, you say I say Seam is evil!?! Of course it is. How else do you expect it to take over the world.
You are right. Seam does not swallow exceptions and... I never mentioned swallowing in my post. blah, that's so anticlimactic.
Fine, this is just the way faces is designed and also the way myfaces is implemented. I'm not the only person that thinks this is odd:
http://www.mail-archive.com/users@myfaces.apache.org/msg11592.html.
But this forum is not the right place to discuss faces specs. I'll move my comments on that elsewhere.
However, in Seam, the outcome of not finding an @Name(d) class, should that not be a medium sized error, something that might throw an exception? or maybe just and ERROR log line? On the other hand, perhaps a missing @Name(d) class is just a special case of a wider scenario that could play out without ultimate failure. -
7. Re: Error during model data update, but no exception in the
theute Jun 30, 2006 3:45 AM (in response to free67)When you deploy your app, Seam tells you the component it found. Look there. My guess is that it is something else.