[jboss-user] [JBoss Seam] - Mysterious Error: Could not set field value by reflection
dustismo
do-not-reply at jboss.com
Thu Oct 11 14:33:06 EDT 2007
I have been trying to figure this out all morning..
| SEVERE: Error Rendering View[/if/wizard2/wizard2.xhtml]
| javax.el.ELException: /if/wizard2/wizard2.xhtml @18,85 items="#{dataSourceMap.inputTypes}": Error reading 'inputTypes' on type net.infofilter.session.wizard2.DataSourceMap_$$_javassist_17
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
| at com.sun.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:121)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:312)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:282)
| at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
| at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:312)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:282)
| at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
| at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:312)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:282)
| at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
| at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
| at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
| at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
| at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
| at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:509)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:552)
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: DataSourceMap.inputTypesTree on: net.infofilter.session.wizard2.DataSourceMap with value: class java.util.HashMap
| at org.jboss.seam.util.Reflections.set(Reflections.java:79)
| at org.jboss.seam
| 11:32:41,295 ERROR [STDERR] .persistence.ManagedEntityIdentityInterceptor.getFromWrapper(ManagedEntityIdentityInterceptor.java:196)
| at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.entityIdsToRefs(ManagedEntityIdentityInterceptor.java:129)
| at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| 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 net.infofilter.session.wizard2.DataSourceMap_$$_javassist_17.getInputTypes(DataSourceMap_$$_javassist_17.java)
| 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 javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
| at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| ... 91 more
| Caused by: java.lang.IllegalArgumentException
| at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.seam.util.Reflections.set(Reflections.java:64)
| ... 114 more
|
The view page simply iterates over the inputTypes List (I striped out all the other logic to see if there was some other problem
Here is the backing bean:
|
| @Name("dataSourceMap")
| @Scope(CONVERSATION)
| public class DataSourceMap implements Serializable{
| private static final long serialVersionUID = -4190757500520505242L;
|
| @In
| FacesMessages facesMessages;
|
| @In
| private User user;
|
| @In
| private EntityManager entityManager;
|
| private HashMap<String, List<DataSource>> sourcesByInputType = null;
|
| private HashMap<String, DataSource> sourcesByName = null;
|
| private TreeMap<String, InputType> inputTypesTree = null;
|
| private List<InputType> inputTypes = null;
|
| private HashMap<Integer, InputType> inputTypeById = null;
|
| /**
| * Loads all the DataSources available to this user and organizes them by input type.
| *
| */
| @SuppressWarnings("unchecked")
| @Create
| public void init() {
| //initialize datastructures
| ...
| }
|
| public DataSource getDataSourceByName(String name) {
| return this.sourcesByName.get(name);
| }
|
| public List<DataSource> getDataSources(String inputType) {
| return sourcesByInputType.get(inputType);
| }
|
| public InputType getInputById(Integer id) {
| return this.inputTypeById.get(id);
| }
|
| public InputType getInputType(String inputType) {
| return this.inputTypesTree.get(inputType);
| }
|
| public List<InputType> getInputTypes() {
| System.out.println("GETTING INPUT TYPES!");
| return inputTypes;
| }
|
| public void setInputTypes(List<InputType> types) {
| this.inputTypes = types;
| }
|
| public TreeMap<String, InputType> getInputTypesTree() {
| return this.inputTypesTree;
| }
|
| public void setInputTypesTree(TreeMap<String, InputType> inputTypesTree) {
| this.inputTypesTree = inputTypesTree;
| }
| }
|
Any help?
-Dustin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094228#4094228
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094228
More information about the jboss-user
mailing list