java - Spring servlet configuration file throws exception -
i following exception:
build path incomplete. cannot find class file com/hexgen/core/ihexgendictionarybased
this line above exception:
<context:component-scan base-package="com.hexgen.api.facade" />
this complete xml file:
<?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:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:sec="http://www.springframework.org/schema/security" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> <sec:global-method-security pre-post-annotations="enabled" secured-annotations="enabled" authentication-manager-ref="authenticationmanager" proxy-target-class="true"> <sec:expression-handler ref="expressionhandler"/> </sec:global-method-security> <bean id="expressionhandler" class="org.springframework.security.access.expression.method.defaultmethodsecurityexpressionhandler"> <property name="permissionevaluator" ref="hexgenpermissionevaluator" /> </bean> <bean id="hexgenpermissionevaluator" class="com.hexgen.api.facade.security.hexgenpermissionevaluator"/> <context:component-scan base-package="com.hexgen.api.facade" /> <mvc:annotation-driven /> <context:annotation-config /> </beans>
can explain have fix this?
you need make sure wherever com/hexgen/core/ihexgendictionarybased
class (or .class file) location needs on build path (or classpath). if it's in other hexgen-core.jar example make sure add build path (using eclipse) or classpath (using -cp
parameter).
if file in other project directory add /src
source directory spring project , core
classes automatically on classpath.
Comments
Post a Comment