5 Replies Latest reply on Jan 23, 2007 3:44 AM by theute

    isolating portal from others ear application

      hello,

      i have a classloader issu when i deploy a jsf ear application and jboss portal.
      i saw in the wiki : http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

      do i have to add this:

      <jboss-app>
      <loader-repository>
      dot.com:loader=unique-archive-name
      </loader-repository>
      </jboss-app>


      in any earapp/META-INF/jboss-app.xml files ?

      i modified the ear-deployer like this:


      <server>
      <!-- EAR deployer, remove if you are not using ear deployments -->
      <mbean code="org.jboss.deployment.EARDeployer"
      name="jboss.j2ee:service=EARDeployer">
      <!-- A flag indicating if ear deployments should have their own scoped
      class loader to isolate their classes from other deployments.
      -->
      <attribute name="Isolated">true</attribute>
      <!-- A flag indicating if the ear components should have in VM call
      optimization disabled.
      -->
      <attribute name="CallByValue">true</attribute>
      </mbean>
      </server>


      but i still have the error when i deploy the ear with jbp:

      17:10:25,318 ERROR [StartupServletContextListener] Error initializing ServletContext
      java.lang.ClassCastException: com.sun.facelets.component.RepeatRenderer
       at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:610)
       at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:145)
       at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:66)
       at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:49)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)


      best regards

        • 1. Re: isolating portal from others ear application

          ear-deployer :

          <server>
           <!-- EAR deployer, remove if you are not using ear deployments -->
           <mbean code="org.jboss.deployment.EARDeployer"
           name="jboss.j2ee:service=EARDeployer">
           <!-- A flag indicating if ear deployments should have their own scoped
           class loader to isolate their classes from other deployments.
           -->
           <attribute name="Isolated">true</attribute>
           <!-- A flag indicating if the ear components should have in VM call
           optimization disabled.
           -->
           <attribute name="CallByValue">true</attribute>
           </mbean>
          </server>


          • 2. Re: isolating portal from others ear application

            up

            a jsf ear app with jsf.facelets,jbseam, jbpm, ajax doesn't deploy if the portal is in the AS :p

            17:10:25,318 ERROR [StartupServletContextListener] Error initializing ServletContext
            java.lang.ClassCastException: com.sun.facelets.component.RepeatRenderer
             at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:610)
             at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:145)
             at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.
            java:66)
             at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContext
            Listener.java:49)
             at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)



            help wanted ^^

            • 3. Re: isolating portal from others ear application

              the problem comes form
              jsf-facelets.jar and jsf-example.jar.

              in portal-core/web-inf/faces-config :

              <application>
               <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
               <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
               </application>


              can you explain this please ? what do you do with it ?

              thanks

              best regards,


              • 4. Re: isolating portal from others ear application
                antoine_h

                Hello,
                I am also wondering what this is for ?
                Thank you

                • 5. Re: isolating portal from others ear application
                  theute

                  Either you isolate your applications *or* you use the same libraries. You can share your libraries by putting them in server/default/lib and only at this place.