SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-735
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Grégory Provost
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

LocalCompassBean to implement org.springframework.beans.factory.BeanClassLoaderAware

Created: 09/Oct/08 03:31 AM   Updated: 09/Oct/08 07:22 AM
Component/s: Compass::Core
Affects Version/s: 2.0.0 RC2
Fix Version/s: 2.1.0 RC

Environment: Windows XP


 Description  « Hide
Trying to integrate Compass, Spring and AXIS2 together.

LocalCompassBean is not aware of the ClassLoader being used for loading/configuring the BeanFactory. As consequence, when starting the webservice, the WebappClassLoader is used when invoking the init methods of the LocalCompassBean instead of the webservice ClassLoader --> ClassNotFoundException.

StackTrace on java.lang.ClassNotFoundException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1443)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:242)
org.compass.core.util.ClassUtils.forName(ClassUtils.java:90)
org.compass.spring.LocalCompassBean.afterPropertiesSet(LocalCompassBean.java:275)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)

In order to avoid this problem LocalCompassBean must implement org.springframework.beans.factory.BeanClassLoaderAware. And every call to ClassUtils.forName must use the ClassLoader being set through the BeanClassLoaderAware implementation.

Regards
Grégory



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Grégory Provost added a comment - 09/Oct/08 06:58 AM
thanks for the fix. When will it be released ?

Shay Banon added a comment - 09/Oct/08 07:04 AM
The fix for in Jira is set to 2.1 RC1.

Grégory Provost added a comment - 09/Oct/08 07:08 AM
Yes I know that ! Question is "When will it it be available on the repository (http://repo.compass-project.org/org/compass-project/compass/) ?

Shay Banon added a comment - 09/Oct/08 07:22 AM
I hope to release 2.1 RC1 in the next week or two weeks. You can get the nightly build with this fix once the nightly is built.