Thank you Romain!
I tried the and got an other exception:
Dez 15, 2016 11:49:55 AM org.apache.openejb.assembler.DeployerEjb deploy
SCHWERWIEGEND: Can't deploy
C:\Development\Projects\QuvionSystem\quvion\qvn-server\target\intellij_build\qvn-server-1.0.ear
java.lang.ClassCastException: java.net.URL cannot be cast to java.util.List
at
org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:800)
at
org.apache.openejb.config.DeploymentLoader.addWebModule(DeploymentLoader.java:789)
at
org.apache.openejb.config.DeploymentLoader.createAppModule(DeploymentLoader.java:596)
The EAR now contains one web module and tree ejb modules?
Is this a kown bug?
I found something like this in a message in 2013:
http://tomee-openejb.979440.n4.nabble.com/java-lang-ClassCastException-java-net-URL-cannot-be-cast-to-java-util-List-td4666501.html
Best regards
Ingo
> Gesendet: Donnerstag, 15. Dezember 2016 um 11:42 Uhr
> Von: "Romain Manni-Bucau" <[email protected]>
> An: "[email protected]" <[email protected]>
> Betreff: Re: TomEE and Rest
>
> Hi
>
> maybe just move the rest endpoint to a web module
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2016-12-15 11:35 GMT+01:00 Ingo Mahnke <[email protected]>:
>
> > Hallo,
> > currenty I try to use Rest-Services with tomee (1.7.4) and have a problem.
> > Does anybody know a good tuotrial for this (for tomee)?
> >
> > During deployment I always get this exception:
> > error invoking org.apache.openejb.server.cxf.rs.CxfRSService@733037
> > java.lang.IllegalStateException: Invalid context 'qvn-server'. Cannot
> > find context in host localhost
> > at org.apache.tomee.webservices.TomcatRsRegistry.
> > createRsHttpListener(TomcatRsRegistry.java:103)
> > at org.apache.openejb.server.rest.RESTService.
> > deployApplication(RESTService.java:461)
> >
> >
> > "qvn-server" is the name of the ear-file. This file contains three
> > ejb-modules and one ejb module contains a class
> > like this:
> >
> >
> >
> > .................
> > @Stateless
> > @LocalBean
> > @Path("/subscriber")
> > public class SubscriberService {
> >
> >
> > @GET
> > @Produces(MediaType.APPLICATION_JSON)
> > @Path("{id}")
> > public MailingListSubscriber read(@PathParam("id") long id) {
> > .....
> >
> > return new MailingListSubscriber();
> > }
> >
> >
> > }
> > ...................
> >
> > Is it nessesary to make some setup within tomee (context.xml)?
> > I tried this but with no success?
> >
> >
> > Thank you
> > Ingo
> >
> >
> >
> >
>