tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <johndam...@apache.org>
Subject Re: Can't read beans.xml (TomEE 1.7.4 + new Camel CDI)
Date Mon, 30 May 2016 18:49:32 GMT
Hi,

Camel CDI relies on CDI 1.1 semantics.  scan is a CDI 1.1 feature.  TomEE
1.7 is Java EE 6, meaning its using CDI 1.0 not CDI 1.1.

Though I do see a typo in their beans.xml, saying the version is 1.0 (that
attribute is mostly ignored).

You should try on the recently released TomEE 7.

John

On Mon, May 30, 2016 at 2:41 PM dimas <dmitry_shultz@kaltire.com> wrote:

> 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.
>

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