Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 部署bean上的Jboss错误_Spring_Jboss_Ejb 3.1 - Fatal编程技术网

Spring 部署bean上的Jboss错误

Spring 部署bean上的Jboss错误,spring,jboss,ejb-3.1,Spring,Jboss,Ejb 3.1,我正在尝试部署一个在Jboss中使用@Interceptros注释的bean。 根据文档,我创建了beanRefContext.xml,下面是Bean代码 @Stateless @LocalBean @Interceptors(SpringBeanAutowiringInterceptor.class) public class ClienteBean implements ClienteBeanLocal { public ClienteBean() { // TODO Auto-

我正在尝试部署一个在Jboss中使用@Interceptros注释的bean。 根据文档,我创建了beanRefContext.xml,下面是Bean代码

@Stateless
@LocalBean
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class ClienteBean implements ClienteBeanLocal {


public ClienteBean() {
    // TODO Auto-generated constructor stub
}

@Autowired
private IClienteDAO cliente;

@Override
public List<ClienteDTO> selectALL() throws Exception {
    return cliente.selectALL();
}

我该怎么解决呢?

JBoss似乎没有看到SpringBeanAutowiringInterceptor.class。在EAR文件中,将spring JAR放在lib目录中。看看这是否有效

如果您使用maven组装EAR文件,可以执行以下操作:

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(Unknown Source) [:1.7.0_09]
    at sun.reflect.annotation.AnnotationParser.parseArray(Unknown Source) [:1.7.0_09]
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(Unknown Source) [:1.7.0_09]
    at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source) [:1.7.0_09]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source) [:1.7.0_09]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source) [:1.7.0_09]
    at java.lang.Class.initAnnotationsIfNecessary(Unknown Source) [:1.7.0_09]
    at java.lang.Class.getAnnotations(Unknown Source) [:1.7.0_09]
    at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.readAnnotations(IntrospectionTypeInfoFactoryImpl.java:610) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:126) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.reflect.plugins.InheritableAnnotationHolder.getDeclaredAnnotations(InheritableAnnotationHolder.java:96) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.reflect.plugins.ClassInfoImpl.getAnnotations(ClassInfoImpl.java:181) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.reflect.plugins.AbstractAnnotatedInfo.getUnderlyingAnnotations(AbstractAnnotatedInfo.java:63) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.scanning.plugins.visitor.ClassHierarchyResourceVisitor.handleClass(ClassHierarchyResourceVisitor.java:76) [:1.0.0.GA]
    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.doVisit(ReflectResourceVisitor.java:108) [:1.0.0.GA]
    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.visit(ReflectResourceVisitor.java:86) [:1.0.0.GA]
    ... 53 more