Announcement Announcement Module
Collapse
No announcement yet.
java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory

    Gigs,
    I just started using ActiveMQ configuration in my application & I copied the com.springsource.org.apache.activemq-5.1.0.jar & its dependency jars ( 9 Jars) to the DM server (~/repository/bundles/usr) BUT I see ClassNotFoundException !!

    Appreciate any quick help in this regard.

    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="vm://embedded?broker.persistent=false"/>
    <property name="dispatchAsync" value="true"></property>
    </bean>




    LOG:

    <SPDE0100E> The class with name 'org.apache.activemq.ActiveMQConnectionFactory', referenced by bean 'connectionFactory', could not be loaded by class loader 'ServerBundleClassLoader: [bundle=JobManagerBundle_1.0.0]':
    java.lang.ClassNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClassInternal(BundleLoader.java:481)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:397)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:385)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:87)
    at com.springsource.server.osgi.framework.equinox.Ser verBundleClassLoader.loadClass(ServerBundleClassLo ader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.loadClass(BundleLoader.java:313)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.loadClass(BundleHost.java:227)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.loadClass(AbstractBundle.java:1274)
    at org.springframework.osgi.util.BundleDelegatingClas sLoader.findClass(BundleDelegatingClassLoader.java :99)
    at org.springframework.osgi.util.BundleDelegatingClas sLoader.loadClass(BundleDelegatingClassLoader.java :156)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
    at org.springframework.util.ClassUtils.forName(ClassU tils.java:211)
    at org.springframework.beans.factory.support.Abstract BeanDefinition.resolveBeanClass(AbstractBeanDefini tion.java:385)
    at org.springframework.beans.factory.support.Abstract BeanFactory.resolveBeanClass(AbstractBeanFactory.j ava:1138)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.predictBeanType(Abstrac tAutowireCapableBeanFactory.java:524)
    at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :1177)
    at org.springframework.beans.factory.support.Abstract BeanFactory.isFactoryBean(AbstractBeanFactory.java :758)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:422)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:288)
    at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:145)
    at com.springsource.server.kernel.dm.ContextPropagati ngTaskExecutor$2.run(ContextPropagatingTaskExecuto r.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    Last edited by mahag; Aug 13th, 2009, 04:23 PM.

  • #2
    Folks,
    I started the DM server in debug mode with -suspend & I see CloneNotSupportedException in copy() method of ActiveMQConnectionFactory!!

    The exception toString trace shows the messages;

    -The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
    -The type java.util.Properties cannot be resolved. It is indirectly referenced from required .class files
    -The type java.io.Externalizable cannot be resolved. It is indirectly referenced from required .class files
    -The type javax.naming.Referenceable cannot be resolved. It is indirectly referenced from required .class files

    /**
    * Returns a copy of the given connection factory
    */
    public ActiveMQConnectionFactory copy() {
    try {
    return (ActiveMQConnectionFactory) super.clone();
    }
    catch (CloneNotSupportedException e) {
    throw new RuntimeException("This should never happen: " + e, e);
    }
    }

    Comment


    • #3
      There is NO Typo

      The bean definition correct, for some reason the posting shows a "space" in the
      class="org.apache.activemq.ActiveMQConnectionFacto ry">

      <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
      <property name="brokerURL" value="vm://embedded?broker.persistent=false"/>
      <property name="dispatchAsync" value="true"></property>
      </bean>

      Comment

      Working...
      X