tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Makarov Alexey <alexe...@yandex.com>
Subject Re: Error merging Java EE JNDI entries in to war...
Date Wed, 25 Mar 2020 08:24:44 GMT
Hello! Problem have been in my "server.xml". I set "docBase" as "/var/www/path/to/my/app/"
but it was necessary set to "/var/www/path/to/my/app/myapp.war":
Here is an excerpt from the file. 

Wrong:
...
 <Host name="localhost"  appBase="/var/www" unpackWARs="true" autoDeploy="true">
            <Context path="/myapp" docBase="/var/www/path/to/my/app" antiResourceLocking="false"
/>
            ...
</Host>
...


Right (removed appBase="/var/www" from "Host" and added "/myapp.war" to "docBase" of "Context"):
...
<Host name="localhost" unpackWARs="true" autoDeploy="true" deployOnStartup="true">
            <Context path="/myapp" docBase="/var/www/path/to/my/app/myapp.war" />
            ...
</Host>
...

-- 
WIth best regards,
Makarov Alexey


24.03.2020, 17:18, "Makarov Alexey" <alexeys9@yandex.com>:
> Hello!
> I need to deploy applications in non-default directories. For this purpose I put war-files
in docBase of <Context /> elements in <Host /> of file "conf/server.xml", and
start server. But my application not deployed becouse of following error:
>
> 24-Mar-2020 16:57:56.110 SEVERE [main] org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal
Error merging Java EE JNDI entries in to war /myapp: Exception: org.hibernate.boot.registry.classloading.spi.ClassLoadingException:
Unable to load class [ru.ritos.visitor.Password]
> org.apache.openejb.OpenEJBRuntimeException: org.hibernate.boot.registry.classloading.spi.ClassLoadingException:
Unable to load class [ru.ritos.visitor.Password]
> at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:136)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1407)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
> at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5051)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
> at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
> at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
> Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable
to load class [ru.ritos.visitor.Password]
> at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:133)
> at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.<init>(AnnotationMetadataSourceProcessorImpl.java:109)
> at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.<init>(MetadataBuildingProcess.java:155)
> at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:149)
> at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1214)
> at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1245)
> at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:141)
> at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:112)
> at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:134)
> ... 33 more
> Caused by: java.lang.ClassNotFoundException: Could not load requested class : ru.ritos.visitor.Password
> at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:210)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:348)
> at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:130)
> ... 41 more
>
> As your can see, I use Hibernate. Class "ru.ritos.visitor.Password" is exist. I gues
class loading stop on first entity of my war-file.
> Maybe I forgot to do something in "conf/system.properties"?
> When I deploy in "webapps" (without modifying server.xml and using "WEB-INF/context.xml")
is all fine.
> I'll be glad to any help. Thank you.
>
> --
> WIth best regards,
> Makarov Alexey

Mime
View raw message