activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Mohan.Radhakrish...@cognizant.com>
Subject RE: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
Date Mon, 24 Aug 2015 07:34:38 GMT
This git link(https://github.com/apache/activemq-artemis/blob/master/examples/jms/stomp1.1/src/main/resources/activemq/server0/broker.xml)
is down.

Mine is like this.
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns="urn:activemq"
               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">


But this link https://github.com/projectodd/wunderboss-artemis/blob/master/src/main/resources/default-broker.xml

Has this.

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">

Thanks,
Mohan

-----Original Message-----
From: Radhakrishnan, Mohan (Cognizant)
Sent: Wednesday, August 19, 2015 8:48 AM
To: users@activemq.apache.org
Subject: RE: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

Would you know which artemis JARs are required in the EAR. All my JARs are inside my WAR's
WEB-INF.

Are all these needed ?
activemq-spring( 5.8.0 ) , artemis-server( 1.0.0 ) and artemis-jms-server ( 1.0.0 )


Thanks,
Mohan
________________________________________
From: tbain98@gmail.com [tbain98@gmail.com] on behalf of Tim Bain [tbain@alumni.duke.edu]
Sent: Wednesday, August 19, 2015 1:06 AM
To: ActiveMQ Users
Subject: RE: java.lang.ClassNotFoundException: org.apache.xbean.spring.context.v2.XBeanNamespaceHandler

It sounds like your XSD isn't making it onto the classpath.  Is it possible that whatever
Artemis JAR includes artemis-server.xsd isn't getting into the EAR either?
On Aug 18, 2015 7:43 AM, <Mohan.Radhakrishnan@cognizant.com> wrote:

> It didn't make it into the EAR. So now I have added it and this error
> is resolved. But I have another problem.
>
> Broker.xml causes this.
>
> Caused by: org.xml.sax.SAXParseException; lineNumber: 23; columnNumber:
> 77; cvc-elt.1.a: Cannot find the declaration of element 'configuration'.
>         at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
>         at
> org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
>         at
> org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
>         at
> org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
>         at
> org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
>         at
> org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2143)
>         at
> org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:788)
>         at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNS
> DocumentScannerImpl.java:283)
>
> Should I use a broker.xml ? I also have artemis-roles.properties and
> artemis-users.properties in my WAR's WEB-INF.
>
> <?xml version='1.0'?>
> <!--
> Licensed to the Apache Software Foundation (ASF) under one or more
> contributor license agreements.  See the NOTICE file distributed with
> this work for additional information regarding copyright ownership.
> The ASF licenses this file to you under the Apache License, Version
> 2.0 (the "License"); you may not use this file except in compliance
> with the License.  You may obtain a copy of the License at
>
>   http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.  See the License for the specific language governing
> permissions and limitations under the License.
> -->
>
> <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>                xmlns="urn:activemq"
>                xsi:schemaLocation="urn:activemq
> /schema/artemis-server.xsd">
>
>    <jms xmlns="urn:activemq:jms">
>       <!--the queue used by the example-->
>       <queue name="exampleQueue"/>
>    </jms>
>
>    <core xmlns="urn:activemq:core">
>
>       <persistence-enabled>false</persistence-enabled>
>
>       <acceptors>
>          <acceptor name="in-vm">vm://0</acceptor>
>       </acceptors>
>
>       <!-- Other config -->
>
>       <security-settings>
>          <!--security for example queue-->
>          <security-setting match="#">
>             <permission type="createDurableQueue" roles="guest"/>
>             <permission type="deleteDurableQueue" roles="guest"/>
>             <permission type="createNonDurableQueue" roles="guest"/>
>             <permission type="deleteNonDurableQueue" roles="guest"/>
>             <permission type="consume" roles="guest"/>
>             <permission type="send" roles="guest"/>
>          </security-setting>
>       </security-settings>
>
>    </core>
> </configuration>
>
>
>
> Thanks,
> Mohan
>
> -----Original Message-----
> From: tbain98@gmail.com [mailto:tbain98@gmail.com] On Behalf Of Tim
> Bain
> Sent: Tuesday, August 18, 2015 6:42 PM
> To: ActiveMQ Users
> Subject: Re: java.lang.ClassNotFoundException:
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
>
> 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.erro
> r(FailFastProblemReporter.java:70)
> >        at
> >
> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderCo
> ntext.java:85)
> >        at
> > org.springframework.beans.factory.parsing.ReaderContext.error(Reader
> > Co
> > ntext.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.
> >
> 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.
>
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
View raw message