AnsweredAssumed Answered

Jboss 3.1 Enterprise installation

Question asked by alnogo on Nov 12, 2009
Latest reply on Mar 25, 2010 by decla
Hi,

I have been following the steps setout at this page, to install alfresco enterprise 3.1 in jboss 4.2.3

http://wiki.alfresco.com/wiki/Deploying_WAR_JBoss

My machine is configured as so:

jboss 4.2.3
mysql 5.0
java jdk 1.6

My jboss specific configurations are :

jboss/default/deploy/mysql-ds.xml


<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>alfresco-datasource</jndi-name>
     <connection-url>jdbc:mysql://158.168.49.36:3306/alfresco</connection-url>
    <driver-class>org.gjt.mm.mysql.Driver</driver-class>
    <user-name>alfresco</user-name>
    <password>alfresco</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <metadata>
       <type-mapping>mySQL</type-mapping>
    </metadata>
  </local-tx-datasource>
</datasources>

jboss/default/deploy/ejb3.deployer/meta-inf/persistence.properties

hibernate.bytecode.provider=cglib

jboss/bin/run.bat


set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=512m
set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote -Dalfresco.home=.

I have the mysql-connector-java-5.1.10-bin.jar in my jboss/server/default/lib directory.

The Good News

With these configurations, and following the instructions for installing jboss and alfresco, when I drop the community alfresco.war (3.2) file into the jboss/server/default/deploy directory, deployment is succesful, and I can view the alfresco application.

Problem

With these configurations, and following the instructions for installing jboss and alfresco, when I drop the enterprise alfresco.war (3.1) file into the jboss/server/default/deploy directory, I always get the same error, and deployment fails


2009-11-12 10:27:00,587 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] Initializing Spring root WebApplicationContext
2009-11-12 10:27:06,477 INFO  [STDOUT] 10:27:06,477  INFO  [alfresco.config.SystemPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/hibernate-cfg.properties]
2009-11-12 10:27:09,743 INFO  [STDOUT] 10:27:09,727  WARN  [hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
   at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
   at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
   at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
   at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)

I have tried this a number of times, and always get the same error. Does anyone know if I have to do anything extra to configure the 3.1 enterprise war to work with jboss? I have googled this problem, and the only detailed resource I can find for installation of jboss and alfresco is at this link.

http://wiki.alfresco.com/wiki/Deploying_WAR_JBoss

This problem is always consistent, even on different machines, we have also tried to swap out the mysql drive for an earlier version, but this makes no difference. The one thing I have not done yet, is to expand the war file, change property and configuration files, re-pack the war, and test again. I am loath to do this, as I believe that if it is not expected for the community war, then surely its not expected for the enterprise war.

Outcomes