facebook

WebLogic 10 + Spring + Global Context

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #280905 Reply

    Shai Yallin
    Member

    Hi 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

    #280913 Reply

    Loyal Water
    Member

    Shai,
    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 ?

    #280917 Reply

    Shai Yallin
    Member

    Stack 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 Workbench

    Version: 6.0.1 GA
    Build id: 6.0.1-GA-200710

    Eclipse Project SDK

    Version: 3.3.0.v20070607-7M7J-BIolz-OcxWxvWAPSfLPqevO
    Build id: I20070625-1500

    Eclipse Platform

    Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
    Build id: I20070625-1500

    Eclipse Java Development Tools

    Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
    Build id: I20070625-1500

    Eclipse RCP

    Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
    Build id: I20070625-1500

    Eclipse Plug-in Development Environment

    Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
    Build id: I20070625-1500

    Eclipse Graphical Editing Framework

    Version: 3.3.1.v20070814
    Build id: 20070814-1555

    Eclipse 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

    #280939 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, this is a WL-specific question. Hopefully one of our other WL users can pitch in an idea or two.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: WebLogic 10 + Spring + Global Context

You must be logged in to post in the forum log in