我在我的MAC上使用GWT + GAE构建应用程序。在这个应用程序中,我有DTO,并从DTO转换为持久性实体,我正在使用{Maper对象Dozer Library。所有内容都在 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)
是否可以修复此警告?
答案 0 :(得分:4)
是,禁用JMX bean的自动注册。在Dozer configuration页面,dozer.autoregister.jmx.beans
默认为true
。将其设置为false
。现在这是通过属性文件完成的,我不确定你是否可以用GAE做到这一点。如果你不能,你将不得不获得源的副本,禁用它并重新编译它。
话虽如此,它确实看起来像一个警告,但我不知道Dozer会如何反应,所以你只需要尝试并看到。它可能没问题,但即使是这样,我仍然会解决它。