In Eclipse Luna I created a maven project enterprises-granny
clone of github https://github.com/SAP/cloud-enterprise-granny.git .
After cloning git , all source files are imported in a project.A server JAVA WEB shipped from SAP HCP is running on local host.
Few applications are running on this server for testing purpose they works fine. In eclipse server project , there is a folder named webapps
which includes 'hello','basecamp' etc folder ie currently running apps on server , some of them includes maven as well.
When enterprises-granny
project is chosen to run as -> run on server -> JAVA WEB ->finish then it deployed all files to server without any error(s) .Now webapps
includes one more folder enterprises-granny
which includes all deployed files and then it opens a web browser with link http://localhost:8080/enterprise-granny
but webpage content is empty ie empty page is displayed .
Where as http://localhost:8080/hello (Another app to display hello world
) displays a page with contents hello world
.
How to resolve this error ?
Are you sure it is actually deploying properly? If eg in the Server Log (the trace one esp) you see lines reporting failure to instantiate some bean or other, then your deployment has ended in application crashing. Like mine right now (working with Tag 1.10.1). (I know this is not a full answer to your question, but worth checking. If you are getting similar failure reason, then whoever finds the answer to that first, please share!).
So for example my crash log spits out: 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;
...
If you just need to get some version of enterprise-granny up and running, without trying to debug stuff, then the latest GitHub version that works (without hacking) is the one tagged with 1.7.0 - this one doesn't have Twitter Bootstrap and Apache Tiles, never mind the other fine things in the latest versions, but it should deploy ok for you. (Tip: create a new server to test it locally, or if you want to keep it on a server you already deployed a version to, then in Server-config you should delete the existing .war from the pickup folder).
One other thing: for these "old-school" versions, which have the osintegrators "cloud-granny" look and feel, you might want to implement a couple of changes which will get the app to run also with Internet Explorer (not needed for Firefox or Chrome). The changes are:
//after the page loads
$(function() {
app.getAllAddresses();
$("#addressList").on("click",
//"option",
function() {
app.getAddressById(this.value);
});
});
... here you comment out the "option" parameter (which you don't use anyway). The other change is to prevent caching of jquery ajax calls, you do this in the section, just before closing element and after loading jquery, like this:
<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>
Implementing these two changes doesn't harm Chrome or Firefox, and enables IE users to select items in the addressList, and Save/Delete them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.