http://localhost:8080/rest-ws-spring/api/message works for me and I get

INFOS - ------------------------- localhost -> /rest-ws-spring
INFOS - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@58594a11
INFOS - OpenWebBeans Container is starting...
INFOS - Adding OpenWebBeansPlugin : [CdiPlugin]
INFOS - Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
INFOS - All injection points were validated successfully.
INFOS - OpenWebBeans Container has started, it took 367 ms.
INFOS - At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
INFOS - Root WebApplicationContext: initialization started
INFOS - Refreshing Root WebApplicationContext: startup date [Tue Feb 02
13:19:18 CET 2016]; root of context hierarchy
INFOS - Registering annotated classes: [class
psamolysov.demo.restws.ApplicationConfig]
INFOS - JSR-330 'javax.inject.Inject' annotation found and supported for
autowiring
INFOS - Looking for @ControllerAdvice: Root WebApplicationContext: startup
date [Tue Feb 02 13:19:18 CET 2016]; root of context hierarchy
INFOS - Mapped "{[/message],methods=[GET],produces=[text/plain]}" onto
public java.lang.String
psamolysov.demo.restws.controller.MessageController.message()
INFOS - Root WebApplicationContext: initialization completed in 1806 ms
INFOS - FrameworkServlet 'spring-mvc-dispatcher': initialization started
INFOS - FrameworkServlet 'spring-mvc-dispatcher': initialization completed
in 40 ms
INFOS - Starting ProtocolHandler ["http-nio-8080"]
INFOS - Starting ProtocolHandler ["ajp-nio-8009"]
INFOS - Server startup in 3556 ms


{ apache-tomee-webprofile-7.0.0-SNAPSHOT }  » tree -L 2 apps/
apps/
├── rest-ws-application
│   ├── META-INF
│   ├── rest-ws-spring
│   └── rest-ws-spring.war
└── rest-ws-application.ear



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2016-02-02 12:38 GMT+01:00 rmpestano <[email protected]>:

> Hi Romain,
>
> still no luck, I've got your latest commits and build a snapshot again but
> it didn't help, context was not initialized.
>
> Also note that it works with JavaEE war files inside the ear, here's an ear
> <
> http://s000.tinyupload.com/download.php?file_id=01150630056700489302&t=0115063005670048930256792
> >
> with other 2 wars that work.
>
> After deploying it you can access:
> http://localhost:8080/rest-ws-cdi/api/message and
> http://localhost:8080/rest-ws-ejb/api/message.
>
>
> The problem seems to be related to spring's WebApplicationListener
> <
> https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/web/WebApplicationInitializer.java
> >
> which
> is not being invoked when the application is inside an ear.
>
>
> thanks for the prompt reply.
>
> 2016-02-02 9:04 GMT-02:00 Romain Manni-Bucau [via TomEE & OpenEJB] <
> [email protected]>:
>
> > Hi Rafael,
> >
> > I guess it is related to
> https://issues.apache.org/jira/browse/TOMEE-1703
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2016-02-02 11:14 GMT+01:00 Rafael Pestano <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=4677558&i=0>>:
> >
> > > Hi guys,
> > >
> > >
> > > I'm trying to deploy a spring-mvc application as an ear on
> > Tomee7-SNAPSHOT
> > > (built it yesterday) but the spring context isn't initialized.
> > >
> > > If I extract the war from the ear and deploy it then the spring context
> > > starts and I can access the rest endpoint:
> > > *http://localhost:8080/rest-ws-spring/api/message
> > > <http://localhost:8080/rest-ws-spring/api/message>*.
> > >
> > > Here is the log for the ear deployment: http://pastebin.com/nRT0knmm
> (no
> >
> > > spring context initialization is triggered)
> > >
> > > and here is log for war deploy: http://pastebin.com/Li4jHkeY
> > >
> > > In the war deploy I get spring initialization logs:
> > > INFO - FrameworkServlet 'spring-mvc-dispatcher': initialization started
> > > INFO - FrameworkServlet 'spring-mvc-dispatcher': initialization
> > completed
> > > in 17 ms
> > >
> > >
> > > You can get the ear here:
> > > http://s000.tinyupload.com/?file_id=05217187591843118884
> > > <http://s000.tinyupload.com/?file_id=05217187591843118884>
> > >
> > > Any help is appreciated.
> > >
> > > --
> > > <http://www.advancedit.com.br/>Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > http://rpestano.wordpress.com/
> > > @realpestano <https://twitter.com/realpestano>
> > >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://tomee-openejb.979440.n4.nabble.com/Help-deploying-spring-app-inside-ear-tp4677557p4677558.html
> > To start a new topic under TomEE Users, email
> > [email protected]
> > To unsubscribe from TomEE Users, click here
> > <
> http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=979441&code=cm1wZXN0YW5vQGdtYWlsLmNvbXw5Nzk0NDF8MTE1OTM0ODgyNg==
> >
> > .
> > 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
> >
> >
>
>
>
> --
> <http://www.advancedit.com.br/>Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> http://rpestano.wordpress.com/
> @realpestano <https://twitter.com/realpestano>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Help-deploying-spring-app-inside-ear-tp4677557p4677559.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to