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.
Product Version: NetBeans IDE Dev (Build 200903261933) Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) -When creating new Database desktop application, the form is created with errors, and opens with "Form Loaded With Errors" Warning. -The same problem occurs when creating first M/D Form in any Java project -Any subsequent M/D form is created successfully I tried this in WinXP and Ubuntu, with sample Derby DB and with MySQL - reproducible in all cases. In messages.log (attached) many exceptions can be seen. The ergonomics cluster was ENABLED (I will try this with disabled too).
Created attachment 78966 [details] Messages log
Created attachment 78967 [details] Warning message in the IDE
Created attachment 78970 [details] Previous image with correct format (sorry)
The root exception is org.netbeans.modules.j2ee.persistence.provider.InvalidPersistenceXmlException [path: C:\Documents and Settings\pavel\My Documents\NetBeansProjects\DesktopApplication7\src\META-INF\persistence.xml] at org.netbeans.modules.j2ee.persistence.provider.ProviderUtil.getPUDataObject(ProviderUtil.java:552) at org.netbeans.modules.j2ee.persistence.provider.ProviderUtil.getPUDataObject(ProviderUtil.java:585) at org.netbeans.modules.form.j2ee.J2EEUtils.getPersistenceXML(J2EEUtils.java:341) [catch] at org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard.instantiatePersitence(MasterDetailWizard.java:407) at org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard.instantiate(MasterDetailWizard.java:340) ... and the corresponding code from ProviderUtil.getPUDataObject() DataObject dataObject = null; try { dataObject = DataObject.find(fo); } catch (DataObjectNotFoundException ex) { Exceptions.printStackTrace(ex); } if (!(dataObject instanceof PUDataObject)){ throw new InvalidPersistenceXmlException(FileUtil.getFileDisplayName(fo)); } e.g. the DataObject that corresponds to persistence.xml is not PUDataObject, but XMLDataObject. It seems to be some internal problem of j2ee/persistence or some clash of j2ee/persistence and xml => reassigning to j2ee/persistence for evaluation.
Tomas M will help with this - thanks. I can reproduce, and yes, persistence.xml is of type org.netbeans.modules.xml.XMLDataObject. However, after the wizard completes when I open persistence.xml, it uses the specific multiview editor for persistence.xml, so it looks like at that point it's a PUDataObject. Strange. BTW, this problem is not reproducible when using the Entity Classes from Database wizard in a regular JavaSE project.
There have been no changes in this area recently, so I have no idea when and how this broke. Any ideas when this stopped working?
This works for me correctly in build from March 17, so this is a recent regression.
Petr/Tomas, this issue is last stopper for M3. Any estimation when it could be fixed ? Thanks in advance.
I'm able to reproduce but only for the first time, once the project is created, it works for me. Jardo, please, do you have any idea why I'm not able to get correct DataObject for persistence.xml file? I get XmlDataObject instead of PUDataObject. As Petr wrote, there were no changes in the Persistence module itself and we are not able to reproduce with older build (and I noticed that you made some changes in Lookup and data systems recently). Thanks for any help/ideas.
> -The same problem occurs when creating first M/D Form in any Java project > -Any subsequent M/D form is created successfully > > I'm able to reproduce but only for the first time, once the project is created, it works for me. It seems to happen every time the persistence.xml file is created e.g. if you delete this file after the first attempt then you will be able to reproduce the mentioned exception again.
Problem seems to be in FileSystems, in caching incorrect MIME type.
Fixed - http://hg.netbeans.org/core-main/rev/816ec416bbcc. I tried to create desktop DB application and it worked. I will merge it to M3 clone.
Thanks many times!
The fix looks good. Btw. to simplify transfer to M3 clone, it is good to first update to release67_m3_base and then commit the fix. More info at: http://wiki.netbeans.org/HgHowTos#section-HgHowTos-GettingReadyForWorkWithClones
Transplanted into M3 (original log accidentally lost). Previously I forgot to thank to Tomas Mysik for precise evaluation. http://hg.netbeans.org/release67_m3/rev/40a8ebbed5d3
Product Version: NetBeans IDE Dev (Build 200904010000) Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 (WinXP and Ubuntu) Verified. Master/Deatail form created successfully.
Integrated into 'main-golden', will be available in build *200904020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/816ec416bbcc User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #161340 - Do not cache any fallback MIME type.