4 Replies Latest reply on Jul 15, 2010 2:01 PM by Nic Essling

    Issues deploying the sample-portal

    Nic Essling Newbie

      All,

       

      in http://community.jboss.org/wiki/Portalcontainers Thomas Heute described among other things how to deploy the sample portal. It seems to be pretty straight forward given that the portal just needs packaging and deployment. However it does not work for me.

       

      2 issues:

       

      - The first thing I'm wondering about is that Thomas assumes that the conf/login-config.xml has an application policy for the default portal realm as a precondition. I'm running GateIn on JBoss. But in my GateIn\server\default\conf\login-config.xml file there is no element <application-policy name="gatein-domain">. So I'm kind of confused. Thomas also mentioned that besides deploying the sample-portal.ear file the login-config.xml file would have to be updated with an element <application-policy name="gatein-domain-sample-portal"> . So is this still needed and if yes why does the first application-policy not ship with GateIn as default?

       

      - As a second issue I get an error with the DB. GateIn seems to expect a DB name something_portalname, this is why I created jdbcjcr_portal and jdbcidm_portal in the beginning. Now with the new portal called sample-portal it seems to expect a DB something_sample-portal with JNDI name java:gatein-idm_sample-portal. And my originally working DB with JNDI name java:gatein-idm_portal cannot be found and bound anymore. So what is the strategy here? Do 2 portals running as 2 different WARs, i.e. in 2 different portal containers, need 2 different databases? If yes, where and how do I configure this? If no, how do I tell GateIn not to look out for the other DB something_otherPortalName?

        • 1. Re: Issues deploying the sample-portal
          Nic Essling Newbie

          Ok, 2 steps ahead but 1 step back again.

           

          I now followed Fred's post at http://community.jboss.org/wiki/StepsToCreateANewPortalFromSample-Portal and set up a new portal "myportal" that I deployed in addition to the default portal "portal". I can access it, but:

           

          1) the default portal does not work any more. When starting up JBoss I get an error that the datasource that worked fine before could not be found:

           

          19:12:09,940 ERROR [HibernateServiceImpl] gatein-idm_portal not bound
          javax.naming.NameNotFoundException: gatein-idm_portal not bound

          ....

          19:12:12,642 ERROR [DatasourceConnectionProvider] Could not find datasource: java:gatein-idm_portal
          javax.naming.NameNotFoundException: gatein-idm_portal not bound

           

          Why is that?

           

          2) secondly when accessing the new portal via http://localhost:8080/myportal it is tried to access the file /eXoResources/skin/Stylesheet-lt.css which results in an NPE. The page is loaded but with some UI flaws of course. Obviously only the file /eXoResources/skin/Stylesheet.css is there.

           

          So where is the "-lt" in the file name coming from?

           

          In the source code it says

          link id="CoreSkin" rel="stylesheet" type="text/css" href="/eXoResources/skin/Stylesheet-lt.css" 

          Which file renders this part?
          • 2. Re: Issues deploying the sample-portal
            Nic Essling Newbie

            Well, the second issue disappears when I undeploy myportal-extension.ear again. No clue why though. But my other portal is still screwed...

            • 3. Re: Issues deploying the sample-portal
              Thomas Heute Master

              You need to create a database:

              gatein-idm_portal and  gatein-jcr_portal

               

              When you add a new portal, unfortunately the default portal looks for a Database or datasource named <previous_name>_portal.

              This is in order to support previous eXo portal users AFAIK.

              1 of 1 people found this helpful
              • 4. Re: Issues deploying the sample-portal
                Nic Essling Newbie

                Actually I already had the databases jdbcidm_portal and jdbcjcr_portal. What was wrong was the JNDI name. So after deploying the second portal I had to change from

                 

                     <jndi-name>gatein-idm</jndi-name>
                      <connection-url>jdbc:mysql://localhost:3306/jdbcidm_portal</connection-url>
                      <driver-class>com.mysql.jdbc.Driver</driver-class>

                 

                and

                 

                     <jndi-name>gatein-jcr</jndi-name>
                      <connection-url>jdbc:mysql://localhost:3306/jdbcjcr_portal</connection-url>
                      <driver-class>com.mysql.jdbc.Driver</driver-class>

                 

                to

                 

                     <jndi-name>gatein-idm_portal</jndi-name>
                        <connection-url>jdbc:mysql://localhost:3306/jdbcidm_portal</connection-url>
                       <driver-class>com.mysql.jdbc.Driver</driver-class>

                 

                and

                 

                     <jndi-name>gatein-jcr_portal</jndi-name>
                        <connection-url>jdbc:mysql://localhost:3306/jdbcjcr_portal</connection-url>
                       <driver-class>com.mysql.jdbc.Driver</driver-class>

                 

                 

                Now JBoss starts fine. However when I accessed the one portal and wanted to switch to the other, my JBoss crash due to an OutOfMemoryError... But that's probably just my machine.

                 

                 

                So the other question remains open why the portal extension brings issues with the stylesheet. Any ideas?