activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
Date Tue, 18 Aug 2015 13:12:11 GMT
Have you confirmed that xbean-spring.jar is actually making it into your
EAR and then onto the classpath?
On Aug 18, 2015 1:59 AM, <Mohan.Radhakrishnan@cognizant.com> wrote:

> Hi,
>     I have a Artemix-Spring-Arquillian setup. I am loading some bean from
> spring-beans-embedded.xml using the 'import' statement in
> applicationContext.xml. Since I am getting
> This exception I have included
>
>               <dependency>
>                 <groupId>org.apache.xbean</groupId>
>                 <artifactId>xbean-spring</artifactId>
>                 <version>4.3</version>
>               </dependency>
>
> But that doesn't work. Is there something wrong with the 'import'
> statement ? Can I load ActiveMQ beans like this ? At this time this doesn't
> seem to have anything to do
> With Arquillian because Arquillian 'ShrinkWrap' packages everything. JBoss
> Wildfly is used.
>
> Thanks,
> Mohan
>
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Failed to import bean definitions from relative
> location [spring-beans-embedded.xml]
> Offending resource: ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from ServletContext resource
> [/WEB-INF/spring-beans-embedded.xml]; nested exception is
> org.springframework.beans.FatalBeanException: NamespaceHandler class
> [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] for namespace [
> http://activemq.apache.org/schema/core] not found; nested exception is
> java.lang.ClassNotFoundException:
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler from [Module
> "deployment.SCOS-Ear.ear.SCOS-Web.war:main" from Service Module Loader]
>        at
> org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
>        at
> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
>        at
> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
>
> pom.xml
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>        <modelVersion>4.0.0</modelVersion>
>        <groupId>scos.hrg</groupId>
>        <artifactId>arquillian-hrg-e2e</artifactId>
>        <version>0.0.1-SNAPSHOT</version>
>        <dependencies>
>
>               <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring-jms</artifactId>
>                      <version>4.1.1.RELEASE</version>
>               </dependency>
>               <dependency>
>                   <groupId>org.apache.activemq</groupId>
>                   <artifactId>activemq-spring</artifactId>
>                   <version>5.8.0</version>
>               </dependency>
>               <dependency>
>                      <groupId>javax.enterprise</groupId>
>                      <artifactId>cdi-api</artifactId>
>                      <version>1.0-SP4</version>
>               </dependency>
>               <dependency>
>          <groupId>org.apache.activemq</groupId>
>          <artifactId>artemis-server</artifactId>
>          <version>1.0.0</version>
>        </dependency>
>        <dependency>
>          <groupId>org.apache.activemq</groupId>
>          <artifactId>artemis-jms-server</artifactId>
>          <version>1.0.0</version>
>        </dependency>
>        <dependency>
>                      <groupId>org.apache.geronimo.specs</groupId>
>                      <artifactId>geronimo-jms_1.1_spec</artifactId>
>                      <version>1.1.1</version>
>               </dependency>
>              <dependency>
>                 <groupId>org.springframework</groupId>
>                 <artifactId>spring-context</artifactId>
>                 <version>4.1.1.RELEASE</version>
>              </dependency>
>               <dependency>
>                      <groupId>org.jboss.spec.javax.jms</groupId>
>                      <artifactId>jboss-jms-api_1.1_spec</artifactId>
>                      <version>1.0.1.Final</version>
>               </dependency>
>
>               <dependency>
>                  <groupId>org.jboss.arquillian.junit</groupId>
>                  <artifactId>arquillian-junit-container</artifactId>
>                    <version>1.1.8.Final</version>
>                  <scope>test</scope>
>               </dependency>
>               <dependency>
>                       <groupId>org.jboss.arquillian.core</groupId>
>                       <artifactId>arquillian-core-api</artifactId>
>                       <version>1.1.4.Final</version>
>                       <scope>test</scope>
>               </dependency>
>               <dependency>
>                 <groupId>org.apache.xbean</groupId>
>                 <artifactId>xbean-spring</artifactId>
>                 <version>4.3</version>
>               </dependency>
>               <dependency>
>                   <groupId>org.jboss.shrinkwrap.resolver</groupId>
>                   <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
>                   <version>2.1.0</version>
>                   <scope>test</scope>
>               </dependency>
>               <dependency>
>             <groupId>org.jboss.arquillian.extension</groupId>
>
> <artifactId>arquillian-service-integration-spring-inject</artifactId>
>             <version>1.0.0.Beta3</version>
>                   <scope>test</scope>
>               </dependency>
>     </dependencies>
>
>        <profiles>
>               <profile>
>                      <id>arq-jbossas-managed</id>
>                      <dependencies>
>                            <dependency>
>                                   <groupId>org.wildfly</groupId>
>
> <artifactId>wildfly-arquillian-container-managed</artifactId>
>                                   <version>8.2.0.Final</version>
>                            </dependency>
>                      </dependencies>
>               </profile>
>        </profiles>
> </project>
>
> applicationContext.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:jms="http://www.springframework.org/schema/jms"
>        xmlns:oxm="http://www.springframework.org/schema/oxm"
>        xmlns:p="http://www.springframework.org/schema/p"
>        xmlns:context="http://www.springframework.org/schema/context"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>     http://www.springframework.org/schema/jms
>     http://www.springframework.org/schema/jms/spring-jms-3.0.xsd
>     http://www.springframework.org/schema/context
>     http://www.springframework.org/schema/context/spring-context-3.0.xsd
>     http://www.springframework.org/schema/oxm
>     http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd"
>        default-lazy-init="true">
>
>
>     <context:annotation-config/>
>
>    <!-- Activates scanning of @Repository and @Service -->
>    <context:component-scan base-package="scos.hrg"/>
>    <import resource="spring-beans-embedded.xml"/>
>    <import resource="spring-jms-beans.xml"/>
>    <import resource="broker.xml"/>
>
> </beans>
>
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful. Where permitted by
> applicable law, this e-mail and other e-mail communications sent to and
> from Cognizant e-mail addresses may be monitored.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message