【问题标题】:grails 1.1.1 will support java 1.7grails 1.1.1 将支持 java 1.7
【发布时间】:2017-08-24 14:41:29
【问题描述】:

目前我的应用程序在 grails 1.1.1 上运行,在 web sphere 服务器上运行 java 1.6。我的应用程序正在使用 java 1.6 的旧服务器上工作。最近服务器团队升级了 websphere 服务器 8.5.5,他们要求我们使用 java 1.7 部署一个耳朵。我已经用 java 1.7 部署了 ear。现在我遇到以下错误:

Error Page Exception
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.


Original Exception: 
Error Message: javax.servlet.ServletException: Filter [charEncodingFilter]: could not be initialized
Error Code: 500
Target Servlet: com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor
Error Stack: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass 
     at java.security.AccessController.doPrivileged(AccessController.java:426) 
     at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704) 
     at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411) 
     at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) 
     at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169) 
     at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749) 
     at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634) 
     at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426) 
     at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718) 
     at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177) 
     at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370) 
     at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639) 
     at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968) 
     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776) 
     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379) 
     at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435) 
     at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653) 
     at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477) 
     at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603) 
     at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667) 
     at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611) 
     at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269) 
     at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1261) 
     at java.security.AccessController.doPrivileged(AccessController.java:426) 
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:92) 
     at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1255) 
     at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1093) 
     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:832) 
     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:814) 
     at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335) 
     at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118) 
     at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228) 
     at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181) 
     at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247) 
     at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360) 
     at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602) 
     at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$QueuedWork.run(SSLReadServiceContext.java:1981) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881) 
     Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass 
     ... 43 more 
     Caused by: java.lang.reflect.InvocationTargetException 
     ... 43 more 
     Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [customer.CustomerController]! 
     ... 43 more 
     Caused by: java.lang.TypeNotPresentException: Type CustomerSegment not present 
     at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:399) 
     at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:126) 
     at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:84) 
     at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:68) 
     at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1164) 
     at java.beans.Introspector.getBeanInfo(Introspector.java:428) 
     at java.beans.Introspector.getBeanInfo(Introspector.java:175) 
     at java.security.AccessController.doPrivileged(AccessController.java:456) 
     at customer.CustomerController.$getStaticMetaClass(CustomerController.groovy) 
     at base.BdwBaseController.<init>(BdwBaseController.groovy) 
     at customer.CustomerController.<init>(CustomerController.groovy) 
     ... 43 more 
     Caused by: java.lang.ClassNotFoundException: CustomerSegment 
     at java.lang.Class.forNameImpl(Native Method) 
     at java.lang.Class.forName(Class.java:302) 
     ... 54 more 

我有几个问题:

  • Grails 1.1.1 将支持 java 1.7 吗?
  • 如果不需要,我是否需要升级 grails?
  • 升级 grails 的所有步骤是什么?
  • web sphere 8.5.5 将不支持 java 1.6?
  • 要解决此错误,我需要检查什么?
  • 我需要更新 jars 吗?

请在下面找到我在我的应用程序中使用的罐子:

jar files

【问题讨论】:

  • 每个问题一个问题
  • 我没有得到你@BurtBeckwith
  • Burt 提醒您在每个帖子中问一个问题。在这里回答你想问的所有问题是不可能的(或者至少真的很令人困惑)。作为旁注,您还在这里询问了一些非常古老的(2009)东西,即使您确实让它工作,出于包括性能,安全性和可维护性在内的大量原因,您最好升级!

标签: java grails websphere


【解决方案1】:

我会尽可能多地回答,但这是尽力而为,因为你在一篇帖子中问了太多问题!

1 - 可能不会。 Grails 1.1.1 于 2009 年问世,Java 1.7 于 2011 年问世,是对 1.6 的重大改变。您也许可以强迫他们一起工作,但六(多)年后您将很难找到好的信息。

2 - 是的。

3 - 您可以从这里开始:http://docs.grails.org/1.2.0/ 然后从那里开始。

4 - 请参阅下面的评论。 (本来我说的是错的:IBM 推荐 Java 8 和 WebSphere 8。)

5 - 可能并不重要,如果您要升级所有内容。

6 - 是的。

【讨论】:

  • 对于第 4 点,WebSphere 8 将仅与 Java 6 一起运行。客户询问的 WebSphere 8.5.5 具有不同的 Java 版本,具体取决于所使用的 8.5.5 中的修订包级别。对于任何最近的修订包(8.5.5.5 和更新版本),都支持 Java 6、7 和 8(尽管推荐使用 Java 8)。不过值得注意的是,IBM 将于 2018 年 4 月 30 日在 8.5.5 中取消对 Java 6 的支持。
  • 感谢指正!我刚刚做了一个快速的谷歌搜索,显然这点错了!
  • 感谢您的支持。我将尝试更新我的 grails。丹尼尔和亚历克斯莫特利
  • 祝你好运!如果遇到问题,请随时在 StackOverflow 上发布问题; Grails 1 已经很老了,但我敢肯定这里有人会提供帮助!几年前我开始使用 Grails 1.2,现在正在升级到 3.2,所以这绝对是可能的!
  • 最后一个问题:我需要将grails升级到哪个版本? @丹尼尔
猜你喜欢
  • 1970-01-01
  • 2020-05-09
  • 2021-03-07
  • 1970-01-01
  • 2013-11-18
  • 1970-01-01
  • 2016-01-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多