java - Problems communicating Business Layer (JPA) with Presentation Layer (Netbeans 7.x) -


i develop "database based" java desktop application in following way:

  • develop data access layer (dal) using jpa (pojos generated netbeans 7.4)
  • develop business layer (bl) (my own classes, controllers, etc.)
  • develop presentation layer (pl): graphical user interfaces (panels, frames, dialogs)
  • making (pl) communicate (bl)

i developed (dal + bl) in single netbeans project (projectdbl.jar).

i developed pl in separate netbeans project (projectgui)

i importing projectdbl.jar projectgui compiled library.

i didn't add eclipselink libraries projectgui since added in projectdbl.jar.

i didn't add database driver library projectgui same reasons.

i separate between dal+bl , pl. further database modification (mysql->sqlserver example) should not impact done in pl.

the problem facing kind of exception raising when want invoke method in projectdbl.jar:

exception in thread "main" java.lang.noclassdeffounderror: javax/persistence/entitynotfoundexception 

it seems if persistence unit must not instantiated external jar...

a compiled library doesn't include libraries uses. otherwize, every jar file 50mbs large, , end commonly used libraries being present several times in classpath.

you neet add every library use, directly or indirectly, classpath.


Comments

Popular posts from this blog

Change the color of an oval at click in Java AWT -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -