0

我下载了 grails 2.0.4 并运行了这些命令:

  grails create-app contactmanager
  cd contactmanager
  grails clean
  grails run-app

最后一个命令返回此错误堆栈跟踪:

| Error Error generating web.xml file
org.apache.xml.utils.WrappedRuntimeException: org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to org.apache.xml.serializer.SerializationHandler
    at org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerFactory.java:137)
    at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:214)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:278)
    at org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.writeWebDescriptorResult(DefaultGrailsPluginManager.java:682)
    at org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.doWebDescriptor(DefaultGrailsPluginManager.java:667)
    at org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.doWebDescriptor(DefaultGrailsPluginManager.java:643)
    at org.codehaus.groovy.grails.plugins.GrailsPluginManager$doWebDescriptor.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at _GrailsPackage_groovy$_run_closure5_closure10.doCall(_GrailsPackage_groovy:121)
    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:597)
    at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:226)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at _GrailsPackage_groovy$_run_closure5_closure10.doCall(_GrailsPackage_groovy)
    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:597)
    at .........
4

1 回答 1

0

您是否在任何时候操作过 jre/lib/ext 目录?我这样做是为了在 weblogic 上设置 saml 环境。我复制了这些文件

  • 序列化程序-2.10.0.jar
  • xalan-2.7.1.jar
  • xercesImpl-2.10.0.jar
  • xml-apis-2.10.0.jar
  • xml-resolver-1.2.jar

这导致了 xml 解析中的问题。我从 jre/lib/ext 中删除了这些文件,它开始工作。想知道你是否有同样的问题。

于 2014-09-03T16:32:18.553 回答