Spring security Spring Security LDAP IncorrectResultSizeDataAccessException

Spring security Spring Security LDAP IncorrectResultSizeDataAccessException,spring-security,Spring Security,我为此绞尽脑汁已经有一段时间了,但一事无成。这就是我的security-context.xml中的内容。这将是一个servlet 我不断得到以下错误: nested exception is java.lang.NoClassDefFoundError: org/springframework/dao/IncorrectResultSizeDataAccessException 有人能告诉我我做错了什么吗?谢谢。您需要确保类路径上有spring tx。如果您使用的是构建工具,您可以通过查看以下

我为此绞尽脑汁已经有一段时间了,但一事无成。这就是我的security-context.xml中的内容。这将是一个servlet

我不断得到以下错误:

nested exception is java.lang.NoClassDefFoundError: org/springframework/dao/IncorrectResultSizeDataAccessException

有人能告诉我我做错了什么吗?谢谢。

您需要确保类路径上有spring tx。如果您使用的是构建工具,您可以通过查看以下内容来了解其配置:解释配置的外观。例如,如果您使用的是Spring 3.2.0.RELEASE和Maven,则需要确保pom.xml中包含以下内容:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>3.2.0.RELEASE</version>
</dependency>

请注意,确保您的Spring依赖项版本匹配非常关键,即与group org.springframework的工件应该匹配,因此如果您没有在其他地方使用Spring 3.2.0.RELEASE,您需要确保更改版本号以匹配其他Spring依赖项。

您需要确保类路径上有Spring tx。如果您使用的是构建工具,您可以通过查看以下内容来了解其配置:解释配置的外观。例如,如果您使用的是Spring 3.2.0.RELEASE和Maven,则需要确保pom.xml中包含以下内容:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>3.2.0.RELEASE</version>
</dependency>
请注意,确保您的Spring依赖项版本匹配是至关重要的,即与组org.springframework的工件应该匹配,因此如果您没有在其他地方使用Spring 3.2.0.RELEASE,您将需要确保更改版本号以匹配其他Spring依赖项