Hi there,
i am currently very confused by the netbeans ide. I am developing a java se desktop app with hibernate as a db abstraction layer. Hibernate works great and didn't give me any problems but a week ago i switched development environments from eclipse to netbeans (to use the gui editor).
My problem is a class not mapped exception that is thrown when i run the app in netbeans, by klicking the run button in netbeans. What it comes down to is that the path where hibernate searches any entity classes is wrong:
Code:
14:58:04,306 DEBUG AbstractJarVisitor:116 - Searching mapped entities in jar/par: file:path/netbeans-project/src
where "path/netbeans-project" is the path to my netbeans project. The weird thing is that JUnit test run in netbeans do work because the right path is specified and the jar file that netbeans builds also works when run manually.
After debugging Hibernate to find out how the path is generated i found out that the path can be specified in the persistence.xml
EJB3Configuration.java line 272:
Code:
URL jarURL = JarVisitorFactory.getJarURLFromURLEntry( url, "/META-INF/persistence.xml" );
But i don't know the directive to specify the jar-url and i would like to find a cleaner solution like a switch in netbeans.
Does anybody develop in netbeans?
I would be very thankful for a hint.