Solved

Netbeans java

Posted on 2012-04-04
6
420 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:sargent240
  • 4
  • 2
6 Comments
 

Author Comment

by:sargent240
ID: 37809239
I might add, the code in line 779 is generated by Netbeans.
0
 
LVL 12

Expert Comment

by:Sharon Seth
ID: 37810179
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 ?
0
 

Author Comment

by:sargent240
ID: 37811828
I don't have any idea how to go about that,  can you get me started?
Thanks.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 12

Accepted Solution

by:
Sharon Seth earned 500 total points
ID: 37822480
Set the following property somewhere before you hit line 779 , maybe set it in your main()
java.beans.Beans.setDesignTime(true) .

I am  assuming this would skip the code that tries to create an entity manager factory. If you are able to go beyond this point , we will look at what needs to be done next
0
 

Author Comment

by:sargent240
ID: 37842888
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
0
 

Author Closing Comment

by:sargent240
ID: 37913229
Found the problem thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven example error 3 54
diffSum example 4 27
servlet filter example 37 46
Can I download a movie that I can watch on the web? 2 7
Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Viewers will learn the basics of creating custom device Racks in Ableton Live. Place instrument(s) and effects onto a track, and select them all by holding the Shift key and clicking on the device title bars: Group them by typing Command-G (Ctrl-G…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now