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.
When running tests of NB 7.3.1 on JDK 8 a lot of tests fail with the same error: NoSuchFieldException: declaredMethods The problem is in NB code which tries to get field "declaredMethods" of the Class object. This field was removed in JDK 8: https://jbs.oracle.com/bugs/browse/JDK-8005232 Full stack trace: java.lang.NoSuchFieldException: declaredMethods at java.lang.Class.getDeclaredField(Class.java:1973) at org.netbeans.junit.MethodOrder.orderMethods(MethodOrder.java:86) at org.netbeans.junit.MethodOrder.initialize(MethodOrder.java:71) at org.netbeans.junit.NbTestCase.<clinit>(NbTestCase.java:99) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:258) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:374) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1060) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:911) List of failing tests: org.netbeans.core.ProxyAutoConfigTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.multiview.NoMVCLookupTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.netigso.EnabledAutoloadTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.netigso.IntegrationTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.startup.InstalledFileLocatorAndCLITest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.startup.layers.DynamicSFSFallbackTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.windows.awt.ValidateLayerMenuTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.core.windows.awt.ValidateLayerToolbarTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.junit.NbModuleSuiteContextClassLoaderTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.junit.internal.NbModuleLogHandlerTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.autoupdate.services.FeatureIncompleteTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.DynamicVerifyTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.DynamicVerifyTest:org.netbeans.junit.NbModuleSuite$S::unknown_1 org.netbeans.modules.ide.ergonomics.ErgonomicInfastructureTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.VerifyErgonomicsIDETest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.VerifyFullIDETest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.WizardDeadTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.DisableJ2EEKeepsMobilityEnabledTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.EnableJ2EEEnablesJavaTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.FeaturesOffDemandTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.FoDURLStreamHandlerFactoryTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.FoDUpdateUnitProviderTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ParseXMLContentTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectDuplicatedTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectEnableFailureTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectFalsePositiveTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectOnDemandTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectOpenTriggersAddOnsTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectRejectedTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.ide.ergonomics.fod.ProjectWithDependenciesTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.java.platform.ConvertAsJavaBeanPlatformTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.java.platform.PlatformInstallTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.ContextClassLoaderTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.EnabledAutoloadTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.HookConfiguratorTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.IntegrationTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.LogReaderServiceTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.netbinox.NetigsoHasSAXParserTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.properties.PropertiesEncodingInMimeLookupTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.settings.RecognizeInstanceObjectsOnModuleEnablementTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.settings.convertors.MimeTypeTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.modules.xml.InstanceDataObjectInXMLTest:org.netbeans.junit.NbModuleSuite$S::unknown org.netbeans.spi.debugger.ui.EngineComponentsProviderTest:org.netbeans.junit.NbModuleSuite$S::unknown test.pkg.not.in.junit.BrandingAssignedTest:org.netbeans.junit.NbModuleSuite$S::unknown test.pkg.not.in.junit.NbModuleSuiteMockServiceTest:org.netbeans.junit.NbModuleSuite$S::unknown
Fanis, can we stop calling the removed method via reflection and try another approach?
Created attachment 137948 [details] proposed fix The patch fixes failing nbjunit tests. Jardo, as I am not the owner of this area, I could go ahead and integrate if you do not have any objections. Thank you
The patch makes OrderZATest and OrderAZTest in nbjunit fail.
I assume this will need to be backported to 7.3 version. Don't transplant - merge: $ hg up -C release73 $ hg merge e1a2a1bb5bc7 $ hg ci -m "Backport to 7.3 version"
Integrated into 'main-silver', will be available in build *201308072300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/e1a2a1bb5bc7 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #233436: Use different reflection calls on JDK8
Just adding more tests failing due to this reason: org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testIssue209755 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_01 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_02 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_03 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_04 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_05 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_06 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_07 org.netbeans.modules.php.editor.actions.UsedNamesComputerTest::testUseCase_08 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedMultipleSections1 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedSimple1 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedSimple2 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedSimple3 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedSimple4 org.netbeans.modules.php.editor.js.JsFormatterEmbeddedTest::testEmbeddedSimple5
More tests with the same failure org.netbeans.modules.php.editor.parser.astnodes.CommentExtractorTest::testExistingDescription org.netbeans.modules.php.editor.parser.astnodes.CommentExtractorTest::testExistingDescriptionWithMoreDeclarations org.netbeans.modules.php.editor.parser.astnodes.CommentExtractorTest::testNoDescription org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testConnection org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testFilters org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testFiltersLifecoycle org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testJpa org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testJstl org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testListeners org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testServlets org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testServletsLifecycle org.netbeans.modules.profiler.categories.j2ee.CategoryMarkTest::testStatements org.netbeans.modules.profiler.categories.j2ee.EjbCategoryMarkTest::testEjbContainer org.netbeans.modules.profiler.categories.j2ee.EjbCategoryMarkTest::testLifeCycle org.netbeans.modules.profiler.categories.j2ee.EjbCategoryMarkTest::testPersistence org.netbeans.modules.profiler.categories.j2ee.EjbFlatProfileTest::testEjbContainer org.netbeans.modules.profiler.categories.j2ee.EjbFlatProfileTest::testLifeCycle org.netbeans.modules.profiler.categories.j2ee.EjbFlatProfileTest::testPersistence org.netbeans.modules.profiler.categories.j2ee.EjbMarkTest::testEJBContainerCategory org.netbeans.modules.profiler.categories.j2ee.EjbMarkTest::testLifecycleCategory org.netbeans.modules.profiler.categories.j2ee.EjbMarkTest::testPersistenceCategory org.netbeans.modules.profiler.categories.j2ee.FlatProfileTest::testConnection org.netbeans.modules.profiler.categories.j2ee.FlatProfileTest::testStatements org.netbeans.modules.profiler.categories.j2ee.WebCategoryMarkTest::testJsps org.netbeans.modules.profiler.categories.j2ee.WebFlatProfileTest::testJsps
org.netbeans.modules.templates.ScriptingCreateFromTemplateTest::testCreateFromTemplateEncodingProperty org.netbeans.modules.templates.IndentEngineIntTest::testCreateFromTemplateUsingFreemarker org.netbeans.modules.web.core.jsploader.SetModifiedTest::testModifySave org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupportTest::testClassBaseLibraryFromLibraryProject org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupportTest::testClassBaseLibraryWithinCurrentProject org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupportTest::testCompositeComponentLibraryWithDescriptor org.netbeans.modules.web.jsf.editor.facelets.FaceletsLibrarySupportTest::testCompositeComponentLibraryWithDescriptorFromLibraryProject org.netbeans.modules.web.jspparser.IdeEnvironmentTest::testAddedJarFile org.netbeans.modules.web.jspparser.IdeEnvironmentTest::testGetTagLibMap70426 org.netbeans.modules.web.jspparser.IdeEnvironmentTest::testRemovedJarFile org.netbeans.spi.project.ui.support.ProjectCustomizerListenersTest::testAllListeners org.openide.awt.MenuBarCNFETest::testALotOfClassNotFoundExceptions org.openide.awt.ToolbarPoolDeadlockTest::testWaitsForToolbars
org.netbeans.junit.OrderTest::shuffleTest org.netbeans.junit.OrderZATest::shuffleTest
org.netbeans.junit.NbModuleSuiteOrderTest::testTestCaseOrder