cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco with JBoss from scratch

rsfeir
Champ in-the-making
Champ in-the-making
I have a bizarre error with alfresco setup from scratch.  What I mean is that I downloaded JBoss Portal bundle with the server for version 2.1 RC 1, started that and all was OK.  I dropped in the alfresco.war and I got the first time the missing mysql driver, so I fixed that by dropping it into the deploy/lib dir.  Then I started again and got the error below, and can't for the life of me figure out why this is.  If I download the alfresco jboss package from alfresco and run everything is OK.



org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'descriptorComponent' defined in class path resource [alfresco/application-context.xml]: Can't resolve reference to bean 'systemBootstrap' while setting property 'systemBootstrap'; nested exc
eption is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/application-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException:
Bootstrap failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemBootstrap' defined in class path resource [alfresco/application-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Bootstrap
failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:344)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:971)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:941)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:205)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:583)
        at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:466)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:307)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
43 REPLIES 43

gavinc
Champ in-the-making
Champ in-the-making
It's because we store all the config files in JBoss's conf directory.

Presuming you still have our bundle on your system you can copy all the config files from that one to your downloaded JBoss.

For example: cp <alfresco>/jboss/server/default/conf/alfresco/*.* <your-jboss>/server/default/conf/alfresco

Re-start the server and it should be OK.

krblock
Champ in-the-making
Champ in-the-making
If you have successfully done a from scratch install, could you post the versions of the components you used. I tried the following and was not able to get it to work:

jboss application server 4.0.3 SP1
jboss portal 2.2 RC2
alfresco-war 1.1.0

I copied the conf files and the mysql driver. The database gets created, but I get an exception later. Just want to make sure I using something that is expected to work before I spend to much time playing with it.

Thanks.

rsfeir
Champ in-the-making
Champ in-the-making
Same here, so I resorted to just using the default alfresco-packaged files and added our app to it.

R

rsfeir
Champ in-the-making
Champ in-the-making
Oh I should clarify, I tried with JBoss 2.0.1 RC 1 and alfresco 1.1

kevinr
Star Contributor
Star Contributor
The bundle we ship Alfresco with is using:
jboss-portal-2.0 and jboss-4.0.2

I have recently tried to get Alfresco 1.1 working with the latest JBoss portal bundle:
jboss-portal-2.2.0RC2 and jboss-4.0.3SP1

However i was not sucessful. There seems to be an issue around the version of MyFaces that is now bundled with the portal and i also noticed another version of MyFaces with the bundled tomcat that is embedded in the JBoss. I am not sure yet what the problem is exactly as i haven't had time to look further. I will continue to look at the issue and try to get it resolved so we can move forward with a newer version of portal+jboss.

Thanks for your patience,

Kevin

jdestef
Champ in-the-making
Champ in-the-making
Hi,

Is there any timeframe for a resoultion of this issue?

Tx

kevinr
Star Contributor
Star Contributor
I'll take a look at it this week.

Cheers,

Kev

kevinr
Star Contributor
Star Contributor
Hi,

Ok i have spent the day looking at this, there are a number of issues that prevented Alfresco from running against the latest Jboss portal (2.2.0)

The first issue is the fact that they now package the MyFaces JAR files inside the embedded TomCat instance in JBoss - which means we need to remove those from our WAR file deployment (thanks to user "petek73" for spotting that). However we use a slightly patched version of MyFaces 1.1.1 so i needed to also overwrite the JAR files in the embedded tomcat with our ones.

The second problem is the exception from the Bootstrap process as mentioned above, which was an issue with logging from Spring where a special logging method needs to be implemented (now fixed) - or adding INFO level to the ROOT log4j appender in JBoss also fixes it.

There are also several issues as JBoss Portal 2.2.0 is quite different from 2.0.0 in that the portal XML deployment descriptors have changed format so the Alfresco portlets will no longer deploy. And also the way that the portal saves attributes in the external HttpSession (hidden by the portletsession) has changed which meant our portal integration was no longer working (which allows us in theory to transparently support both Servlet and JSR-168 Portal containers).

The issues have all been fixed now and I have the latest version of Alfresco working against the JBoss portal 2.20 + JBoss AS 4.0.3sp1.

I will commit the changes shortly. You will either need to wait for the next release to get the updated JBoss bundle or if you want this sooner then you will need to build from the SVN source repo, and overwrite the MyFaces JAR files in the jboss tomcat installation with the ones from our SVN lib dir as mentioned above.

Thanks,

Kevin

kevinr
Star Contributor
Star Contributor
Fixes to this are available in the current nightly build. You will need to patch the jboss portal 2.2.0 tomcat MyFaces JARs from our source archive as detailed above.

Thanks,

Kevin