问题描述
- maven web启动服务器是出现错误error creating fake context.xml
-
Creating Tomcat server configuration at D:Program FilesdpapDPAP-2.0.1.RC1-DEMOsourcedpap-demodpap-demo-webtargettomcat
[ERROR] error creating fake context.xml : only whitespace content allowed before start tag and not u9518 (position: START_DOCUMENT seen u9518... @1:1)
org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace content allowed before start tag and not u9518 (position: START_DOCUMENT seen u9518... @1:1)
at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1528)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1407)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:179)
at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:75)
at org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:40)
at org.apache.tomcat.maven.plugin.tomcat6.RunMojo.getContextFile(RunMojo.java:254)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo.createContext(AbstractRunMojo.java:533)
at org.apache.tomcat.maven.plugin.tomcat6.RunMojo.createContext(RunMojo.java:134)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo.startContainer(AbstractRunMojo.java:825)
at org.apache.tomcat.maven.plugin.tomcat6.AbstractRunMojo.execute(AbstractRunMojo.java:463)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
解决方案
外部的tomcat还是用的是maven tomcat的插件?pom.xml和context.xml配置文件发出来看看
时间: 2024-10-31 15:14:41