错误是:" weblogic.application.ModuleException:java.lang.ClassNotFoundException weblogic server 12.2.1

时间:2016-11-18 16:43:24

标签: java eclipse spring-mvc spring-security weblogic12c

我是spring,spring security和weblogic的新手,所以我正在开发一个使用它们的项目 我在这里使用weblogic服务器12.2.1 但问题是该项目在tomcat 8服务器上运行完美 我已经在weblogic上部署了一次应用程序,并且在我添加spring安全性之前它已经工作了一次,但是在我完成tomcat之后,现在weblogic要求删除一个类

我的堆栈跟踪是

<Nov 18, 2016 7:15:13 PM AST> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\MarsWorkspace\xxx\target\m2e-wtp\web-resources. Ensure that the annotations are valid. The error is org.xxx.services.Login> 
<Nov 18, 2016 7:15:13 PM AST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1477051442040128" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login"
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:981)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:942)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
    at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:564)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:500)
    Truncated. see log file for complete stacktrace
> 
<Nov 18, 2016 7:15:13 PM AST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating distribute task for application "_auto_generated_ear_".> 
<Nov 18, 2016 7:15:13 PM AST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:981)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:942)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
    at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:564)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:500)
    Truncated. see log file for complete stacktrace
> 
<Nov 18, 2016 7:15:17 PM AST> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application C:\MarsWorkspace\xxx\target\m2e-wtp\web-resources. Ensure that the annotations are valid. The error is org.xxx.services.Login> 
<Nov 18, 2016 7:15:17 PM AST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1477056982276446" for task "1" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login"
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:981)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:942)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
    at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:564)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:500)
    Truncated. see log file for complete stacktrace
> 
<Nov 18, 2016 7:15:18 PM AST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating distribute task for application "_auto_generated_ear_".> 
<Nov 18, 2016 7:15:18 PM AST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.xxx.services.Login
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:981)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:942)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
    at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:564)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:500)
    Truncated. see log file for complete stacktrace
> 

现在当我把这个班级拿回来时

Error creating bean with name 'login': Injection of autowired dependencies failed;
pom.xml中的

版本

<!-- Generic properties -->
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Spring -->
<spring-framework.version>4.2.5.RELEASE</spring-framework.version>
<!-- <aspectj.version>1.7.4</aspectj.version> -->

<!-- Hibernate / JPA -->
<hibernate.version>5.2.4.Final</hibernate.version>

<!-- JSF Version -->
<jsf.version>2.2.13</jsf.version>

<!-- Logging -->
<logback.version>1.0.13</logback.version>
<slf4j.version>1.7.5</slf4j.version>
 <!-- spring security -->
 <springSecurity.version>4.0.3.RELEASE</springSecurity.version>

当我搜索到这个错误时,我想也许weblogic spring模块与我的冲突,所以我添加了weblogic.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.7/weblogic-web-app.xsd">

<wls:container-descriptor>
        <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
    </wls:container-descriptor>
</wls:weblogic-web-app> 

我还删除了C:\ Weblogic12_2_1 \ user_projects \ domains \ adminDomain \ servers \ AdminServer中的缓存,日志和tmp文件但没有任何反应。

我现在正在寻找几天,但如果有任何身体可以指出我会感激的东西,那就没有运气了。

1 个答案:

答案 0 :(得分:1)

我通过降低库版本解决了这个问题。