gpt4 book ai didi

java - 带有 grails timeZoneSelect 标记的 IllegalAccessException on google app engine/java

转载 作者:行者123 更新时间:2023-11-29 06:23:24 24 4
gpt4 key购买 nike

有人在 GAE/J 上使用过 grails timeZoneSelect 标签吗?我在应用引擎上遇到了以下错误。我知道反射是不允许的,但错误的行似乎是在调用一个简单的公共(public)函数(inDaylightTime)?有谁知道如何解决这个问题(缺少硬编码的时区列表)?

谢谢

Uncaught exception from servletorg.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag : org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag : java.lang.IllegalAccessException: Reflection is not allowed on public boolean sun.util.calendar.ZoneInfo.inDaylightTime(java.util.Date)    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)    at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)    at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5235)    at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5233)    at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)    at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)    at com.google.net.rpc.impl.Server$2.run(Server.java:838)    at com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)    at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:536)    at com.google.net.rpc.impl.Server.startRpc(Server.java:793)    at com.google.net.rpc.impl.Server.processRequest(Server.java:368)    at com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:448)    at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)    at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)    at com.google.net.async.Connection.handleReadEvent(Connection.java:466)    at com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:759)    at com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:205)    at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)    at com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)    at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:394)    at java.lang.Thread.run(Unknown Source)Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag : org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag : java.lang.IllegalAccessException: Reflection is not allowed on public boolean sun.util.calendar.ZoneInfo.inDaylightTime(java.util.Date)

最佳答案

当我尝试调用 TimeZone.getTimeZone() 获取 TimeZone 并通过使用不同的库 Joda Time 解决这个问题时,我遇到了类似的问题。

http://joda-time.sourceforge.net/index.html

此包中有等效的时间/日期方法,比底层 JDK 中的方法效果更好。

关于java - 带有 grails timeZoneSelect 标记的 IllegalAccessException on google app engine/java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2055896/

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