NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

6.8 Simple CRUD application with MySQL hangs on createEntityManagerFactory

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
dAlexis



Joined: 18 Jan 2010
Posts: 7

PostPosted: Mon Jan 18, 2010 7:01 pm    Post subject: 6.8 Simple CRUD application with MySQL hangs on createEntityManagerFactory Reply with quote

Situation: NetBeans 6.8, Remote MySQL. Connection to DB from IDE is OK, I successfully run SQL INSERT commands in NetBeans. Inserted data is visible by other tool. It seems to me, that the connection is right. Entity class is generated by CRUD wizard and seems to be OK too. But! while trying to run generated application hangs on the string below:

Code:

entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(resourceMap.getString("entityManager.persistenceUnit")).createEntityManager(); // NOI18N


It was found by debugger.

Simply showing toplink string in output and timeout several minutes after nothing...

What I was trying (w\o success):

1) Changing persistance libraries - I tested two other with the same result.
2) Chaning to the latest MySQL driver (from *6 to *10 version)
3) Adding stored password to connection properties. ( All rights for scheme are provided to user, I'm using)

JDK version is 6 upd 17.

Any advice?
Back to top
dAlexis



Joined: 18 Jan 2010
Posts: 7

PostPosted: Tue Jan 19, 2010 8:50 am    Post subject: Reply with quote

Additional info - I installed JavaDB and it works perfect with CRUD wizard. TopLink shows two lines:

Code:

[TopLink Info]: 2010.01.19 11:41:34.109--ServerSession(9938272)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2010.01.19 11:41:34.937--ServerSession(9938272)--file:/C:/Projects/MercDB/Test2/src/-InetPU login successful


The second line is not shown while connecting to MySQL. Seems to me, that the problem is specific to remote MySQL connection. I made an attempt to run jar file with MySQL outside of IDE - same connection timeout received. I also changed hostname to IP address in MySQL connection properties - nothing...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo