运行grails run-app时生成web.xml文件时出错

时间:2013-08-21 02:48:44

标签: grails

我下载了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 .........

1 个答案:

答案 0 :(得分:0)

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

  • serializer-2.10.0.jar
  • xalan-2.7.1.jar
  • xercesImpl-2.10.0.jar
  • xml-apis-2.10.0.jar
  • XML的旋转变压器1.2.jar

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