Copy link to clipboard
Copied
We installed the ColdFusion 2021 version on a new server and configured the existing Coldfusion applications to run on it. One of the ColdFusion applications, which does not have any file with .hbmxml extension works fine, but the other application has a few file with .hbmxml extension gives the following error. We verified the IIS web server's request filtering list to be sure .hbmxml extension is not in the block extensions list. Is there any other configuration files should be updated to run the hibernation files without any problem? Thank you for your help!
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.
java.lang.NullPointerException
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXConnector$1.getPublicId(StAXConnector.java:101)
at org.apache.xerces.util.SAXLocatorWrapper.getPublicId(Unknown Source)
at org.apache.xerces.xni.parser.XMLParseException.<init>(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXEventConnector.handleStartElement(StAXEventConnector.java:261)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXEventConnector.bridge(StAXEventConnector.java:130)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:460)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:435)
at org.hibernate.boot.jaxb.internal.AbstractBinder.jaxb(AbstractBinder.java:171)
at org.hibernate.boot.jaxb.internal.MappingBinder.doBind(MappingBinder.java:61)
at org.hibernate.boot.jaxb.internal.AbstractBinder.doBind(AbstractBinder.java:102)
at org.hibernate.boot.jaxb.internal.AbstractBinder.bind(AbstractBinder.java:84)
at org.hibernate.boot.jaxb.internal.JaxpSourceXmlSource.doBind(JaxpSourceXmlSource.java:29)
at org.hibernate.boot.MetadataSources.addDocument(MetadataSources.java:409)
at org.hibernate.cfg.Configuration.addDocument(Configuration.java:462)
at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:647)
at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:213)
at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:186)
at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:68)
at coldfusion.orm.hibernate.HibernateProvider.initializeORMForApplication(HibernateProvider.java:168)
at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:77)
at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:819)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:433)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:231)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:377)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:463)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Copy link to clipboard
Copied
That is apparently a known problem in Hibernate 5.2.x. See https://discourse.hibernate.org/t/getting-npe-while-using-cache-usage-read-only-in-hbmxml-in-hiberna...
One suggestion there is for you to place the <cache> element after the <tuplizer> in the hbmxml files.
Copy link to clipboard
Copied
Thank you for your response. I found out that the problem happens with the entities that have the composite primary keys. CF 2021 is not able to map these entities. In the code, composite key was indicated as -- property name="id" type="any"; -- It worked with the older version of CF server, but 2021 could not resolve it. Following statements looks like working.
property name="yearId" type="numeric" fieldtype="id";
property name="contactId" type="numeric" fieldtype="id";
Thank you,
Copy link to clipboard
Copied
Thanks for the update.
In that case, I would suggest you report a ColdFusion bug.
Copy link to clipboard
Copied
The final solution of this problem was that adding an identity field to the table in the database and using this field as fieldtype="id" in the entity. Composite primary keys in the entity creates problem on CF 2021.
Copy link to clipboard
Copied
It's certainly good to hear that you solved it, and thanks very much for sharing your observation. Perhaps others searching for the problem may find this post.
But better still would be if you would take that next step of opening a bug report (see the URL that BKBK offered). Sure, he was proposing it then for you to GET help. Now it would still be very helpful if you reported it to a) make Adobe aware of the problem so that b) even if they can't solve it for some reason (if it's outside their control about hibernate) they could at least document it. But they may well be able to solve it, or press the hibernate org to solve it.
Finally, though, this COULD be something about the db server you're using. You don't say. Is it sql server? mysql? oracle? something else? There may well be either a setting in that DB that could be a) controlled in the db or b) controlled in the hibernate config (or your code) to affect this behavior.
Just trying very much to not leave this at your conclusion that "composite primary keys in the entity creates problem on CF 2021". In my experience, there's usually far more to such "bugs" than such a simple statement--though sometimes it may well be as simple as that. Or maybe that only is true in SOME cases, perhaps related to the DB or some other aspect of your configuration or coding.
Again, filing a bug report at tracker.adobe.com would better get Adobe's attention to look into it, and given the questions above I hope you can see why it would not be prudent for any of us to do that for you (sometimes we'll do that, to save folks the trouble). It only taks a minute to do, and would be a better legacy than this post alone. 🙂