Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
Cannot find class org.springmodules.validation.bean.conf.loader.anno tation.Annotation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot find class org.springmodules.validation.bean.conf.loader.anno tation.Annotation

    I want to use Spring Modules 0.9 and had read the article http://wheelersoftware.com/articles/...framework.html.
    I use Eclipse, New Project, Plug-in Development, Plug-in from Existing JAR Archives, an OSGi framework (Equinox), unselect "Unzip the JAR archives into the project" to create a new Plug-in SpringJar for the spring-modules-validation.jar.
    Then I modify the Java Build Path of another project to use the spring-modules-validation.jar.
    Please help to solve the following error.
    servlet.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:osgi="http://www.springframework.org/schema/osgi"
           xmlns:amq="http://activemq.apache.org/schema/core"
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:p="http://www.springframework.org/schema/p"
           xsi:schemaLocation="http://www.springframework.org/schema/beans 
                               http://www.springframework.org/schema/beans/spring-beans.xsd
                               http://www.springframework.org/schema/osgi 
                               http://www.springframework.org/schema/osgi/spring-osgi.xsd
                               http://www.springframework.org/schema/context
                               http://www.springframework.org/schema/context/spring-context-2.5.xsd">
    	
    	<!-- Enable annotation-based validation using Bean Validation Framework -->
    	<!-- Using these instead of vld namespace to prevent Eclipse from complaining -->
    	<bean id="configurationLoader"
    		class="org.springmodules.validation.bean.conf.loader.annotation.AnnotationBeanValidationConfigurationLoader"/>
    	<bean id="validator" class="org.springmodules.validation.bean.BeanValidator"
    		p:configurationLoader-ref="configurationLoader"/>
    
    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- Enable annotation-based validation using Bean Validation Framework --> <!-- Using these instead of vld namespace to prevent Eclipse from complaining --> <bean id="configurationLoader" class="org.springmodules.validation.bean.conf.loader.annotation.AnnotationBeanValidationConfigurationLoader"/> <bean id="validator" class="org.springmodules.validation.bean.BeanValidator" p:configurationLoader-ref="configurationLoader"/>
    Error appear on the Eclipse console:
    12:15:55,984 ERROR org.springframework.osgi.web.context.support.OsgiB undleXmlWebApplicationContext:152 - Refresh error
    org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [org.springmodules.validation.bean.conf.loader.anno tation.AnnotationBeanValidationConfigurationLoader] for bean with name 'configurationLoader' defined in URL [bundleentry://8.fwk13665843/WEB-INF/App-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springmodules.validation.bean.conf.loader.anno tation.AnnotationBeanValidationConfigurationLoader not found from bundle [com.comp.hw.war]
    at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1141)
Working...
X