Skip to main content

Posts

Showing posts from August, 2015

Maven dependencies Nature is not working in Eclipse

If you have enable the maven nature enables via eclipse and still  All maven dependencies are not loading and its not showing up in the libraries then. Add this entry in your classpath file of project . Just after JRE entry in your classpath file. 1. Ctrl+Shift+R to open up resource . 2. search .classpath 3 .add entry after JRE. <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>

Exception java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter

Exception: Caused by: java. lang . NoClassDefFoundError : net/sf/cglib/proxy/CallbackFilter at org. springframework . beans . factory . support . CglibSubclassingInstantiationStrategy . instantiateWithMethodInjection (CglibSubclassingInstantiationStrategy. java : 71 ) at org. springframework . beans . factory . support . SimpleInstantiationStrategy . instantiate (SimpleInstantiationStrategy. java : 75 ) at org. springframework . beans . factory . support . AbstractAutowireCapableBeanFactory . instantiateBean (AbstractAutowireCapableBeanFactory. java : 948 ) ... 13 more Caused by: java. lang . ClassNotFoundException : net. sf . cglib . proxy . CallbackFilter at java. net . URLClassLoader $1. run (Unknown Source) at java. net . URLClassLoader $1. run (Unknown Source) at java. security . AccessController . doPrivileged (Native Method) at java. net . URLClassLoader . findClass (Unknown Source) at java. lang . ClassLoader . loadClass (Unknown Source) at sun. misc . Launch...

Exception at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass)

You might end up with this exception while doing your one to one ,or many to one relationship in hibernate. Exception: Exception in thread "main" java. lang . NullPointerException at org. hibernate . cfg . OneToOneSecondPass . doSecondPass (OneToOneSecondPass. java : 135 ) at org. hibernate . cfg . Configuration . secondPassCompile (Configuration. java : 1127 ) at org. hibernate . cfg . AnnotationConfiguration . secondPassCompile (AnnotationConfiguration. java : 296 ) at org. hibernate . cfg . Configuration . buildSessionFactory (Configuration. java : 1283 ) at com. javatpoint . Test . main (Test. java : 13 ) To fix correct this exception Check following : 1. Your one to one mapping bean is pointing to correct column. 2. You have configured both table correctly. Once you have correct these your exception will go away.

Maven - Pom.xml Issues.

Maven -- > pom.xml error resolution Problem 1. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved. Soultion :-  1 . Just go to the path  C: \Users \< username> \. m2 \repository \org \apache \maven \plugins 2.  Delete the plugin which is causing the issue . 3. In Eclipse clean and build your project again 4. choose Maven->Update Dependencies. Problem 2 : Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled. Solution :-  Rightclick on your project in eclipse and choose Maven->Update Dependencies Choose Force update of snapshot release.

How to hot deploy your code on Remote Debugging.

Make sure you have check this. 1) If you run your application in eclipse using the launch configuration Is your "Project" - "Build Automatically" flag enabled? If not, the code is not compiled and ignored at runtime. Follow these steps to debug in Remote debug mode. Go to :- yourProject  --> Debug as --> debug configuration... 1 .DoubleClick on Remote java application  2. Set port in the connect Tab. click OK and select the appropriate project you want to debug. Click Ok and  then click debug. Hot deploy has supported the code changes in the method implementation only. If you add a new class or a new method, restart is still required. You are done with the Hot Deploy of remote application.