Wednesday 9 May 2012

SOA Infra starting problems

I'm helping my new customer in migrating an Oracle Forms application to a new 11g databased environment. Since the application is using Oracle Workflow the transition includes replacing Workflow with BPEL11g. So a SoaSuite installation is needed. The installation of the development server is done on a virtual (VMware ESX) Windows 2008 server. Installing Weblogic and SoaSuite and configuring the domain is pretty straighforward. However at starting the server the SOAInfra won't come up. After a while we encountered the following exception in the soa_server.out log:
<26-apr-2012 15:50:34 uur CEST> <Error> <org.springframework.web.context.ContextLoader> <BEA-000000> <Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SensorManager' defined in ServletContext resource [/WEB-INF/fabric-config-core.xml]: Cannot resolve reference to bean 'FabricMesh' while setting bean property 'fabricMesh'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMesh': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FabricMeshTarget' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: Cannot resolve reference to bean 'SpringServiceEngine' while setting bean property 'serviceEngines' with key [6]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [oracle.integration.platform.blocks.java.SpringServiceEngine] for bean with name 'SpringServiceEngine' defined in ServletContext resource [/WEB-INF/fabric-config.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: weblogic/sca/api/ScaReferenceProcessor

         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)

         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)

         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)

         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

         at java.security.AccessController.doPrivileged(Native Method)
   ...
Apparently this is caused by a class not found: "java.lang.NoClassDefFoundError: weblogic/sca/api/ScaReferenceProcessor". We (the administrator Gerrit and me) searched around the forums and eventually found that this was caused by a missing com.oracle.weblogic.sca.engine.jar in the weblogic classpath. From there the solution is quite simple. The jar file is found in the modules folder in the COMMON_COMPONENTS_HOME, eg. in our case "D:\oracle\product\11.1.1\fmw\oracle_common\modules". But apparently in the domain configuration this is missed to be added to the class path in the setDomainEnv.cmd file. So edit this file (setDomainEnv.cmd), which is found in DOMAIN_HOME/bin, in our case: "E:\oracle\admin\domains\soa_domain\bin\setDomainEnv.cmd". At the top of that file you'll find the setting:
set COMMON_COMPONENTS_HOME=D:\oracle\product\11.1.1\fmw\oracle_common
This variable can be used to add the jar file to the classpath. So search in the file to the lines that build up the POST_CLASSPATH variable and add the following line:
set POST_CLASSPATH=%COMMON_COMPONENTS_HOME%\modules\com.oracle.weblogic.sca.engine.jar;%POST_CLASSPATH%
Then (in our case) the SOA_Infra should be able to start. In file E:\oracle\admin\domains\soa_domain\bin\setDomainEnv.cmd By the way, our SOASuite environment was a 11.1.1.6 setup on windows.

1 comment :

Anonymous said...

Many thanks..it worked!!!