3 Replies Latest reply on Jul 7, 2010 7:02 AM by shivani chandna

    CAS 3.4.2 on JBoss-5.1.0.GA

    Fons Maathuis Newbie

      Hi All,


      I'm trying to deploy CAS on a JBoss server, but can't get it correctly running on Windows XP fp3


      First I've installed java jdk1.6.0. with an installer, put the JAVA_HOME in my system-environments.


      Then unpacked the JBoss-zip file to D:\, put the JBOSS_HOME in the system-environments. Before starting I've generated a certificate with keytool to $JBOSS_HOME\server\default\keystore\server.keystore.


      Because port 1098 seams to be used (can't find out why) I had to change rmi-port to 10098 by changing $JBOSS_HOME\server\default\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml


      In order to activate ssl I had to change $JBOSS_HOME\server\default\deploy\jbossweb.sar\server.xml; replaced the piece about SSL with this:

      <Connector protocol="HTTP/1.1" SSLEnabled="true" port="8443" address="${jboss.bind.address}" scheme="https" secure="true" clientAuth="false" keystoreFile="${jboss.server.home.dir}/keystore/server.keystore" keystorePass="keypass" sslProtocol = "TLS" />


      Installed JBoss as a service and started it by net start JBAS50SVC. Starts fine, ssl enabled, have access to https://localhost:8443/ with my certificate.


      Then I opened the admin-console to create a datasource for CAS, named CasPersistence. Directing to a DB2 database connecting thru a DB2 personal edition client. Seems to work.


      With all this I tried to install CAS with the admin-console by using 'Add a new resource' on the WebApplication/summary tab. I've used the cas-server-webapp-3.4.2.war file which is included in the cas-server-3.4.2-release.zip file.

      I've changed the content of  $JBOSS_HOME\server \default\deploy\cas-server-webapp-3.4.2.war\WEB-INF\classes\META-INF\persistence.xml (included). In order to get it validated I had to add an extra directory to $JBOSS_HOME named toegevoegd, in which I put the persistence_2_0.xsd.


      I can't get the CAS webapp started because the cas-server-core-3.4.2.jar can't be found. It is in \WEB_INF\lib.


      I've included the logfiles from the server.


      Hope someone has a solution or a set of documentation for JBoss 5.1.0 GA and CAS 3.4.2. All doc's I can find are about older versions.

        • 1. Re: CAS 3.4.2 on JBoss-5.1.0.GA
          shivani chandna Newbie

          The first issue of persistence.xml can be resolved by using a jta specific configuration in persistence.xml file . An example of that is below:



          Second issue related to slf4j is because of multiple bindings for it - (one in common/lib and other server/default/deploy/cas.war/WEB-INF/lib)

          Remove the jars from cas.war/WEB-INF/lib folder (otherwise causing conflict with jboss5 version slf4j jars):





          - Shivani.

          1 of 1 people found this helpful
          • 2. Re: CAS 3.4.2 on JBoss-5.1.0.GA
            Fons Maathuis Newbie

            Thanks Shivani,


            I've tried your suggestions, picked up the persistence.xml, deleted the jar-files and created an oracle ds on my server. Still can't get it to work ok. The server starts ok. CAS however doesn't deploy. I've uploaded the logs and my xml-files default\deploy\cas.war\WEB-INF\classes\META-INF\persistence.xml and \default\deploy\vtregistry-ds.xml. Deploy.log is the logging I get when I try to start CAS.war from the admin-console.

            I must say I don't have much expirience on JBoss, so my definitions may not be complete and correct.


            Hope you can help me again





            • 3. Re: CAS 3.4.2 on JBoss-5.1.0.GA
              shivani chandna Newbie

              There are two things to check for:

              1. Datasource definition is correct :Check this from the admin-console and see if the datasource settings deployed without errors. (From the server.logs this appears to be OK)


              2. The jta-data-source should point to the JNDI name of the database this persistence unit maps to.

              As of now you have in your persistence.xml defined it as <jta-data-source>java:/XAOracleDS</jta-data-source>

              where as it should be <jta-data-source>java:/vtregistry</jta-data-source> as per the above definition.


              Just for additional info:  Set the log file path in log4j.xml in WEB-INF/classes/ for cas.war and increase logging to DEBUG


              - Shivani.