sae云平台java环境搭建中遇到的问题

在云平台sae上搭建spring mvc3.2 + spring3.2 + spring security3.2 + hibernate3.3环境,搭建过程中遇到了N多的错,本地tomcat运行没问题,上传到sae就会报错,现总结如下:

1.servlet、jsp两个jar必须删掉,否则会和sae环境jar包冲突

2.引入hibernate时会引入xml-api.jar,这个包也必须删掉,否则会报如下错误:

JAVA_SAE_Fatal_error: Failed startup of context c.s.s.w.SaeWebAppContext{/1/tryplatform,file:/data1/jetty_work/623/tryplatform/jetty-0.0.0.0-12058-tryplatform.war-_1_tryplatform-any-/webapp/},/data1/www/htdocs/623/tryplatform/1/tryplatform.war
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring/root-context.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.DocumentBuilderFactory cannot be found
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
at org.springframework.context.support.AbstractApplicationContext.refresh(Abstract yq36.javaruntime


3.如果报表不存在的错,可能是因为sae环境对mysql的表名是区分大小写的,注意一下hibernage生成的sql表名的大小写

你可能感兴趣的:(sae云平台java环境搭建中遇到的问题)