即使我更喜欢处理JavaEE应用程序,这个电子商务应用程序(Shopizer)也是一个Spring应用程序。我希望它能在GF 4.1.1上顺利运行,但它仍然会出现偶然错误,甚至Shopizer的作者也无法精确解读。他们宁愿期待他们的应用程序成为典型的“一次编写,随处运行”应用程序。
这是我得到的输出(请确保滚动到底部,因为有更多信息):
- 服务器控制台中从上到下的输出 -
.......
Info: visiting unvisited references
Info: visiting unvisited references
Info: WebModule[null] ServletContext.log():No Spring WebApplicationInitializer types detected on classpath
Info: Initializing Mojarra 2.2.12 ( 20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/2.2.12@14885) for context '/sm-shop-2.0.3-SNAPSHOT'
Severe: Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
Severe: Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?
Severe: Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/xml/sax/SAXNotRecognizedException
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:773)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:353)
---- left out the middle part ----
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:745)
Severe: Exception while loading the app
Severe: Undeployment failed for context /sm-shop-2.0.3-SNAPSHOT
Severe: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/xml/sax/SAXNotRecognizedException
Info: Exception Occurred :Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/xml/sax/SAXNotRecognizedException. Please see server.log for more details.
伟大的@BalusC
在回复我对其他一些(无关的)问题的评论时向我指出,该项目可能包含对某个javaee
库的引用。我告诉作者,他们的反应是:
“好点javaee.jar可能已经被依赖项拉了但事实并非如此。从IDE中你可以看到来自sm-shop的pom依赖项。
从我看到glassfish在项目中查找javaee xml文件并找不到它,也许有一种方法可以跳过验证“
所以我的问题是:如何阻止GF查找这些内容
这是Git(版本2.0.3)的链接,适用于任何关心代码库的人:https://github.com/shopizer-ecommerce/shopizer/tree/2.0.3
谢谢!