OpenApiValidationFilter RestAssured is throwing error - swagger

I am using, validation filter in the rest assured test cases, but its thwoing error as below
[main] INFO com.atlassian.oai.validator.schema.SchemaValidator - Note: Schema uses the 'allOf' keyword. Validation of 'additionalProperties' may fail with unexpected errors. See the project README FAQ for more information.
java.lang.NoSuchMethodError: 'java.util.ArrayDeque com.google.common.collect.Queues.newArrayDeque()'
at com.github.fge.jsonschema.processors.validation.ValidationStack.(ValidationStack.java:70)
at com.github.fge.jsonschema.processors.validation.InstanceValidator.(InstanceValidator.java:86)
at com.github.fge.jsonschema.processors.validation.ValidationProcessor.process(ValidationProcessor.java:54)

Related

How to suppress exact message in log4j2?

How to suppress exact message in log4j2 ?
11:03:28.500 [main] DEBUG o.s.jdbc.datasource.init.ScriptUtils - SQLWarning ignored: SQL state '23000', error code '1062', message [Duplicate entry '888' for key 'PRIMARY']
Can I exclude based on strings included in message (like "Duplicate entry" or "error code '1062'")?
I've tried to find it in documentation of log4j2 configuration but failed.
I know that I could rewrite sql script.

How to fine-tune the level for SonarQube Gradle plugin

I'm using SonarQube plugin (version 2.6.1) for Gradle (version 4.7) and have the problem that a lot of unimportant log output is being written while running the sonar analysis on my CI server.
Is there a way to fine-tune the log level for this plugin?
I checked the documentation but the only setting related to the log output I found was the JVM argument "verbose" which I'm not using either way (I guess the default is false so this shouldn't be turned on for me).
EDIT: Here are some examples of the output I would like to get rid of:
Some huge exception stacktraces during findbugs analysis (this one is shortened, didn't want to post the whole stacktrace, it's really huge).
16:23:34.993 ERROR - Unable to create symbol table for : /opt/workspace/pipeline-1/src/main/java/com/SomeClass.java
java.lang.NullPointerException: null
at org.sonar.java.resolve.TypeAndReferenceSolver.getSymbolOfMemberSelectExpression(TypeAndReferenceSolver.java:232) ~[java-squid-2.5.1.jar:na]
at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:200) ~[java-squid-2.5.1.jar:na]
at org.sonar.java.resolve.TypeAndReferenceSolver.resolveAs(TypeAndReferenceSolver.java:182) ~[java-squid-2.5.1.jar:na]
at...
Stacktraces from PMD:
16:23:37.206 ERROR - Fail to execute PMD. Following file is ignored: /opt/workspace/pipeline-1/src/main/java/com/SomeClass.java
java.lang.RuntimeException: null
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.3.jar:5.0.3]
at net.sourceforge.pmd.lang.java.typeresolution.PMDASMClassLoader.getImportedClasses(PMDASMClassLoader.java:77) ~[pmd-java-5.2.1.jar:na]...
Lots of irrelevant warnings like these:
16:23:38.638 WARN - /opt/workspace/pipeline-1/src/main/java/com/SomeClass.java: Got an exception - expecting EOF, found '}'
/opt/workspace/pipeline-1/src/main/java/com/SomeClass.java:28:5: expecting RCURLY, found 'default'
16:23:38.655 WARN - /opt/workspace/pipeline-1/src/main/java/com/SomeClass.java: Got an exception - expecting EOF, found 'someVariable'
I don't know what exactly is causing these problems, but since both my app and the results of the sonar analysis are looking OK, I would like to get rid of those log outputs since they only pollute my logs on Jenkins and make them unreadable.
There's property sonar.log.level and sonar.verbose; for example:
allprojects {
sonarqube {
properties {
// property "sonar.log.level", "INFO"
property "sonar.log.level", "TRACE"
}
}
}
see the analysis parameters.

Diagnosing Worklight 6 SQL Adapter issue, JPA tracing

Worklight Studio 6, SQL adapter attempting connection to DB2 database.
Standard pattern for procedure
return WL.Server.invokeSQLStatement({
preparedStatement : listUnassignedWorkOrders,
parameters : []
});
When I invoke my procedure I see this error
[ERROR ] FWLSE0035E: Invocation of procedure 'SqlStatement' failed.
[project Infrabel01] Type 'Function' currently does not support
marshalling to JSON.
And the logs show
[err] 0 WorklightPU WARN [Scheduled Executor-thread-1]
openjpa.Runtime - An error occurred while registering a
ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root
URL
[file:/C:/djna-nobackup/Workspaces/WL6.0/01/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar].
The error has been consumed. To see it, set your openjpa.Runtime log
level to TRACE. Load-time class transformation will not be available.
How to diagnose? How would I set the trace level in worklight?
JPA docs say:
property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO,
Tool=INFO, SQL=TRACE"
But where to put that in worklight?
The WorklightPU WARN in the log is not relevant and has been removed in newer releases of Worklight.
For your actual issue, see the following developerWorks threads with the same issue that was resolved.
Type 'Function' currently does not support marshalling to JSON.
developerWorks thread #1
developerWorks thread #2

How to show mbunit/gallio TestLog or Console output in Jenkins?

I'm using Gallio/MbUnit framework for my web testing, and the tests are kicked off from Jenkins. I've installed the Gallio/MbUnit plugin and it's publishing the xml report. I'm trying to find a way to display test log or console messages in the "Test Result" section so the team can easily read failures instead of digging into the "Console Output" for any failed test run.
When I run these Gallio/MbUnit tests from my local machine using Icarus everything is pretty nicely formatted, but not so much with Jenkins. I'd like to keep using it and improve how we display the errors. Suggestions?
For a failed test:
Failed
...MainMenuTests.AcctClaimsItems
Failing for the past 4 builds (Since Failed#128 )
Took 47 sec.
add description
Error Message
Expected value to be false.Actual Value : d:\Jenkins\jobs\...\workspace\WebTesting\Base\Helpers.cs:line 90d:\Jenkins\jobs\...\workspace\WebTesting\TigerEye\Tests\MainMenuTests.cs:line 329true
Stacktrace
at WebTesting.Base.Helpers.Click(IWebDriver driver, IWebElement element) in
From the raw console output:
Start time: 4:21 PM
Initializing the runtime and loading plugins.
Verifying test files.
Initializing the test runner.
Running the tests.
[failed] Test WebTesting/MainMenuTests/AcctClaimsItems
Expected value to be false.
Found System.Web Exception after click to url
.../Accounting/FETReport.aspx
Actual Value : true
at WebTesting.Base.Click(IWebDriver driver, IWebElement element) in d:\Jenkins\jobs\...\workspace\WebTesting\Base\StaticHelpers.cs:line 90 at WebTesting...\Tests.MainMenuTests.AcctClaimsItems() in d:\Jenkins\jobs\...\workspace\WebTesting\TigerEye\Tests\MainMenuTests.cs:line 329
Code:
if (driver.PageSource.Contains("System.Web - Exception"))
{
TestLog.Write("Found exception on page {0}", driver.Url);
TestLog.Write(driver.PageSource.ToString());
Console.Write("Found exception on page {0}", driver.Url);
Console.Write(driver.PageSource.ToString());
Assert.IsFalse(driver.PageSource.Contains("System.Web - Exception"), "Found System.Web Exception after click to url {0}",driver.Url);
}
There is a general console parsing plugin you can use to add a post build step https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin

saxon: problem reusing XsltTransformer object

Using Saxon-B, I'm trying to follow the javadoc and serially reuse an XsltTransformer object.
I'm thwarted by:
Error
XTDE1490: Cannot write more than one result document to the same URI, or write to a URI
that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared
2011-03-22 11:06:23,830 [main] ERROR btweb.compiler.CompileSite - Site compilation terminated with error.
btweb.compiler.CompilerException: Error running transform Cannot write more than one result document to the same URI, or write to a URI that has been read: file:/Users/benson/x/btweb/web_2_0/sites/us/errors/404/404.xml.prepared
It's probably Saxon-B bug. You can find more information here. According to this site "Fixed in 8.9.0.4".

Resources