2

I have a web application that is working fine under Netbeans 7.3. When I installed it on another computer with Netbeans 7.4, all references to the JPA metamodel are now undefined.

The import statements referring to the metamodel (those ending with an underscore, like the 3rd import statement below) are not recognized :

import bfMetier.ApplicationInitialise;
import entites.Locations;
import entites.Locations_;

And when I run the project, it aborts with a «cannot find symbol Locations_» error :

SEVERE: Exception while loading the app : EJB Container initialization error
java.lang.ExceptionInInitializerError
(...)
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
  symbol:   class Locations_
  location: package entites
    at beansFacades.LocationsFacade.<clinit>(LocationsFacade.java:10)

I'm using ecclipse as the JPA 2.0 provider and running the app under Glassfish 3.1.2.2.

Is there any parameter I need to add in order for the metamodel classes to be generated?

Thanks!

Pierre C
  • 2,920
  • 1
  • 35
  • 35

1 Answers1

0

I created a new java project in 7.4 and found some differences...

  1. There is no option in context menu for generating classes from database (like 7.3).
  2. I found this option in New Java Class... Persistence category.
  3. The entity generated by 7.4 do not have metadata classes.

Might be, the metadata classes are no longer generated/or needed by netbeans.

Pioneer
  • 1,530
  • 1
  • 11
  • 11