Не удается развернуть приложение JAX-RS в TomEE из IntelliJ - PullRequest
0 голосов
/ 22 мая 2018

Я не могу развернуть приложение JAX-RS на TomEE из IntelliJ.На самом деле, веб-приложение развернуто и работает как положено, но IntelliJ сообщает:

Artifact is not deployed. Press 'Deploy' to start deployment

, что делает невозможным повторное развертывание.На консоли нет ошибок:

Connected to server
[2018-05-22 10:57:19,570] Artifact adjunkto-web:war exploded: Artifact is being deployed, please wait...
22-May-2018 10:57:19.726 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using default host: localhost
22-May-2018 10:57:19.727 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /
22-May-2018 10:57:20.317 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT
22-May-2018 10:57:20.499 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
22-May-2018 10:57:20.500 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean .Comp2064284523: Container(type=MANAGED, id=Default Managed Container)
22-May-2018 10:57:20.502 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default Managed Container)
22-May-2018 10:57:20.520 INFO [http-nio-8080-exec-4] org.apache.openejb.core.managed.SimplePassivater.init Using directory C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp for stateful session passivation
22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT" loaded.
22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT
22-May-2018 10:57:20.627 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@7776ab
22-May-2018 10:57:20.804 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting...
22-May-2018 10:57:20.815 INFO [http-nio-8080-exec-4] org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin]
22-May-2018 10:57:20.828 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for jar:file:/C:/software/apache-tomee-webprofile-7.0.4-adjunkto/temp/0-ROOT/WEB-INF/lib/adjunkto-domain-1.0-SNAPSHOT.jar!/META-INF/beans.xml looking all classes to find CDI beans, maybe think to add a beans.xml if not there or add the jar to exclusions.list
22-May-2018 10:57:21.329 INFO [http-nio-8080-exec-4] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully.
22-May-2018 10:57:21.333 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 528 ms.
22-May-2018 10:57:21.340 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT)
22-May-2018 10:57:21.492 INFO [http-nio-8080-exec-4] sun.reflect.DelegatingMethodAccessorImpl.invoke 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.
22-May-2018 10:57:21.848 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using readers:
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.PrimitiveTextProvider@71670710
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.FormEncodingProvider@143be198
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.MultipartProvider@657973c7
22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.SourceProvider@46e83b9c
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider@c685959
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.JAXBElementProvider@47145e6d
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider@457c1eac
22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider@66a30e49
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.StringTextProvider@74a4930b
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.BinaryDataProvider@3db25508
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.DataSourceProvider@181eb56c
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using writers:
22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.johnzon.jaxrs.WadlDocumentMessageBodyWriter@66313160
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.StringTextProvider@74a4930b
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider@c685959
22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.PrimitiveTextProvider@71670710
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.FormEncodingProvider@143be198
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.MultipartProvider@657973c7
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.SourceProvider@46e83b9c
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.JAXBElementProvider@47145e6d
22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider@457c1eac
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider@66a30e49
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.BinaryDataProvider@3db25508
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.provider.DataSourceProvider@181eb56c
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using exception mappers:
22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper@487a3473
22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.openejb.server.cxf.rs.EJBExceptionMapper@5093e1dd
22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication      org.apache.cxf.jaxrs.validation.ValidationExceptionMapper@6618867
22-May-2018 10:57:21.857 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST Application: http://localhost:8080/ -> cz.valvera.adjunkto.web.AdjunktoApplication@70a52015
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints      Service URI: http://localhost:8080/ -> Pojo cz.valvera.adjunkto.web.RootResource
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints               GET http://localhost:8080/ ->      String index()         
22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints              POST http://localhost:8080/ ->      String post(JsonObject)
[2018-05-22 10:57:21,936] Artifact adjunkto-web:war exploded: Artifact is not deployed. Press 'Deploy' to start deployment
22-May-2018 10:57:28.566 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager]
22-May-2018 10:57:28.571 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /manager
22-May-2018 10:57:28.654 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager
22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager" loaded.
22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager
22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using context file C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager\META-INF\context.xml
22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager)
22-May-2018 10:57:28.688 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke 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.
22-May-2018 10:57:28.708 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager] has finished in [142] ms

Я нашел эти сообщения в журналах IDE:

2018-05-22 17:16:07,549 [ 428383]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 
2018-05-22 17:16:07,550 [ 428384]   INFO - j.compiler.server.BuildManager - Using preloaded build process to compile C:\vyvoj\adjunkto 
2018-05-22 17:16:07,719 [ 428553]   INFO - lij.compiler.impl.CompilerUtil -     COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 174 ms: 0 min 0sec 
2018-05-22 17:16:07,720 [ 428554]   INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException 
2018-05-22 17:16:07,720 [ 428554]   INFO - s.CompilerReferenceServiceImpl - backward reference index reader doesn't exist 
2018-05-22 17:16:07,916 [ 428750]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_162/lib/tools.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/optimizedFileManager.jar 
2018-05-22 17:16:07,937 [ 428771]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
2018-05-22 17:16:07,937 [ 428771]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation 
2018-05-22 17:16:07,937 [ 428771]   INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.  

Я удалил каталог ~ / .IntelliJIdea2018.1 и переустановил IntelliJ, но это не такне могу ничего изменить.Возможно, эти сообщения даже не связаны с моей проблемой.

Используя приложение / manager, я вижу, что развернуто три приложения:

/
/manager
/tomee

В IntelliJ у меня установлен «Контекст приложения»в "/".Я попытался изменить «Контекст приложения», и это изменило путь контекста в развернутом приложении, но исходная проблема осталась.

Я использую IntelliJ 2018.1.4 и TomEE 7.0.4.Что может быть не так?

...