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 252550 - Error: cannot access HelpCtx
Summary: Error: cannot access HelpCtx
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 11:59 UTC by cezariusz
Modified: 2015-09-30 09:51 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Java file (4.77 KB, application/octet-stream)
2015-05-22 12:00 UTC, cezariusz
Details
Form file (4.00 KB, application/xml)
2015-05-22 12:01 UTC, cezariusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-05-22 11:59:23 UTC
Product Version: NetBeans IDE Dev (Build 201505160001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb)

I've created a new platform application, added a module, then added a Window (TopComponent) to it, fixed errors from bug 252036 and bug 252173 (missing import of NbBundle).
When I try to build the module I have the error:

ant -f R:\\Work\\DemoApp\\SomeCode -Dcontinue.after.failing.tests=true run
taskdefs:
common-init:
projectized-common.basic-init:
basic-init:
files-init:
nbm-license-init:
build-init:
Scanning for modules in C:\Program Files\NetBeans Dev 201505160001\platform
Scanning for modules in suite R:\Work\DemoApp
Distilling R:\Work\DemoApp\build\public-package-jars\org-netbeans-modules-settings.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-netbeans-modules-settings.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-awt.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-openide-awt.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-util.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\lib\org-openide-util.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-util-lookup.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\lib\org-openide-util-lookup.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-windows.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-openide-windows.jar]
init:
up-to-date:
compile:
Compiling 1 source file to R:\Work\DemoApp\SomeCode\build\classes
R:\Work\DemoApp\SomeCode\src\org\cezariusz\demo\app\code\MyEditorTopComponent.java:33: error: cannot access HelpCtx
public final class MyEditorTopComponent extends TopComponent {
  class file for org.openide.util.HelpCtx not found
C:\Program Files\NetBeans Dev 201505160001\harness\common.xml:224: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)

And the same when I clean and build the application:

platform.download:
ant -f R:\\Work\\DemoApp clean build
Deleting directory R:\Work\DemoApp\build\testuserdir
testuserdir-delete:
suite-jnlp.clean:
clean:
org.cezariusz.demo.app.code.taskdefs:
org.cezariusz.demo.app.code.common-init:
org.cezariusz.demo.app.code.projectized-common.basic-init:
org.cezariusz.demo.app.code.basic-init:
org.cezariusz.demo.app.code.files-init:
org.cezariusz.demo.app.code.testuserdir-delete:
org.cezariusz.demo.app.code.clean:
branding:
Created dir: R:\Work\DemoApp\build\cluster
Building jar: R:\Work\DemoApp\build\cluster\core\locale\core_demoapp.jar
Building jar: R:\Work\DemoApp\build\cluster\modules\locale\org-netbeans-core-windows_demoapp.jar
files-init:
release:
Created dir: R:\Work\DemoApp\build\cluster\config\Modules
build:
org.cezariusz.demo.app.code.taskdefs:
org.cezariusz.demo.app.code.common-init:
org.cezariusz.demo.app.code.projectized-common.basic-init:
org.cezariusz.demo.app.code.basic-init:
org.cezariusz.demo.app.code.files-init:
org.cezariusz.demo.app.code.nbm-license-init:
org.cezariusz.demo.app.code.build-init:
Created dir: R:\Work\DemoApp\build\public-package-jars
Scanning for modules in C:\Program Files\NetBeans Dev 201505160001\platform
Scanning for modules in suite R:\Work\DemoApp
Distilling R:\Work\DemoApp\build\public-package-jars\org-netbeans-modules-settings.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-netbeans-modules-settings.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-awt.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-openide-awt.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-util.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\lib\org-openide-util.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-util-lookup.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\lib\org-openide-util-lookup.jar]
Distilling R:\Work\DemoApp\build\public-package-jars\org-openide-windows.jar from [C:\Program Files\NetBeans Dev 201505160001\platform\modules\org-openide-windows.jar]
org.cezariusz.demo.app.code.init:
org.cezariusz.demo.app.code.up-to-date:
org.cezariusz.demo.app.code.compile:
Created dir: R:\Work\DemoApp\SomeCode\build\classes
Compiling 5 source files to R:\Work\DemoApp\SomeCode\build\classes
R:\Work\DemoApp\SomeCode\src\org\cezariusz\demo\app\code\MyEditorTopComponent.java:33: error: cannot access HelpCtx
public final class MyEditorTopComponent extends TopComponent {
  class file for org.openide.util.HelpCtx not found
C:\Program Files\NetBeans Dev 201505160001\harness\suite.xml:187: The following error occurred while executing this line:
C:\Program Files\NetBeans Dev 201505160001\harness\common.xml:224: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Comment 1 cezariusz 2015-05-22 12:00:37 UTC
Created attachment 153815 [details]
Java file
Comment 2 cezariusz 2015-05-22 12:01:00 UTC
Created attachment 153816 [details]
Form file
Comment 3 Antonin Nebuzelsky 2015-05-25 10:18:02 UTC
Tomasi, any clue? Thanks.
Comment 4 mjr_1974 2015-07-10 19:38:11 UTC
It happens in Linux too...
Comment 5 Christian Lenz 2015-09-30 09:43:14 UTC
I think you've forgotten to add the HelpCtx lib to the dependencies. After this you need Lookup as a dependency too. Please comment whether this helped or not.
Comment 6 Tomas Zezula 2015-09-30 09:51:32 UTC
You need to have the org.openide.util.ui module in your application, the dependency on org.openide.util is not enough. For dependencies on org.openide.util older than 9.3 the dependency on org.openide.util.ui is automatically injected by build and by module system in runtime. For newer you need to add the dependency yourself.