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 225145

Summary: Find disabled in orm.xml file
Product: xml Reporter: myshkin
Component: Text-EditAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal CC: dkonecny, omolenkamp, sj-nb, vladperl
Priority: P3 Keywords: REGRESSION
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample project

Description myshkin 2013-01-21 15:42:57 UTC
Product Version = NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Operating System = Linux version 3.2.0-33-generic-pae running on i386
Java; VM; Vendor = 1.7.0_09
Runtime = Java HotSpot(TM) Client VM 23.5-b02

maven project:
  opened src/main/resources/META-INF/orm.xml
  click in editor.
  Ctrl-S (Emacs keybinding) does nothing.
  Edit -> Find is greyed out, as is Edit -> Replace.

Other buffers are still working normally.
Comment 1 Svata Dedic 2013-04-02 16:31:36 UTC
Please check if your file is not read-only for some reason.
Comment 2 Svata Dedic 2013-04-02 16:47:08 UTC
in a persistence.xml (ORM mapping) in a sample application, the Find feature works well.
Please zip the project (even excluding sources, or irrelevant parts), or make a sample project that exhibits the defect & attach to the defect. thanks.
Comment 3 myshkin 2013-04-09 16:44:08 UTC
(In reply to comment #1)
> Please check if your file is not read-only for some reason.

Yeah, it isn't read-only.  I can edit it to my hearts content.

You are correct that find works fine in persistence.xml.  It is only orm.xml that has an issue.  

please note that these are 2 different types of xml documents.  persistence.xml sets up the persistence context.  orm.xml has actual mapping definitions (i.e. overrides the JPA class annotations).

http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/persistence/orm_2_0.xsd
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/persistence/persistence_2_0.xsd
Comment 4 Svata Dedic 2013-04-11 08:58:41 UTC
I created manually a sample orm.xml file (using namespace http://java.sun.com/xml/ns/persistence/orm). Find is enabled as usual, file is recognized as configuration file by JPA project support. 

Passing to JEE team, maybe some project-specific issue ?
Comment 5 Sergey Petrov 2013-04-11 10:16:48 UTC
there is no orm.xml support on jpa support side, i.e. general xml support should work here.
also I see it was reported against beta2, is it reproducible with release?
is it valid for any file "orm.xml" with any content and location, can you provide your orm.xml or/and sample project?
also tried to crate some sample orm.xml in maven project (to have the same path), I'm using default keybinding but it shouldn't affect main menu in my opinion. Edit|find isn't disabled in my case nether right after orm.xml creation nor after ide restart.
Comment 6 omolenkamp 2013-05-01 14:07:21 UTC
I'm seeing the same behaviour in NetBeans 7.3: I can't use Find in orm.xml-files.

The actual file name doesn't seem to matter, but once I remove the xmlns-attribute from the root element, I can use Find again.
Comment 7 omolenkamp 2013-05-01 14:08:47 UTC
Created attachment 134009 [details]
Sample project

I've attached a sample project with an orm.xml file. This is an Ant project, but the bug happens in Maven projects as well.
Comment 8 Sergey Petrov 2013-07-04 05:35:04 UTC
*** Bug 227319 has been marked as a duplicate of this bug. ***
Comment 9 Sergey Petrov 2013-07-04 05:37:47 UTC
as even name doesn't matter and it's related to existence of xmlns, move to xml area
Comment 10 Martin Balin 2015-09-17 14:13:06 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.