Skip to main content

Posts

Showing posts from June, 2017

java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()

Exception: java. lang . NoSuchMethodError : javax. ws . rs . core . Application . getProperties ()Ljava/util/Map; at org. glassfish . jersey . server . ApplicationHandler .<init>(ApplicationHandler. java : 304 ) at org. glassfish . jersey . server . ApplicationHandler .<init>(ApplicationHandler. java : 285 ) at org. glassfish . jersey . servlet . WebComponent .<init>(WebComponent. java : 311 ) at org. glassfish . jersey . servlet . ServletContainer . init (ServletContainer. java : 170 ) at org. glassfish . jersey . servlet . ServletContainer . init (ServletContainer. java : 358 ) at javax. servlet . GenericServlet . init (GenericServlet. java : 158 ) at org. apache . catalina . core . StandardWrapper . initServlet (StandardWrapper. java : 1231 ) at org. apache . catalina . core . StandardWrapper . loadServlet (StandardWrapper. java : 1144 ) at org. apache . catalina . core . StandardWrapper . load (StandardWrapper. java : 1031...

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

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 : org. springframework . aop . support . AopUtils . isCglibProxyClass (Ljava/lang/Class;)Z at org. springframework . beans . factory . support . SimpleInstantiationStrategy . instantiate (SimpleInstantiationStrategy. java : 189 ) at org. springframework . beans . factory . support . ConstructorResolver . instantiateUsingFactoryMethod (ConstructorResolver. java : 588 ) ... 28 more Caused by: java. lang . NoSuchMethodError : org. springframework . aop . support . AopUtils . isCglibProxyClass (Ljava/lang/Class;)Z at org. apache . cxf . common . util . SpringAopClassHelper . getRealClassInternal (SpringAopClassHelper. java : 85 ) at org. apache . cxf . common . util . ClassHelper . getRealClass (ClassHelper. java : 55 ) at or...

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 : Backup your pom.xml somewhere. Go to your pom.xml and on the bottom tab and click "Dependency Hierarchy" tab.  From there search for log4j-over-slf4j.  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.  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

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 <exclusion> <artifactId> servlet-api </artifactId> <groupId> javax.servlet </groupId> </exclusion>

Debug javascript.

Guide to Debug your java script files in google Chrome. Ways to find debug console in chrome. 1. install FirebugLite : https://chrome.google.com/webstore/detail/bmagokdooijbeehmkpknfglimnifench/https%3A//chrome.google.com/webstore/detail/elkkomimknapgodalnkjeddkjnjkfmfp 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 sel...