<div dir="ltr">You will need at least: geronimo-jpa_2.0_spec-1.1.jar that JAR contains javax.persistence. Maybe you will also need ehcache-core-2.4.7.jar and ehcache-openjpa-0.2.0.jar for caching, but I'm not sure about this.<br><div><br></div><div>Stephan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 17. Juli 2020 um 12:17 Uhr schrieb <<a href="mailto:martin.rosenthal@oerag.de">martin.rosenthal@oerag.de</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Michael and Stefan,<br>
<br>
thank you for your help. I found the reason for the error. We are using a<br>
custom OpenCMS module which contains als class for creating<br>
EntityManagerFactory for the Application. This calls will be loaded by an<br>
annotation @WebListener.<br>
<br>
@WebListener<br>
public class EMF implements ServletContextListener {<br>
<br>
private static EntityManagerFactory emf;<br>
<br>
@Override<br>
public void contextInitialized(ServletContextEvent event) {<br>
emf = Persistence.createEntityManagerFactory("xxxxxx");<br>
ServiceFactory.initializeServiceFactory(emf);<br>
<br>
}<br>
<br>
@Override<br>
public void contextDestroyed(ServletContextEvent event) {<br>
if (emf != null) {<br>
emf.close();<br>
}<br>
}<br>
<br>
public static EntityManager createEntityManager() {<br>
if (emf == null) {<br>
throw new IllegalStateException("Context is not initialized yet."<br>
);<br>
}<br>
<br>
return emf.createEntityManager();<br>
}<br>
<br>
public static EntityManagerFactory getEntityManagerFactory() {<br>
return emf;<br>
}<br>
<br>
As persistence provide we are using<br>
org.apache.openjpa.persistence.PersistenceProviderImpl in the<br>
persistence.xml file. The db2 driver deliverd by OpenCMS works fine. The<br>
only problem is to get the above shown class working on startup. I've<br>
copied the openjpa-2.4.0.jar in the lib directory but it has no effect. I<br>
get the same error. I think i must write a new class for creating<br>
EntityManagerFactory .<br>
<br>
Regards,<br>
Martin<br>
<br>
<br>
<br>
<br>
Von: Stephan Schrader <<a href="mailto:zstephanz@gmail.com" target="_blank">zstephanz@gmail.com</a>><br>
An: The OpenCms mailing list <<a href="mailto:opencms-dev@opencms.org" target="_blank">opencms-dev@opencms.org</a>><br>
Datum: 17.07.2020 10:32<br>
Betreff: Re: [opencms-dev] Antwort: Re: Update OpenCMS 10.5 to 11.0.1 -<br>
NoClassDefFoundError<br>
Gesendet von: <a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a><br>
<br>
<br>
<br>
Hi Martin,<br>
<br>
I would say, it depends. If you have custom classes referencing<br>
javax.persistence.EntityManagerFactory then copy the missing JARs (OpenJPA<br>
or Hibernate) to the WEB-INF/lib folder or update the dependency management<br>
in your build tool. But this depends on your setup.<br>
<br>
If you used the OpenCms JPA DB driver before, then you need to configure<br>
the non JPA DB driver as Michael mentioned.<br>
<br>
<a href="https://documentation.opencms.org/javadoc/core/org/opencms/db/db2/package-summary.html" rel="noreferrer" target="_blank">https://documentation.opencms.org/javadoc/core/org/opencms/db/db2/package-summary.html</a><br>
<br>
Stephan<br>
<br>
Am Fr., 17. Juli 2020 um 07:02 Uhr schrieb <<a href="mailto:martin.rosenthal@oerag.de" target="_blank">martin.rosenthal@oerag.de</a>>:<br>
Hello Stephan,<br>
<br>
thanks for your reply. It's really strange. What can i / should use<br>
instead<br>
of JPA???<br>
<br>
Regards,<br>
Martin<br>
<br>
<br>
<br>
<br>
Von: Stephan Schrader <<a href="mailto:zstephanz@gmail.com" target="_blank">zstephanz@gmail.com</a>><br>
An: The OpenCms mailing list <<a href="mailto:opencms-dev@opencms.org" target="_blank">opencms-dev@opencms.org</a>><br>
Datum: 16.07.2020 20:37<br>
Betreff: Re: [opencms-dev] Update OpenCMS 10.5 to 11.0.1 -<br>
NoClassDefFoundError<br>
Gesendet von: <a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a><br>
<br>
<br>
<br>
Hi Martin,<br>
<br>
the JPA support has been removed with commit:<br>
<a href="https://github.com/alkacon/opencms-core/commit/375c6bf71f645a84d9121d84beb75c111bc5734a" rel="noreferrer" target="_blank">https://github.com/alkacon/opencms-core/commit/375c6bf71f645a84d9121d84beb75c111bc5734a</a><br>
<br>
. Unfortunately I haven't found any reason.<br>
<br>
Stephan<br>
<br>
Am Do., 16. Juli 2020 um 12:15 Uhr schrieb <<a href="mailto:martin.rosenthal@oerag.de" target="_blank">martin.rosenthal@oerag.de</a><br>
>:<br>
<br>
Hello,<br>
<br>
i'm trying to upgrade my local OpenCMS developer system from<br>
OpenCMS<br>
10.5<br>
to 11.0.1. It is actually running on Windows 10, Oracle Java 8<br>
in a<br>
Tomcat<br>
9.0.30. As database i'm using IBM DB2 v.10.5.0.9 .<br>
After copying the files from the upgrade package in my<br>
installation<br>
directory als described in the readme-file, OpenCMS isn't<br>
starting<br>
After a<br>
few seconds i get the error:<br>
<br>
<br>
SCHWERWIEGEND: Error deploying web application directory<br>
[D:\apache-tomcat-9.0.30\webapps\web]<br>
java.lang.IllegalStateException: Error starting child<br>
at<br>
org.apache.catalina.core.ContainerBase.addChildInternal<br>
(ContainerBase.java:720)<br>
at org.apache.catalina.core.ContainerBase.addChild<br>
(ContainerBase.java:690)<br>
at org.apache.catalina.core.StandardHost.addChild<br>
(StandardHost.java:705)<br>
at<br>
org.apache.catalina.startup.HostConfig.deployDirectory<br>
(HostConfig.java:1133)<br>
at org.apache.catalina.startup.HostConfig<br>
$DeployDirectory.run<br>
(HostConfig.java:1867)<br>
at java.util.concurrent.Executors$RunnableAdapter.call<br>
(Executors.java:511)<br>
at java.util.concurrent.FutureTask.run<br>
(FutureTask.java:266)<br>
at<br>
org.apache.tomcat.util.threads.InlineExecutorService.execute<br>
(InlineExecutorService.java:75)<br>
at java.util.concurrent.AbstractExecutorService.submit<br>
(AbstractExecutorService.java:112)<br>
at<br>
org.apache.catalina.startup.HostConfig.deployDirectories<br>
(HostConfig.java:1045)<br>
at org.apache.catalina.startup.HostConfig.deployApps<br>
(HostConfig.java:429)<br>
at org.apache.catalina.startup.HostConfig.start<br>
(HostConfig.java:1576)<br>
at<br>
org.apache.catalina.startup.HostConfig.lifecycleEvent<br>
(HostConfig.java:309)<br>
at<br>
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent<br>
(LifecycleBase.java:123)<br>
at<br>
org.apache.catalina.util.LifecycleBase.setStateInternal<br>
(LifecycleBase.java:423)<br>
at org.apache.catalina.util.LifecycleBase.setState<br>
(LifecycleBase.java:366)<br>
at org.apache.catalina.core.ContainerBase.startInternal<br>
(ContainerBase.java:936)<br>
at org.apache.catalina.core.StandardHost.startInternal<br>
(StandardHost.java:841)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:183)<br>
at org.apache.catalina.core.ContainerBase<br>
$StartChild.call<br>
(ContainerBase.java:1384)<br>
at org.apache.catalina.core.ContainerBase<br>
$StartChild.call<br>
(ContainerBase.java:1374)<br>
at java.util.concurrent.FutureTask.run<br>
(FutureTask.java:266)<br>
at<br>
org.apache.tomcat.util.threads.InlineExecutorService.execute<br>
(InlineExecutorService.java:75)<br>
at java.util.concurrent.AbstractExecutorService.submit<br>
(AbstractExecutorService.java:134)<br>
at org.apache.catalina.core.ContainerBase.startInternal<br>
(ContainerBase.java:909)<br>
at<br>
org.apache.catalina.core.StandardEngine.startInternal<br>
(StandardEngine.java:262)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:183)<br>
at<br>
org.apache.catalina.core.StandardService.startInternal<br>
(StandardService.java:421)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:183)<br>
at<br>
org.apache.catalina.core.StandardServer.startInternal<br>
(StandardServer.java:930)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:183)<br>
at org.apache.catalina.startup.Catalina.start<br>
(Catalina.java:633)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native<br>
Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke<br>
(NativeMethodAccessorImpl.java:62)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke<br>
(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:498)<br>
at org.apache.catalina.startup.Bootstrap.start<br>
(Bootstrap.java:343)<br>
at org.apache.catalina.startup.Bootstrap.main<br>
(Bootstrap.java:474)<br>
Caused by: org.apache.catalina.LifecycleException: Failed to<br>
start<br>
component [StandardEngine[Catalina].StandardHost<br>
[localhost].StandardContext<br>
[/web]]<br>
at<br>
org.apache.catalina.util.LifecycleBase.handleSubClassException<br>
(LifecycleBase.java:440)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:198)<br>
at<br>
org.apache.catalina.core.ContainerBase.addChildInternal<br>
(ContainerBase.java:717)<br>
... 37 more<br>
Caused by: java.lang.NoClassDefFoundError:<br>
Ljavax/persistence/EntityManagerFactory;<br>
at java.lang.Class.getDeclaredFields0(Native Method)<br>
at java.lang.Class.privateGetDeclaredFields<br>
(Class.java:2583)<br>
at java.lang.Class.getDeclaredFields(Class.java:1916)<br>
at<br>
org.apache.catalina.util.Introspection.getDeclaredFields<br>
(Introspection.java:110)<br>
at<br>
<br>
org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation<br>
(WebAnnotationSet.java:269)<br>
at<br>
<br>
org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations<br>
<br>
<br>
(WebAnnotationSet.java:89)<br>
at<br>
<br>
org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations<br>
<br>
<br>
(WebAnnotationSet.java:67)<br>
at<br>
<br>
org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig<br>
<br>
<br>
(ContextConfig.java:330)<br>
at<br>
org.apache.catalina.startup.ContextConfig.configureStart<br>
(ContextConfig.java:777)<br>
at<br>
org.apache.catalina.startup.ContextConfig.lifecycleEvent<br>
(ContextConfig.java:301)<br>
at<br>
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent<br>
(LifecycleBase.java:123)<br>
at<br>
org.apache.catalina.core.StandardContext.startInternal<br>
(StandardContext.java:5051)<br>
at org.apache.catalina.util.LifecycleBase.start<br>
(LifecycleBase.java:183)<br>
... 38 more<br>
Caused by: java.lang.ClassNotFoundException:<br>
javax.persistence.EntityManagerFactory<br>
at<br>
org.apache.catalina.loader.WebappClassLoaderBase.loadClass<br>
(WebappClassLoaderBase.java:1365)<br>
at<br>
org.apache.catalina.loader.WebappClassLoaderBase.loadClass<br>
(WebappClassLoaderBase.java:1188)<br>
... 51 more<br>
<br>
Has anyone the same problem or an idea, what could be the<br>
reason?<br>
<br>
Thanks and regards,<br>
Martin Rosenthal<br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list,<br>
please<br>
visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list,<br>
please<br>
visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please<br>
visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please<br>
visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
</blockquote></div>