This discussion is archived
2 Replies Latest reply: Nov 16, 2012 12:35 AM by ElectroD RSS

apex-config.xml and glassfish error: MessContent is not allowed in prolog.

ElectroD Newbie
Currently Being Moderated
Hello!

I'm trying to create permanent config to apex listener.
So i have removed comments in web.xml in apex.war
     <context-param>
          <param-name>config.dir</param-name>
          <param-value>C:\app\config</param-value>
     </context-param>
then i have created apex-config.xml in C:\app\config\apex:
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
   <entry key="apex.db.username">APEX_PUBLIC_USER</entry>
   <entry key="apex.db.password">@123</entry>  (or !123 also tryed)
   <entry key="apex.db.hostname">localhost</entry>
   <entry key="apex.db.port">1521</entry>
   <entry key="apex.db.sid">orcl</entry>
</properties>
Then i deploy this war into glassfish v3.1.1, apex-listener v1.1.4.195.00.12
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: oracle.dbtools.rt.x3p.impl.X3PParseException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog.. Please see server.log for more details.
If i change apex-config.xml (delete 1st or 2nd row, add new parameters) the result is same. Also all files i have in UTF-8. Files doesn't have some unwritable characters.
If I remove file apex-config.xml, apex.war will deploy successfully.

the log from server.log:
[#|2012-11-08T20:10:03.590+0400|SEVERE|glassfish3.1.1|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1306: Startup of context /apex failed due to previous errors|#]

[#|2012-11-08T20:10:03.591+0400|SEVERE|glassfish3.1.1|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1305: Exception during cleanup after start failed
org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
     at org.apache.catalina.session.StandardManager.stop(StandardManager.java:874)
     at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571)
     at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)
     at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2000)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202)
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:195)
     at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
     at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
     at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
     at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
     at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
     at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:662)
|#]
[#|2012-11-08T20:05:36.208+0400|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: oracle.dbtools.rt.x3p.impl.X3PParseException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: oracle.dbtools.rt.x3p.impl.X3PParseException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2000)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202)
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:195)
     at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
     at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
     at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
     at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
     at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
     at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:662)
|#]
Please, HELP =)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points