13 Replies Latest reply: Jun 20, 2011 8:23 AM by Michal Vanco RSS

Custom portal container with custom portal

Jacek Bukowski Newbie

Hi,

I am trying to create a custom portal. I am basing on the gatein-sample-portal.ear provided with GateIn. I created following structure:

  • portal-config.ear
    • portal-config.jar
      • conf/configuration.xml  (here is plugin org.exoplatform.container.definition.PortalContainerDefinitionPlugin)
    • portal-config.war
      • WEB-INF/conf/configuration.xml (here  only import  war:/conf/sample-portal1/portal/portal-configuration.xml)
      • WEB-INF/conf/sample-portal1/portal/portal-configuration.xml - here is plugin org.exoplatform.portal.config.NewPortalConfigListener
      • WEB-INF/conf/sample-portal1/portal/myportal/portal.xml with portal config

 

In WEB-INF/conf/sample-portal1/portal/portal-configuration.xml there is following init-param:

<object-param>

                                                  <name>portal.configuration</name>

                                                  <description>description</description>

                                                  <object type="org.exoplatform.portal.config.NewPortalConfig">

                                                            <field name="predefinedOwner">

                                                                      <collection type="java.util.HashSet">

                                                                                <value>

                                                                                          <string>myportal</string>

                                                                                </value>

                                                                      </collection>

                                                            </field>

                                                            <field name="ownerType">

                                                                      <string>portal</string>

                                                            </field>

                                                            <field name="templateLocation">

                                                                      <string>war:/conf/sample-portal1/portal</string>

                                                            </field>

                                                  </object>

</object-param>

 

And in WEB-INF/conf/sample-portal1/portal/myportal/portal.xml:

<portal-config

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"

    xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">

  <portal-name>myportal</portal-name>

  <locale>en</locale>

  <access-permissions>Everyone</access-permissions>

  <edit-permission>*:/platform/administrators</edit-permission>

  <properties>

    <entry key="sessionAlive">onDemand</entry>

  </properties>

           <portal-layout>

        <page-body> </page-body>

  </portal-layout>

</portal-config>

 

 

I logs during GateIn start I can see, that the sample-portal1 container is created:

09:52:26,266 INFO  [RootContainer] Trying to create the portal container 'sample-portal1'
....
09:52:46,158 INFO  [PortalController] The WebAppController has been successfully initialized for the portal 'sample-portal1'

 

I would expect now, that myportal is now available like this: http://localhost:8080/portal/public/myportal. But the portal does not exists. Also is not listed in the list of portals when I log in to classic portal as root. Can anyone put some light on it?

  • 1. Custom portal container with custom portal
    Michal Vanco Newbie

    Hi,

     

    I think you should have a look at this document: http://community.jboss.org/wiki/Createanewportalusingextension because it contains exactly what you are looking for.

     

    I think that your problem is that you have incorrect directories structure and name of container you are extending.

     

    If you want to extend default container 'portal', then you have to specify it at your portal-config.jar/conf/configuration.xml.

    And then your portal-configuration.xml have to be in this folder: WEB-INF/conf/portal/portal

     

    Or if you want to create new portal container with new portal, then you should check this document: http://community.jboss.org/wiki/Createanewportalcontainerusingextension

     

    Hope this helps

     

    Michal Vančo

  • 2. Custom portal container with custom portal
    Minh Hoang TO Novice

    Try to browse to localhost:8080/sample-portal1/....

  • 3. Custom portal container with custom portal
    Jacek Bukowski Newbie

    Michal, Minh thank you for quick reply. Indeed, I was checknig ../portal instead of .../sample-portal1 context. Funny, but http://community.jboss.org/wiki/Createanewportalcontainerusingextension is the only place I saw, where it is clear mentioned that portal container related to the context, the portal is accessible. Previously I was working with JBoss Portal and there (as far as i know) there is no way to change /portal context (except deploying the portal application to that context).

     

    Thanks one again. I spent so much time on it and I had a feeling that I had to miss some stupid detail

  • 4. Re: Custom portal container with custom portal
    Asif Akram Newbie

    Hi Michal,

     

    I followed your tutorial "how to create new portal at existing portal container" and it worked and I can access the portal at URL http://localhost:8080/portal/private/newPortal.

     

    But when I tried the instructions "Create a new portal container using extension", the server throws exception at startup:

    ERROR [[/myportal]] Exception starting filter PortalContainerFilter

    java.lang.ClassNotFoundException: org.exoplatform.container.web.PortalContainerFilter

     

    Any idea what I may be doing wrong.

     

    Cheers

  • 5. Re: Custom portal container with custom portal
    Michal Vanco Newbie

    Hi Asif,

     

    I've just verified sample portal container project from http://anonsvn.jboss.org/repos/qa/portal/portal-container-extension and it works fine on my side.

    Which version of GateIn are you using? Did you extend this sample project or did you start from scratch?

    In current project you have to change only PortalLoginController class in web.xml to org.exoplatform.web.security.PortalLoginController (was: org.exoplatform.web.login.PortalLoginController) - only if you are using GateIn and not EPP 5.

    I didn't see any error on startup and I've accessed portal at http://localhost:8080/myportal .

     

    Let me know if you have some progress or additional questions.

    Regards,

    Michal Vančo, JBoss QA

  • 6. Re: Custom portal container with custom portal
    Asif Akram Newbie

    Hi Michal,

     

       Thanks for the quick reply. I am using GateIn-3.1.0-GA. Default portal (classic) works and I have changed nothing for that portal. I downloaded the maven project porta-container-extension executed "mvn clean install" command. There is no exception or warning from maven. Then I copied the myportal-ds.xml and portal-container-extension-ear.ear in the deploy directory. I haven't even changed the name for new portal container server. I have tried few times but very time it throws the same exception "java.lang.ClassNotFoundException: org.exoplatform.container.web.PortalContainerFilter".

     

    I can see PortalContainerFilter mentioned in web.xml of portal-container-extension-war.war but it is not mentioned in web.xml for potal-extension-war.war. I commented out the PortalContainerFilter from the web.xml in portal-container-extension-war/src/main/webapp/WEB-INF/ and rebuild the project. Now the server doesn't complain at startup but when I try to access the portal at http://localhost:8080/myportal it throws NullPointerException.

     

    Am I missing any step. May I need to add jar file with the corresponding lib directory of the server?

     

    Cheers

    Asif

  • 7. Re: Custom portal container with custom portal
    Minh Hoang TO Novice

    Could you post the web.xml of your sample portal 's .war?

     

    If you aim to create a new portal container myportal, make sure that there is declaration

     

     

    <listener>

            <listener-class>org.exoplatform.web.GenericHttpListener</listener-class>

        </listener>

     

     

     

    Which version of GateIn are u working on?

  • 8. Re: Custom portal container with custom portal
    Michal Vanco Newbie

    Hi Asif,

     

    it seems I've found a solution for you with GateIn 3.1.0.GA.

    Remove web.xml from portal-container-extension-war/src/main/webapp/WEB-INF and use this one instead:

    https://svn.jboss.org/repos/gatein/portal/tags/3.1.0-GA/web/portal/src/main/webapp/WEB-INF/web.xml (it's web.xml for default portal container for correct GateIn version).

    Only change display-name, servlet-name and servlet-mapping from "portal" to "myportal".

     

    I've just verified with GateIn 3.1 and changed extension and it works fine.

     

    The problem is that in extension project you've checkouted from svn is newer version of web.xml.

     

    I hope this will help.

     

    Best regards,

    Michal Vančo, JBoss QA

  • 9. Re: Custom portal container with custom portal
    Asif Akram Newbie

    Hi Michal, 

     

      Sorry for being late in responding. I can't access the web.xml due to authentication. I just checked out the revision 2250 and the exception I am getting is:

    11:57:55,607 ERROR [[/myportal]] Exception starting filter PortalContainerFilter

    java.lang.ClassNotFoundException: org.exoplatform.container.web.PortalContainerFilter

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:262)

        at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)

        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:220)

        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)

        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)

        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

        at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

        at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

        at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

        at $Proxy38.start(Unknown Source)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

        at org.jboss.system.ServiceController.start(ServiceController.java:460)

        at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

        at org.jboss.Main.boot(Main.java:221)

        at org.jboss.Main$1.run(Main.java:556)

        at java.lang.Thread.run(Thread.java:662)

    11:57:55,636 ERROR [StandardContext] Error filterStart

    11:57:55,636 ERROR [StandardContext] Context [/myportal] startup failed due to previous errors

    11:57:55,637 WARN  [portal:GenericHttpListener] Cannot broadcast the event 'org.exoplatform.web.GenericHttpListener.contextDestroyed'

    java.lang.NullPointerException

        at org.exoplatform.web.GenericHttpListener.broadcast(GenericHttpListener.java:216)

        at org.exoplatform.web.GenericHttpListener.contextDestroyed(GenericHttpListener.java:143)

        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3949)

        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4615)

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4437)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

        at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

        at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

        at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

        at $Proxy38.start(Unknown Source)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

        at org.jboss.system.ServiceController.start(ServiceController.java:460)

        at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

        at org.jboss.Main.boot(Main.java:221)

        at org.jboss.Main$1.run(Main.java:556)

        at java.lang.Thread.run(Thread.java:662)

    11:57:55,642 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/myportal state=Create mode=Manual requiredState=Installed

    org.jboss.deployers.spi.DeploymentException: URL file:/opt/server/GateIn-3.1.0-GA/server/default/tmp/3j011-od2bt7-gp5b98vw-1-gp5bae4t-a9/portal-container-extension-war.war/ deployment failed

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

        at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

        at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

        at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

        at $Proxy38.start(Unknown Source)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

        at org.jboss.system.ServiceController.start(ServiceController.java:460)

        at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

        at org.jboss.Main.boot(Main.java:221)

        at org.jboss.Main$1.run(Main.java:556)

        at java.lang.Thread.run(Thread.java:662)

    11:57:55,673 INFO  [TomcatDeployment] undeploy, ctxPath=/myrest

    11:57:55,725 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/server/GateIn-3.1.0-GA/server/default/deploy/portal-container-extension-ear.ear/ state=PreReal mode=Manual requiredState=Real

    org.jboss.deployers.spi.DeploymentException: URL file:/opt/server/GateIn-3.1.0-GA/server/default/tmp/3j011-od2bt7-gp5b98vw-1-gp5bae4t-a9/portal-container-extension-war.war/ deployment failed

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)

        at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

        at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

        at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

        at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

        at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

        at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

        at $Proxy38.start(Unknown Source)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

        at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

        at org.jboss.system.ServiceController.start(ServiceController.java:460)

        at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

        at org.jboss.Main.boot(Main.java:221)

        at org.jboss.Main$1.run(Main.java:556)

        at java.lang.Thread.run(Thread.java:662)

     

    The web.xml for the project is:

    <?xml version="1.0" encoding="ISO-8859-1" ?>

     

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

                     "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>

        <display-name>myportal</display-name>

     

        <!-- ================================================================== -->

        <!--   RESOURCE FILTER TO CACHE MERGED JAVASCRIPT AND CSS               -->

        <!-- ================================================================== -->

        <filter>

            <filter-name>GenericFilter</filter-name>

            <filter-class>org.exoplatform.web.filter.GenericFilter</filter-class>

        </filter>

        <filter>

            <filter-name>ResourceRequestFilter</filter-name>

            <filter-class>org.exoplatform.portal.application.ResourceRequestFilter</filter-class>

        </filter>

     

        <filter>

            <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>

            <filter-class>org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter</filter-class>

        </filter>

     

        <filter>

            <filter-name>SetCurrentIdentityFilter</filter-name>

            <filter-class>org.exoplatform.services.security.web.SetCurrentIdentityFilter</filter-class>

        </filter>

     

        <filter>

            <filter-name>RestEncodingFilter</filter-name>

            <filter-class>org.exoplatform.services.rest.servlet.RestEncodingFilter</filter-class>

            <init-param>

                <param-name>REQUEST_ENCODING</param-name>

                <param-value>UTF-8</param-value>

            </init-param>

        </filter>

     

        <filter>

            <filter-name>CacheUserProfileFilter</filter-name>

            <filter-class>org.exoplatform.web.CacheUserProfileFilter</filter-class>

        </filter>

      <filter>

             <filter-name>PortalContainerFilter</filter-name>

             <filter-class>org.exoplatform.container.web.PortalContainerFilter</filter-class>

      </filter> 

     

       <filter-mapping>

            <filter-name>PortalContainerFilter</filter-name>

            <url-pattern>/*</url-pattern>

      </filter-mapping>

        <filter-mapping>

            <filter-name>GenericFilter</filter-name>

            <url-pattern>/*</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ResourceRequestFilter</filter-name>

            <url-pattern>*.css</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ResourceRequestFilter</filter-name>

            <url-pattern>*.gif</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ResourceRequestFilter</filter-name>

            <url-pattern>*.png</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ResourceRequestFilter</filter-name>

            <url-pattern>*.jpg</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ResourceRequestFilter</filter-name>

            <url-pattern>/javascript/*</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>SetCurrentIdentityFilter</filter-name>

            <url-pattern>/*</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>CacheUserProfileFilter</filter-name>

            <url-pattern>/*</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>RestEncodingFilter</filter-name>

            <url-pattern>/rest/*</url-pattern>

        </filter-mapping>

     

        <filter-mapping>

            <filter-name>ThreadLocalSessionProviderInitializedFilter</filter-name>

            <url-pattern>/*</url-pattern>

        </filter-mapping>

     

        <!-- ================================================================== -->

        <!--           LISTENER                                                 -->

        <!-- ================================================================== -->

        <listener>

            <listener-class>org.exoplatform.web.GenericHttpListener</listener-class>

        </listener>

        <listener>

            <listener-class>org.exoplatform.portal.application.PortalSessionListener</listener-class>

        </listener>

        <listener>

            <listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>

        </listener>

        <!-- ================================================================== -->

        <!--           SERVLET                                                  -->

        <!-- ================================================================== -->

        <servlet>

            <servlet-name>portal</servlet-name>

            <servlet-class>org.exoplatform.portal.application.PortalController</servlet-class>

            <init-param>

                <param-name>webui.configuration</param-name>

                <param-value>app:/WEB-INF/webui-configuration.xml</param-value>

            </init-param>       

            <load-on-startup>1</load-on-startup>

        </servlet>

     

        <servlet>

            <servlet-name>RestServer</servlet-name>

            <description>eXo - Platform REST Server</description>

            <servlet-class>org.exoplatform.services.rest.servlet.RestServlet</servlet-class>

            <load-on-startup>4</load-on-startup>

        </servlet>

     

        <servlet>

            <servlet-name>javascript</servlet-name>

            <servlet-class>org.exoplatform.portal.webui.javascript.JavascriptServlet</servlet-class>

        </servlet>

     

        <servlet>

            <servlet-name>Controller</servlet-name>

            <servlet-class>org.exoplatform.frameworks.jcr.web.CommandControllerServlet</servlet-class>

            <load-on-startup>1</load-on-startup>

        </servlet>

     

        <servlet>

            <servlet-name>PortalLoginController</servlet-name>

            <servlet-class>org.exoplatform.web.login.PortalLoginController</servlet-class>

        </servlet>

        <servlet>

            <servlet-name>InitiateLoginServlet</servlet-name>

            <servlet-class>org.exoplatform.web.login.InitiateLoginServlet</servlet-class>

        </servlet>

        <servlet>

            <servlet-name>ErrorLoginServlet</servlet-name>

            <servlet-class>org.exoplatform.web.login.ErrorLoginServlet</servlet-class>

        </servlet>

     

        <servlet>

            <servlet-name>GateInServlet</servlet-name>

            <servlet-class>org.gatein.wci.api.GateInServlet</servlet-class>

            <load-on-startup>0</load-on-startup>

        </servlet>

     

        <!--  =================================================================  -->

        <servlet-mapping>

            <servlet-name>InitiateLoginServlet</servlet-name>

            <url-pattern>/initiatelogin</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>ErrorLoginServlet</servlet-name>

            <url-pattern>/errorlogin</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>PortalLoginController</servlet-name>

            <url-pattern>/login</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>javascript</servlet-name>

            <url-pattern>/javascript/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>portal</servlet-name>

            <url-pattern>/private/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>portal</servlet-name>

            <url-pattern>/public/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>portal</servlet-name>

            <url-pattern>/admin/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>portal</servlet-name>

            <url-pattern>/service</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

          <servlet-name>portal</servlet-name>

          <url-pattern>/upload/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

          <servlet-name>portal</servlet-name>

          <url-pattern>/download/*</url-pattern>

        </servlet-mapping>

        <servlet-mapping>

            <servlet-name>RestServer</servlet-name>

            <url-pattern>/rest/*</url-pattern>

        </servlet-mapping>

     

        <servlet-mapping>

            <servlet-name>Controller</servlet-name>

            <url-pattern>/connector</url-pattern>

        </servlet-mapping>

     

        <servlet-mapping>

            <servlet-name>GateInServlet</servlet-name>

            <url-pattern>/gateinservlet</url-pattern>

        </servlet-mapping>

     

        <!-- The Welcome File List for IBM WebSphere -->

     

        <welcome-file-list>

            <welcome-file>/index.jsp</welcome-file>

        </welcome-file-list>

     

        <security-constraint>

            <web-resource-collection>

                <web-resource-name>user authentication</web-resource-name>

                <url-pattern>/private/*</url-pattern>

                <http-method>POST</http-method>

                <http-method>GET</http-method>

            </web-resource-collection>

            <auth-constraint>

                <role-name>users</role-name>

            </auth-constraint>

            <user-data-constraint>

                <transport-guarantee>NONE</transport-guarantee>

            </user-data-constraint>

        </security-constraint>

        <security-constraint>

            <web-resource-collection>

                <web-resource-name>admin authentication</web-resource-name>

                <url-pattern>/admin/*</url-pattern>

                <http-method>POST</http-method>

                <http-method>GET</http-method>

            </web-resource-collection>

            <auth-constraint>

                <role-name>admin</role-name>

            </auth-constraint>

            <user-data-constraint>

                <transport-guarantee>NONE</transport-guarantee>

            </user-data-constraint>

        </security-constraint>

        <login-config>

            <auth-method>FORM</auth-method>

            <realm-name>my-gatein-domain</realm-name>

            <form-login-config>

                <form-login-page>/initiatelogin</form-login-page>

                <form-error-page>/errorlogin</form-error-page>

            </form-login-config>

        </login-config>

        <security-role>

            <description>a simple user role</description>

            <role-name>users</role-name>

        </security-role>

        <security-role>

            <description>the admin role</description>

            <role-name>admin</role-name>

        </security-role>

    </web-app>

     

    I am using the latest GateIn 3.1 FINAL version with JBoss AS 5.1.0. Once again thanks for the help.

     

    Cheers

    Asif

  • 10. Re: Custom portal container with custom portal
    Asif Akram Newbie

    Hi Michal,

     

       Which version of GateIn portal I should be using with the latest portal extension project. I don't mind changing the version of Portal Container.

     

    Cheers

    Asif

  • 11. Re: Custom portal container with custom portal
    Michal Vanco Newbie

    Hi Asif,

     

    sorry I've added wrong link, you should be able to access web.xml in public svn:

     

    http://anonsvn.jboss.org/repos/gatein/portal/tags/3.1.0-GA/web/portal/src/main/webapp/WEB-INF/web.xml

     

    (put this web.xml in portal container extension and rename above mentioned elements)

     

    Let me know if it works.

     

    Regards, Michal Vančo

  • 12. Re: Custom portal container with custom portal
    Asif Akram Newbie

    Hi Michal,

     

       Thanks for the help. Replacing the old web.xml and updating the web.xml with new portal name did the trick.    Which version of GateIn portal I should be using with the latest portal extension project. I don't mind changing the version of Portal Container.

     

    Cheers

    Asif

  • 13. Re: Custom portal container with custom portal
    Michal Vanco Newbie

    Asif, the portal extension project was done for JBoss EPP 5.1 (released on December 2010) and I'm not sure where exactly was this difference with PortalContainerFilter added in GateIn.

    I think you should be fine with what you have (Gatein 3.1) and you can update to GateIn 3.2 when it's out. It's up to you.

     

    Regards, Michal Vančo