Discussion:
OpenEJBException: No service-jar.xml files found
Chetan Vasudev
2018-01-18 20:51:52 UTC
Permalink
Hello,

I've been having some trouble deploying a spring application on tomEE and
was wondering if anyone could help me.

I am using TomEE 7 server in my eclipse and am deploying a very simple
spring application with a couple of JPA entities and planning to use
Hibernate as the provider and have defined as much in the persistence.xml.
When i try to deploy the application, i get the following error.
SEVERE: Failed Configuring Service(id=spring.cf/jdbc/java-hdi-container)
java.lang.IllegalStateException: org.apache.openejb.OpenEJBException: No
service-jar.xml files found: searched META-INF/xs.openejb/service-jar.xml
and xs/openejb/service-jar.xml
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.parse(ServiceJarXmlLoader.java:71)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.load(ServiceJarXmlLoader.java:57)
at
org.apache.openejb.config.provider.ProviderManager.getProvider(ProviderManager.java:184)
at
org.apache.openejb.config.provider.ProviderManager.get(ProviderManager.java:56)
at
org.apache.openejb.config.ServiceUtils.getServiceProvider(ServiceUtils.java:116)
at
org.apache.openejb.config.ConfigurationFactory.resolveServiceProvider(ConfigurationFactory.java:1451)
at
org.apache.openejb.config.ConfigurationFactory.getServiceProvider(ConfigurationFactory.java:1310)
at
org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1184)
at
org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:992)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:190)

at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:420)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:1037)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1277)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Caused by: org.apache.openejb.OpenEJBException: No service-jar.xml files
found: searched META-INF/xs.openejb/service-jar.xml and
xs/openejb/service-jar.xml
at
org.apache.openejb.config.sys.JaxbOpenejb.readServicesJar(JaxbOpenejb.java:162)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.parse(ServiceJarXmlLoader.java:65)
... 23 more
Jan 18, 2018 9:41:37 PM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/
spring.cf]
org.apache.openejb.OpenEJBException: Failed Configuring Service(id=
No service-jar.xml files found: searched
META-INF/xs.openejb/service-jar.xml and xs/openejb/service-jar.xml
at
org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1301)
at
org.apache.openejb.config.AutoConfig.processApplicationResources(AutoConfig.java:992)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:190)

at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:420)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:1037)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1277)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart
(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent
(GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
searched META-INF/xs.openejb/service-jar.xml and xs/openejb/service-jar.xml
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.parse(ServiceJarXmlLoader.java:71)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.load(ServiceJarXmlLoader.java:57)
at
org.apache.openejb.config.provider.ProviderManager.getProvider(ProviderManager.java:184)
at
org.apache.openejb.config.provider.ProviderManager.get(ProviderManager.java:56)
at
org.apache.openejb.config.ServiceUtils.getServiceProvider(ServiceUtils.java:116)
at
org.apache.openejb.config.ConfigurationFactory.resolveServiceProvider(ConfigurationFactory.java:1451)
at
org.apache.openejb.config.ConfigurationFactory.getServiceProvider(ConfigurationFactory.java:1310)
at
org.apache.openejb.config.ConfigurationFactory.configureService(ConfigurationFactory.java:1184)
... 16 more

Caused by: org.apache.openejb.OpenEJBException: No service-jar.xml files
found: searched META-INF/xs.openejb/service-jar.xml and
xs/openejb/service-jar.xml
at
org.apache.openejb.config.sys.JaxbOpenejb.readServicesJar(JaxbOpenejb.java:162)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.parse(ServiceJarXmlLoader.java:65)
... 23 more





I do not know what to make of this, any pointers would be helpful.


Regards,
Chetan
Romain Manni-Bucau
2018-01-22 12:26:17 UTC
Permalink
Hi

did you try adding your jars in conf/exclusions.list? content is one jar
prefix to exclude from the scanning per line and default-list to inherit
from the defaults. Excluding spring and classes using @Resource can let you
get rid of this exception. If not it means you really need a jar with this
file in your server but I guess (blind guess) it is not the case otherwise
you would probably know it.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>
Post by Chetan Vasudev
Hello,
I've been having some trouble deploying a spring application on tomEE and
was wondering if anyone could help me.
I am using TomEE 7 server in my eclipse and am deploying a very simple
spring application with a couple of JPA entities and planning to use
Hibernate as the provider and have defined as much in the persistence.xml.
When i try to deploy the application, i get the following error.
SEVERE: Failed Configuring Service(id=spring.cf/jdbc/java-hdi-container)
java.lang.IllegalStateException: org.apache.openejb.OpenEJBException: No
service-jar.xml files found: searched META-INF/xs.openejb/service-
jar.xml
and xs/openejb/service-jar.xml
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
parse(ServiceJarXmlLoader.java:71)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
load(ServiceJarXmlLoader.java:57)
at
org.apache.openejb.config.provider.ProviderManager.
getProvider(ProviderManager.java:184)
at
org.apache.openejb.config.provider.ProviderManager.get(
ProviderManager.java:56)
at
org.apache.openejb.config.ServiceUtils.getServiceProvider(
ServiceUtils.java:116)
at
org.apache.openejb.config.ConfigurationFactory.resolveServiceProvider(
ConfigurationFactory.java:1451)
at
org.apache.openejb.config.ConfigurationFactory.getServiceProvider(
ConfigurationFactory.java:1310)
at
org.apache.openejb.config.ConfigurationFactory.configureService(
ConfigurationFactory.java:1184)
at
org.apache.openejb.config.AutoConfig.processApplicationResources(
AutoConfig.java:992)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:190)
at
org.apache.openejb.config.ConfigurationFactory$Chain.
deploy(ConfigurationFactory.java:420)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(
ConfigurationFactory.java:1037)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(
TomcatWebAppBuilder.java:1277)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(
TomcatWebAppBuilder.java:1125)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(
GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.StandardContext.startInternal(
StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1419)
at
org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.openejb.OpenEJBException: No service-jar.xml files
found: searched META-INF/xs.openejb/service-jar.xml and
xs/openejb/service-jar.xml
at
org.apache.openejb.config.sys.JaxbOpenejb.readServicesJar(
JaxbOpenejb.java:162)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
parse(ServiceJarXmlLoader.java:65)
... 23 more
Jan 18, 2018 9:41:37 PM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/
spring.cf]
org.apache.openejb.OpenEJBException: Failed Configuring Service(id=
No service-jar.xml files found: searched
META-INF/xs.openejb/service-jar.xml and xs/openejb/service-jar.xml
at
org.apache.openejb.config.ConfigurationFactory.configureService(
ConfigurationFactory.java:1301)
at
org.apache.openejb.config.AutoConfig.processApplicationResources(
AutoConfig.java:992)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:190)
at
org.apache.openejb.config.ConfigurationFactory$Chain.
deploy(ConfigurationFactory.java:420)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(
ConfigurationFactory.java:1037)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(
TomcatWebAppBuilder.java:1277)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart
(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent
(GlobalListenerSupport.java:133)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
LifecycleBase.java:94)
at
org.apache.catalina.core.StandardContext.startInternal(
StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1419)
at
org.apache.catalina.core.ContainerBase$StartChild.call(
ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
searched META-INF/xs.openejb/service-jar.xml and
xs/openejb/service-jar.xml
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
parse(ServiceJarXmlLoader.java:71)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
load(ServiceJarXmlLoader.java:57)
at
org.apache.openejb.config.provider.ProviderManager.
getProvider(ProviderManager.java:184)
at
org.apache.openejb.config.provider.ProviderManager.get(
ProviderManager.java:56)
at
org.apache.openejb.config.ServiceUtils.getServiceProvider(
ServiceUtils.java:116)
at
org.apache.openejb.config.ConfigurationFactory.resolveServiceProvider(
ConfigurationFactory.java:1451)
at
org.apache.openejb.config.ConfigurationFactory.getServiceProvider(
ConfigurationFactory.java:1310)
at
org.apache.openejb.config.ConfigurationFactory.configureService(
ConfigurationFactory.java:1184)
... 16 more
Caused by: org.apache.openejb.OpenEJBException: No service-jar.xml files
found: searched META-INF/xs.openejb/service-jar.xml and
xs/openejb/service-jar.xml
at
org.apache.openejb.config.sys.JaxbOpenejb.readServicesJar(
JaxbOpenejb.java:162)
at
org.apache.openejb.config.provider.ServiceJarXmlLoader.
parse(ServiceJarXmlLoader.java:65)
... 23 more
I do not know what to make of this, any pointers would be helpful.
Regards,
Chetan
Loading...