at org.glassfish.jersey.server.ApplicationHandler.<init>(
at org.glassfish.jersey.server.ApplicationHandler.<init>(
at org.glassfish.jersey.servlet.WebComponent.<init>(
at org.glassfish.jersey.servlet.ServletContainer.init(
at org.glassfish.jersey.servlet.ServletContainer.init(
at javax.servlet.GenericServlet.init(
at org.apache.catalina.core.StandardWrapper.initServlet(
at org.apache.catalina.core.StandardWrapper.loadServlet(
at org.apache.catalina.core.StandardWrapper.load(
at org.apache.catalina.core.StandardContext.loadOnStartup(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(
at org.apache.catalina.core.ContainerBase$
at org.apache.catalina.core.ContainerBase$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Solution :

This error usual means that you have a both a JAX-RS 1 and JAX-RS 2 jar on the classpath. 

Jersey 2 uses JAX-RS 2 (, but if you have the jsr311-api.jar also, which is JAX-RS 1, there is a in each jar.

But the jsr311-api Application doesn’t have the method getProperties() (hence NoSuchMethodError).

So just exclude these dependencies manually or by eclipse dependency hierarchy feature :

1. Open POM
2. Open dependency hierarchy tab in bottom.
3. search for jsr and exclude all jsr dependencies.

215 total views, no views today

Failed to instantiate [org.apache.cxf.endpoint.Server]: Factory method ‘jaxRsServer’ threw exception;

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.cxf.endpoint.Server]: Factory method 'jaxRsServer' threw exception; nested exception is java.lang.NoSuchMethodError:;)Z
... 28 more
Caused by: java.lang.NoSuchMethodError:;)Z
at org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(
at org.apache.cxf.common.util.ClassHelper.getRealClass(
at org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.setResourceClassesFromBeans(
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setServiceBeans(
at com.example.config.AppConfig.jaxRsServer(
at com.example.config.AppConfig$$EnhancerBySpringCGLIB$$67f4649c.CGLIB$jaxRsServer$3(<generated>)
at com.example.config.AppConfig$$EnhancerBySpringCGLIB$$67f4649c$$FastClassBySpringCGLIB$$ae89a288.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(
at com.example.config.AppConfig$$EnhancerBySpringCGLIB$$67f4649c.jaxRsServer(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(

 To solve this issue update your versions of below dependencies:



this will resolve the issue,

266 total views, no views today

Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.

I was hitting the same problem when working with Apache tomcat . .

Solution Steps :

  1. Backup your pom.xml somewhere.
  2. Go to your pom.xml and on the bottom tab and click “Dependency Hierarchy” tab. 
  3. From there search for log4j-over-slf4j. 
  4. Exclude all instances of this dependency (right click on the instance and “Exclude Maven Artifact”). After you have no more log4j-over-slf4j appearing save your POM and try to run the program. 
  5. If it still doesn’t work then undo the changes you just made and exclude all instances of slf4j-log4j12.

Hopes this will resolve your problem

184 total views, no views today

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

Problem :

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

Solution :

getContextPath() was added with Servlet 2.5, does your version of Jetty supports that ? 

Might also want to check that you do not have some older or duplicate version of j2ee around.

Indicates that Jetty 6.1.x supports Servlet 2.5 , make sure you don’t have a pre-2.5 servlet version around. If this gets loaded before the 2.5 version, the entire classpath sees only Servlet 2.0 API (the 2.5 doesn’t even gets loaded).

so exclude it from the maven pom.xml

Exclusion entry

193 total views, no views today

Debug javascript.

Guide to Debug your java script files in google Chrome.

Ways to find debug console in chrome.
2. press F12 or inspect element
Below window will open up which contains various tabs.
Tab Details:
Elements: it shows HTML part of your page.
console : in case you want to run some statements.
sources : all your JavaScript files.
Network : shows all your Ajax and load requests.
Performance: you can monitor your page performance
How to debug:
To debug any javascript file just search your file by using ctrl+O or select your file from the left panel of your browser window.
To add debug point just click on row number as shown in the image below.
Now perform any operations on you webpage. Here I’m selecting value from the dropdown.

As soon as you select any value from the drop down. your request goes for processing and your request stop on debug point.
For this request in network tab there is an entry for it. which shows data retrieve from the request for more information you can select request header,response and preview tab.
After successful hit of the request your request will enter in the success part of your ajax request.
If you want to change and explore more values you can go to console tab.
if you want to change values of HTML element then go to element tab where you can change style of the page and can see change in real time.

152 total views, no views today