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

Samebug tips5

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 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.

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web19385

  • 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, 11 months 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
  • Error creating bean with name 'activemqBroker' defined in OSGi res[/META-INF/spring/servicemix-activemq.xml|id=21|symName=org.apache.servicemix.activemq]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
  • Stack trace

    • 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 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:557) 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.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:379) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:730) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.postRefresh(AbstractDelegatedExecutionApplicationContext.java:219) at org.springframework.osgi.extender.dependencies.startup.AsynchServiceDependencyApplicationContextExecutor$CompleteRefreshTask.run(AsynchServiceDependencyApplicationContextExecutor.java:133) at java.lang.Thread.run(Thread.java:613) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.ibatis.SqlMapClientFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:98) 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) ... 9 more Caused by: java.lang.NoClassDefFoundError at org.springframework.orm.ibatis.SqlMapClientFactoryBean.class$(SqlMapClientFactoryBean.java:72) at org.springframework.orm.ibatis.SqlMapClientFactoryBean.<init>(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 java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83) ... 13 more Caused by: 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 org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) 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) ... 20 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    17 times, 3 days ago
    2 times, 3 days ago
    Unknown user
    Once, 6 days ago
    3 times, 6 days ago
    1933 more bugmates