danlance
08/24/2023, 4:40 PMcannot initialize ORM Engine [class:org.lucee.extension.orm.hibernate.HibernateORMEngine;name:hibernate.extension;version:3.5.5.61;], make sure you have added all the required jar files
Looking at https://luceeserver.atlassian.net/browse/LDEV-4609 we see hibernate extension has been removed from 5.4.1 onwards.
We have tried to include the latest version of the ORM extension by setting environment variable(within our docker file):
LUCEE_EXTENSIONS: "FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate ORM Engine;version=3.5.5.89"
And also the specific version of the hibernate extension referred to in the error message:
LUCEE_EXTENSIONS: "FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate ORM Engine;version=3.5.5.61"
Neither of these make any difference to the error message displayed.
Java Stack trace is as follows:
lucee.runtime.exp.ApplicationException: cannot initialize ORM Engine [class:org.lucee.extension.orm.hibernate.HibernateORMEngine;name:hibernate.extension;version:3.5.5.61;], make sure you have added all the required jar files
at lucee.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:3171)
at lucee.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:3142)
at lucee.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:74)
at lucee.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:474)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:118)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2493)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2478)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2449)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1216)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1162)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at runwar.undertow.SSLClientCertHeaderHandler.handleRequest(SSLClientCertHeaderHandler.java:144)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:257)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:182)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:188)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:136)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:99)
at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:45)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:772)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:344)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:207)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:809)
at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)
at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:42)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at runwar.undertow.SSLClientCertHeaderHandler.handleRequest(SSLClientCertHeaderHandler.java:144)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449)
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:818)
at org.lucee.xml.XMLUtility.writeTo(XMLUtility.java:544)
at org.lucee.xml.XMLUtility.toString(XMLUtility.java:576)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.createMapping(HibernateORMEngine.java:336)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.getSessionFactoryData(HibernateORMEngine.java:145)
at org.lucee.extension.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:67)
at lucee.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:3158)
... 92 more
Caused by: java.lang.ClassNotFoundException: org.apache.xml.serializer.TreeWalker not found by org.lucee.xalan [67]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 99 more
Is anyone able to advise why setting the LUCEE_EXTENSIONS env var as per the above did not cause the extension to be installed on startup (or if it did, why we are still getting the error)?
We have no specific references to hibernate, or to a particular version of hibernate anywhere within our application or configuration - although our application does use ORM.
Can anyone advise where the specific (and quite old) version of the hibernate is being referred to in the error message.
Is there any way of locating where within our CFML code this exception is being triggered? We only see the java stack trace, and no reference to any CFML triggering code.
Java stack trace is also truncated (potentially why we can’t see CF triggering location) - is there any way of getting the full stack track rather than the truncated version?bdw429s
08/24/2023, 4:42 PMJava stack trace is also truncated (potentially why we can’t see CF triggering location) - is there any way of getting the full stack track rather than the truncated version?This isn't actually true. The removed portions of the stack are redundant (overlap) with the outermost cause
bdw429s
08/24/2023, 4:43 PMbdw429s
08/24/2023, 4:43 PMClassNotFoundException: org.apache.xml.serializer.TreeWalker not found by org.lucee.xalan
which would seem a bundle is missing-- perhaps not available any longer in the latest version of Lucee? Not sure.bdw429s
08/24/2023, 4:44 PMdanlance
08/24/2023, 4:51 PMThis isn’t actually true. The removed portions of the stack are redundant (overlap) with the outermost causeAh ok - although that still does not allow us to see fully where in our application this is being triggered from (we have 2 different installations of the same software stack, and one (the simpler one) does not generate this error following updating Lucee - and the 2nd, does… Knowing what is triggering would potentially allow us to mitigate the issue.
bdw429s
08/24/2023, 4:52 PMbdw429s
08/24/2023, 4:52 PMThread.run()bdw429s
08/24/2023, 4:53 PMbdw429s
08/24/2023, 4:53 PMbdw429s
08/24/2023, 4:54 PMdanlance
08/24/2023, 4:54 PMbdw429s
08/24/2023, 4:54 PMat lucee.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:74)
at lucee.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:474)danlance
08/24/2023, 4:58 PMbdw429s
08/24/2023, 5:03 PMdanlance
08/24/2023, 5:09 PMbdw429s
08/24/2023, 5:10 PMbdw429s
08/24/2023, 5:10 PMbdw429s
08/24/2023, 5:11 PMentityLoad(), it won't say "I've never heard of such a function with that name", it will say, "Hey you're trying to use ORM, but there isn't an ORM extension installed"bdw429s
08/24/2023, 5:11 PMbdw429s
08/24/2023, 5:12 PMbdw429s
08/24/2023, 5:13 PMbdw429s
08/24/2023, 5:13 PMbdw429s
08/24/2023, 5:15 PMbdw429s
08/24/2023, 5:16 PMdanlance
08/24/2023, 5:20 PM…it will say, “Hey you’re trying to use ORM, but there isn’t an ORM extension installed”But yet… prior to me adding the environment variables to reference the Hibernate extension… there was no reference to hibernate within our build. This is not an upgrade to an existing server. It’s a config based build… Using docker and commandbox… Actually.. hmmm…. The version of CB we are testing this on was one prior to CB releasing new version containing Lucee 5.4.3.2…
FROM ortussolutions/commandbox:3.7.11
I am specifying ENV BOX_SERVER_APP_CFENGINE lucee@5.4.3+2
Before first load (before warmup-server is called)
Is it possible that it’s somehow finding the version of the hibernate extension that shipped with the version of Lucee which shipped with that version of CB???
🤔bdw429s
08/24/2023, 5:22 PMbdw429s
08/24/2023, 5:23 PMbdw429s
08/24/2023, 5:23 PMbdw429s
08/24/2023, 5:23 PMdanlance
08/24/2023, 5:25 PMbdw429s
08/24/2023, 5:26 PMbdw429s
08/24/2023, 5:26 PMbdw429s
08/24/2023, 5:26 PMdanlance
08/24/2023, 5:27 PMdanlance
08/24/2023, 5:27 PMdanlance
08/24/2023, 5:27 PMcnt-sb-cms-default.sb.local-1 | | |----------------------------------------------------------
cnt-sb-cms-default.sb.local-1 | | √ | Setting Server Profile to [production]
cnt-sb-cms-default.sb.local-1 | | |-----------------------------------------------------
cnt-sb-cms-default.sb.local-1 | | | Profile set from secure by default
cnt-sb-cms-default.sb.local-1 | | | Block CF Admin external
cnt-sb-cms-default.sb.local-1 | | | Block Sensitive Paths enabled
cnt-sb-cms-default.sb.local-1 | | | Block Flash Remoting enabled
cnt-sb-cms-default.sb.local-1 | | | Directory Browsing disabled
cnt-sb-cms-default.sb.local-1 | | | File Caching enableddanlance
08/24/2023, 5:29 PMbdw429s
08/24/2023, 5:30 PMserver set profile=development
or just enable the admin
server web web.blockCFAdmin=falsebdw429s
08/24/2023, 5:30 PMbdw429s
08/24/2023, 5:30 PMdanlance
08/24/2023, 5:36 PMbdw429s
08/24/2023, 5:37 PMbdw429s
08/24/2023, 5:37 PMdanlance
08/24/2023, 5:38 PMbdw429s
08/24/2023, 5:38 PMbdw429s
08/24/2023, 5:38 PMdanlance
08/24/2023, 5:38 PMdanlance
08/24/2023, 5:39 PMdanlance
08/24/2023, 5:40 PMbdw429s
08/24/2023, 5:40 PMdanlance
08/24/2023, 5:41 PMdanlance
08/24/2023, 5:46 PMortussolutions/commandbox:3.7.12
which is using COMMANDBOX_VERSION=5.9.0 and if my recollection late night scanning of twitter notifications is correct, Lucee 5.4.3.2….
Can’t hurt, and might help…
And at least now I know how to get into Lucee admin, I can see what if any extensions are installed, and attempt to manually install either Ortus ORM plugin, or latest Lucee ORM plugin to see if we get any different behaviour…danlance
08/24/2023, 5:52 PMortussolutions/commandbox:3.7.11mborn
08/24/2023, 5:53 PMorg.apache.xml.serializer.TreeWalker not found by org.lucee.xalan [67]
• I can't think of any difference you would see between a manual install from the server admin, and an install via the env var. Except, of course, for the full stack trace error message you get in the server admin.mborn
08/24/2023, 5:54 PM5.4.29.28 at a minimum, since there is no 3.5 version of the Ortus fork.
• As far as required code changes, all your entityNew()...ormFlush() , etc. should behave exactly the same...
• but there is a ton of changes in Hibernate between Hibernate 3.5 and 5.4, so I wouldn't be too surprised if you need to tweak something somewhere.
• Let us know if you run into any specific issues upgrading to the Ortus fork. We like bug trackers. 🙂mborn
08/24/2023, 5:55 PMbdw429s
08/24/2023, 5:57 PMwhich is using@danlance No, like I said above in this thread, I didn't update to Lucee 5.4 until CommandBox 5.9.1 https://www.ortussolutions.com/blog/commandbox-591-releasedand if my recollection late night scanning of twitter notifications is correct, Lucee 5.4.3.2….COMMANDBOX_VERSION=5.9.0
bdw429s
08/24/2023, 5:57 PMdanlance
08/24/2023, 5:59 PMThe extension is not installed because installation failedThat makes sense… but… what does not make sense is what is triggering the installation, if it’s not contained within Lucee standard package any more… and when we have not specific configuration requesting that the hibernate extension be installed (at least prior to my testing using env vars..)
mborn
08/24/2023, 6:00 PMmborn
08/24/2023, 6:00 PMmborn
08/24/2023, 6:01 PMthis.ormEnabled = true in your Application.cfc?danlance
08/24/2023, 6:02 PMCommandBox 5.9.0 was still on Lucee 5.3.10Yep - I realise that… What I mistakenly assumed, was that when there was a bump in the
ortussolutions/commandbox version within a similar time frame to your announcement, that it would include CB 5.9.1
…which was a mistaken assumption on my part…bdw429s
08/24/2023, 6:03 PMbdw429s
08/24/2023, 6:03 PMbdw429s
08/24/2023, 6:04 PMdanlance
08/24/2023, 6:06 PMOh, yes you probably haveYes, that would be the case (although it is also the case in another build on same stack which is not erroring… go figure) Why they would have a hard coded reference to such an old version…makes little sense to me…in yourthis.ormEnabled = true?Application.cfc
danlance
08/24/2023, 6:08 PMWe coordinate our releasesThis still looks like 5.9.0 to me… https://hub.docker.com/layers/ortussolutions/commandbox/3.7.12/images/sha256-808ca7a[…]830643330922801bcef1254f575d6e2e86372556c4e6f?context=explore
bdw429s
08/24/2023, 6:10 PMjclausen
08/24/2023, 6:12 PMjclausen
08/24/2023, 6:13 PMdanlance
08/24/2023, 6:13 PMjclausen
08/24/2023, 6:13 PMdanlance
08/24/2023, 6:36 PM