Jenkins: Illegal reflective access by org.testng.xml.XMLParser in - jenkins

I am trying to run the same program in Jenkins using run.bat file.
It throwing me below error:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.testng.xml.XMLParser (file:test ng path) to constructor com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl()
WARNING: Please consider reporting this to the maintainers of org.testng.xml.XMLParser
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.NoClassDefFoundError: bsh/EvalError
at org.testng.TestRunner.<init>(TestRunner.java:99)
at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:508)
at org.testng.SuiteRunner.init(SuiteRunner.java:142)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:106)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1116)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1103)
at org.testng.TestNG.runSuitesLocally(TestNG.java:955)
at org.testng.TestNG.run(TestNG.java:900)
at org.testng.TestNG.privateMain(TestNG.java:1182)
at org.testng.TestNG.main(TestNG.java:1146)
Caused by: java.lang.ClassNotFoundException: bsh.EvalError
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
My run.bat file has
java -cp "lib/*;bin" org.testng.TestNG testng.xml
command
I have set JAVA_HOME to my jdk in configurations

Related

Jenkins 2.304: Failed to monitor for Free Swap Space

Jenkins 2.304, Java 11.
When launching a job to a remote machine, observed a Free Swap Space failure. What could cause it?
Remoting version: 4.10
This is a Unix agent
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by jenkins.slaves.StandardOutputSwapper$ChannelSwapper to constructor java.io.FileDescriptor(int)
WARNING: Please consider reporting this to the maintainers of jenkins.slaves.StandardOutputSwapper$ChannelSwapper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Evacuated stdout
ERROR: Failed to monitor for Architecture
ERROR: Failed to monitor for Free Disk Space
ERROR: ERROR: Failed to monitor for Clock Difference
Failed to monitor for Free Swap Space
java.util.concurrent.TimeoutException
at hudson.remoting.Request$1.get(Request.java:321)
at hudson.remoting.Request$1.get(Request.java:240)
at hudson.remoting.FutureAdapter.get(FutureAdapter.java:65)
at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitorDetailed(AbstractAsyncNodeMonitorDescriptor.java:113)
at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:77)
at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:305)

WFLYCTL0085: Failed to parse configuration

I am new to Jboss world and running JBOSS and getting following error while starting.
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/manish/Desktop/ometap/wildfly-10.0.0.Final
JAVA: java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
=========================================================================
Listening for transport dt_socket at address: 8787
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by __redirected.__SAXParserFactory (file:/home/manish/Desktop/ometap/wildfly-10.0.0.Final/jboss-modules.jar) to constructor com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl()
WARNING: Please consider reporting this to the maintainers of __redirected.__SAXParserFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
13:34:35,267 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.1.Final
13:34:35,627 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
13:34:35,798 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) starting
13:34:36,608 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:356)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.wildfly.extension.core-management
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
at org.jboss.as.server.parsing.StandaloneXml$DefaultExtensionHandler.parseExtensions(StandaloneXml.java:126)
at org.jboss.as.server.parsing.StandaloneXml_4.readServerElement(StandaloneXml_4.java:218)
at org.jboss.as.server.parsing.StandaloneXml_4.readElement(StandaloneXml_4.java:141)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:103)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:49)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
Caused by: java.util.concurrent.ExecutionException: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147)
... 11 more
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:196)
at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127)
at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: org.jboss.modules.ModuleNotFoundException: org.wildfly.extension.core-management:main
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:223)
at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:178)
... 8 more
13:34:36,611 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
13:34:36,615 INFO [org.jboss.as.server] (Thread-1) WFLYSRV0220: Server shutdown has been requested.
13:34:36,681 INFO [org.jboss.as] (MSC service thread 1-3) WFLYSRV0050: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) stopped in 34ms
How can i fix above error?
If you want to use Java 9+ I'd suggest using at least WildFly 15. WildFly 17.0.1.Final is the latest release and does work with Java 9+.
If you are stuck on WildFly 10, I'd suggest using Java 1.8 instead.

Weblogic not coming up inside the Dockder container

Weblogic is not coming up . It is giving following stack trace . Can any one help in solving that ?
<Jun 20, 2018 1:04:27,029 PM UTC> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: A MultiException has 4 exceptions. They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.rjvm.RJVMService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.protocol.ProtocolRegistrationService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.protocol.ProtocolRegistrationService
A MultiException has 4 exceptions. They are:
1. java.lang.ExceptionInInitializerError
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.rjvm.RJVMService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.protocol.ProtocolRegistrationService errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.protocol.ProtocolRegistrationService
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:250)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ExceptionInInitializerError
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:163)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:278)
at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:72)
at weblogic.rjvm.RJVMService.start(RJVMService.java:54)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NullPointerException
at weblogic.utils.net.AddressUtils$AddressMaker.getAllAddresses(AddressUtils.java:62)
at weblogic.utils.net.AddressUtils$AddressMaker.<clinit>(AddressUtils.java:45)
at weblogic.utils.net.AddressUtils.getIPForLocalHost(AddressUtils.java:163)
at weblogic.rjvm.JVMID.setLocalID(JVMID.java:278)
at weblogic.rjvm.RJVMService.setJVMID(RJVMService.java:72)
Truncated. see log file for complete stacktrace
>
The WebLogic Server encountered a critical failure
Reason: Assertion violated
Stopping Derby server...
Derby server stopped.
Actually there was an interface resolution problem inside the docker container which was causing this
Make sure following points for resolution :
1) Cat /etc/hosts should have entry corresponding to localhost
2) docker0 interface should be in up state

Getting the error in Jenkins console java.lang.RuntimeException: java.io.IOException: invalid constant type: 15

Task I am doing
I am trying to trigger Junit using gradle in Jenkins. I am using powerMock (1.4.12) + mockito (1.9.5) for mocking along with Junit4 (4.11) & java8.
The problem
Getting the error in Jenkin console java.lang.RuntimeException: java.io.IOException: invalid constant type: 15
JUnit Report below stack trace
java.lang.IllegalStateException: Failed to transform class with name amdocs.APILink.backend.services.arCrgAdjnRef00. Reason: null at org.powermock.core.classloader.MockClassLoader.loadMockClass(MockClassLoader.java:266)
at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:180)
at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:68)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
You should probably not use libraries / tools that are five years old, when there are newer versions. Either this is a bug in one of the tools you use, or something got added to Java as language that they don't understand.

Failed to install ZAP_2.4.2_Core.tar.gz

it's my first post here so please excuse me for making any mistakes.
I try to perform the installation of ZAProxy Plugin in Jenkins.
I installed the custom tools plugin by inserting the values according to the website https://wiki.jenkins-ci.org/display/JENKINS/ZAProxy+Plugin.
After that I execute ZAProxy in my Jenkins Job:
After performing the build I see the following error:
Perform ZAProxy
Unpacking https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz to /var/lib/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ZAProxy_2.4.3 on Jenkins
ERROR: java.io.IOException: Failed to install https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz to /var/lib/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ZAProxy_2.4.3
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:832)
at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at com.cloudbees.jenkins.plugins.customtools.CustomTool.forNode(CustomTool.java:154)
at com.cloudbees.jenkins.plugins.customtools.CustomTool.forNode(CustomTool.java:59)
at fr.novia.zaproxyplugin.ZAProxy.retrieveZapHomeWithToolInstall(ZAProxy.java:486)
at fr.novia.zaproxyplugin.ZAProxy.checkParams(ZAProxy.java:574)
at fr.novia.zaproxyplugin.ZAProxy.startZAP(ZAProxy.java:613)
at fr.novia.zaproxyplugin.ZAProxyBuilder.perform(ZAProxyBuilder.java:159)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: Failed to unpack https://github.com/zaproxy/zaproxy/wiki/Downloads/ZAP_2.4.3_Core.tar.gz (26 bytes read of total -1)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:826)
... 19 more
Caused by: java.io.IOException: Failed to extract input stream
at hudson.FilePath.readFromTar(FilePath.java:2300)
at hudson.FilePath.access$400(FilePath.java:190)
at hudson.FilePath$10.invoke(FilePath.java:720)
at hudson.FilePath$10.invoke(FilePath.java:718)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.FilePath.untarFrom(FilePath.java:718)
at hudson.FilePath.installIfNecessaryFrom(FilePath.java:824)
... 19 more
Caused by: java.io.IOException: incorrect header check
at com.jcraft.jzlib.InflaterInputStream.read(InflaterInputStream.java:112)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:160)
at org.apache.commons.compress.utils.IOUtils.readFully(IOUtils.java:134)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.readRecord(TarArchiveInputStream.java:419)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getRecord(TarArchiveInputStream.java:388)
at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:269)
at hudson.FilePath.readFromTar(FilePath.java:2278)
... 26 more
Build step 'Execute ZAProxy' marked build as failure
[DependencyCheck] Collecting Dependency-Check analysis files...
[DependencyCheck] Finding all files that match the pattern dependency-check- report.xml
[DependencyCheck] Parsing 1 file in /var/lib/jenkins/jobs/<project name>_continuous/workspace
[DependencyCheck] Successfully parsed file /var/lib/jenkins/jobs/<project name>_continuous/workspace/dependency-check-report.xml of module <company name> HELP with 0 unique warnings and 0 duplicates.
[DependencyCheck] Computing warning deltas based on reference build #75
[DependencyCheck] Ignore new warnings since this is the first valid build
[DependencyCheck] Plug-in Result: Success - no threshold has been exceeded
Finished: FAILURE
I just couldn*t find any information about this error(s) and I'm sure it could help other newcomers who have to use this plugin in the future. Please help me. It's the Jenkins of my company so I have to conceal internal information. I overdraw it for you with red color.
Where did you get that URL from?
The correct one for ZAP 2.4.3 core is: https://github.com/zaproxy/zaproxy/releases/download/2.4.3/ZAP_2.4.3_Core.tar.gz

Resources