【问题标题】:Hazelcast and spring bootHazelcast 和弹簧靴
【发布时间】:2016-03-01 06:15:05
【问题描述】:

我正在使用 spring boot 1.3.3 和 Hazelcast 我的构建看起来像:

            <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>${spring.boot.version}</version>
            <configuration>
                <executable>true</executable>
                <layout>ZIP</layout>
                <embeddedLaunchScriptProperties>
                    <mode>service</mode>
                    <useStartStopDaemon>false</useStartStopDaemon>
                </embeddedLaunchScriptProperties>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-all</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>

当服务在 Linux 中执行时,我在日志中看到:

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/hazelcast/cluster/impl/operations/WanReplicationOperation
    at org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1302) ~[spring-webmvc-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:977) ~[spring-webmvc-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]

但我在胖罐子里看到 hazelcast-all.jar 有什么线索吗?

【问题讨论】:

  • stacktrace 提到 Spring 4.2.4,但 Spring Boot 1.3.3 使用 Spring 4.2.5。

标签: spring-boot hazelcast


【解决方案1】:

问题是由 spring-boot 脚本引起的。 由于服务停止没有杀死进程并且它仍然活着,因此启动失败并在日志中抛出这样的异常。 我仍然不明白为什么它找不到专门的 hazelcast 类,其余的都可以

【讨论】:

    猜你喜欢
    • 2017-12-22
    • 2018-02-14
    • 2019-05-03
    • 2021-04-20
    • 1970-01-01
    • 2023-01-07
    • 2021-12-29
    • 2021-12-08
    • 1970-01-01
    相关资源
    最近更新 更多