Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
I am getting the following exception. Please let me know what am I missing? Thanks in advance.
Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getDeclaredConstructor(Class.java:1985) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
nested exception is java.lang.IllegalStateException: Cannot create command without commandClass
I am getting following exception while using AbstractCommandController in spring framework.
The server encountered an internal error () that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Cannot create command without commandClass being set - either set commandClass or (in a form controller) override formBackingObject org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:488) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
Please help me in resolving this exception. Thanks in advance.
nested exception is java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher
I am getting following exception while deploying a web spring based application in tomcat 6.0.
nested exception is java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:899) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
I am getting following exception while deploying spring framework based application in tomcat. Please let me know what is missing.
SEVERE: Error configuring application listener of class
<br> org.springframework.web.context.ContextLoaderListener<br> java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener<br> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)<br> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)<br> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)<br> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)<br> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)<br> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)<br> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)<br> at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)<br> at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)<br> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)<br>
Restoring Conventional Browser Navigation to AJAX Applications
This article was result of my experience in developing Rich Internet application. It is depiction of my fight against the pitfalls of AJAX application. User is happy if you give him a better usability and performance but he is not aware about the underline technologies. If all of the sudden the default browser navigation stops to work in the desired fashion, user will start to panic. The developer starts getting issues like my back button is not working, clicking refresh lost my work done, so and so forth. The first reaction of developer is this is AJAX world and it act this way only, what can I do? Then we have to look for the ways of supporting default browser navigation in AJAX world. There are few hacks for providing supporting for default browser’s navigation using javascript but AJAX provide more systematic way of doing this. In my article I will explain how to use DOJO history APIs to cope up with one of the pitfall of AJAX application.
To read the article please follow the link
How many ways shared data problem can be solved?
1. Disabling interrrupts – to be used when data is shared between ISR and task code. note that scheduler would not be able to switch tasks as interrupts are disabled.
2. Using semaphore – can be used when data is not to be used in ISR as semaphores are not allowed in ISR.
3. Disabling task switches – to be used when data is not shared among ISR and task code.
What is deadly embrace or dead lock?
Dead lock or deadly embrace is another fancy name given to priority inversion.
What is priority inversion?
Priority inversion is a phenomenon which happens when different priority tasks shares common data is a particular fashion. Say task A is higher priority task than task B and they both shares common data say x. Say task B was running and it locks x for its use while task A interrupted and got control now when task A needs to access x it would be able to because control would never be given back to task B to release x. Hence higher priority task is blocked by lower priority task, which is reffered to as priority inversion.
What is mutex?
Mutex is short form of mutual exclusion. It is very much silimar to semaphore and the names are used interchangably in different opperating systems. The semaphore which are task attached i.e. the task which had acquired the sempahore will only be allowed to release it, are generally termed as Mutex.
Implement a stack?
A stack is an ordered list in which all insertions and deletions are made at one end, called the top. We can picture a stack as in the following figure.

The last element inserted is the first element deleted. Thus E is deleted before D because E was inserted after D. For this reason a stack is sometime called last-in, first-out (LIFO). Implementation of stack in Java
public class MyStack extends Vector {
/**
* Constructor creates an empty stack
*/
public MyStack() {
}
/**
* Pushes an Object onto the top of the stack
*/
public Object push(Object item) {
addElement(item);
return item;
}
/**
* Pops an item from the stack and returns it. The item popped is
* removed from the Stack.
*/
public Object pop() {
if (isEmpty()) {
throw new EmptyStackException();
}
Object item = elementData[--elementCount];
// Release memory used by this element
elementData[elementCount] = null;
return item;
}
/**
* Returns the top Object on the stack without removing it.
*/
public Object peek() {
if (isEmpty()) {
throw new EmptyStackException();
}
return elementData[elementCount - 1];
}
/**
* Check if the stack is empty.
*/
public boolean isEmpty() {
return elementCount == 0;
}
}