tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <asot...@gmail.com>
Subject Re: EJB and REST
Date Sun, 13 Apr 2014 18:16:24 GMT
Still happens :(

 <dependencies>

                <dependency>

                    <groupId>org.apache.openejb</groupId>

                    <artifactId>arquillian-tomee-embedded</artifactId>

                    <version>${tomee.version}</version>

                    <scope>test</scope>

                </dependency>


                <!-- To test jax-rs applications with embed TomEE you need

                    to both of these dependencies -->

                <dependency>

                    <groupId>org.apache.openejb</groupId>

                    <artifactId>openejb-cxf-rs</artifactId>

                    <version>4.6.0</version>

                    <scope>test</scope>

                </dependency>

                <dependency>

                    <groupId>org.apache.openejb</groupId>

                    <artifactId>tomee-jaxrs</artifactId>

                    <version>${tomee.version}</version>

                    <scope>test</scope>

                    <exclusions>

                        <exclusion>

                            <groupId>commons-logging</groupId>

                            <artifactId>commons-logging</artifactId>

                        </exclusion>

                    </exclusions>

                </dependency>

Should I remove from any other dependency too? For example
Arquillian.persistence-extension is using too, or Drone extension.




2014-04-13 20:06 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:

> well actually this was a regression due to a new feature. That's like
> it when you implement an API with throw new UnusupportedException,
> thanks cxf logging facade ;)
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-04-13 20:03 GMT+02:00 Alex Soto <asotobu@gmail.com>:
> > Oh cool I suppose you are talking about Apache TomEE 1.6.1, so I exclude
> > commons-logging from tomee-jaxrs dependency and that's all.
> >
> > Thank you so much when I arrive at home I will try it.
> >
> > Well nice to see how TomEE is improving from release to release :)
> >
> >
> > 2014-04-13 19:58 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
> >
> >> Hi
> >>
> >> this should be fixed on trunk. If you switch from commons logging to
> >> jul it should work even with this version.
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2014-04-13 19:54 GMT+02:00 Alex Soto <asotobu@gmail.com>:
> >> > Hello I am developing a RESTful service. My first approach has been
> >> > creating a creating a class and annotating as @Sateless EJB and also
> >> using
> >> > @Path to be a REST point too and it worked.
> >> > In my next iteration I have modified a bit that class by extracting an
> >> > interface with REST annotations and then the EJB simply implements
> that
> >> > interface.
> >> >
> >> > @Path("/points/")
> >> >
> >> > public interface CatalogService {
> >> >
> >> >     @Produces({MediaType.APPLICATION_JSON})
> >> >
> >> >     @GET
> >> >
> >> >     public List<Gift> catalog();
> >> >
> >> > }
> >> >
> >> >
> >> > @Stateless
> >> >
> >> > public class CatalogServiceImpl implements CatalogService {
> >> >
> >> >     @EJB
> >> >
> >> >     GiftCatalogService giftCatalogService;
> >> >
> >> >     @Override
> >> >
> >> >     public List<Gift> catalog() {
> >> >
> >> >         return this.giftCatalogService.giftCatalog();
> >> >
> >> >     }
> >> >
> >> > }
> >> >
> >> >
> >> > Than I have created my Arquillian test and next exception is thrown:
> >> >
> >> > *INFO: Started Ejb(deployment-id=GiftCatalogService,
> >> > ejb-name=GiftCatalogService, container=Default Stateless Container)*
> >> >
> >> > *abr 13, 2014 7:41:12 PM
> org.apache.openejb.assembler.classic.Assembler
> >> > createApplication*
> >> >
> >> > *INFO: Deployed
> >> >
> >>
> Application(path=/private/var/folders/k7/5t5fmkj547315vzzv51wh0fh0000gn/T/arquillian-tomee-app-working-dir/0/giftcatalog)*
> >> >
> >> > *abr 13, 2014 7:41:13 PM org.apache.openejb.observer.ObserverManager
> >> > fireEvent*
> >> >
> >> > *SEVERE: error invoking
> >> > Observer{class=org.apache.tomee.webservices.TomeeJaxRsService}*
> >> >
> >> > *java.lang.UnsupportedOperationException*
> >> >
> >> > * at
> >> >
> >>
> org.apache.cxf.common.logging.AbstractDelegatingLogger.setLevel(AbstractDelegatingLogger.java:268)*
> >> >
> >> > * at
> >> >
> >>
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:391)*
> >> >
> >> > * at
> >> >
> >>
> org.apache.openejb.server.rest.RESTService.deployApplication(RESTService.java:453)*
> >> >
> >> > * at
> >> >
> >>
> org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:273)*
> >> >
> >> > * at
> >> >
> >>
> org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51)*
> >> >
> >> > I have noticed that the EJB is deployed correctly but when tries to
> >> > "decorate" with REST it throws this exception. Am I doing something
> wrong
> >> > or there is something not implemented on Apache CXF.
> >> >
> >> > Also I have on classpath next dependencies with
> >> arquillian-tomee-embedded:
> >> >
> >> >
> >> > <dependency>
> >> >
> >> >          groupId>org.apache.openejb</groupId>
> >> >
> >> >                     <artifactId>openejb-cxf-rs</artifactId>
> >> >
> >> >                     <version>4.6.0</version>
> >> >
> >> >                     <scope>test</scope>
> >> >
> >> >                 </dependency>
> >> >
> >> >                 <dependency>
> >> >
> >> >                     <groupId>org.apache.openejb</groupId>
> >> >
> >> >                     <artifactId>tomee-jaxrs</artifactId>
> >> >
> >> >                     <version>${tomee.version}</version>
> >> >
> >> >                     <scope>test</scope>
> >> >
> >> >                 </dependency>
> >>
> >
> >
> >
> > --
> > +----------------------------------------------------------+
> >   Alex Soto Bueno - Computer Engineer
> >   www.lordofthejars.com
> > +----------------------------------------------------------+
>



-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

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