views:

746

answers:

1

I am trying to run imageDB and jpetstore in JDeveloper 11g. It compiles fine, but it won't run, and the weblogic server throws errors. Does anyone know how to successfully run Spring 2.5.x sample applications in Jdeveloper 11g?

I get the following error when I try jpetstore sample.

Jul 27, 2009 5:03:20 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing
XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: Could not initialize class
org.springframework.aop.aspectj.AspectJExpressionPointcut
A: 

The problem occurs because of WebLogic Server Application Classloading.

You need the following weblogic.xml.

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"&gt;
   <container-descriptor>
      <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>
</weblogic-web-app>

for more info: http://download.oracle.com/docs/cd/E13222_01/wls/docs92/programming/classloading.html

Squareroot