使用JDK1.8执行Java petstore 1.1.2

时间:2018-11-08 01:16:14

标签: java-ee legacy-app

我需要使用Java SE 7+在服务器(JBoss,Tomcat,Glassfish等)上运行JPS 1.1.2(正是该版本)。
我已经设法将其部署在Glassfish服务器上(与JDK1.8一起运行)。我必须修改SQL代码才能填充数据库。但是,我不能进入宠物店。我是从服务器日志中得到的:

[Fatal Error] :1:41: Content is not allowed in prolog.

然后这样:

    WebModule[/estore]StandardWrapper.Throwable
java.lang.NullPointerException
    at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.getTagValue(ScreenFlowXmlDAO.java:379)
    at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.getScreens(ScreenFlowXmlDAO.java:173)
    at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.loadScreenDefinitions(ScreenFlowXmlDAO.java:110)
    at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowManager.init(ScreenFlowManager.java:65)
    at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.getScreenFlowManager(MainServlet.java:145)
    at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.init(MainServlet.java:58)
    at javax.servlet.GenericServlet.init(GenericServlet.java:244)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1583)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1225)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:237)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
    at java.lang.Thread.run(Thread.java:748)

我遵循了导致错误的最后一个标记,它是“模板” 有谁成功运行JPS 1.1.2,我将不胜感激。

0 个答案:

没有答案