[jboss-user] [JBoss Seam] - Does injection perform standard JSF conversion?
adambrod
do-not-reply at jboss.com
Fri Sep 15 13:51:58 EDT 2006
Hi-
I have a property in my managed bean that is injected from the request parameters. Will Seam perform standard conversions like regular JSF managed properties?
This property fails:
@In("#{param.managedFileId}")
| protected Long managedFileId;
with the exception below. From what I can tell, Seam is trying to inject the request parameter as a String, but the target expects a Long. How can I fix this? Here is the request url I'm using: http://localhost:8000/files/dFile.faces?managedFileId=30050
java.lang.IllegalArgumentException
| at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.seam.Component.setFieldValue(Component.java:1210)
| at org.jboss.seam.Component.injectFields(Component.java:1024)
| at org.jboss.seam.Component.inject(Component.java:795)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
| at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:82)
| at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60
| at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:34)
| at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
| at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
| at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
| at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
| at com.intralinks.web.managedfile2.DisplayManagedFileController$$EnhancerByCGLIB$$c2e391ae.toString(<generated>)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972002#3972002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972002
More information about the jboss-user
mailing list