javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2846

Composite components attribute type cannot anymore contain primitive type names like int and boolean: give java.lang.ClassNotFoundException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.21
    • Fix Version/s: 2.1.22, 2.2.1
    • Component/s: composite components
    • Labels:
      None
    • Environment:

      Tested against mojarra 2.1.17 (primitives work in composite interface) and 2.1.21 (primitives no longer work).

      GlassFish Server Open Source Edition 3.1.2.2 (build 5) running in Ubuntu 12.10 (quantal)

      Description

      Having
      <cc:attribute name="someBooleanPrimitive" type="boolean" required="false"/>
      <cc:attribute name="someIntPrimitive" type="int" required="false"/>
      in composite component interface no longer works in Mojarra 2.1.21 and java.lang.ClassNotFoundException is given. This change causes trouble in existing applications using primite types. The documentation of composite:attribute type also does not clearly tell if primitive types are allowed or not.

      Mojarra 2.1.17 works with type name given as primitive type in composite component interface but Mojarra 2.1.21 gives following:
      java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: boolean
      at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:277)
      at com.sun.faces.facelets.tag.composite.AttributeHandler.apply(AttributeHandler.java:144)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at com.sun.faces.facelets.tag.composite.InterfaceHandler.apply(InterfaceHandler.java:122)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.createComponentMetadata(FaceletViewHandlingStrategy.java:295)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:980)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:976)
      at com.sun.faces.util.Cache.get(Cache.java:106)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:233)
      at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:937)
      at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:605)
      at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.createComponent(CompositeComponentTagHandler.java:162)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:494)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:169)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
      at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
      at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:906)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassNotFoundException: boolean
      at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
      at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:266)
      at com.sun.faces.util.Util.loadClass(Util.java:273)
      at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:272)
      ... 55 more

        Issue Links

          Activity

          Hide
          auotila added a comment -

          I could not see a way to add attachments to bug tracker. Here's the simple test for this issue:

          resources/ezcomp/typeTest.xhtml:

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:cc="http://java.sun.com/jsf/composite"
          xmlns:h="http://java.sun.com/jsf/html">

          <!-- INTERFACE
          -->
          <cc:interface>
          <cc:attribute name="someBooleanPrimitive" type="boolean" required="false"/>
          <cc:attribute name="someBooleanPrimitiveWithDefault" type="boolean" required="false" default="true"/>
          <cc:attribute name="someIntPrimitive" type="int" required="false"/>
          <cc:attribute name="someIntPrimitiveWithDefault" type="int" required="false" default="42"/>
          <cc:attribute name="someBooleanObject" type="java.lang.Boolean" required="false"/>
          <cc:attribute name="someBooleanObjectWithDefault" type="java.lang.Boolean" required="false" default="true"/>
          <cc:attribute name="someIntegerObject" type="java.lang.Integer" required="false"/>
          <cc:attribute name="someIntegerObjectWithDefault" type="java.lang.Integer" required="false" default="42"/>
          </cc:interface>

          <!-- IMPLEMENTATION -->
          <cc:implementation>
          someBooleanPrimitive: <h:outputText value="#

          {cc.attrs.someBooleanPrimitive}

          "/><br/>
          someBooleanPrimitiveWithDefault: <h:outputText value="#

          {cc.attrs.someBooleanPrimitiveWithDefault}

          "/><br/>
          someBooleanObject: <h:outputText value="#

          {cc.attrs.someBooleanObject}

          "/><br/>
          someBooleanObjectWithDefault: <h:outputText value="#

          {cc.attrs.someBooleanObjectWithDefault}

          "/><br/>
          someIntPrimitive: <h:outputText value="#

          {cc.attrs.someIntPrimitive}

          "/><br/>
          someIntPrimitiveWithDefault: <h:outputText value="#

          {cc.attrs.someIntPrimitiveWithDefault}

          "/><br/>
          someIntegerObject: <h:outputText value="#

          {cc.attrs.someIntegerObject}

          "/><br/>
          someIntegerObjectWithDefault: <h:outputText value="#

          {cc.attrs.someIntegerObjectWithDefault}

          "/><br/>

          </cc:implementation>
          </html>

          index.xhtml:

          <?xml version='1.0' encoding='UTF-8' ?>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:ezcomp="http://java.sun.com/jsf/composite/ezcomp">
          <h:head>
          <title>Composite component type test</title>
          </h:head>
          <h:body>
          <ezcomp:typeTest someBooleanPrimitive="false" someBooleanObject="false" someIntPrimitive="50" someIntegerObject="100"/>
          <hr/>
          <ezcomp:typeTest someBooleanPrimitive="untrue" someBooleanObject="verytrue" someIntPrimitive="500" someIntegerObject="100"/>
          </h:body>
          </html>

          Show
          auotila added a comment - I could not see a way to add attachments to bug tracker. Here's the simple test for this issue: resources/ezcomp/typeTest.xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun.com/jsf/html"> <!-- INTERFACE --> <cc:interface> <cc:attribute name="someBooleanPrimitive" type="boolean" required="false"/> <cc:attribute name="someBooleanPrimitiveWithDefault" type="boolean" required="false" default="true"/> <cc:attribute name="someIntPrimitive" type="int" required="false"/> <cc:attribute name="someIntPrimitiveWithDefault" type="int" required="false" default="42"/> <cc:attribute name="someBooleanObject" type="java.lang.Boolean" required="false"/> <cc:attribute name="someBooleanObjectWithDefault" type="java.lang.Boolean" required="false" default="true"/> <cc:attribute name="someIntegerObject" type="java.lang.Integer" required="false"/> <cc:attribute name="someIntegerObjectWithDefault" type="java.lang.Integer" required="false" default="42"/> </cc:interface> <!-- IMPLEMENTATION --> <cc:implementation> someBooleanPrimitive: <h:outputText value="# {cc.attrs.someBooleanPrimitive} "/><br/> someBooleanPrimitiveWithDefault: <h:outputText value="# {cc.attrs.someBooleanPrimitiveWithDefault} "/><br/> someBooleanObject: <h:outputText value="# {cc.attrs.someBooleanObject} "/><br/> someBooleanObjectWithDefault: <h:outputText value="# {cc.attrs.someBooleanObjectWithDefault} "/><br/> someIntPrimitive: <h:outputText value="# {cc.attrs.someIntPrimitive} "/><br/> someIntPrimitiveWithDefault: <h:outputText value="# {cc.attrs.someIntPrimitiveWithDefault} "/><br/> someIntegerObject: <h:outputText value="# {cc.attrs.someIntegerObject} "/><br/> someIntegerObjectWithDefault: <h:outputText value="# {cc.attrs.someIntegerObjectWithDefault} "/><br/> </cc:implementation> </html> index.xhtml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ezcomp="http://java.sun.com/jsf/composite/ezcomp"> <h:head> <title>Composite component type test</title> </h:head> <h:body> <ezcomp:typeTest someBooleanPrimitive="false" someBooleanObject="false" someIntPrimitive="50" someIntegerObject="100"/> <hr/> <ezcomp:typeTest someBooleanPrimitive="untrue" someBooleanObject="verytrue" someIntPrimitive="500" someIntegerObject="100"/> </h:body> </html>
          Hide
          sergeich added a comment -

          I have the same issue with wrapper types like Boolean and Integer:

          java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: Integer
          at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:277)
          at com.sun.faces.facelets.tag.composite.AttributeHandler.apply(AttributeHandler.java:144)
          at com.sun.faces.facelets.tag.composite.InterfaceHandler.apply(InterfaceHandler.java:122)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
          at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
          at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.createComponentMetadata(FaceletViewHandlingStrategy.java:295)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:980)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:976)
          at com.sun.faces.util.Cache.get(Cache.java:106)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:233)
          at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:937)
          at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.createComponent(CompositeComponentTagHandler.java:162)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:494)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:169)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at com.sun.faces.facelets.tag.composite.ImplementationHandler.apply(ImplementationHandler.java:81)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
          at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
          at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
          at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyCompositeComponent(CompositeComponentTagHandler.java:375)
          at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:188)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:106)
          at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
          at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
          at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
          at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:111)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
          at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
          at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
          at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
          at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
          at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
          at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320)
          at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379)
          at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358)
          at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
          at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
          at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
          at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
          at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:906)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
          at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
          at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
          at java.lang.Thread.run(Thread.java:722)
          Caused by: java.lang.ClassNotFoundException: Integer
          at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
          at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:266)
          at com.sun.faces.util.Util.loadClass(Util.java:273)
          at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:272)
          ... 114 more

          Show
          sergeich added a comment - I have the same issue with wrapper types like Boolean and Integer: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: Integer at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:277) at com.sun.faces.facelets.tag.composite.AttributeHandler.apply(AttributeHandler.java:144) at com.sun.faces.facelets.tag.composite.InterfaceHandler.apply(InterfaceHandler.java:122) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87) at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164) at com.sun.faces.application.view.FaceletViewHandlingStrategy.createComponentMetadata(FaceletViewHandlingStrategy.java:295) at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:980) at com.sun.faces.application.view.FaceletViewHandlingStrategy$2.newInstance(FaceletViewHandlingStrategy.java:976) at com.sun.faces.util.Cache.get(Cache.java:106) at com.sun.faces.application.view.FaceletViewHandlingStrategy.getComponentMetadata(FaceletViewHandlingStrategy.java:233) at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:937) at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.createComponent(CompositeComponentTagHandler.java:162) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:494) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:169) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.tag.composite.ImplementationHandler.apply(ImplementationHandler.java:81) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87) at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164) at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyCompositeComponent(CompositeComponentTagHandler.java:375) at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:188) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:106) at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178) at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395) at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366) at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:111) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87) at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:320) at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:379) at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:358) at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199) at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155) at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87) at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:164) at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:906) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:99) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassNotFoundException: Integer at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:266) at com.sun.faces.util.Util.loadClass(Util.java:273) at com.sun.faces.facelets.tag.composite.PropertyHandlerManager$DefaultPropertyHandler.apply(PropertyHandlerManager.java:272) ... 114 more
          Hide
          Manfred Riem added a comment -

          Note the Object variants of the primitives should be specified using their fully qualified name (java.lang.Integer).

          Show
          Manfred Riem added a comment - Note the Object variants of the primitives should be specified using their fully qualified name (java.lang.Integer).
          Hide
          Manfred Riem added a comment -

          Applied to 2.1 branch,

          svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2846, r=rogerk1, make sure a cc:attribute default value can use the specified type, especially primitives"
          Sending jsf-ri\src\main\java\com\sun\faces\util\Util.java
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveFalse.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveTrue.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveWithDefault.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\boolean.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\booleanWithDefault.xhtml
          Adding test\agnostic\facelets\cc\src\test\java\com\sun\faces\test\agnostic\facelets\composite\Issue2846IT.java
          Transmitting file data .......
          Committed revision 11931.

          Show
          Manfred Riem added a comment - Applied to 2.1 branch, svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2846 , r=rogerk1, make sure a cc:attribute default value can use the specified type, especially primitives" Sending jsf-ri\src\main\java\com\sun\faces\util\Util.java Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveFalse.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveTrue.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveWithDefault.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\boolean.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\booleanWithDefault.xhtml Adding test\agnostic\facelets\cc\src\test\java\com\sun\faces\test\agnostic\facelets\composite\Issue2846IT.java Transmitting file data ....... Committed revision 11931.
          Hide
          Manfred Riem added a comment -

          Applied to 2.2 trunk,

          svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2846, r=rogerk1, make sure a cc:attribute default value can use the specified type, especially primitives"
          Sending jsf-ri\src\main\java\com\sun\faces\util\Util.java
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveFalse.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveTrue.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveWithDefault.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\boolean.xhtml
          Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\booleanWithDefault.xhtml
          Adding test\agnostic\facelets\cc\src\test\java\com\sun\faces\test\agnostic\facelets\composite\Issue2846IT.java
          Transmitting file data .......
          Committed revision 11932.

          Show
          Manfred Riem added a comment - Applied to 2.2 trunk, svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2846 , r=rogerk1, make sure a cc:attribute default value can use the specified type, especially primitives" Sending jsf-ri\src\main\java\com\sun\faces\util\Util.java Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveFalse.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveTrue.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\attributeBooleanPrimitiveWithDefault.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\boolean.xhtml Adding test\agnostic\facelets\cc\src\main\webapp\resources\attributes\booleanWithDefault.xhtml Adding test\agnostic\facelets\cc\src\test\java\com\sun\faces\test\agnostic\facelets\composite\Issue2846IT.java Transmitting file data ....... Committed revision 11932.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              auotila
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: