JBuilder+struts一个常见异常

[org.apache.commons.digester.Digester]-[ERROR] Parse Error at line 3 column 22: The content of element type "tiles-definitions" is incomplete, it must match "(definition)+". 2005-10-20 10:59:18,109 [org.apache.commons.digester.Digester]-[ERROR] Parse Error at line 3 column 22: The content of element type "tiles-definitions" is incomplete, it must match "(definition)+". org.xml.sax.SAXParseException: The content of element type "tiles-definitions" is incomplete, it must match "(definition)+". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.tiles.xmlDefinition.XmlParser.parse(XmlParser.java:334) at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile(I18nFactorySet.java:542) at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles(I18nFactorySet.java:479) at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFactory(I18nFactorySet.java:295) at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(I18nFactorySet.java:269) at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(I18nFactorySet.java:217) at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.init(ComponentDefinitionsFactoryWrapper.java:139) at org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory(TilesUtilImpl.java:168) at org.apache.struts.tiles.TilesUtil.createDefinitionsFactory(TilesUtil.java:205) at org.apache.struts.tiles.TilesPlugin.init(TilesPlugin.java:230) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3421) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:700) 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:324) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1058) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1683) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634) at org.apache.crimson.parser.Parser2.parse(Parser2.java:333) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:385) at org.apache.catalina.core.StandardHost.install(StandardHost.java:803) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:442) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) 以上错误多见于JBUILDER + STRUTS

 

 

 

 

解决方法: 将tiles-defs.xml改为:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>
  <definition name="/" />
</tiles-definitions>

posted @ 2018-09-07 10:48  人情世故  阅读(178)  评论(0编辑  收藏  举报
"不管做什么,只要坚持下去就会看到不一样!在路上,不卑不亢!"