cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 2.0 on BEA weblogic 9.1

berkie
Champ in-the-making
Champ in-the-making
I have tried to deploy the alfresco 2.0 war on a BEA 9.1 weblogic server but I get an error when starting the application. Does anybody has a solution for this?

<Warning> <HTTP> <WRNDBEBE130109> <examplesServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1172824306209> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: java.lang.NullPointerException.
java.lang.NullPointerException
   at org.alfresco.util.RuntimeSystemPropertiesSetter.postProcessBeanFactory(RuntimeSystemPropertiesSetter.java:68)
   at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:380)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:302)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:374)
   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
   at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:83)
   at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1581)
   at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2678)
   at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:874)
   at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
   at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
   at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
   at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
   at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)
   at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:640)
   at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
   at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:252)
   at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
   at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
   at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:176)
   at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:347)
   at weblogic.management.deploy.internal.DeploymentAdapter$1.activate(DeploymentAdapter.java:50)
   at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
   at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
   at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:168)
   at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
2 REPLIES 2

berkie
Champ in-the-making
Champ in-the-making
The reason for this lies in the classloader resource loading.
The necessary steps to make this work:
1. Create a new domain 'alfresco'
2. Copy mysql-connector-java-5.0.3-bin.jar to {DOMAIN_HOME}/lib
3. Deploy WAR file
4. Extract ${DOMAIN_HOME}/servers/AdminServer/tmp/_WL_user/alfresco/hp7x2s/war/WEB-INF/lib/_wl_cls_gen.jar to ${DOMAIN_HOME}/servers/AdminServer/tmp/_WL_user/alfresco/hp7x2s/war/WEB-INF/classes
5. Delete _wl_cls_gen.jar
6. ${DOMAIN_HOME}/servers/AdminServer/tmp/_WL_user/alfresco/hp7x2s/war/WEB-INF/classes/repository.properties: Set dir.root to an absolute path (C:/Alfresco/alf_data)

steve
Champ in-the-making
Champ in-the-making
Hi,

I deployed Alfresco 2.0 using the following steps into Weblogic using MySQL DB:

Perform the required pre-setup of MySQL - create a user called 'alfresco' with password 'alfresco' and assign them to a tablespace called 'alfresco' with all permissions.

1. I used the '…/weblogic92/samples/domains/wl_server' server (this is the base dir for any further dir locations).
2. Copy 'mysql-connector-java-5.0.3-bin.jar' to the 'lib' directory.
3. In the 'autodeploy' dir, create a dir called 'alfresco'
4. Copy the 'alfresco.war' file to the 'autodeploy/alfresco' dir
5. Rename (mv) the 'alfresco.war' file to 'alfresco.zip'
6. Extract 'alfresco.zip'
7. Confirm that the zip has been extracted, then delete it.
8. Navigate to 'autodeploy/alfresco/WEB-INF/classes/alfresco'
9. Edit the 'repository.properties' and enter a fixed/absolute location for 'dir.root'.
10. Navigate back to the wl_server level, then copy 'autodeploy/alfresco/WEB-INF/lib/cryptix-jce-provider.jar' to the 'lib' dir
(I did this because I got this error: http://forums.alfresco.com/viewtopic.php?t=966)
11. Run the 'startWeblogic.sh' command to start the Weblogic server.

Note, I had to edit the 'bin/setDomainEnv.sh' file and increase the -XX:MaxPermSize to 256m and increase the -Xmx option also to get rid of memory issues I experienced.

Note: Weblogic ships with its own version of 'rhino.jar' that overrides the one shipped and required by Alfresco. The symptoms of this include scripts and advanced workflows not working. The solution is to ensure that the Alfresco shipped 'rhino-js-1.6R4.jar' found in the exploded WAR at 'alfresco/WEB-INF/lib' is set to be first on the classpath.

In the BEA file 'setDomainEnv.sh' or windows equivalent there is a 'PRE_CLASSPATH' export variable that can be used to set what comes first in the classpath and is an appropriate place for the path to our rhino jar to be added.

Hope this helps,

Steve