- This topic has 3 replies, 3 voices, and was last updated 16 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
Shai YallinMemberHi there,
I have a project composed of an Ear, several Web projects and several Java projects, which uses Spring Framework 2 for dependency injection, and configured using a global application context defined at the Ear level (so that multiple web project will use the same context), using the “parentContextKey” web.xml parameter. This works just fine under JBoss 4.2.0GA. However, deploying to Weblogic 10 (and probably older versions as well though I haven’t had the time to check on WL9), the file beanRefContext.xml (which is loaded by the context loader listener and contains the global context) is not found. This appears to be a known issue with Weblogic, that uses a special ‘APP-INF’ directory for stuff that should exist in the classpath.
Sadly, putting the configuration within this directory didn’t resolve the problem.
When loading the context directly from each web project’s WEB-INF directory, everything works.
Any ideas would be appreciated.
Thanks
Shai
Loyal WaterMemberShai,
Can you paste the entire error message here for me.Also, can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
Is there anything recorded under <workspace>/.metadata/.log file ?
Shai YallinMemberStack trace:
<14:48:36 IST 22/01/2008> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [EarContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘EarContext’ is defined.
org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [EarContext], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘EarContext’ is defined
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:410)
at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:346)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:195)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:458)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘EarContext’ is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:378)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:227)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:892)
Truncated. see log file for complete stacktrace
>
<14:48:36 IST 22/01/2008> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application ‘_appsdir_ewaveCommonEarTemplate_dir’.
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
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)
Truncated. see log file for complete stacktrace
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘EarContext’ is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:378)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:227)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:892)
Truncated. see log file for complete stacktrace
>—————————–
Installation summary:
*** Date:
Tuesday, January 22, 2008 2:45:39 PM IST** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.0.1 GA
Build id: 6.0.1-GA-200710*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 6.0.1 GA
Build id: 6.0.1-GA-200710Eclipse Project SDK
Version: 3.3.0.v20070607-7M7J-BIolz-OcxWxvWAPSfLPqevO
Build id: I20070625-1500Eclipse Platform
Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
Build id: I20070625-1500Eclipse Java Development Tools
Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
Build id: I20070625-1500Eclipse RCP
Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
Build id: I20070625-1500Eclipse Plug-in Development Environment
Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
Build id: I20070625-1500Eclipse Graphical Editing Framework
Version: 3.3.1.v20070814
Build id: 20070814-1555Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\myEclipse6.0\eclipse\eclipse.exe
-name
Eclipse
–launcher.library
C:\myEclipse6.0\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
-startup
C:\myEclipse6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-exitdata
140_68
-vm
c:\myEclipse6.0\jre\bin\javaw.exe——————–
Nothing that seems relevant found in the log file
Riyad KallaMemberMoving to OT > Soft Dev, this is a WL-specific question. Hopefully one of our other WL users can pitch in an idea or two.
-
AuthorPosts