cancel
Showing results for 
Search instead for 
Did you mean: 

JBoss build (Still supported?)

edk
Champ in-the-making
Champ in-the-making
I have been trying to build Alfresco using the following directions: http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment

But I get into problems when trying the following command
ant build-jboss
It seems that the jboss targets where removed with SVN v8881. That commit's comment was:
r8881 | gavinc | 2008-04-24 17:08:54 -0400 (Thu, 24 Apr 2008) | 8 lines

Improved build scripts
  - Cleaned up spaghetti dependencies
  - More stable build process for WAR files
  - Added consistent top level targets for building and deploying all WAR files
  - Improved clean targets
  - Improved -projecthelp/-p output (now only shows top level useful targets)
  - Fixed issue in continuous build for Paul where tomcat instance was required
  - Continuous build now packages slingshot.war in relevant bundles
The jboss targets are excluded as of SVN v13002.

So, is jboss still supported as a build target? If so, is there new documentation?
13 REPLIES 13

edk
Champ in-the-making
Champ in-the-making
I don't want to blog here, but I hope that someone listening will point me in the correct direction - or report that they are getting the same errors.

I get the fewest errors following this procedure:
  1. Download jboss-portal-2.7.1-bundled.zip

  2. Apply patch

  3. Move files into proper locations (alfresco.war  mysql-connector-java-5.1.6-bin.jar  share.war)

  4. Execute ./jboss/bin/run.sh
This test is done with an empty alfresco database and no alf_data directory.

The errors are:
09:33:09,716 ERROR [STDERR] Feb 3, 2009 9:33:09 AM javax.faces.webapp.FacesServlet init
SEVERE: Initialization of the JSF runtime either failed or did not occurr.  Review the server''s log for details.
java.lang.InstantiationException: org.jboss.portletbridge.context.FacesContextFactoryImpl

09:33:09,717 ERROR [STDERR] g.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:109)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

09:35:36,460 ERROR [[/alfresco]] Servlet /alfresco threw load() exception
org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4FLogFactory does not implement org.apache.commons.logging.LogFactory
        at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:180)
        at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)


Complete logs and patches can be found at : http://www.atl.org/~ed/alfresco-logs.zip

Is there something else to do? Can someone verify the errors on their system?

Patch File

diff -r -u jboss-org/bin/run.sh jboss/bin/run.sh
— jboss-org/bin/run.sh   2009-01-20 12:46:36.000000000 -0500
+++ jboss/bin/run.sh   2009-02-02 23:14:59.000000000 -0500
@@ -5,6 +5,9 @@
##                                                                          ##
### ====================================================================== ###

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

DIRNAME=`dirname $0`
Only in jboss/server/default/deploy: alfresco.war
diff -r -u jboss-org/server/default/deploy/ejb3.deployer/META-INF/persistence.properties jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties
— jboss-org/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2009-01-20 12:46:38.000000000 -0500
+++ jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties   2009-02-02 23:16:33.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 -r -u jboss-org/server/default/deploy/jboss-web.deployer/conf/web.xml jboss/server/default/deploy/jboss-web.deployer/conf/web.xml
— jboss-org/server/default/deploy/jboss-web.deployer/conf/web.xml   2009-01-20 12:46:40.000000000 -0500
+++ jboss/server/default/deploy/jboss-web.deployer/conf/web.xml   2009-02-02 23:18:27.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 ==================== –>
@@ -293,11 +297,13 @@
           be scanned for common tag lib descriptors to include in every war
           deployment.
         –>
+        <!–
         <init-param>
            <description>JSF standard tlds</description>
            <param-name>tagLibJar0</param-name>
            <param-value>jsf-libs/jsf-impl.jar</param-value>
         </init-param>
+        –>
         <init-param>
            <description>JSTL standard tlds</description>
            <param-name>tagLibJar1</param-name>
Only in jboss/server/default/deploy: share.war
Only in jboss/server/default/lib: mysql-connector-java-5.1.6-bin.jar

mlmalfresco123
Champ in-the-making
Champ in-the-making
Ya.. I have the same question. I downloaded the latest Alfresco Community 3.0 source code - SVN revision 12844 (per the Release Notes on the Wiki).

When I try to Ant build agains "build-tomcat" target - it ends up with the following error:


Package annotations should be in file package-info.java
    [javac] @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.cmis.org/2008/05", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

I was just trying to get it to build period, right after a fresh download.

THEN,

When I started looking at the "build-jboss" target, I noticed it is commented out as well as many of its dependent targets.

What's going on with this? Is JBoss no longer supported? And why is the Tomcat build not working either.

This happens for both SVN revision 12844 and for 13022 (the latest HEAD).

Please help…

edk
Champ in-the-making
Champ in-the-making
For my efforts, I was using svn v13002 and just running the command 'ant build'

Then I took only these two products to my jboss server for testing:
  • ./projects/web-client/build/dist/alfresco.war

  • ./projects/slingshot/build/dist/share.war

mlmalfresco123
Champ in-the-making
Champ in-the-making
After you built it like you said, did Alfresco Web Client come up successfully after you deployed it to JBoss ?

edk
Champ in-the-making
Champ in-the-making
After you built it like you said, did Alfresco Web Client come up successfully after you deployed it to JBoss ?
Yes, the Web Client is available. There are still errors in the Share, nothing works only errors like:


13:56:57,289 INFO  [STDOUT] 13:56:57,289  ERROR [web.site.FrameworkHelper] A Page Rendering problem was handled
13:56:57,290 INFO  [STDOUT] 13:56:57,290  ERROR [web.site.FrameworkHelper] Page Id: site-index
13:56:57,291 INFO  [STDOUT] 13:56:57,290  ERROR [web.site.FrameworkHelper] Trace org.alfresco.web.framework.exception.RendererExecutionException: Unable to execute 'body' JSP include: /site-index.jsp
   at org.alfresco.web.framework.render.bean.JSPProcessor.executeBody(JSPProcessor.java:126)
   at org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   at org.alfresco.web.framework.render.RenderHelper.processTemplate(RenderHelper.java:376)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:69)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:124)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.bean.PageRenderer.body(PageRenderer.java:81)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.RenderUtil.startPageRenderer(RenderUtil.java:144)
   at org.alfresco.web.framework.render.RenderUtil.renderPage(RenderUtil.java:117)
   at org.alfresco.web.framework.render.PresentationUtil.renderPage(PresentationUtil.java:85)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatchPage(DispatcherServlet.java:459)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatch(DispatcherServlet.java:336)

mlmalfresco123
Champ in-the-making
Champ in-the-making
Glad to hear you got it working. I"ll give it a shot. Btw, what is this "Share.war" thingy? I'm not familiar with it.. Is it some new architecture?

Also, what version of Java JVM/JRE are you using / have installed? I am using 1.5.0_16 and after trying like you said to run "ant build" I keep getting the error


package annotations should be in file package-info.java
    [javac] @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.cmis.org/2008/05", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

Any ideas why I might be getting this? I was thinking maybe my JRE is incompatible or something.

edk
Champ in-the-making
Champ in-the-making
Glad to hear you got it working. I"ll give it a shot. Btw, what is this "Share.war" thingy? I'm not familiar with it.. Is it some new architecture?
Have a look here: http://www.alfresco.com/products/collaboration/
Yes, its a new interface to alfresco - better in some ways, but does not replace Alfresco Explorer.

mlmalfresco123
Champ in-the-making
Champ in-the-making
Ah, so it sounds like its an interface to Sharepoint maybe.. Ok.. well I'll research it.. Hey I also posted an addendum to my previous post.. See above about JVM version…Let me know.. Thanks…

edk
Champ in-the-making
Champ in-the-making
Also, what version of Java JVM/JRE are you using / have installed? I am using 1.5.0_16 and after trying like you said to run "ant build" I keep getting the error

package annotations should be in file package-info.java
    [javac] @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.cmis.org/2008/05", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
Any ideas why I might be getting this? I was thinking maybe my JRE is incompatible or something.
I can't say that I have the same problem…. Here is my environment:

export JAVA_HOME=/usr/local/jdk1.5.0_16
export TOMCAT_HOME=/mnt/sda5/Alfresco-3-HEAD/tomcat-6.0.18
export APP_TOMCAT_HOME=/mnt/sda5/Alfresco-3-HEAD/tomcat-6.0.18
export VIRTUAL_TOMCAT_HOME=/mnt/sda5/Alfresco-3-HEAD/tomcat-6.0.18-virt

Fedora Core 5 x86, packages:
ant-1.6.5-1jpp_7fc
The tomcat directories are from apache-tomcat-6.0.18.tar.gz, no modifications.