9 Replies Latest reply on May 25, 2009 6:28 AM by Thomas Heute

    Jboss portal on JBoss AS5

    Søren Hilmer Newbie

      Ups, I accidentially posted this in the wrong forum, sorry.

      Hi

      I successfully deployed Jboss portal using the instructions on:
      http://www.jboss.org/community/wiki/JBossPortalonAS5%3Bjsessionid=8BAD177F51EE170F8EF2B2F2F3E5485E

      But then I changed to JBoss AS 5.1.0CR1
      and I get this at runtime.

      21:17:08,408 ERROR [AbstractKernelController] Error installing to Start: name=portal:service=IdentityUIConfigurationService,type=IdentityUI state=Create mode=Manual requiredState=Installed
      org.jboss.portal.core.identity.services.metadata.CoreIdentityConfigurationException: Could not parse configuration file.
      at org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationServiceImpl.createConfiguration(IdentityUIConfigurationServiceImpl.java:340)
      at org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationServiceImpl.startService(IdentityUIConfigurationServiceImpl.java:135)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
      at org.jboss.portal.jems.as.system.AbstractJBossService.start(AbstractJBossService.java:73)
      at sun.reflect.GeneratedMethodAccessor316.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.portal.jems.as.system.JBossServiceModelMBean$ServiceMixin.execute(JBossServiceModelMBean.java:486)
      at org.jboss.portal.jems.as.system.JBossServiceModelMBean$ServiceMixin.startService(JBossServiceModelMBean.java:452)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
      at org.jboss.portal.jems.as.system.JBossServiceModelMBean$6.invoke(JBossServiceModelMBean.java:374)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      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.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:216)
      at org.jboss.Main$1.run(Main.java:546)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: overwrite-workflow cannot appear in this position. Expected content of identity-ui-configuration is choice: subscription-mode admin-subscription-mode overwrite-workflow email-domain email-from password-generation-characters default-roles ui-components
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:183)
      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
      at org.jboss.portal.core.identity.services.metadata.IdentityUIConfigurationServiceImpl.createConfiguration(IdentityUIConfigurationServiceImpl.java:332)
      ... 72 more
      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: overwrite-workflow cannot appear in this position. Expected content of identity-ui-configuration is choice: subscription-mode admin-subscription-mode overwrite-workflow email-domain email-from password-generation-characters default-roles ui-components
      at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:449)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
      ... 75 more


      Any clues?

      Does anybody know here now the timeframe for migrating JBossPortal to JBAS 5.1?

      Best regards
      Soren

        • 2. Re: Jboss portal on JBoss AS5
          Søren Hilmer Newbie

          Yes, the explanation provided by the link you sent is exactly what I have used.
          And everything is fine on JBoss AS 5.1.0 Beta1 but gives the above error using JBoss AS 5.1.0 CR1

          --Soren

          • 3. Re: Jboss portal on JBoss AS5
            Matt Wringe Master

            oh, ok, so its a problem when using AS 5.1.0 CR1 :(

            • 4. Re: Jboss portal on JBoss AS5
              Emanuel Muckenhuber Master

              for CR1 you could add the -Dxb.builder.useUnorderedSequence=true flag. This will be the default for 5.1.0.GA

              • 5. Re: Jboss portal on JBoss AS5
                Matt Wringe Master

                For CR1 the -Dxb.builder.useUnorderedSequence=true is already set.

                The issue appears to be that an xsd file is setup wrong and that its using a choice when it really wants multiple options. It appears that this is now being enforced in 5.1 when it hasn't in the past.

                XSD in question:
                http://anonsvn.jboss.org/repos/portal/branches/JBoss_Portal_Branch_2_7_AS5/core-identity/src/resources/portal-identity-sar/conf/schema/identity-ui-configuration.xsd

                And xml file which is causing issues:
                http://anonsvn.jboss.org/repos/portal/branches/JBoss_Portal_Branch_2_7_AS5/core-identity/src/resources/portal-identity-sar/conf/identity-ui-configuration.xml

                The xml tag in question is <identity-ui-configuration>

                • 6. Re: Jboss portal on JBoss AS5
                  Emanuel Muckenhuber Master

                   

                  "mwringe" wrote:
                  For CR1 the -Dxb.builder.useUnorderedSequence=true is already set.

                  The issue appears to be that an xsd file is setup wrong and that its using a choice when it really wants multiple options. It appears that this is now being enforced in 5.1 when it hasn't in the past.

                  Indeed the choice in the xsd does not make sense, and looks like i'm also the one to blame ;)

                  • 7. Re: Jboss portal on JBoss AS5
                    Søren Hilmer Newbie

                    Thanks for the pointer.
                    I have changed the xsd (see below). I do not know if this is as intended, but now deployment works for me on CR1 :-)

                    --Soren

                    <?xml version="1.0"?>
                    <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                     ~ JBoss, a division of Red Hat ~
                     ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
                     ~ contributors as indicated by the @authors tag. See the ~
                     ~ copyright.txt in the distribution for a full listing of ~
                     ~ individual contributors. ~
                     ~ ~
                     ~ This is free software; you can redistribute it and/or modify it ~
                     ~ under the terms of the GNU Lesser General Public License as ~
                     ~ published by the Free Software Foundation; either version 2.1 of ~
                     ~ the License, or (at your option) any later version. ~
                     ~ ~
                     ~ This software is distributed in the hope that it will be useful, ~
                     ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
                     ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
                     ~ Lesser General Public License for more details. ~
                     ~ ~
                     ~ You should have received a copy of the GNU Lesser General Public ~
                     ~ License along with this software; if not, write to the Free ~
                     ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
                     ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
                    
                    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                     xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
                     elementFormDefault="qualified">
                    
                    <xsd:element name="identity-ui-configuration">
                     <xsd:complexType>
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:class impl="org.jboss.portal.core.identity.services.metadata.IdentityUIConfiguration"/>
                     </xsd:appinfo>
                     </xsd:annotation>
                    
                     <xsd:sequence>
                     <!-- User portlet and user management portlet preferences -->
                     <xsd:element name="subscription-mode" type="subscriptionMode" default="jbp_identity_validation_workflow"/>
                     <xsd:element name="admin-subscription-mode" minOccurs="0" maxOccurs="1" type="subscriptionMode" default="automatic"/>
                     <xsd:element name="overwrite-workflow" type="xsd:boolean" default="false"/>
                     <xsd:element name="email-domain" minOccurs="1" maxOccurs="1" type="xsd:string" default="example.com" />
                     <xsd:element name="email-from" minOccurs="1" maxOccurs="1" type="xsd:string" default="no-reply@example.com" />
                     <xsd:element name="password-generation-characters" minOccurs="1" maxOccurs="1" type="xsd:string"/>
                     <xsd:element name="default-roles" type="defaultRoles" minOccurs="1" maxOccurs="1"/>
                    
                     <!-- user interface components -->
                     <xsd:element name="ui-components" minOccurs="1" maxOccurs="1">
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:class impl="java.util.HashMap"/>
                     </xsd:appinfo>
                     </xsd:annotation>
                     <xsd:complexType>
                     <xsd:sequence>
                     <xsd:element name="ui-component" minOccurs="1" maxOccurs="unbounded" type="UIComponent" />
                     </xsd:sequence>
                     </xsd:complexType>
                     </xsd:element>
                     <!-- end: user interface components -->
                     </xsd:sequence>
                     </xsd:complexType>
                    </xsd:element>
                    
                    <!-- restictions for subscription-modes -->
                    
                    <xsd:simpleType name="subscriptionMode">
                     <xsd:restriction base="xsd:string">
                     <xsd:enumeration value="custom" />
                     <xsd:enumeration value="automatic" />
                     <xsd:enumeration value="jbp_identity_validation_workflow" />
                     <xsd:enumeration value="jbp_identity_validation_approval_workflow" />
                     </xsd:restriction>
                    </xsd:simpleType>
                    
                    <xsd:complexType name="defaultRoles">
                     <xsd:sequence>
                     <xsd:element name="role" minOccurs="1" type="xsd:string" maxOccurs="unbounded"/>
                     </xsd:sequence>
                    </xsd:complexType>
                    
                    <xsd:complexType name="validators">
                     <xsd:sequence>
                     <xsd:element name="validator" minOccurs="1" type="xsd:string" maxOccurs="unbounded"/>
                     </xsd:sequence>
                    </xsd:complexType>
                    
                    <xsd:complexType name="componentValues">
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:mapEntry nonNullValue="true"/>
                     </xsd:appinfo>
                     </xsd:annotation>
                     <xsd:choice minOccurs="1" maxOccurs="1">
                     <xsd:element name="value" maxOccurs="unbounded">
                     <xsd:complexType>
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:mapEntry/>
                     <jbxb:characters>
                     <jbxb:mapEntryValue/>
                     </jbxb:characters>
                     </xsd:appinfo>
                     </xsd:annotation>
                     <xsd:simpleContent>
                     <xsd:extension base="xsd:string">
                     <xsd:attribute name="key" type="xsd:string">
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:mapEntryKey/>
                     </xsd:appinfo>
                     </xsd:annotation>
                     </xsd:attribute>
                     </xsd:extension>
                     </xsd:simpleContent>
                     </xsd:complexType>
                     </xsd:element>
                     </xsd:choice>
                    </xsd:complexType>
                    
                    <xsd:complexType name="UIComponent">
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:mapEntry impl="org.jboss.portal.core.identity.services.metadata.UIComponentConfiguration" getKeyMethod="getName" setKeyMethod="setName" />
                     </xsd:appinfo>
                     </xsd:annotation>
                     <xsd:sequence>
                     <xsd:element name="property-ref" maxOccurs="1" minOccurs="1" type="xsd:string" />
                     <xsd:element name="localization-bundle" type="xsd:string" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="validators" type="validators" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="converter" type="xsd:string" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="required" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="read-only" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
                     <xsd:element name="values" type="componentValues" minOccurs="0" maxOccurs="1">
                     <xsd:annotation>
                     <xsd:appinfo>
                     <jbxb:class impl="java.util.HashMap"/>
                     </xsd:appinfo>
                     </xsd:annotation>
                     </xsd:element>
                     </xsd:sequence>
                     <!-- attribute name -->
                     <xsd:attribute name="name" type="xsd:string" use="required" />
                    </xsd:complexType>
                    
                    </xsd:schema>
                    


                    • 9. Re: Jboss portal on JBoss AS5
                      Thomas Heute Master

                      Instead of 'sequence' I've used 'all' which doesn't mind the order.
                      The descriptor shipped with JBoss Portal wouldn't have parsed otherwise. It's better for backward compatibility.