profile can fix it.
So, you can create a widfly profile and a tomee profile. :)

On Tue, Aug 23, 2016 at 7:23 PM, Ivan St. Ivanov <ivan.st.iva...@gmail.com>
wrote:

> Ah, now I understand, thanks for the clarification, Romain!
>
> So, if I add TomEE's javaee-api dependency to my POM, the TomEE Embedded
> tests pass. But as you might guess, the WildFly container ones fail. That's
> why I decided to put each one container's javaee-api dependency in its own
> profile. That's how TomEE's profile's dependencies looked like the
> following:
>
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.tomee</groupId>
>             <artifactId>javaee-api</artifactId>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.tomee</groupId>
>             <artifactId>arquillian-tomee-embedded</artifactId>
>             <version>7.0.1</version>
>             <scope>test</scope>
>         </dependency>    </dependencies>
>
> Now the test failed again, this time with different exception:
>
> java.lang.IncompatibleClassChangeError: Class
> org.apache.webbeans.conversation.ConversationStorageBean does not
> implement
> the requested interface javax.enterprise.inject.spi.BeanAttributes
> at
> org.apache.webbeans.component.BeanAttributesImpl.<init>(
> BeanAttributesImpl.java:59)
> at
> org.apache.webbeans.component.third.ThirdpartyBeanImpl.<
> init>(ThirdpartyBeanImpl.java:41)
> at
> org.apache.webbeans.component.third.PassivationCapableThirdpartyBe
> anImpl.<init>(PassivationCapableThirdpartyBeanImpl.java:32)
> at
> org.apache.webbeans.container.BeanManagerImpl.addInternalBean(
> BeanManagerImpl.java:373)
> at
> org.apache.webbeans.conversation.ConversationManager.<init>(
> ConversationManager.java:69)
> at
> org.apache.webbeans.config.WebBeansContext.<init>(
> WebBeansContext.java:158)
> at
> org.apache.webbeans.config.WebBeansContext.<init>(
> WebBeansContext.java:116)
>
> I read elsewhere that this might be caused by different versions of CDI on
> the server and in the webapp. But what did I do to make this violation?
> While the dependency was outside of the profile, it used to work.
>
> Cheers,
> Ivan
>
> P.S. I am trying to make this project follow the microprofile requirements,
> so making the Arquillian tests runnable on all runtimes is a must :)
>
>
> On Wed, Aug 24, 2016 at 12:31 AM, Romain Manni-Bucau <
> rmannibu...@gmail.com>
> wrote:
>
> > Yes, not using tomcat el api - shaded in tomee javaee-api - you get
> > glassfish defaults.
> >
> > Ensure to use org.apache.tomee:javaee-api
> >
> > Le 23 août 2016 23:28, "John D. Ament" <johndam...@apache.org> a écrit :
> >
> > > Don't forget, TomEe will ship Geronimo jars.  If you reference Javax.el
> > > you'll get duplicates
> > >
> > > On Aug 23, 2016 17:25, "Alex Soto" <asot...@gmail.com> wrote:
> > >
> > > > Then now I have no idea, it seems emedded instance does not contain
> the
> > > > javax.el interpreter. Can you try using remote artifacts?
> > > >
> > > > El 23 ago. 2016 11:19 p. m., "Ivan St. Ivanov" <
> > ivan.st.iva...@gmail.com
> > > >
> > > > escribió:
> > > >
> > > > > Hey Alex :)
> > > > >
> > > > > I'm using the Arquillian Universe BOM Alpha 3. Downgraded to Alpha
> 2,
> > > but
> > > > > getting the same exception.
> > > > >
> > > > > Cheers,
> > > > > Ivan
> > > > >
> > > > > On Wed, Aug 24, 2016 at 12:15 AM, Alex Soto <asot...@gmail.com>
> > wrote:
> > > > >
> > > > > > Are you using arquillian 1.1.11, if so try with .10
> > > > > >
> > > > > > El 23 ago. 2016 10:47 p. m., "Ivan St. Ivanov" <
> > > > ivan.st.iva...@gmail.com
> > > > > >
> > > > > > escribió:
> > > > > >
> > > > > > > Hi folks,
> > > > > > >
> > > > > > > I have an issue when I run Arquillian test in the TomEE
> embedded
> > > > > > > container, version 7.0.1. Originally I wanted to run a test as
> > > client
> > > > > > > (@RunAsClient) that checks a RESTful web service's response
> [1].
> > > > > However,
> > > > > > > during the deployment of the ShrinkWrap archive I get the
> > following
> > > > > > > exception:
> > > > > > >
> > > > > > > javax.el.ELException: Provider com.sun.el.
> ExpressionFactoryImpl
> > > not
> > > > > > found
> > > > > > > at javax.el.FactoryFinder.newInstance(FactoryFinder.java:101)
> > > > > > > at javax.el.FactoryFinder.find(FactoryFinder.java:197)
> > > > > > > at javax.el.ExpressionFactory.newInstance(ExpressionFactory.
> > > > java:197)
> > > > > > > at javax.el.ExpressionFactory.newInstance(ExpressionFactory.
> > > > java:168)
> > > > > > > at org.apache.jasper.runtime.JspApplicationContextImpl.<init>(
> > > > > > > JspApplicationContextImpl.java:46)
> > > > > > > at org.apache.jasper.runtime.JspApplicationContextImpl.
> > > getInstance(
> > > > > > > JspApplicationContextImpl.java:76)
> > > > > > > at org.apache.jasper.runtime.JspFactoryImpl.
> > > > getJspApplicationContext(
> > > > > > > JspFactoryImpl.java:217)
> > > > > > > at org.apache.openejb.cdi.OpenEJBLifecycle.setJspELFactory(
> > > > > > > OpenEJBLifecycle.java:416)
> > > > > > > at org.apache.openejb.cdi.OpenEJBLifecycle.
> > > initializeServletContext(
> > > > > > > OpenEJBLifecycle.java:387)
> > > > > > > at org.apache.tomee.catalina.TomcatWebAppBuilder.
> startInternal(
> > > > > > > TomcatWebAppBuilder.java:1423)
> > > > > > >
> > > > > > > The whole exception trace is attached to this emal.
> > > > > > >
> > > > > > > I wondered what the problem is, so I added a dummy resource [2]
> > > that
> > > > > > > doesn't involve CDI. And then ran a test [3] as client and it
> > went
> > > > > fine.
> > > > > > > Then I added a test that doesn't run as client and involves a
> > class
> > > > > that
> > > > > > > uses CDI [4]. And I got the same exception as above.
> > > > > > >
> > > > > > > Do you know what is the reason for the failure? The same tests
> > run
> > > > > > > successfully on the WildFly 10 managed container. And they keep
> > > > failing
> > > > > > on
> > > > > > > TomEE embedded even with an empty beans.xml added to the
> > ShrinkWrap
> > > > web
> > > > > > > archive.
> > > > > > >
> > > > > > > The app under test is runnable under TomEE 7 Plume as well as
> via
> > > the
> > > > > > > Maven plugin.
> > > > > > >
> > > > > > > Thank you,
> > > > > > > Ivan
> > > > > > >
> > > > > > > [1] https://github.com/ivannov/javaee-actuator/blob/
> > > > > > > arquillian/javaee-actuator/src/test/java/io/github/
> > > > > > > ivannov/actuator/resources/MetricsResourceTest.java
> > > > > > > [2] https://github.com/ivannov/javaee-actuator/blob/
> > > > > > > arquillian/javaee-actuator/src/main/java/io/github/
> > > > > > > ivannov/actuator/resources/HelloResource.java
> > > > > > > [3] https://github.com/ivannov/javaee-actuator/blob/
> > > > > > > arquillian/javaee-actuator/src/test/java/io/github/
> > > > > > > ivannov/actuator/resources/HelloResourceTest.java
> > > > > > > [4] https://github.com/ivannov/javaee-actuator/blob/
> > > > > > > arquillian/javaee-actuator/src/test/java/io/github/
> > > > > > > ivannov/actuator/resources/BeansResourceTest.java
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>



-- 
Daniel Cunha
https://twitter.com/dvlc_
http://www.tomitribe.com
http://www.tomitribe.io

Reply via email to