cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration for JBoss, JBoss working but configuration not

edk
Champ in-the-making
Champ in-the-making
I have been attempting to configure Alfresco running under JBoss, but no configuration changes make any difference!

Working Test
For my test case, I installed Alfresco and JBoss straight out of the box, with minimal configuration:
  • extract alfresco-labs-war-3Stable.zip

  • extract jboss-4.2.3.GA.zip

  • copy alfresco.war and share.war from alfresco-labs-war-3Stable.zip to jboss-4.2.3.GA/server/default/deploy

  • copy mysql-connector-java-5.1.7-bin.jar to jboss-4.2.3.GA/server/default/lib

  • create link from jboss-4.2.3.GA to jboss mostly for my convenience

  • create mysql database: mysqladmin -u root create alfresco

  • set permissions: echo "grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;" | mysql -u root

  • Flush the privileges: mysqladmin -u root flush-privileges

  • edit Alfresco/jboss/bin/run.sh, Alfresco/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties, Alfresco/jboss/server/default/deploy/jboss-web.deployer/conf/web.xml as the following diff file suggests:

diff -u -r Alfresco-org/jboss/bin/run.sh Alfresco/jboss/bin/run.sh
— Alfresco-org/jboss/bin/run.sh   2009-02-11 19:40:47.000000000 -0500
+++ Alfresco/jboss/bin/run.sh   2009-02-11 19:57:51.000000000 -0500
@@ -5,6 +5,9 @@
##                                                                          ##
### ====================================================================== ###

+JAVA_HOME="/home/ed/local/jdk1.6.0_11"
+JAVA_OPTS="-Xms512m -Xmx1G -XX:MaxPermSize=128m -server -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false"
+
### $Id: run.sh 75849 2008-07-15 18:43:17Z dimitris@jboss.org $ ###

DIRNAME=`dirname $0`
diff -u -r Alfresco-org/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties Alfresco/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties
— Alfresco-org/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2008-07-18 14:21:02.000000000 -0400
+++ Alfresco/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2009-02-11 19:57:51.000000000 -0500
@@ -14,4 +14,4 @@
hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
hibernate.bytecode.use_reflection_optimizer=false
# I don't think this is honored, but EJB3Deployer uses it
-hibernate.bytecode.provider=javassist
\ No newline at end of file
+hibernate.bytecode.provider=cglib
diff -u -r Alfresco-org/jboss/server/default/deploy/jboss-web.deployer/conf/web.xml Alfresco/jboss/server/default/deploy/jboss-web.deployer/conf/web.xml
— Alfresco-org/jboss/server/default/deploy/jboss-web.deployer/conf/web.xml   2008-07-18 14:21:02.000000000 -0400
+++ Alfresco/jboss/server/default/deploy/jboss-web.deployer/conf/web.xml   2009-02-11 19:57:51.000000000 -0500
@@ -59,16 +59,20 @@

    <!– Configures JSF for a web application if the javax.faces.webapp.FacesServlet is declared –>
    <!– in web.xml.                                                                             –>
+   <!–
    <listener>
      <listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
    </listener>
+   –>

    <!– Listens to all web app lifecycle events so that @PreDestroy can be called on –>
    <!– JSF managed beans that go out of scope.  You can comment this out if you     –>
    <!– don't use JSF or you don't use annotations on your managed beans.            –>
+   <!–
    <listener>
      <listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
    </listener>
+   –>


   <!– ================== Built In Servlet Definitions ==================== –>
  • start alfresco with: ./jboss/bin/run.sh >run1.log &
It runs, but not perfect, showing errors of:
  • 20:09:35,097 INFO  [STDOUT] 20:09:35,097 UserSmiley Frustratedystem WARN  [alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.

  • Cannot run program "./ImageMagick/bin/convert": java.io.IOException: error=2, No such file or directory

  • Cannot run program "./bin/pdf2swf": java.io.IOException: error=2, No such file or directory
Configuration Setup
So, now lets say that I want to change the login for the MySQL database. Following the directions on this page: http://wiki.alfresco.com/wiki/Repository_Configuration#What_Can_Be_Set.3F I should be able to create the file jboss/server/default/conf/props/alfresco/extension/custom-repository.properties with the contents of:
db.username=alfresco3
db.password=alfresco3ERROR
I have also tried the properties file at jboss/server/default/conf/alfresco/custom-repository.properties.

I would expect an error, showing that the password "alfresco3ERROR" is an invalid login account. Also changes to the following parameters have no affect:
  • ooo.exe=

  • ooo.user=

  • img.root=

  • swf.exe=

  • db.driver=

  • db.url=
Am I putting the property file in the proper location?
4 REPLIES 4

edk
Champ in-the-making
Champ in-the-making

edk
Champ in-the-making
Champ in-the-making
I have done much more research on this issue, even after rereading the Install_Configure_Alfresco_Lab3Stable.pdf. It seems that the only way that I can set my own db.username/db.password is to compile from source, and change ./projects/repository/config/alfresco/repository.properties before building.

I've read the installation/configuration document, and on page 31 there is reference to the file alfresco/application-context.xml, which then imports alfresco/core-services-context.xml. Now that file loads the common properties with this section:
    <!– load common properties –>
    <bean id="repository-properties"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/repository.properties</value>
                <value>classpath:alfresco/version.properties</value>
                <value>classpath:alfresco/domain/transaction.properties</value>
                <!– <value>classpath:alfresco/jndi.properties</value> –>
            </list>
        </property>
    </bean>
But there is no reference to load the custom-repository.properties as referenced in the documentation. Is there some shortcut custom-property loader available in Tomcat that is not available in JBoss?

Anyone else able to reproduce this failure to load the custom-repository.properties file in JBoss?

source code from svn v13216

mikeh
Star Contributor
Star Contributor
Have you seen this wiki article on Repository Config?
http://wiki.alfresco.com/wiki/Repository_Configuration

Thanks,
Mike

edk
Champ in-the-making
Champ in-the-making
Have you seen this wiki article on Repository Config?
http://wiki.alfresco.com/wiki/Repository_Configuration
I was following that page, which is why I was creating/editing the file at jboss/server/default/conf/props/alfresco/extension/custom-repository.properties.

Using strace, I noticed that JBoss was aware that the file existed (a stat64 was run against the file), but the file was never opened!

Did I place the file in the correct location?