This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206120 - Hibernate support is way out-of-date
Summary: Hibernate support is way out-of-date
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P1 normal with 3 votes (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 185272 215812 220004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-08 03:34 UTC by blake1024
Modified: 2014-05-29 06:56 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description blake1024 2011-12-08 03:34:37 UTC
Hibernate 3.2.5 was released in 2007!!  Hibernate gets updated often with important updates.  While it may be difficult to keep up with them, 2007 is unreasonably old.  Currently Hibernate is on 3.6.8 and 4.0.0 is just about to be released.  I think Hibernate 4.0.0 release will come out before Netbeans 7.1.  Please update Netbeans support to Hibernate 4.0.0 (or 3.6.8 at the very least).
Comment 1 Tonka 2012-05-24 08:05:59 UTC
I can see why Oracle may not want to support Hibernate but realistically Hibernate 3.6 is markedly better than 3.2 and the tools have come a long way too. People who want the latest Hibernate features and tools are going to find Eclipse quite attractive and may take the extra day or so to learn how to use Eclipse.   True one can setup a Netbeans Maven project and install the Hibernate artifacts (I actually prefer this to Netbeans' predefined libraries) but the newest tools would still only be available on Eclipse.

(Update the 3.6 eh? :-)
Comment 2 Sergey Petrov 2012-05-24 09:56:31 UTC
unfortunately it's not just library update, if you want to use ths library you can always create your own, and it may be handled properly by jpa part of netbeans, but hibernate par (hql query, etc) may not be compartible and may require a lot of time to be updated.
Comment 3 matthias42 2012-06-03 12:32:19 UTC
Actually the situation with hibernate is similar to the SAF removal (see bug #204661) only that netbeans in this case suffers from a maintained library. According to the "Hibernate Roadmap":

https://community.jboss.org/wiki/HibernateRoadmap

Version 3.6 is obsolete, 4.1 is in maintenance mode and 5.0 is developed. So at this time I would see 4.1 as the most likely candidate. Yes that would probably mean internal fixes are necessary, so why not do it after the 7.2 release?

Following the arguments in the SAF discussion, that netbeans tries to support current features and libraries more than the obsolete technologies, this is the way I would see as logical.
Comment 4 Petr Jiricka 2012-06-11 08:24:15 UTC
Sergey is right that updating the libraries bundled in the IDE is difficult, but I am thinking if we could still improve this in the Hibernate framework support. What if there was UI that offers the user to specify their own location of Hibernate, as we do e.g. for the JSF framework? We could then stop offering the user to add Hibernate 3.2.5 to their project, and just require that the user specifies the library herself. Would this be a good solution and would it be easy to implement?
Comment 5 blake1024 2012-06-11 13:01:54 UTC
I don't understand the complicated part.  However, manually updating the Hibernate libraries is easy compared to updating the JAX-WS libraries.  Allowing the user to specify the Hibernate libraries as you suggest would be an improvement.
Comment 6 Sergey Petrov 2012-06-11 14:54:24 UTC
It's not a problem to bundle new version except possible legal issues, it's almost the same as support to specify new location or even easier.
Main problem is in HQL editor, configuration xml generations and POJO generations as API in hibernate may change for these actions. But if someone tried to update libraries manually and it works in all these cases it means we can try to update support without much problems.
Comment 7 Sergey Petrov 2012-07-23 13:21:30 UTC
*** Bug 215812 has been marked as a duplicate of this bug. ***
Comment 8 Sergey Petrov 2012-11-02 09:58:08 UTC
*** Bug 220004 has been marked as a duplicate of this bug. ***
Comment 9 Sergey Petrov 2012-11-15 04:40:49 UTC
*** Bug 185272 has been marked as a duplicate of this bug. ***
Comment 10 Sergey Petrov 2012-11-29 13:23:59 UTC
under investigation,
looking into hibernate 4.x found next issue https://forum.hibernate.org/viewtopic.php?f=1&t=988407
there is no hibernate-tools.jar available if I got it right. it may be possible to build smth but it may not work (found some issues in other threads).
Is there any sense to upgrade to latest 3.x, I'm not sure.
Comment 11 Sergey Petrov 2012-11-29 13:27:07 UTC
regarding mentioned above eclipse, looks like it also have only hibernate 3 support http://www.hibernate.org/subprojects/tools.html, is it?
Comment 12 Sergey Petrov 2013-01-14 13:24:52 UTC
Finally I would like to update to 3.6.10 when 7.3 development will be finished. It's not final plan yet.
Comment 13 Sergey Petrov 2013-01-28 20:28:47 UTC
3.6.10 is relatively up to date 3.x version.
4.x or 5.x can be filed as separate enhancement, close this one to track progress.
please try latest daily (1-3 days) from this comment. it's not part of 7.3 and will be available in next release. nice to find out if there are any regressions earlier.
Comment 14 blake1024 2014-02-07 00:40:05 UTC
Hibernate 4.3.1 Final is out.  NetBeans support is still way out of date.  Please address.  Thanks.
Comment 15 Sergey Petrov 2014-02-07 09:23:55 UTC
it's not the best way to reopen the same issue each time new "hibernate release" is release. but anyway, 8.0 have 4.2.6 bundled(if I remember right), I do not expect update to each minor vertion each tome.
Comment 16 blake1024 2014-02-07 15:32:50 UTC
If we don't re-raise it it sits there forever.  If we put it in as a new project you curtly tell us it is a duplicate.  If I reopen, you till me that's not the way to re-raise an issue.  Why don't you create a new type "Still doesn't work".  I don't know how to please you.

With respect to "8.0 have 4.2.6 bundled", see https://netbeans.org/community/releases/80/relnotes.html#supported_technologies
it states "Hibernate 3.6.10".  So, either you are wrong or your web page is wrong.  I haven't checked personally because I thought your page would be accurate.

What is the correct way for you (netbeans) or me to figure out what the actual status is and follow up with this?
Comment 17 Sergey Petrov 2014-02-07 15:37:07 UTC
1 year ago, it was 3.6.10, 10 years later it may be 10.3.5 and it's still valid to have this one closed.
regarding mentioned link, it seems outdated, but also I don't like term supported with specific version as no new 4.x feature is supported but 4.x is bundled and is used when project is created.
Comment 18 Defto 2014-05-29 06:56:45 UTC
I have Netbeans 8.0 , I'm trying to make a Web Service with Hibernate (default 4.2.6 ) with Glassfish 4 problem is with the Session Factory as the exception says that mapping is not in the file I HibernateUtil.java . :

. sessionFactory = new AnnotationConfiguration () configure () buildSessionFactory (). ;

in the hibernate.cfg.xml file I have :

<! DOCTYPE hibernate -configuration PUBLIC " - / / Hibernate / Hibernate Configuration DTD 3.0 / / EN" " http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd ">

When you test the Web Service ( Test Web Service ) I get these fragments in Glassfish Console 4:

Information: HHH000206 : hibernate.properties not found ....

WARN : HHH000223 : Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/ . Use http://www.hibernate.org/dtd/ namespace instead. Refer to Hibernate 3.6 Migration Guide! ....

Grave : java.lang.ExceptionInInitializerError
. ws.model.dto.HibernateUtil at <clinit> ( HibernateUtil.java : 38 )
at ws.model.dao.CatUserDao.getAllUsers ( CatUserDao.java : 24 )
at ws.service.webservice.TCOM_WS.getAllUsers ( TCOM_WS.java : 30 )
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 : 483 )
at org.glassfish.webservices.InstanceResolverImpl $ 1.invoke ( InstanceResolverImpl.java : 143 )
at com.sun.xml.ws.server.InvokerTube $ 2.invoke ( InvokerTube.java : 149 )
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest ( SEIInvokerTube.java : 88 )
at com.sun.xml.ws.api.pipe.Fiber.__doRun ( Fiber.java : 1136 )
at com.sun.xml.ws.api.pipe.Fiber._doRun ( Fiber.java : 1050 )
at com.sun.xml.ws.api.pipe.Fiber.doRun ( Fiber.java : 1019 )
at com.sun.xml.ws.api.pipe.Fiber.runSync ( Fiber.java : 877)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process ( AbstractTubeImpl.java : 136 )
at org.glassfish.webservices.MonitoringPipe.process ( MonitoringPipe.java : 142 )
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest ( PipeAdapter.java : 119 )
at com.sun.xml.ws.api.pipe.Fiber.__doRun ( Fiber.java : 1136 )
at com.sun.xml.ws.api.pipe.Fiber._doRun ( Fiber.java : 1050 )
at com.sun.xml.ws.api.pipe.Fiber.doRun ( Fiber.java : 1019 )
at com.sun.xml.ws.api.pipe.Fiber.runSync ( Fiber.java : 877)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process ( AbstractTubeImpl.java : 136 )
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:210)
at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:142)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest ( PipeAdapter.java : 119 )
at com.sun.xml.ws.api.pipe.Fiber.__doRun ( Fiber.java : 1136 )
at com.sun.xml.ws.api.pipe.Fiber._doRun ( Fiber.java : 1050 )
at com.sun.xml.ws.api.pipe.Fiber.doRun ( Fiber.java : 1019 )
at com.sun.xml.ws.api.pipe.Fiber.runSync ( Fiber.java : 877)
at com.sun.xml.ws.server.WSEndpointImpl $ 2.Process ( WSEndpointImpl.java : 420 )
com.sun.xml.ws.transport.http.HttpAdapter at $ HttpToolkit.handle ( HttpAdapter.java : 687 )
at com.sun.xml.ws.transport.http.HttpAdapter.handle ( HttpAdapter.java : 266 )
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle ( ServletAdapter.java : 169 )
at org.glassfish.webservices.JAXWSServlet.doPost ( JAXWSServlet.java : 169 )
at javax.servlet.http.HttpServlet.service ( HttpServlet.java : 707)
at javax.servlet.http.HttpServlet.service ( HttpServlet.java : 790 )
at org.apache.catalina.core.StandardWrapper.service ( StandardWrapper.java : 1682 )
at org.apache.catalina.core.StandardWrapperValve.invoke ( StandardWrapperValve.java : 318)
at org.apache.catalina.core.StandardContextValve.invoke ( StandardContextValve.java : 160 )
at org.apache.catalina.core.StandardPipeline.doInvoke ( StandardPipeline.java : 734)
at org.apache.catalina.core.StandardPipeline.invoke ( StandardPipeline.java : 673 )
at com.sun.enterprise.web.WebPipeline.invoke ( WebPipeline.java : 99)
at org.apache.catalina.core.StandardHostValve.invoke ( StandardHostValve.java : 174 )
at org.apache.catalina.connector.CoyoteAdapter.doService ( CoyoteAdapter.java : 357 )
at org.apache.catalina.connector.CoyoteAdapter.service ( CoyoteAdapter.java : 260 )
at com.sun.enterprise.v3.services.impl.ContainerMapper.service ( ContainerMapper.java : 188 )
at org.glassfish.grizzly.http.server.HttpHandler.runService ( HttpHandler.java : 191 )
at org.glassfish.grizzly.http.server.HttpHandler.doHandle ( HttpHandler.java : 168 )
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead ( HttpServerFilter.java : 189 )
at org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute ( ExecutorResolver.java : 119 )
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter ( DefaultFilterChain.java : 288 )
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart ( DefaultFilterChain.java : 206 )
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute ( DefaultFilterChain.java : 136 )
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process ( DefaultFilterChain.java : 114 )
at org.glassfish.grizzly.ProcessorExecutor.execute ( ProcessorExecutor.java : 77 )
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent ( TCPNIOTransport.java : 838 )
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent ( AbstractIOStrategy.java : 113 )
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0 ( WorkerThreadIOStrategy.java : 115 )
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access at $ 100 ( WorkerThreadIOStrategy.java : 55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.DoWork ( AbstractThreadPool.java : 564 )
org.glassfish.grizzly.threadpool.AbstractThreadPool at $ Worker.run ( AbstractThreadPool.java : 544 )
at java.lang.Thread.run ( Thread.java : 744 )
Caused by: org.hibernate.MappingException : Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister
at org.hibernate.persister.internal.PersisterFactoryImpl.create ( PersisterFactoryImpl.java : 174 )
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135)
. at org.hibernate.internal.SessionFactoryImpl <init> ( SessionFactoryImpl.java : 386)
at org.hibernate.cfg.Configuration.buildSessionFactory ( Configuration.java : 1790 )
at org.hibernate.cfg.Configuration.buildSessionFactory ( Configuration.java : 1861 )
. ws.model.dto.HibernateUtil at <clinit> ( HibernateUtil.java : 29)
62 more ...
Caused by: java.lang.ClassCastException : can not be cast to org.hibernate.type.StringType org.hibernate.type.VersionType
at org.hibernate.tuple.PropertyFactory.buildVersionProperty ( PropertyFactory.java : 162 )
. org.hibernate.tuple.entity.EntityMetamodel at <init> ( EntityMetamodel.java : 193)
. at org.hibernate.persister.entity.AbstractEntityPersister <init> ( AbstractEntityPersister.java : 507)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:146)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 ( Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance ( NativeConstructorAccessorImpl.java : 62 )
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance ( DelegatingConstructorAccessorImpl.java : 45 )
at java.lang.reflect.Constructor.newInstance ( Constructor.java : 408)
at org.hibernate.persister.internal.PersisterFactoryImpl.create ( PersisterFactoryImpl.java : 163 )
67 more ...

Grave : Initial SessionFactory creation failed.org.hibernate.MappingException : Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister

I've tried everything and nothing. Any solution to this?

thanks