If you create the persistence.xml
manually in Windows the file will be created with that will prevent Netbeans for recognizing- Netbeans will not recognize it as the special file it is and won’t be able to to open it with the special/custom visual editor.CRLF
line endings (windows style line endings),
I opened an bug report netbeans issue #172538. At the beginning, I thought the problem was due to different line ending CRLF vs LF issues, but as pointed out in the bug report the line ending has nothing to do with it. It’s just the IDE restart what is needed, no need to change the line endings.
The workaround is easy: change the newline (also line break or end-of-line EOL) characters to Unix style ( just restart the IDE. Unfortunately just closing and reopening the project containing the LF
) with any utility. I used Cygwin’s dos2unix (dos2unix src/META-INF/persistence.xml
) and thenpersistence.xml
file won’t work you have to restart Netbeans.