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.
Hi. I am new in JAVA world. And I am using this site "https://netbeans.org/kb/docs/java/hibernate-java-se.html" as my guide. Anyway, I am using NetBean 8.0 and MySQL ver 5.1.73 Then, after following the procedures, I am now testing my hibernate -> HQL Unfortunately, got an error: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:350) at javax.naming.InitialContext.bind(InitialContext.java:425) And here is my Hibernate.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name="session1"> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/laptopinv?zeroDateTimeBehavior=convertToNull</property> <property name="hibernate.connection.username">laptopinvuser</property> <property name="hibernate.connection.password">P@ssw0rd</property> <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property> <property name="hibernate.show_sql">true</property> <mapping resource="sentinel/Entity/Employees.hbm.xml"/> <mapping resource="sentinel/Entity/Access.hbm.xml"/> <mapping resource="sentinel/Entity/Laptop.hbm.xml"/> <mapping resource="sentinel/Entity/Department.hbm.xml"/> <mapping resource="sentinel/Entity/Users.hbm.xml"/> <mapping resource="sentinel/Entity/Position.hbm.xml"/> <mapping resource="sentinel/Entity/Guardonduty.hbm.xml"/> <mapping resource="sentinel/Entity/Webaccess.hbm.xml"/> </session-factory> </hibernate-configuration> Anything I missed from the tutorial? Please help. Thanks in advance.
Did you follow the tutorial step by step? As it's marked as valid for 8.0, I suppose tutorial author tried this one, as I know another tutorial which doesn't work in 8.0 (but should work in 8.0.1)
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