Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 225145 - Find disabled in orm.xml file
Find disabled in orm.xml file
Product: xml
Classification: Unclassified
Component: Text-Edit
PC Linux
: P3 (vote)
Assigned To: Svata Dedic
: 227319 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2013-01-21 15:42 UTC by myshkin
Modified: 2015-09-17 14:13 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT

Sample project (16.03 KB, application/x-compressed-tar)
2013-05-01 14:08 UTC, omolenkamp

Note You need to log in before you can comment on or make changes to this bug.
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).
Comment 4 Svata Dedic 2013-04-11 08:58:41 UTC
I created manually a sample orm.xml file (using namespace 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.

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