我已经完成上述设置,并且正在运行Hello world程序。 编译和构建成功,但是执行挂起。 请参阅图片的右下角。 ...
提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
在Eclipse Luna中,我创建了一个github https://github.com/SAP/cloud-enterprise-granny.git的maven项目enterprises-granny
克隆。
克隆git之后,所有源文件都将导入到项目中。SAPHCP附带的服务器JAVA WEB正在本地主机上运行。
出于测试目的,很少有应用程序在此服务器上运行,它们可以正常工作。 在eclipse服务器项目中,有一个名为webapps
的文件夹,其中包含“ hello”,“ basecamp”等文件夹,即当前在服务器上运行的应用程序,其中一些还包括maven。
当选择enterprises-granny
项目以->在服务器上运行-> JAVA WEB-> finish的方式运行时,它将所有文件部署到服务器而没有任何错误。现在, webapps
包含一个文件夹enterprises-granny
,其中包括所有部署的文件然后打开带有链接http:// localhost:8080 / enterprise-granny的Web浏览器
但网页内容为空,即显示空白页面。
其中http:// localhost:8080 / hello (另一个用于显示hello world
应用程序)显示的页面包含内容hello world
。
如何解决此错误?
您确定它确实在正确部署吗? 例如,如果在服务器日志(跟踪一个esp)中看到报告无法实例化某些bean或其他实例的行,则说明部署已结束,导致应用程序崩溃。 现在就像我的一样(使用Tag 1.10.1)。 (我知道这不是您问题的完整答案,但是值得检查。如果您遇到类似的失败原因,那么谁先找到该问题的答案,请分享!)。
因此,例如我的崩溃日志弹出: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'api': Cannot resolve reference to bean 'validationInInterceptor' while setting bean property 'inInterceptors' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationInInterceptor' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'validationProvider' while setting bean property 'provider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationProvider' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.validation.BeanValidationProvider]: Constructor threw exception;
Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'api': Cannot resolve reference to bean 'validationInInterceptor' while setting bean property 'inInterceptors' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationInInterceptor' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'validationProvider' while setting bean property 'provider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validationProvider' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.validation.BeanValidationProvider]: Constructor threw exception;
...
如果您只需要启动并运行某种版本的企业专用工具,而无需尝试调试东西,那么可以正常工作的最新GitHub版本(不带黑客)是带有1.7.0标记的版本-该版本没有Twitter Bootstrap和Apache Tiles,不要介意最新版本中的其他优点,但是它应该可以为您部署好。 (提示:创建一个新服务器以在本地对其进行测试,或者如果要将其保留在已经部署了版本的服务器上,则在Server-config中,应从拾取文件夹中删除现有的.war)。
另一件事:对于这些“老派”版本,它们的外观和感觉都像osintegrator的“ cloud-granny”一样,您可能需要进行一些更改,使应用程序也可以与Internet Explorer一起运行(不需要Firefox或Chrome)。 更改为:
//after the page loads
$(function() {
app.getAllAddresses();
$("#addressList").on("click",
//"option",
function() {
app.getAddressById(this.value);
});
});
...在这里,您注释掉了“ option”参数(无论如何您都不使用)。 另一个更改是防止缓存jquery ajax调用,您可以在本节中在关闭元素之前和加载jquery 之后执行此操作,如下所示:
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script>
$(document).ready(function() {
$.ajaxSetup({
cache : false
});
});
</script>
</head>
实施这两个更改不会损害Chrome或Firefox,并使IE用户可以选择addressList中的项目,然后保存/删除它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.