org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in OSGi res[/META-INF/spring/bundle-context.xml|id=186|symName=org.my.i18n.service]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.ibatis.SqlMapClientFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

A few things cause this exception:
1) Check if you have all jars and if they're in the correct path.
2) Your classpath might be broken, you can define it in the command line with java -cp yourClassPath or at your IDE if you're using one.

,
Expert tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Solutions on the web

via Spring JIRA by Ingo Meyer, 1 year ago
Error creating bean with name 'sqlMapClient' defined in OSGi res[/META-INF/spring/bundle-context.xml|id=186|symName=org.my.i18n.service]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could
via Spring JIRA by Ingo Meyer, 1 year ago
Error creating bean with name 'sqlMapClient' defined in OSGi res[/META-INF/spring/bundle-context.xml|id=186|symName=org.my.i18n.service]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could
via spring.io by Unknown author, 1 year ago
Error creating bean with name 'torqueHelper' defined in class path resource [coreContext.xml] : Initialization of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition
via narkive.com by Unknown author, 2 years ago
exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourceDao' defined in class path resource [META-INF/opennms/applicationContext-dao.xml]: Invocation of init method failed
via Kuali JIRA by Mohammed Kousheh, 1 year ago
Error creating bean with name 'encryptionService' defined in class path resource [KNSSpringBeans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kuali.rice.core.service.impl.DemonstrationGradeEncryptionServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
java.lang.ClassNotFoundException: com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig
at java.lang.ClassLoader.findClass(ClassLoader.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:429)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.class$(SqlMapClientFactoryBean.java:72)
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.(SqlMapClientFactoryBean.java:108)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:860)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:238)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:167)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:235)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:167)
at org.springframework.osgi.extender.dependencies.startup.AsynchServiceDependencyApplicationContextExecutor$CompleteRefreshTask.run(AsynchServiceDependencyApplicationContextExecutor.java:133)
at java.lang.Thread.run(Thread.java:613)

Users with the same issue

4 times, 4 months ago
Once, 1 year ago
3 times, 1 year ago
2 times, 1 year ago
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.