Spring MVC weblogic ClassNotFoundException

前端 未结 2 922
谎友^
谎友^ 2021-01-28 12:48

I\'m trying to setup a basic spring-mvc project with weblogic. I get this stacktrace

weblogic.application.ModuleException: java.lang.ClassNotFoundException: org.         


        
相关标签:
2条回答
  • 2021-01-28 13:27

    In same cases this is due to a conflict within WebLogic internal libraries and your application, may be you should try to use this :

    <prefer-application-packages>    
       <package-name>org.springframework.*</package-name>
    </prefer-application-packages>
    
    0 讨论(0)
  • 2021-01-28 13:39

    Your jar dependencies are missing. You have to import them manually or in case of using Maven, add thee lines to your pom.xml, that assures all the dependencies.

    <properties>
        <spring.version>4.3.2.RELEASE</spring.version>
    </properties>
    
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>
    

    Then you can clean and rebuild your project. It should be ok.

    0 讨论(0)
提交回复
热议问题