Unable to pass ActiveMQ configuration in Quarkus native build with Camel setup - apache-camel

I am getting the following errors while passing ActiveMQ properties in the broker URL in Quarkus native build and Camel setup.
javax.jms.JMSException: Could not create Transport. Reason: javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {transport.initialReconnectDelay=1000, transport.timeout=5000, transport.maxReconnectAttempts=5}
Invalid socket parameters: {enabledProtocols=TLSv1.2}, continuing to retry.

I found the root cause of this issue. This is related to Quarkus native build and reflection. At startup, the framework tries to set properties using reflection. After adding the following into reflectconfig.json, everything is working as expected.
"name": "org.apache.activemq.command.ConsumerInfo",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
"name": "org.apache.activemq.transport.failover.FailoverTransport",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
"name": "sun.security.ssl.SSLSocketImpl",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true

Related

I get this error at mid of test case when I use WebdriverManager with selenium in parallel. 'disconnected: not connected to DevTools' [duplicate]

I am seeing below error and browser got disconnected between. Its happening only for chrome. Selenium version I am using is:
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
Error stack trace:
[1579632222.785][SEVERE]: Unable to receive message from renderer
org.openqa.selenium.WebDriverException: disconnected: not connected to DevTools
(Session info: chrome=79.0.3945.117)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MBP15-PBJGH8.8x8.com', ip: 'fe80:0:0:0:1846:114d:10a6:bf26%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 79.0.3945.117, chrome: {chromedriverVersion: 78.0.3904.70 (edb9c9f3de024..., userDataDir: /var/folders/mz/2_llwtkx31d...}, goog:chromeOptions: {debuggerAddress: localhost:54446}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: 3577826ba5ac2d089a34e17f9aa987c9
This error message...
org.openqa.selenium.WebDriverException: disconnected: not connected to DevTools
(Session info: chrome=79.0.3945.117)
.
.
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 79.0.3945.117, chrome: {chromedriverVersion: 78.0.3904.70 (edb9c9f3de024..., userDataDir: /var/folders/mz/2_llwtkx31d...}, goog:chromeOptions: {debuggerAddress: localhost:54446}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=78.0
Release Notes of chromedriver=78.0 clearly mentions the following :
Supports Chrome v78
You are using chrome=79.0
Release Notes of ChromeDriver v79.0 clearly mentions the following :
Supports Chrome 79
So there is a clear mismatch between the ChromeDriver v78.0 and the Chrome Browser v79.0
Solution
Ensure that:
ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level.
Chrome is updated to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

No suitable pipeline found for auth-register-login error in Express Gateway start up and get a 404 error when I POST to it

Pls help. I am new to Express Gateway.
During npm start I am getting the following errors. I dont see any problems (being novice) any problems with gateway.config.yml and the way pipelines are configured.
When I POST a message I get Not Found.. Also attached below a simple post message..
2020-03-28T02:20:04.382Z [EG:gateway] debug: mounting routes for apiEndpointName auth-email-confirm, mount /auth/email-confirm/:token
2020-03-28T02:20:04.382Z [EG:gateway] debug: No suitable pipeline found for auth-email-confirm
2020-03-28T02:20:04.382Z [EG:gateway] debug: methods specified, registering for each method individually
2020-03-28T02:20:04.382Z [EG:gateway] debug: mounting routes for apiEndpointName auth-register-login, mount /auth/register-user
2020-03-28T02:20:04.382Z [EG:gateway] debug: No suitable pipeline found for auth-register-login
2020-03-28T02:20:04.382Z [EG:gateway] debug: methods specified, registering for each method individually
2020-03-28T02:20:04.382Z [EG:gateway] debug: mounting routes for apiEndpointName auth-register-login, mount /auth/login
2020-03-28T02:20:04.382Z [EG:gateway] debug: No suitable pipeline found for auth-register-login
2020-03-28T02:20:04.382Z [EG:gateway] debug: methods specified, registering for each method individually
2020-03-28T02:20:04.383Z [EG:gateway] debug: mounting routes for apiEndpointName auth-user, mount /auth/user*
2020-03-28T02:20:04.383Z [EG:gateway] debug: No suitable pipeline found for auth-user
2020-03-28T02:20:04.383Z [EG:gateway] debug: no methods specified. handle all mode.
2020-03-28T02:20:04.383Z [EG:gateway] debug: mounting routes for apiEndpointName properties, mount /property*
2020-03-28T02:20:04.383Z [EG:gateway] debug: No suitable pipeline found for properties
2020-03-28T02:20:04.383Z [EG:gateway] debug: no methods specified. handle all mode.
2020-03-28T02:20:04.383Z [EG:gateway] info: hot-reload config completed
Here is my gateway.config.yml:
http:
port: 8080
admin:
host: localhost
port: 9876
apiEndpoints:
auth-email-confirm:
host: localhost
path: '/auth/email-confirm/:token'
methods: ["GET"]
auth-register-login:
host: localhost
paths: ['/auth/register-user', '/auth/login']
methods: ["POST"]
auth-user:
host: localhost
path: '/auth/user*'
properties:
host: localhost
path: '/property*'
serviceEndpoints:
auth:
url: 'http://localhost:3003'
properties:
url: 'http://localhost:4004'
#policies to be used
policies:
- log
- proxy
- jwt
- request-transformer
#pipelines
pipelines:
# this pipeline is used for user clicking on email confirmation
authEmailConfirmPipeline:
apiEndPoints:
- auth-email-confirm
policies:
- log:
action:
message: '${req.method} ${req.originalUrl}'
- proxy:
action:
serviceEndpoint: auth
changeOrigin: true
# this pipeline is used for user registration or login apis
authRegisterPipeline:
apiEndPoints: # in this case we dont need to validate the jwt
- auth-register-login
policies:
- log:
action:
message: '${req.method} ${req.originalUrl}'
- proxy:
action:
serviceEndpoint: auth
changeOrigin: true
# this pipeline is used for user logout or other user update functions (roles, privileges etc)
authPipeline:
apiEndpoints:
- auth
policies:
- log:
action:
message: '${req.method} ${req.originalUrl}'
- jwt:
action:
secretOrPublicKeyFile: ./.key/pubkey.pem
checkCredentialExistence: false
- proxy:
action:
serviceEndpoint: auth
changeOrigin: true
Using requests.rest in visual studio code:
POST http://localhost:8080/auth/register-user
Content-Type: application/json
{
"username": "gurs#hotmail.com",
"password": "ravig",
"provider": "local",
"firstName": "Ravi",
"lastName": "Guduru",
"middleName": "Udaya",
"phones": [{"6827014411", "mobile"}]
}
The problem causing the "Not Found" response is in the definition of your authRegisterPipeline pipeline. The line:
apiEndPoints: # in this case we dont need to validate the jwt
It's apiEndpoints, not apiEndPoints! Change it to:
apiEndpoints: # in this case we dont need to validate the jwt
and the "Not Found" response should go away. (In my case, it was replaced with a "Bad Gateway" response since I don't have a service running on 3003.)
I have not observed the startup errors you describe runnning NPM version 1.16.10.

Protractor fails with multiCapabilities but passes when only one test runs

I am having an issue running a test with 'multiCapabilities'. My multiCapabilities config is:
multiCapabilities: [{
browserName: 'chrome',
'name': 'LMB Decision Engine - UI Automation',
'tunnel-identifier': 'nonprod',
'parent-tunnel': 'LMSauceLabs'
}, {
browserName: 'chrome',
'name': 'LMB Decision Engine - UI Automation',
'tunnel-identifier': 'nonprod',
'parent-tunnel': 'LMSauceLabs'
}],
And the response that I get is:
[chrome #2] Failed: stale element reference: element is not attached to the page document
[chrome #2] (Session info: chrome=47.0.2526.73)
[chrome #2] (Driver info: chromedriver=2.20.353141 (da3cb4b52d3a04ce079546eac4dc96182f58602b),platform=Linux 3.13.0-32-generic x86)
However, when I run with this capabilities config it passes:
capabilities : {
'browserName': 'firefox',
'name': 'LMB Decision Engine - UI Automation',
'tunnel-identifier': 'nonprod',
'parent-tunnel': 'LMSauceLabs'
},
Has anyone seen this issue when running in parallel? I've tried all different combinations of browser, and disabling all of the plugins individually to see if they are incompatible with multiCapabilities, but the issue seems to be solely running in parallel version individually.
Thanks,
Tyler
If you are trying to run parallel tests in chrome you could use shardTestFiles:true in the multi capabilities config, like this:
multiCapabilities: [
{
browserName: 'chrome',
shardTestFiles: true,
// change this to the number of instances you want to run
maxInstances:2
}];

Angular Protractor with BrowserStack behind a proxy

I want to build a Testsuite for an Angular App. The testsuite should use the framework "Protractor".
When I start the testsuite local with protractor local.config.js, then the test are running successful.
When I start the testsuite with BrowserStack without proxy, also everything are okay.
Now my question:
What settings do I have to do if I want to perform the test by local browser stack behind a proxy?
Main BrowserStack configuration:
var
proxy = 'http://proxy.example.com:8888';
exports.config = {
capabilities: {
project: 'BrowserStack (beyond Proxy)',
proxy: {
proxyType: 'manual',
httpProxy: proxy,
sslProxy: proxy,
},
loggingPrefs: {
driver: "FINE",
server: "OFF",
browser: "FINE"
},
'browserstack.user': 'USER_KEY',
'browserstack.key': 'ACCESS_KEY', // show on BrowserStack
// Needed for testing localhost
'browserstack.local' : 'true',
// Settings for the browser you want to test
// (check docs for difference between `browser` and `browserName`
'browserName' : 'chrome',
'version' : '43.0',
'os' : 'OS X',
'os_version' : 'Yosemite',
'resolution' : '1024x768'
},
seleniumAddress: 'http://hub.browserstack.com/wd/hub',
specs: [
'test/e2e/**/*.spec.js'
]
};
I call the script "BrowserStackLocal" with this parameters:
./BrowserStackLocal -v -proxyHost PROXY_DOMAIN -proxyPort PROXY_PORT $ACCESS_KEY localhost,$PORT,0
Stepts:
start the application on my local computer node app.js
start the script "BrowserStackLocal"
start the protractor with the browserstack configuration from above.
When you are behind a proxy server, you need to do two things:
If you are testing your local server, you need to setup the Local Testing connection by passing the proxy details, which I assume you are doing.
You have to make sure the Selenium requests made via Protractor also reach BrowserStack. The easiest option would be to use global-tunnel npm package. If your proxy is behind an Authentication, you can try using the tunnel npm module.
You no longer need to use global-tunnel. There is now a new configuration option webDriverProxy:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
webDriverProxy: 'http://127.0.0.1:8888',
capabilities: {
browserName: 'chrome'
},
specs: ['*.spec.js'],
};

Seriate SqlContext Error. Failed on step 'connecting'

I'm new to Nodejs and I have to implement some changes in an small project. It runs over Sql Server using seriate module. I throws this error...
Seriate SqlContext Error. Failed on step 'connecting'.Failed to connect to 127.0.0.1:undefined in 15000ms
when executing a getPlainContext() with the following config object:
{
"user": "node",
"password": "node",
"server": "127.0.0.1\\SQLEXPRESS",
"database": "lms-db-dev"
}
I already tryied using (local)\\SQLEXPRESS which I'm using on my Web.config file connection string:
Server=(local)\SQLEXPRESS;Database=lms-db-dev;user id=node; password=node
I'm wondering why it tryies to connect to 127.0.0.1:undefined and how can I fix this.
The problem is that the driver doesn't works with instance name, but Ip/port only. So I removed the instance name and added the port property on the config object with my local server's port, following this answer. My config object becames this:
"db": {
"user": "node",
"password": "node",
"server": "127.0.0.1",
"database": "lms-db-dev",
"port": "52519"
}
I had to turn on the SQL Server Browser service to get Seriate to work with the instance name.

Resources