AnsweredAssumed Answered

Alfresco 4.2.e su JBoss 7

Question asked by luigi on Jan 13, 2014
Latest reply on Jan 14, 2014 by luigi
Ciao a tutti,

stavo provando ad installare Alfresco Community 4.2.e su JBoss 7 (con sistema operativo Windows Seven) e db Postgresql.
Non ho trovato molto in rete su questa versione di JBoss, a parte questo 
<a href="https://forums.alfresco.com/es/guia-de-instalacion-alfresco-42c-en-jboss-711-final-12292012-2355">tutorial</a>
sul forum in lingua spagnola.

Ho provato a riprodurre i passi ma senza successo:

1. scaricato, installato e testato con successo jboss-as-7.1.0.Final


2. creato all'interno della JBOSS_HOME una directory "tmpalfresco" dove ho posizionato il contenuto
   decompresso di alfresco-community-4.2.e (Manual Installation)


3. configurato Postgresql creando in
    "jboss-as-7.1.0.Final/modules/org" una cartella "postgresql" ed all'interno di essa un'altra cartella denominata "main"
    Qui ho inserito il driver "postgresql-9.0-802.jdbc4.jar" ed il properties "module.xml" con questo contenuto
   

    <?xml version="1.0" encoding="UTF-8"?> 
            <module xmlns="urn:jboss:module:1.0" name="org.postgresql"> 
             <resources> 
             <resource-root path="postgresql-9.0-802.jdbc4.jar"/> 
             </resources> 
             <dependencies> 
             <module name="javax.api"/> 
             <module name="javax.transaction.api"/>
             <!–
             <module name="javax.servlet.api" />
             <module name="javax.servlet.jsp.api" />
             <module name="javax.transaction.api" />
              –>
             </dependencies> 
            </module>
   

   
   
4. configurato "standalone.xml" in "/jboss-as-7.1.1.Final/standalone/configuration"   
   con questo contenuto
  

  
   <datasource jta="false" jndi-name="java:jboss/alfrescoDS" pool-name="alfrescoDS" enabled="true" use-java-context="true" use-ccm="false">
                    <connection-url>jdbc:postgresql://localhost:5432/alfresco</connection-url>
                    <driver-class>org.postgresql.Driver</driver-class>
                    <driver>postgresql</driver>
                    <pool>
                        <min-pool-size>2</min-pool-size>
                        <max-pool-size>20</max-pool-size>
                    </pool>
                    <security>
                        <user-name>alfresco</user-name>
                        <password>alfresco</password>
                    </security>
                    <validation>
                        <validate-on-match>false</validate-on-match>
                        <background-validation>false</background-validation>
                        <background-validation-millis>0</background-validation-millis>
                    </validation>
                    <statement>
                        <prepared-statement-cache-size>0</prepared-statement-cache-size>
                        <share-prepared-statements>false</share-prepared-statements>
                    </statement>
   </datasource>
   <drivers>
         <driver name="postgresql" module="org.postgresql">
                        <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
         </driver>
   </drivers>
  
  

   inserito un deployment-timeout più lungo in
  

   <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="1200" />
   </subsystem>
  

   e commentato le seguenti istruzioni
  

<!–
         <extension module="org.jboss.as.webservices"/>
–>
  

   e
  

<!–
         <subsystem xmlns="urn:jboss:domain:webservices:1.1">
            <modify-wsdl-address>true</modify-wsdl-address>
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
            <endpoint-config name="Standard-Endpoint-Config"/>
            <endpoint-config name="Recording-Endpoint-Config">
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                </pre-handler-chain>
            </endpoint-config>
        </subsystem>
–>
  

  
  
5. configurato la JVM in "standalone.conf.bat" sotto in "/jboss-as-7.1.1.Final/bin"


   set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"



6. effettuato il deploy di alfresco e share in "/jboss-as-7.1.1.Final/standalone/deployments"
   creando 2 cartelle all'interno, "alfresco.war" e "share.war",
   rinominando i relativi "war" in "jar",
   posizionandoli ognuno nella sua cartella ed estraendone il contenuto tramite il comando
  

         jar -xvf alfresco.jar
         jar -xvf share.war
  

   e creato due file "alfresco.war.dodeploy" e "share.war.dodeploy" in "/jboss-as-7.1.1.Final/standalone/deployments"

7. commentato ed aggiunto le seguenti istruzioni nel "jboss-web.xml" sotto "alfresco.war/WEB-INF"

  

   <!–
<jboss-web>
   <resource-ref>
      <res-ref-name>jdbc/dataSource</res-ref-name>
      <jndi-name>java:alfresco-datasource</jndi-name>
   </resource-ref>
</jboss-web>
–>
<jboss-web>
   <resource-ref>
      <res-ref-name>jdbc/dataSource</res-ref-name>
      <jndi-name>java:jboss/datasources/AlfrescoDS</jndi-name>
   </resource-ref>
</jboss-web>
  



8. commentato ed aggiunto le seguenti istruzioni nel "web.xml" sotto "alfresco.war/WEB-INF"

  

<!–
   <resource-ref>
      <description>The Alfresco database connection</description>
      <res-ref-name>jdbc/dataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
   </resource-ref>
   –>
   <resource-ref>
      <description>The Alfresco database connection</description>
      <res-ref-name>java:jboss/datasources/AlfrescoDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Unshareable</res-sharing-scope>
   </resource-ref>
  


9. creato il file "persistence.xml" sotto "alfresco.war/META-INF" con il seguente contenuto

<?xml version="1.0" encoding="UTF-8"?>
<persistence
    xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0">


   <!– POSTGRES –>
   <persistence-unit name="tiny" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:jboss/datasources/AlfrescoDS</jta-data-source>
      <properties>
         <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
         <property name="hibernate.hbm2ddl.auto" value="update" />
         <property name="hibernate.show_sql" value="true" />
         <property name="hibernate.format_sql" value="true" />
      </properties>
   </persistence-unit>

</persistence>


10. creato il file " jboss-deployment-structure.xml" sotto "alfresco.war/WEB-INF" con il seguente contenuto
  

<?xml version="1.0"?>

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
   <deployment>
      <exclusions>
         <module name="org.apache.log4j" />
         <module name="org.hibernate" />
      </exclusions>
      <dependencies>
         <module name="org.postgresql" />
         <module name="javax.mail.api" />
         <module name="org.apache.xerces" />
         <module name="org.jboss.modules" />
      </dependencies>
   </deployment>
</jboss-deployment-structure>
   



Non ho ben chiaro come e dove posizionare alfresco-global.properties e le estensioni.
(Sembrerebbe in "JBOSS_HOME/modules/com/yourcompany/configuration/main" ??)


Ed infatti alla fine, avviando JBoss ottengo vari errori
(in allegato file completo server.log) tipo

16:33:08,381 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015852: Could not index class groovy/ui/OutputTransforms$_loadOutputTransforms_closure1.class at /c:/develop/jboss-as-7.1.0.Final/standalone/deployments/alfresco.war/WEB-INF/lib/groovy-all-2.1.7-indy.jar: java.lang.IllegalStateException: Unknown tag! pos=32 poolCount = 101
   at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:606) [jandex-1.0.3.Final.jar:1.0.3.Final]
   at org.jboss.jandex.Indexer.index(Indexer.java:640) [jandex-1.0.3.Final.jar:1.0.3.Final]
   at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:77) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
   at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
   at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
   at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
   at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
   at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

oppure

16:33:16,960 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry commons-io-1.3.1.jar in "/c:/develop/jboss-as-7.1.0.Final/standalone/deployments/alfresco.war/WEB-INF/lib/fop-0.94.jar"  does not point to a valid jar for a Class-Path reference.

   
C'è nessuno che ha avuto esperienze sull'argomento ?

Grazie in anticipo.

Luigi

Attachments

Outcomes