[JBoss Seam] - Facelets / tomahawk redeploy on JBOSS problem
by german.delacruz
Hi guys!
The problem I'll explain isn't a seam problem, but, perhaps, You can help me.
I'm very new to facelets. so, please excuse me if I weren't clear enought
I've an application, where I use some tomahawk components.
If i deploy my application in a Jboss for the first time, everything works perfectly. My problem is on a hot redeploy of my application. Then, I start to have this stacktrace
| com.sun.facelets.tag.TagAttributeException: /cruds/place.xhtml @174,90 popupCalendar="true" object is not an instance of declaring class
| at com.sun.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:53)
| at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
| at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:140)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
| at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
| at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
| at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
| at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
| at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
| at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
| 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.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:143)
| 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.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
| at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:490)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:533)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
| 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 com.sun.facelets.tag.BeanPropertyTagRule$LiteralPropertyMetadata.applyMetadata(BeanPropertyTagRule.java:49)
| ... 56 more
|
This is the problematic code
| <div class="input">
| <t:inputDate id="buyDate" value="#{placeEditor.entity.buyDate}" popupCalendar="true"/>
| <br/><span class="errors"><h:message for="buyDate"/></span>
| </div>
|
I must say that if I cut the popupCalendar attribute, everything works ok. I can reproduce the same behaviour with all my tomahawk components (I use PanelNavigator2 and others)
After making some research on the list, I've found this https://facelets.dev.java.net/servlets/ReadMsg?listName=users&msgNo=2179
There Jacob promise to make a change in MetaTagHandler, but I've seen that this code is untouched for 11 month!!!
I think it's a classpath problem, but Actually I don't know how to solve it.
After writing in to the facelets list, I've received this message form Jacob
anonymous wrote :
| I need to chat with the JBoss guys, because the MetaTagHandler does:
|
| if (mapper == null || !localType.equals(instanceType)) {
| // rebuild meta data
| }
|
| but if you are changing the type, then I wonder why the localType is equal to the instanceType.
|
|
And this is true! Between deploy and deploy, the instanceType is the same that the type cached!! And even worse, When I call the method by reflection it fails??
Anyone has faced it? Is there a workaround??
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963541#3963541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963541
19 years, 9 months
[Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
by jaikiran
If thats what you want to have, then you will have to specify an env-entry for your bean. Have a look at the dtd of ejb-jar.xml at:
http://java.sun.com/dtd/ejb-jar_2_0.dtd
Here's an extract:
anonymous wrote :
| <!--
| The env-entry element contains the declaration of an enterprise bean's
| environment entry. The declaration consists of an optional
| description, the name of the environment entry, and an optional
| value. If a value is not specified, one must be supplied
| during deployment.
|
| Used in: entity, message-driven, session
| -->
| <!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
| env-entry-value?)>
|
| <!--
| The env-entry-name element contains the name of an enterprise bean's
| environment entry. The name is a JNDI name relative to the
| java:comp/env context. The name must be unique within an enterprise bean.
|
| Used in: env-entry
|
| Example:
|
| <env-entry-name>minAmount</env-entry-name>
| -->
| <!ELEMENT env-entry-name (#PCDATA)>
|
| <!--
| The env-entry-type element contains the fully-qualified Java type of
| the environment entry value that is expected by the enterprise bean's
| code.
|
| The following are the legal values of env-entry-type:
|
| java.lang.Boolean
| java.lang.Byte
| java.lang.Character
| java.lang.String
| java.lang.Short
| java.lang.Integer
| java.lang.Long
| java.lang.Float
| java.lang.Double
|
|
| Used in: env-entry
|
| Example:
|
| <env-entry-type>java.lang.Boolean</env-entry-type>
| -->
| <!ELEMENT env-entry-type (#PCDATA)>
|
| <!--
| The env-entry-value element contains the value of an enterprise bean's
| environment entry. The value must be a String that is valid for the
| constructor of the specified type that takes a single String
| parameter, or for java.lang.Character, a single character.
|
| Used in: env-entry
|
| Example:
|
| <env-entry-value>100.00</env-entry-value>
| -->
| <!ELEMENT env-entry-value (#PCDATA)>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963539#3963539
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963539
19 years, 9 months