8 Replies Latest reply on Sep 17, 2010 4:44 AM by andrevanzyl

    Jboss Portal Installation 2.7.2 - Newbie Issues

    namrata.hangal

      Hi

      Just started working on Jboss Portal 2.7.2. Facing an issue with the installation. I've configured mysql 5 with the portal. 7 tables have been created in the database. When I start the server again, it displays the 500 internal error() message. I went through other discussions and tried some solutions like changing the java_opts to 512. But nothing seems to be working.

       

      Could anyone help me out with this? I've attached the server log file for reference.

       

      Thanks!

        • 1. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
          piergiorgiolucidi

          I think that you have a problem with the PortalDS, this is the datasource for JBoss Portal.

          You have to check database settings.

          Hope this helps.

          • 2. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
            namrata.hangal

            Hi piergiorgiolucidiPiergiorgio,

             

            Thanks for the response.

            Could you please point out the line in the log file which indicated the problem you suggested?

            I have set Mysql as my DefaultDS and renamed all hsqldb related files. All mysql xml files are in place in jms and deploy folders in server/default. I also changed login-config.xml file as follows:

             

            <?xml version='1.0'?>
            <!DOCTYPE policy PUBLIC
                  "-//JBoss//DTD JBOSS Security Config 3.0//EN"
                  "http://www.jboss.org/j2ee/dtd/security_config.dtd">

             

            <!-- The XML based JAAS login configuration read by the
            org.jboss.security.auth.login.XMLLoginConfig mbean. Add
            an application-policy element for each security domain.

             

            The outline of the application-policy is:
            <application-policy name="security-domain-name">
              <authentication>
                <login-module code="login.module1.class.name" flag="control_flag">
                  <module-option name = "option1-name">option1-value</module-option>
                  <module-option name = "option2-name">option2-value</module-option>
                  ...
                </login-module>

             

                <login-module code="login.module2.class.name" flag="control_flag">
                  ...
                </login-module>
                ...
              </authentication>
            </application-policy>

             

            $Revision: 64598 $

            -->

             

            <policy>
                <!-- Used by clients within the application server VM such as
                mbeans and servlets that access EJBs.
                -->
                <application-policy name = "client-login">
                   <authentication>
                      <login-module code = "org.jboss.security.ClientLoginModule"
                         flag = "required">
                         <!-- Any existing security context will be restored on logout -->
                         <module-option name="restore-login-identity">true</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <!-- Security domain for JBossMQ -->
                <application-policy name = "jbossmq">
                   <authentication>
                      <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
                         flag = "required">
                         <module-option name = "unauthenticatedIdentity">guest</module-option>
                         <module-option name = "dsJndiName">java:/DefaultDS</module-option>
                         <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
                         <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <!-- Security domain for JBossMQ when using file-state-service.xml
                <application-policy name = "jbossmq">
                   <authentication>
                      <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
                         flag = "required">
                         <module-option name = "unauthenticatedIdentity">guest</module-option>
                         <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

                -->

             

                <!-- Security domains for testing new jca framework -->
                <application-policy name = "HsqlDbRealm">
                   <authentication>
                      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
                         flag = "required">
                         <module-option name = "principal">sa</module-option>
                         <module-option name = "userName">sa</module-option>
                         <module-option name = "password"></module-option>
                         <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=HsqlDS</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <application-policy name = "JmsXARealm">
                   <authentication>
                      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
                         flag = "required">
                         <module-option name = "principal">guest</module-option>
                         <module-option name = "userName">guest</module-option>
                         <module-option name = "password">guest</module-option>
                         <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <!-- A template configuration for the jmx-console web application. This
                  defaults to the UsersRolesLoginModule the same as other and should be
                  changed to a stronger authentication mechanism as required.
                -->
                <application-policy name = "jmx-console">
                   <authentication>
                      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                         flag = "required">
                       <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
                       <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <!-- A template configuration for the web-console web application. This
                  defaults to the UsersRolesLoginModule the same as other and should be
                  changed to a stronger authentication mechanism as required.
                -->
                <application-policy name = "web-console">
                   <authentication>
                      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                         flag = "required">
                         <module-option name="usersProperties">web-console-users.properties</module-option>
                         <module-option name="rolesProperties">web-console-roles.properties</module-option>
                      </login-module>
                   </authentication>
                </application-policy>

             

                <!--
                  A template configuration for the JBossWS security domain.
                  This defaults to the UsersRolesLoginModule the same as other and should be
                  changed to a stronger authentication mechanism as required.
                -->
                <application-policy name="JBossWS">
                  <authentication>
                    <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                      flag="required">
                      <module-option name="usersProperties">props/jbossws-users.properties</module-option>
                      <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
                      <module-option name="unauthenticatedIdentity">anonymous</module-option>
                    </login-module>
                  </authentication>
                </application-policy>

             

                <!-- The default login configuration used by any security domain that
                does not have a application-policy entry with a matching name
                -->
                <application-policy name = "other">
                   <!-- A simple server login module, which can be used when the number
                   of users is relatively small. It uses two properties files:
                   users.properties, which holds users (key) and their password (value).
                   roles.properties, which holds users (key) and a comma-separated list of
                   their roles (value).
                   The unauthenticatedIdentity property defines the name of the principal
                   that will be used when a null username and password are presented as is
                   the case for an unuathenticated web client or MDB. If you want to
                   allow such users to be authenticated add the property, e.g.,
                   unauthenticatedIdentity="nobody"
                   -->
                   <authentication>
                      <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
                         flag = "required" />
                   </authentication>
                </application-policy>
               
                <application-policy name = "MySqlDbRealm">   
                  <authentication>      
                <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">         
                  <module-option name = "principal">portal</module-option>         
                  <module-option name = "userName">portal</module-option>         
                  <module-option name ="password">portalpassword</module-option>         
                  <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>      
                </login-module>   
                  </authentication>
                </application-policy>

             

            </policy>

             

             

            Anything else you suggest?

            • 3. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
              piergiorgiolucidi

               

              Here you can see the root of the problem:

               

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.jca:service=DataSourceBinding,name=PortalDS
                State: NOTYETINSTALLED
                Depends On Me:
                  portal:service=Hibernate,type=CMS
                  portal:service=CMS
                  portal:service=Hibernate,type=Workflow
                  portal:service=Hibernate,type=WSRPConsumer
                  portal:service=Hibernate
                  portal:service=Hibernate,type=Instance
                  portal:service=Hibernate,type=PortalObject
                  portal:service=Hibernate,type=Portlet
              This return the following exception for the datasource of the portal:
              2010-07-21 13:50:27,196 ERROR [org.jboss.portal.server.servlet.PortalServlet] Unexpected exception
              java.lang.NullPointerException
              at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:252)
              at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:112)
              at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:81)
              at org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:72)
              at org.jboss.portal.core.controller.Controller.handle(Controller.java:252)
              at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
              at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
              at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
              at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:566)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
              at java.lang.Thread.run(Thread.java:636)
              Hope this helps
              • 4. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
                namrata.hangal

                Hi

                 

                Thanks for the response.

                Actually am totally new to Jboss Portal. Have no idea how to resolve this issue. Been struggling since a couple of days now! Could you please suggest any resolution to this problem?

                • 5. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
                  piergiorgiolucidi

                  Can you share with us the datasource configuration file?

                  • 6. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
                    antoine_h

                    Hello,

                     

                    you also have this exception, before the one saying that the PortalDS datasource service could not be started :

                     

                    2010-07-21 13:49:30,414 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/home/Namrata/Download/Dump/jboss-portal-2.7.2/server/default/deploy/portal-mysql5-ds.xml
                    org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=DefaultDS
                        at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)
                        at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:451)
                        at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
                        at org.jboss.system.ServiceController.install(ServiceController.java:226)
                        at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(De

                     

                     

                    portal-mysql5-ds.xml cannot be deployed.

                     

                    what I guess you have, is :

                    - have another xxxx-ds.xml in the /server/default/deploy folder

                    - in which there is a declaration for the "PortalDS" datasource (with the same name of datasource).

                    - hence, when jboss try to deploy the one declared in the portal-mysql5-ds.xml file, it say "cannot do that..."

                     

                    I guess you have added the portal-mysql5-ds.xml file, to declare the datasource configuration with mysql, but did not deleted the one that was yet there, for hsqldb ?

                     

                    well anyway : the trouble seems to be there are two files that declare the "PortalDS" data source in the deploy folder.

                     

                    if you want to keep some "xxx-ds.xml" saved files (saving some configurations trials), then move them in another folder : such as /server/default/deploy_saved_files

                     

                    *******************

                    also you have this exception in your log file :

                    2010-07-21 13:49:24,256 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/home/Namrata/Download/Dump/jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-wsrp.sar/portal-wsrp.war/
                    org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.UnknownHostException: www.w3.org
                        at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
                        at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
                        at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder.buildMetaData(JAXRPCServerMetaDataBuilder.java:97)
                        at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeploymentAspect.java:56)

                     

                    this is because the portal-wsrp.sar module needs some access to the net, and you might not have it (or have it properly configure for the WSRP feature).

                     

                    you can remove the portal-wsrp.sar folder from your "default/deploy/jboss-portal.sar" folder.

                    this won't make any trouble.

                    you only won't have the WSRP feature... but that is for Remote Portlet Service, that is Portlet that are running on another server... and not necessary to have the default portal working....

                     

                    hope my guess about the datasource config is proper... and it helps you start...

                    Antoine

                    JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.

                    http://www.sysemo.com/Sysemo-expertise-portails-jboss-portal.php

                    • 7. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
                      namrata.hangal

                      There is a JIRA associated with this

                      https://jira.jboss.org/browse/JBPORTAL-533

                      • 8. Re: Jboss Portal Installation 2.7.2 - Newbie Issues
                        andrevanzyl

                        Hi Namrata

                         

                        I also had some trouble installing and configuring JBoss Portal at the start. Follow these steps and should be fine.

                        1.     Create your database schema called jbossportal

                        2.     Create you portal-mysql5-ds.xml file as follows:

                         

                        <datasources>
                          <local-tx-datasource>
                            <jndi-name>PortalDS</jndi-name>
                            <connection-url>jdbc:mysql://localhost:3306/jbossportal?jbossportal?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false</connection-url>
                            <driver-class>com.mysql.jdbc.Driver</driver-class>
                            <user-name>root</user-name>
                            <password>root</password>
                            <min-pool-size>5</min-pool-size>
                            <max-pool-size>20</max-pool-size>
                            <metadata>
                              <type-mapping>MySQL</type-mapping>
                            </metadata>
                          </local-tx-datasource>
                        </datasources>

                         

                        3.     Make sure to copy your mysql-connector-java-5.1.8-bin.jar (or applicable the applicable version) file into you lib directory

                        4.     Start your portal server

                        5.     Deploy your jboss-portal.sar file into the /server/<portal>/deploy directory

                        6.     You will notice some exception messages and "table not found" errors during the deployment but do not worry about that

                        7.     After the server started successfully, stop and start it again and the portal server should start up without any errors

                         

                        You should now be able to access the portal http://localhost:8080/portal. I am running portal 2.7.2 with jboss 4.2.3 and mysql 5.1