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 230834 - Unable to rebuild Hibernate POJO's
Summary: Unable to rebuild Hibernate POJO's
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 8.0.1
Hardware: PC Windows 8 x64
: P3 normal with 1 vote (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 233332 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-06 09:27 UTC by Maksim Khramov
Modified: 2016-07-07 08:54 UTC (History)
2 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 Maksim Khramov 2013-06-06 09:27:35 UTC
Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-11080-on-20130605)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b13

Steps to reproduce:
Created new Web project with hibernate support. Used bundled derby sample database
Create hibernate reverse engineering xml file with only one PRODUCT_CODE table
Invoke Hibernate Mappring wizard to create POJO file. (I used it with ОВЛ5 Features and EJB annotations and no XML mappings)
Click Finish to see ProductCode,java file is created.
Invoke Wizard again
Dialog shows Error Message: Hibernate configuration fails with message: Unable to load class [ dbo.ProductCode] declared in Hibernate configuration   entry see message.log for exception details.
And exception is in log file:
INFO [org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor]: access to hibernate fails.
java.lang.ClassNotFoundException: dbo.ProductCode
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222)
Caused: java.lang.ClassNotFoundException: dbo.ProductCode starting from ModuleCL@3fd372cf[org.netbeans.modules.hibernatelib] with possible defining loaders null and declared parents [ModuleCL@6b9c0a9d[org.netbeans.libs.freemarker], Netigso[reference:file:ide/modules/org-apache-commons-logging.jar]]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:190)
	at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
	at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2366)
Caused: org.hibernate.MappingException: Unable to load class [ dbo.ProductCode] declared in Hibernate configuration <mapping/> entry
	at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2369)
	at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2310)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2290)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2243)
	at org.hibernate.cfg.Configuration.configure(Configuration.java:2216)
	at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.checkConfig(HibernateCodeGenWizardDescriptor.java:262)
[catch] at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.isValid(HibernateCodeGenWizardDescriptor.java:177)
Comment 1 Sergey Petrov 2013-06-06 10:36:39 UTC
I'm keeping as issue for now as I may be unclear the project need to be rebuild to include newly generated classes in compiled classpath to use later in netbeans wizards which utilize hibernate on project classpath. I need to evaluate if something can be done here, at least some hint regarding project rebuild in case of 'classnotfound'.
Comment 2 Maksim Khramov 2013-06-07 08:25:35 UTC
Was work in previous (7.3) release
Comment 3 Sergey Petrov 2013-06-17 06:57:10 UTC
regarding previous nb, it may be some compile on save option behave differently, I'll try to verify.
Comment 4 Sergey Petrov 2013-09-06 12:13:44 UTC
*** Bug 233332 has been marked as a duplicate of this bug. ***
Comment 5 Sergey Petrov 2014-07-17 12:52:17 UTC
I have hbm.xml can't be found, but it's similar issue in my opinion.
Comment 6 Martin Balin 2016-07-07 08:54:46 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss