Hi,
At this time I'm trying to update Hibernate, Hibernate Search and Lucene versions in OpenKM to the latest libraries that are allowed to work in Java 7. The principal reason or motivation to make this change is to apply Interceptor (https://docs.jboss.org/hibernate/search ... nterceptor) class in the NodeDocument bean so that we can decide what documents should be indexed based on it's own properties.
So the actual versions in the OpenKM Community Version 6.3.13-DEV (portable development machine with Linux Mint) are:
Hibernate Search: 3.4.2
Hibernate ORM: 3.6.1
Lucene: 3.1.0
and the versions I want to upgrade to are:
Hibernate Search: 5.6.6.Final
Hibernate ORM: 5.1.17.Final
Lucene: 5.5.5
At the moment, after 3 days of hard work, I've fixed and reeimplemented all compilation errors and I'm trying to start the application. So, I've manage to fix some execution errors at the start but I'm stuck with the 3rd error in this list:
1st error:
java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;
Solution applied (https://informaticadantesca.blogspot.co ... rnate.html):
Added to pom.xml:
java.lang.NoClassDefFoundError: org/hibernate/type/StringClobType
Solution applied:
Change all references of @Type(type = "org.hibernate.type.StringClobType") with @Type(type = "org.hibernate.type.TextType")
3rd error:
This is the one I'm struggling with. Any commands or recomendations would be appreciated.
I've searched through the project and I haven't found any references to this class. So I suppose that the error is related with another package or dependency. I tried to figure out which dependency could be but I'm still after 5 hours in the same point.
At this time I'm trying to update Hibernate, Hibernate Search and Lucene versions in OpenKM to the latest libraries that are allowed to work in Java 7. The principal reason or motivation to make this change is to apply Interceptor (https://docs.jboss.org/hibernate/search ... nterceptor) class in the NodeDocument bean so that we can decide what documents should be indexed based on it's own properties.
So the actual versions in the OpenKM Community Version 6.3.13-DEV (portable development machine with Linux Mint) are:
Hibernate Search: 3.4.2
Hibernate ORM: 3.6.1
Lucene: 3.1.0
and the versions I want to upgrade to are:
Hibernate Search: 5.6.6.Final
Hibernate ORM: 5.1.17.Final
Lucene: 5.5.5
At the moment, after 3 days of hard work, I've fixed and reeimplemented all compilation errors and I'm trying to start the application. So, I've manage to fix some execution errors at the start but I'm stuck with the 3rd error in this list:
1st error:
java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;
Solution applied (https://informaticadantesca.blogspot.co ... rnate.html):
Added to pom.xml:
Code: Select all
2nd error: <dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>4.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>3.1.4</version>
<scope>runtime</scope>
</dependency>
java.lang.NoClassDefFoundError: org/hibernate/type/StringClobType
Solution applied:
Change all references of @Type(type = "org.hibernate.type.StringClobType") with @Type(type = "org.hibernate.type.TextType")
3rd error:
This is the one I'm struggling with. Any commands or recomendations would be appreciated.
I've searched through the project and I haven't found any references to this class. So I suppose that the error is related with another package or dependency. I tried to figure out which dependency could be but I'm still after 5 hours in the same point.
Code: Select all
Thanks a lot for at least reading this post and I would appreciatte any help or direction to follow.java.lang.NoClassDefFoundError: org/hibernate/type/ImmutableType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2337)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:829)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1278)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:184)
at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:110)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:439)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:421)
at org.hibernate.mapping.Property.isValid(Property.java:226)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:595)
at org.hibernate.mapping.RootClass.validate(RootClass.java:265)
at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:329)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:422)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:711)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:727)
at com.openkm.dao.HibernateUtil.getSessionFactory(HibernateUtil.java:183)
at com.openkm.dao.HibernateUtil.getSessionFactory(HibernateUtil.java:87)
at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:88)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4978)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5290)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.hibernate.type.ImmutableType
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)
... 40 more
Jun 11, 2024 2:02:40 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [RepositoryStartup] in web application [/OpenKM] threw load() exception
java.lang.ClassNotFoundException: org.hibernate.type.ImmutableType
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2337)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:829)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1278)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:184)
at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:110)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:439)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:421)
at org.hibernate.mapping.Property.isValid(Property.java:226)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:595)
at org.hibernate.mapping.RootClass.validate(RootClass.java:265)
at org.hibernate.boot.internal.MetadataImpl.validate(MetadataImpl.java:329)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:422)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:711)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:727)
at com.openkm.dao.HibernateUtil.getSessionFactory(HibernateUtil.java:183)
at com.openkm.dao.HibernateUtil.getSessionFactory(HibernateUtil.java:87)
at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:88)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4978)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5290)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)