Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 172538 - If META-INF/persistence.xml is created manually then is not linked to the visual editor
If META-INF/persistence.xml is created manually then is not linked to the vis...
Product: javaee
Classification: Unclassified
Component: Persistence
All All
: P4 (vote)
: 6.x
Assigned To: Sergey Petrov
Depends on:
  Show dependency treegraph
Reported: 2009-09-18 07:36 UTC by ecerulm
Modified: 2016-07-07 08:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
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

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