Link to home
Start Free TrialLog in
Avatar of sargent240
sargent240Flag for United States of America

asked on

Netbeans java

Below is an error I get when I compile the attached program I have written.  I have not looked at the code for a few weeks as I had a question about a problem in the code and the advice I followed produced the error below.  I get the error when I try to run the program from Netbeans.  I am using Netbeans to write the program.  I have absolutely no idea how to get back where I was.  Before following the instructions, which I don't remember everything was working.  I was simply trying to add another function.  Any ideas anyone?

run:
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named null:  The following providers:
oracle.toplink.essentials.PersistenceProvider
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
Returned null to createEntityManagerFactory.

      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
      at diyjdj.DiyDjMain.initComponents(DiyDjMain.java:779)
      at diyjdj.DiyDjMain.<init>(DiyDjMain.java:747)
      at diyjdj.Main.main(Main.java:19)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)


I have no idea what is going on in line 779.  The source code is attached.  Thanks!
diy-dj.java
Avatar of sargent240
sargent240
Flag of United States of America image

ASKER

I might add, the code in line 779 is generated by Netbeans.
Avatar of Sharon Seth
java.beans.Beans.isDesignTime() is evaluating to false and the code at that line is specifically using an entity manager called Null. Can you see if you can set isDesignTime() to True ?
I don't have any idea how to go about that,  can you get me started?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Sharon Seth
Sharon Seth
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sharonseth,

Been buried with a couple things last few days.  Will be looking at our suggestion over the weekend.  Thanks for the suggestion.  I'll keep you posted
Found the problem thanks.