This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 85455 - IllegalStateException after running create persistence unit hint
Summary: IllegalStateException after running create persistence unit hint
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2006-09-21 16:05 UTC by Lukas Jungmann
Modified: 2006-09-28 10:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-09-21 16:05:49 UTC
build 200609210300 (from release55_dev branch)

-create new webapp (Java EE 5, GlassFish)
-create new java class in it
-add @javax.persistence.Entity to the class
-invoke "Create Persistence Unit..." hint

=>
java.lang.IllegalStateException: This method must be called in the event thread.
        at
org.netbeans.modules.j2ee.common.EventRequestProcessor.invoke(EventRequestProcessor.java:79)
        at
org.netbeans.modules.j2ee.common.EventRequestProcessor.invoke(EventRequestProcessor.java:70)
        at
org.netbeans.modules.j2ee.common.DatasourceUIHelper.connect(DatasourceUIHelper.java:292)
        at
org.netbeans.modules.j2ee.common.DatasourceUIHelper.connect(DatasourceUIHelper.java:270)
        at
org.netbeans.modules.j2ee.persistence.wizard.unit.PersistenceUnitWizardPanelDS.connectDatasources(PersistenceUnitWizardPanelDS.java:99)
        at
org.netbeans.modules.j2ee.persistence.wizard.unit.PersistenceUnitWizardPanelDS.<init>(PersistenceUnitWizardPanelDS.java:68)
        at
org.netbeans.modules.j2ee.persistence.wizard.Util.buildPersistenceUnitUsingWizard(Util.java:384)
        at
org.netbeans.modules.j2ee.persistence.wizard.Util.createPersistenceUnitUsingWizard(Util.java:459)
        at
org.netbeans.modules.j2ee.persistence.wizard.Util.createPersistenceUnitUsingWizard(Util.java:453)
        at
org.netbeans.modules.j2ee.verification.persistence.hints.CreatePersistenceUnitHint.implement(CreatePersistenceUnitHint.java:48)
        at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:340)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Comment 1 Tomasz Slota 2006-09-21 16:31:50 UTC
confirmed & reproducible, very old problem revealed thanks to recent Stepan's changes in the 
'release55_dev' branch
Comment 2 Tomasz Slota 2006-09-22 08:48:17 UTC
Fixed.

Checking in CreatePersistenceUnitHint.java;
/cvs/j2ee/verification/src/org/netbeans/modules/j2ee/verification/persistence/hints/Attic/
CreatePersistenceUnitHint.java,v  <--  CreatePersistenceUnitHint.java
new revision: 1.1.2.2.14.1; previous revision: 1.1.2.2
Comment 3 Andrei Badea 2006-09-25 16:35:50 UTC
The fix seems fine to me.
Comment 4 Lukas Jungmann 2006-09-26 10:38:45 UTC
v. in release55_dev branch; feel free to merge the fix also to release55
Thanks
Comment 5 Tomasz Slota 2006-09-26 10:47:17 UTC
fix committed to the 'release55' branch.

Checking in CreatePersistenceUnitHint.java;
/cvs/j2ee/verification/src/org/netbeans/modules/j2ee/verification/persistence/hints/Attic/
CreatePersistenceUnitHint.java,v  <--  CreatePersistenceUnitHint.java
new revision: 1.1.2.3; previous revision: 1.1.2.2
Comment 6 Lukas Jungmann 2006-09-28 10:21:48 UTC
v.