Announcement Announcement Module
Collapse
No announcement yet.
NoClassDefFoundError ContextSingletonBeanFactoryLocator Error Weblogic 8.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoClassDefFoundError ContextSingletonBeanFactoryLocator Error Weblogic 8.1

    I have an application that is comprised of many EJBs and I am integrating the Spring Framework for DAO support. I have created a spring factory to produce my DAOs. I am having a problem starting the server for the EJBs that try and produce a DAO on server startup. It is working great in unit test (out of container using a different application context file) Any suggestions would be much appreciated.

    My Bean Ref Context file is as follows:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    	<bean id="daoFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">
    		<constructor-arg>
    			<list>
    				<value>/daoApplicationContext.xml</value>
    				<value>/daoFactoryConfiguration.xml</value>
    			</list>
    		</constructor-arg>
    	</bean>				
    </beans>

    My Application Context file is as follows:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
    "http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
        <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" lazy-init="true">
            <property name="environment">
                <props>
                    <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                    <prop key="java.naming.provider.url">t3://localhost:8031</prop>
                </props>
            </property>
        </bean>
        
    	<bean id="SRPool" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
            <property name="jndiTemplate"><ref bean="jndiTemplate"/></property>
            <property name="jndiName"><value>SRPool</value></property>
        </bean>
    
    	<bean id="TSPool" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
            <property name="jndiTemplate"><ref bean="jndiTemplate"/></property>
            <property name="jndiName"><value>TSPool</value></property>
        </bean>
    </beans>
    My Factory Configuration File:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
    "http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
         <bean id="LogWriterDAO" class="com.app.lib.LogWriterDAO">
         	<property name="dataSource"><ref bean="TSPool"></ref></property>
         </bean>
    </beans>

    I have created a jar file containing the above 3 xml files and it is located on the server classpath in the EAR lib directory with the spring.jar ear.


    I am getting the following error:

    Code:
    The WebLogic Server did not start up properly.
    java.lang.NoClassDefFoundError: org/springframework/context/access/ContextSingletonBeanFactoryLocator
            at org.springframework.context.access.ContextSingletonBeanFactoryLocator.getInstance(Ljava/lang/String;)Lorg/springframework/beans/factory/access/BeanFactoryLocator;(ContextSingletonBeanFactoryLocator.java:???)
            at com.app.lib.Factory.produce(Ljava/lang/String;)Ljava/lang/Object;(Factory.java:51)
            at com.app.lib.LogWriter.refreshLogLevel(Ljava/lang/String;)V(LogWriter.java:158)
            at com.app.lib.LogWriter.log(Lcom/app/lib/LogFile;Ljava/lang/String;I)V(LogWriter.java:399)
            at com.app.lib.LogWriter.debug(Ljava/lang/String;Ljava/lang/String;)V(LogWriter.java:325)
            at com.app.jobscheduler.obj.JobSchedulerDAO.<init>(Ljava/lang/String;)V(JobSchedulerDAO.java:168)
            at com.app.jobscheduler.obj.JobUtil.<clinit>()V(JobUtil.java:120)
            at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source)
            at jrockit.vm.RNI.trampoline()V(Unknown Source)
            at com.app.jobscheduler.obj.JobUtil.setInitialContext()V(JobUtil.java:???)
            at com.app.srbundle.obj.ExtractScheduler.startup(Ljava/lang/String;Ljava/util/Hashtable;)Ljava/lang/String;(ExtractScheduler.java:55)
            at weblogic.t3.srvr.StartupClassService.invokeStartup(Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)V(StartupClassService.java:177)
            at weblogic.t3.srvr.StartupClassService.invokeClass(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V(StartupClassService.java:158)
            at weblogic.t3.srvr.StartupClassService.access$000(Lweblogic/t3/srvr/StartupClassService;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V(StartupClassService.java:36)
            at weblogic.t3.srvr.StartupClassService$1.run()Ljava/lang/Object;(StartupClassService.java:121)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:118)
            at weblogic.t3.srvr.StartupClassService.invokeStartupClass(Lweblogic/management/configuration/StartupClassMBean;)V(StartupClassService.java:116)
            at weblogic.t3.srvr.PostDeploymentStartupService.resume()V(PostDeploymentStartupService.java:22)
            at weblogic.t3.srvr.SubsystemManager.resume()V(SubsystemManager.java:131)
            at weblogic.t3.srvr.T3Srvr.resume()V(T3Srvr.java:964)
            at weblogic.t3.srvr.T3Srvr.run([Ljava/lang/String;)I(T3Srvr.java:359)
            at weblogic.Server.main([Ljava/lang/String;)V(Server.java:32)
    Reason: org/springframework/context/access/ContextSingletonBeanFactoryLocator

  • #2
    After combining the contents of the ApplicationContext and the FactoryConfiguration into one file I am no longer getting this error. The beanRefContext.xml file only contains the /applicationContext.xml entry and all of the beans are defined in it. This is kindof strange because the split format works great for my junit/outcontainer testing but is not able to deal with them being split when in container. Any Thoughts?

    Comment

    Working...
    X