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 113543 - Changing persistence.xml through UI doesn't change when saving
Summary: Changing persistence.xml through UI doesn't change when saving
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 19:23 UTC by ieising
Modified: 2007-08-27 13:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Faulty persistence.xml as used to reproduce the bug (628 bytes, text/xml)
2007-08-24 09:08 UTC, ieising
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ieising 2007-08-22 19:23:48 UTC
Hi,

I'm running NB6 dev 200708210000 and when I open the persistence.xml and change the value of 'Table Generation Strategy'
for example from 'Create' to 'Drop and Create' in the design view by setting the appropriate radio-box and then save the
file. The file is not changed. So when I close the file and open it again, I get the old 'Create' value, and so the
change wasn't saved.

When I change the file in the XML editor, and save it. Then it all works perfectly.

Iwan
Comment 1 Erno Mononen 2007-08-22 20:47:43 UTC
I couldn't reproduce this with the same build on Win XP / JDK 6. I tried with a web application (Java EE 5) and with a 
Java SE application and changing the table generation strategy in the visual UI worked as expected. Would you be able 
to give any additional details on this? I am also downgrading this to P2 as per the priority guidelines (a workaround 
exists). Thanks.
 
Comment 2 ieising 2007-08-24 09:07:40 UTC
I've tried it with a brand new project and then it works fine. So I copied my persistence.xml into that new project and
then it doesn't work. I'll attach the faulty file.

This file is created with NB551.

Iwan
Comment 3 ieising 2007-08-24 09:08:43 UTC
Created attachment 47265 [details]
Faulty persistence.xml as used to reproduce the bug
Comment 4 Erno Mononen 2007-08-24 14:19:20 UTC
Thanks for following up on this. It seems to be caused by that the persistence unit created in 5.5 has a different 
provided class for Toplink, namely oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider, whereas 6.0 expects 
it to be oracle.toplink.essentials.PersistenceProvider. Please see issue 87704 for more info on that. So to make it 
work, just change the provider class in the xml view. This is a bug however as the editor should be able to handle 
persistence units created in 5.5. I will fix it for 6.0.
Comment 5 Erno Mononen 2007-08-27 13:35:23 UTC
Fixed in trunk.

Checking in ProviderUtil.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java,v  <--  ProviderUtil.java
new revision: 1.17; previous revision: 1.16
done
Checking in ToplinkProvider.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/provider/ToplinkProvider.java,v  <--  
ToplinkProvider.java
new revision: 1.4; previous revision: 1.3
done