[jboss-user] [JBoss Seam] - Re: Can EntityConverter handle different EntityManagers?

wiberto do-not-reply at jboss.com
Wed Oct 10 22:07:36 EDT 2007


If I don't have a component called "entityManager" I get a n NPE:


  | java.lang.NullPointerException
  | 	at org.jboss.seam.ui.converter.EntityConverterStore.getEntityManager(EntityConverterStore.java:81)
  | 	at org.jboss.seam.ui.converter.EntityConverterStore.put(EntityConverterStore.java:60)
  | 	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:597)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
  | 	at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
  | 	at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
  | 	at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
  | 	at org.jboss.seam.ui.converter.EntityConverterStore_$$_javassist_1.put(EntityConverterStore_$$_javassist_1.java)
  | 	at org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:67)
  | 	at org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67)
  | 	at org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:123)
  | 	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469)
  | 	at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:502)
  | 

Here's my piece of the components.xml with the real names I'm using:


  | <persistence:managed-persistence-context name="numinsEntityManager"
  |                                       auto-create="true"
  |                        persistence-unit-jndi-name="java:/numinsPersistenceUnit" />
  | 
  | <component name="org.jboss.seam.ui.entityConverter">
  |   <property name="entityManager">#{numinsEntityManager}</property>
  | </component>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093814#4093814

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093814



More information about the jboss-user mailing list