gpt4 book ai didi

java - 使用 Dozer 时在 Mac 上出现警告

转载 作者:行者123 更新时间:2023-11-30 07:39:10 26 4
gpt4 key购买 nike

我正在我的 MAC 上使用 GWT + GAE 构建应用程序。在这个应用程序中,我有 DTO 并将 DTO 转换为我正在使用的持久实体 Dozer Library , 它的 Mapper 对象。一切都可以在 Windows 上正常编译和运行,但是当我尝试在 MAC 上以托管模式运行我的应用程序时,我收到以下警告:

The server is running at http://localhost:8080/
2009-06-26 16:16:47.496 java[1378:80f] Can't open input server /Library/InputManagers/MultiClutchInputManager.bundle
2009-06-26 16:16:47.498 java[1378:80f] [Java CocoaComponent compatibility mode]: Enabled
2009-06-26 16:16:47.498 java[1378:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Jun 26, 2009 11:17:00 PM org.dozer.DozerInitializer init
WARNING: Unable to register Dozer JMX MBeans with the PlatformMBeanServer. Dozer will still function normally, but management via JMX may not be available
java.security.AccessControlException: access denied (javax.management.MBeanServerPermission createMBeanServer)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:122)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:508)
at org.dozer.DozerInitializer.registerJMXBean(DozerInitializer.java:108)
at org.dozer.DozerInitializer.registerJMXBeans(DozerInitializer.java:97)
at org.dozer.DozerInitializer.init(DozerInitializer.java:64)
at org.dozer.DozerBeanMapper.<clinit>(DozerBeanMapper.java:56)
at com.athena.server.ContentServiceImpl.saveContent(ContentServiceImpl.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:306)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

是否可以修复此警告?

最佳答案

是的,禁用 JMX bean 的自动注册。来自Dozer configuration页面,dozer.autoregister.jmx.beans 默认为 true。将其设置为 false。现在这是通过属性文件完成的,我不确定您是否可以使用 GAE 来完成。如果不能,则必须获取源代码的副本,将其禁用并重新编译。

话虽这么说,但它确实看起来像是一个警告,但我不知道 Dozer 对此会有何 react ,所以您只需要尝试一下就可以了。它可能很好,但即使是这样,我仍然会修复它。

关于java - 使用 Dozer 时在 Mac 上出现警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1051699/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com