Solved

Netbeans java

Posted on 2012-04-04
6
426 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is there a simpler dropbox system? 10 44
dao vs facade design patterns 2 29
Java List 4 31
Java Inheritance super keyword use 8 29
I have a Synology DS212+ NAS.  These are not only great for backup and normal NAS stuff, but also for delivering media throughout your home or LAN via DLNA.  I copied my whole audio collection from iTunes over to the box, but couldn't figure out how…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
This video teaches viewers about errors in exception handling.
Viewers will learn how to include realistic velocity sensitivity to their Sampler instruments. Set the Vol<Vel parameter in the Filter/Global tab to your desired setting: Gather samples of hits of various intensity, and drag/drop into Velocity zon…

685 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