Results 1 to 2 of 2

Thread: ClassNotFoundException with SpringSource Tooling

  1. #1
    Join Date
    Oct 2008
    Posts
    0

    Default ClassNotFoundException with SpringSource Tooling

    Hi,

    I am trying to develop a PAR project within Eclipse with SpringSource Tooling Suite and SpringIDE. I have created a PAR project and a Bundle project and added the bundle as dependency to the PAR. I created a spring bean definition in /META-INF/spring/module-context.xml containing the following :

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- Core bean -->
    <bean id="core" class="com.sample.core.Core" init-method="init" destroy-method="destroy" />
    </beans>

    Respectively I created the Core class within the com.sample.core package which has the init and destroy methods. The MANIFEST.MF contains the imports for the org.springframework.{beans,context,core,core.io,os gi.context} packages.

    The problem is that if I try to run this, the dm extender bundle tells me the following:

    INFO : Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1989b5: defining beans [core]; root of factory hierarchy
    INFO : Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1989b5: defining beans [core]; root of factory hierarchy
    ERROR: Post refresh error
    org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [com.sample.core.Core] for bean with name 'core' defined in URL [bundleentry://51/META-INF/spring/module-context.xml]; nested exception is java.lang.ClassNotFoundException: com.sample.core.Core
    ... trace ...

    I tried to recreate the bundle from scratch. While I have a simple skeleton (empty Core class with init() and the base MANIFEST.MF) the core bean instantiates fine, the init() is called and everything is just ok. But if I begin to populate the bundle, the error described above appears and I don't really know what am I doing wrong.

    Alex

  2. #2
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default ClassNotFoundException with SpringSource Tooling

    Hi Alex,

    What exactly do you mean by "populate the bundle"?

    Also, what is the physical structure of the resulting bundle (i.e., where do the compiled classes reside? what does the MANIFEST.MF contain? etc.)

    Regards,

    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •