当前位置: 首页 > 知识库问答 >
问题:

运行Hazelcast Management Center Web App时出现NoClassDefFoundError

马宜民
2023-03-14

我试图在tomcat 8(和jetty 9)和jvm 1.7.0_51中运行Hazelcast管理中心web应用程序版本3.2.3。我转到web页面,输入登录屏幕的默认用户名和密码(admin:admin ),然后得到以下异常。Hazelcast本身运行良好,我可以通过编程操作我的地图。

还有其他人在管理中心时遇到问题吗?

    javax.servlet.ServletException: Filter execution threw an exception
    root cause

    java.lang.NoClassDefFoundError: Could not initialize class  com.hazelcast.webmonitor.repositories.SerializationHelper
    com.hazelcast.webmonitor.repositories.UserRepository.save(UserRepository.java:47)
    com.hazelcast.webmonitor.repositories.UserRepository.login(UserRepository.java:88)
    com.hazelcast.webmonitor.service.UserManager.login(UserManager.java:188)
    com.hazelcast.webmonitor.service.UserManager.authenticate(UserManager.java:219)
    org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
    org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94)
    org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:195)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)

After removing the 2nd copy of the hazelcast jar I get this message when i try to login to the hazelcast war:

    11-Jul-2014 17:00:10.891 WARNING [http-nio-8080-exec-1]   com.hazelcast.webmonitor.repositories.UserRepository.null Problem while reading   DataSerializable, namespace: 0, id: 0, class: com.hazelcast.webmonitor.model.User,   exception: com.hazelcast.webmonitor.model.User
     com.hazelcast.nio.serialization.HazelcastSerializationException: Problem while reading DataSerializable, namespace: 0, id: 0, class: com.hazelcast.webmonitor.model.User,   exception: com.hazelcast.webmonitor.model.User
        at com.hazelcast.nio.serialization.DataSerializer.read(DataSerializer.java:114)
        at com.hazelcast.nio.serialization.DataSerializer.read(DataSerializer.java:36)
        at  com.hazelcast.nio.serialization.StreamSerializerAdapter.read(StreamSerializerAdapter.java:59)
        at com.hazelcast.nio.serialization.SerializationServiceImpl.toObject(SerializationServiceImpl.java:221)
         at com.hazelcast.webmonitor.repositories.SerializationHelper.deserialize(SerializationHelper.java:87)
        at com.hazelcast.webmonitor.repositories.SerializationHelper.deserialize(SerializationHelper.java:94)
        at com.hazelcast.webmonitor.repositories.UserRepository.get(UserRepository.java:151)
        at com.hazelcast.webmonitor.repositories.UserRepository.login(UserRepository.java:80)
        at com.hazelcast.webmonitor.service.UserManager.login(UserManager.java:188)
        at com.hazelcast.webmonitor.service.UserManager.authenticate(UserManager.java:219)
        at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
        at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:195)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:78)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at com.jamonapi.http.JAMonTomcatValve.invoke(JAMonTomcatValve.java:67)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1033)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: com.hazelcast.webmonitor.model.User
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:123)
        at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:112)
        at com.hazelcast.nio.ClassLoaderUtil.newInstance(ClassLoaderUtil.java:64)
        at com.hazelcast.nio.serialization.DataSerializer.read(DataSerializer.java:103)
        ... 41 more

共有1个答案

夏高朗
2023-03-14

你的类路径中有不止一个版本的Hazelcast jars吗?如果是这样,您的类路径中应该只有一个,以便正确构建Hazelcast和Management Center的序列化服务。

序列化服务在静态块中的<code>SerializationHelper</code>类中初始化,因此在那里引发的异常将作为<code>NoClassDefFoundError</code>传播到类加载器。

 类似资料:
  • 我对python开发相当陌生,对flask一无所知,我被分配了一个使用flask开发的项目。经过几周的工作,我现在能够解决所有的依赖关系和项目现在编译成功。但当我使用flask run运行项目,然后在浏览器中输入url时,它抛出“flask.cli.NoAppException”。我怎么能像这样运行我的项目呢。 > 设置FLASK_APP=init.py 设置FLASK_ENV=开发 烧瓶运行 服

  • 我在上面有一个问题:我使用了提供的答案,但仍然击中了一个对象错误。你能看到我错过了什么吗?我在“cash_sheet.range(”C8“).pastespecial xlpastevalues”处找到了错误

  • 问题内容: 我正在使用gradle作为JavaFX插件。即使在 distribution /下 构建和运行可执行文件之后,一切都可以完美运行,但只有一类: 为了多种目的,我创建了以下对象: 在IDE中运行该程序没问题,一切正常。但是,如果我构建并尝试运行.exe文件,则会得到以下-StackTrace: 我真的不明白。怎么可能找不到这个类,而我所有其他的类却都找不到呢? 我的build.gradl

  • 问题内容: 我已经创建了自己的文件,并通过将其设置为系统类加载器。它已经初始化,并且一切正常,但是找不到我要加载的类。这是: 我已确认该罐子存在,并且路径正确。这是我在程序中如何称呼它: 这是我得到的例外(第166行是指我尝试创建新行的行: 我什至尝试像这样显式加载类: 是什么原因造成的?它不应该“正常工作”吗? 更新: 这是来自的重要代码 更新2: 这是一个SSCCE:http : //nucl

  • 在我的环境中设置了JAVA_HOME之后,我在运行pig时得到了以下结果: 当我这么做的时候: 但是在我的环境中,JAVA_HOME是这样设置的: 运行于:Ubuntu 10.04.4 LTS java:java版本“1.6.0_21”Hadoop版本:Hadoop-0.20.203 PIG版本:PIG-0.11.1 env:term=Xterm shell=/bin/bash xdg_sessi

  • 代码: pom.xml依赖项: 我不明白发生了什么事,有人能帮忙吗?

  • 问题内容: 我正在使用Java Jersey框架(与Maven),并使用IntelliJ作为我的IDE。我遇到了这个运行时异常,仅当我尝试从命令行运行代码(使用maven进行编译,然后使用java -jar)时才发生,而在IntelliJ中运行时却没有发生。 我有一些Java代码,这些代码将尝试在某个远程URL上进行HTTP GET,并尝试将返回的JSON读取到某些Lombok POJO中: 我不

  • 问题内容: 我正在尝试使用JavaMail API发送电子邮件。我从自解压二进制文件在我的主目录中安装了jdk 1.5。我正在使用Ubintu 9.10 我使用下一条命令编译程序: 〜/ jdk1.5.0_22 / bin / javac -classpath〜/ jdk1.5.0_22 / jre / lib / javamail-1.4.3 / mail.jar:〜/ jdk1.5.0_22