tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Cortez <radcor...@yahoo.com.INVALID>
Subject Re: Can't read beans.xml (TomEE 1.7.4 + new Camel CDI)
Date Tue, 31 May 2016 11:50:08 GMT
Hi Dmitry,
I'm using Camel CDI with 1.7.4. If you really want to use it this way you can. Is not the
best solution ever, but it works:
Just create a project to add camel-cdi jar and then run the maven assembly plugin to generate
your own jar to remove beans.xml.
Something like this:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
http://maven.apache.org/xsd/assembly-1.1.3.xsd">  <id>all</id>  <formats> 
  <format>jar</format>  </formats>  <includeBaseDirectory>false</includeBaseDirectory> 
<fileSets>    <fileSet>      <directory>target/classes</directory> 
    <outputDirectory/>    </fileSet>  </fileSets>  <dependencySets> 
  <dependencySet>      <unpack>true</unpack>      <includes> 
      <include>org.apache.camel:camel-cdi</include>      </includes> 
    <unpackOptions>        <excludes>          <exclude>**/beans.xml</exclude> 
        <exclude>**/Main.class</exclude>        </excludes>   
  </unpackOptions>    </dependencySet>  </dependencySets></assembly>
Plus add your own empty 1.0 beans.xml to be included in your new jar.
Cheers,Roberto
      From: dimas <dmitry_shultz@kaltire.com>
 To: users@tomee.apache.org 
 Sent: Monday, May 30, 2016 7:54 PM
 Subject: RE: Can't read beans.xml (TomEE 1.7.4 + new Camel CDI)
   
Upgrading to TomeEE 7 eliminated this error, Thanks John & Romain.

Cheers,
Dmitry

From: Romain Manni-Bucau [via TomEE & OpenEJB] [mailto:ml-node+s979440n4678667h98@n4.nabble.com]
Sent: May-30-16 11:10 AM
To: Shultz, Dmitry <Dmitry_Shultz@kaltire.com>
Subject: Re: Can't read beans.xml (TomEE 1.7.4 + new Camel CDI)

Hi

Camel cdi doesnt work on javaee6, upgrading to tomee 7.0.0 would be the
easiest
Le 30 mai 2016 20:41, "dimas" <[hidden email]</user/SendEmail.jtp?type=node&node=4678667&i=0>>
a écrit :

> Hi All,
>
> I'm getting following error while deploying web app which is built using
> Camel CDI component (2.17.1):
>
> May 30, 2016 10:52:38 AM org.apache.openejb.config.DeploymentLoader
> mergeBeansXml
> SEVERE: Unable to read beans.xml from:
>
> jar:file:/D:/Repository/kaltire/mix/fsa-tss2click-adapter/target/fsa-tss2click-adapter-1.0-SNAPSHOT/WEB-INF/lib/camel-cdi-2.17.1.jar!/META-INF/beans.xml
> org.apache.openejb.OpenEJBException: Cannot unmarshall the beans.xml:
> unexpected element (uri:"http://java.sun.com/xml/ns/javaee",
> local:"scan").
> Expected elements are
> <{http://java.sun.com/xml/ns/javaee}decorators>,<{
> http://java.sun.com/xml/ns/javaee}interceptors>,<{
> http://java.sun.com/xml/ns/javaee}alternatives>
>        at
>
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:652)
>        at
>
> org.apache.openejb.config.DeploymentLoader.mergeBeansXml(DeploymentLoader.java:1118)
>        at
>
> org.apache.openejb.config.DeploymentLoader.addBeansXmls(DeploymentLoader.java:1104)
>        at
>
> org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:1060)
>        at
>
> org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:784)
>        at
> org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:218)
>        at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2196)
>        at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1147)
>        at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
>        at
>
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
>        at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>        at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>        at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5416)
>        at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>        at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>        at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>        at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
>        at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:663)
>        at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:622)
>        at
>
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:43)
>        at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:176)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:497)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
>        at
>
> org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:35)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:497)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
>        at
>
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
>        at
>
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:497)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
>        at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
>        at
>
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
>        at
>
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:227)
>        at
>
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:194)
>        at
>
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:370)
>        at
>
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:181)
>        at
>
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:344)
>        at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:240)
>        at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:86)
>        at
>
> org.apache.openejb.server.httpd.ServerServlet.service(ServerServlet.java:58)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>        at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>        at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>        at
> org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
>        at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>        at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
>        at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
>        at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>        at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
>        at
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
>        at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>        at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>        at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>        at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.xml.bind.UnmarshalException: unexpected element
> (uri:"http://java.sun.com/xml/ns/javaee", local:"scan"). Expected elements
> are
> <{http://java.sun.com/xml/ns/javaee}decorators>,<{
> http://java.sun.com/xml/ns/javaee}interceptors>,<{
> http://java.sun.com/xml/ns/javaee}alternatives>
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:740)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:262)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:257)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:124)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:573)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
>        at
> org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
>        at
>
> org.apache.openejb.jee.JaxbJavaee$JavaeeNamespaceFilter.startElement(JaxbJavaee.java:291)
>        at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>        at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>        at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>        at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>        at
>
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>        at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>        at
>
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>        at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:236)
>        at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:288)
>        at
> org.apache.openejb.jee.JaxbJavaee.unmarshalJavaee(JaxbJavaee.java:131)
>        at
>
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:647)
>        ... 68 more
>
>
> Here is the content of this beans.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans version="1.0" bean-discovery-mode="all">
>
>    <scan>
>        <exclude name="org.apache.camel.cdi.Main"/>
>    </scan>
>
> </beans>
>
> Is there anything I can do to fix this error?
>
> Thanks,
> Dmitry
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Can-t-read-beans-xml-TomEE-1-7-4-new-Camel-CDI-tp4678666.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

________________________________
If you reply to this email, your message will be added to the discussion below:
http://tomee-openejb.979440.n4.nabble.com/Can-t-read-beans-xml-TomEE-1-7-4-new-Camel-CDI-tp4678666p4678667.html
To unsubscribe from Can't read beans.xml (TomEE 1.7.4 + new Camel CDI), click here<http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4678666&code=ZG1pdHJ5X3NodWx0ekBrYWx0aXJlLmNvbXw0Njc4NjY2fC0yMzcwMzM3NzE=>.
NAML<http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Can-t-read-beans-xml-TomEE-1-7-4-new-Camel-CDI-tp4678666p4678669.html
Sent from the TomEE Users mailing list archive at Nabble.com.

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