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 172538

Summary: If META-INF/persistence.xml is created manually then is not linked to the visual editor
Product: javaee Reporter: ecerulm <ecerulm>
Component: PersistenceAssignee: Sergey Petrov <sj-nb>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description ecerulm 2009-09-18 07:36:31 UTC
Steps to reproduce:

New project / java class library
Add new file / empty files  / persistence.xml 
add xml content. 
Close the project
Reopen the project

The persistence.xml file is still linked to the xml editor instead of the persistence visual editor. 

----
If the persistence.xml file is created using the New/Entity classes from database then the persistence.xml is linked to a specific visual editor. It seems that 
there is no way to force netbeans to use this visual editor when the persistence.xml is created manually
Comment 1 ecerulm 2009-09-18 09:26:43 UTC
The issue can be workaround by forcing UNIX line endings (LF) in persistence.xml. 

dos2unix src/META-INF/persistence.xml

And restarting Netbeans IDE. (Just closing and reopening the project will not work).

I'm not 100% sure but I think should recognize persistence.xml with either Windows/Unix line endings. 
Comment 2 Sergey Petrov 2009-09-21 12:12:51 UTC
it's not a problem with newlines, I just copied from one persistence.xml to another manually created on linux and
reopening works as described, i.e. no visual editor. restart solve the problem.
but it may be not persistence recognizing problem but something more general as the same problem is for manually created
web.xml. It doesn't looks like a usual use case, also editor provide access to the file, restart solve the issue.
Comment 3 Martin Balin 2016-07-07 08:56:46 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss