Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd C:\Users\jrcam\proyecto-adalid\local-adalid-jee2\jax-rs-client; "MAVEN_OPTS=-Djansi.passthrough=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Dorg.slf4j.simpleLogger.log.org.netbeans.modules.maven.event=off" "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.13" cmd /c "\"C:\\Program Files\\NetBeans-12.6\\netbeans\\java\\maven\\bin\\mvn.cmd\" \"-Dexec.args=-classpath %classpath xyz2.BarrioFacadeClient\" \"-Dexec.executable=C:\\Program Files\\Java\\jdk-11.0.13\\bin\\java.exe\" -Dexec.classpathScope=test -Dexec.vmArgs= -Dexec.appArgs= \"-Dmaven.ext.class.path=C:\\Program Files\\NetBeans-12.6\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 -Djansi.passthrough=true org.codehaus.mojo:exec-maven-plugin:3.0.0:exec"
- Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
- 17-03-22 13:09:49 | INFO | L010 | Authentication mechanism: Bearer Token Authorization
- 17-03-22 13:09:50 | DEBUG | RequestAddCookies | CookieSpec selected: default
- 17-03-22 13:09:50 | DEBUG | RequestAuthCache | Auth cache not set in the context
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection request: [route: {}->http://localhost:8180][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection leased: [id: 0][route: {}->http://localhost:8180][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Opening connection {}->http://localhost:8180
- 17-03-22 13:09:50 | DEBUG | DefaultHttpClientConnectionOperator | Connecting to localhost/127.0.0.1:8180
- 17-03-22 13:09:50 | DEBUG | DefaultHttpClientConnectionOperator | Connection established 127.0.0.1:64654<->127.0.0.1:8180
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Executing request GET /auth/realms/jrcam/.well-known/uma2-configuration HTTP/1.1
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Target auth state: UNCHALLENGED
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Proxy auth state: UNCHALLENGED
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> GET /auth/realms/jrcam/.well-known/uma2-configuration HTTP/1.1
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Host: localhost:8180
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Connection: Keep-Alive
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5 (Java/11.0.13)
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Accept-Encoding: gzip,deflate
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "GET /auth/realms/jrcam/.well-known/uma2-configuration HTTP/1.1[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Host: localhost:8180[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5 (Java/11.0.13)[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Cache-Control: no-cache, must-revalidate, no-transform, no-store[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-Frame-Options: SAMEORIGIN[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Referrer-Policy: no-referrer[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Date: Thu, 17 Mar 2022 17:09:50 GMT[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Connection: keep-alive[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Content-Type: application/json[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Content-Length: 1836[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "{"issuer":"http://localhost:8180/auth/realms/jrcam","authorization_endpoint":"http://localhost:8180/auth/realms/jrcam/protocol/openid-connect/auth","token_endpoint":"http://localhost:8180/auth/realms/jrcam/protocol/openid-connect/token","introspection_endpoint":"http://localhost:8180/auth/realms/jrcam/protocol/openid-connect/token/introspect","end_session_endpoint":"http://localhost:8180/auth/realms/jrcam/protocol/openid-connect/logout","frontchannel_logout_session_supported":true,"frontchannel_logout_supported":true,"jwks_uri":"http://localhost:8180/auth/realms/jrcam/protocol/openid-connect/certs","grant_types_supported":["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:device_code","urn:openid:params:grant-type:ciba"],"response_types_supported":["code","none","id_token","token","id_token token","code id_token","code token","code id_token token"],"response_modes_supported":["query","fragment","form_post","query.jwt","fragment.jwt","form_post.jwt","jwt"],"registration_endpoint":"http://localhost:8180/auth/realms/jrcam/clients-registrations/openid-connect","token_endpoint_auth_methods_supported":["private_key_jwt","client_secret_basic","client_secret_post","tls_client_auth","client_secret_jwt"],"token_endpoint_auth_signing_alg_values_supported":["PS384","ES384","RS384","HS256","HS512","ES256","RS256","HS384","ES512","PS256","PS512","RS512"],"scopes_supported":["openid","roles","phone","web-origins","email","profile","microprofile-jwt","address","offline_access"],"resource_registration_endpoint":"http://localhost:8180/auth/realms/jrcam/authz/protection/resource_set","permission_endpoint":"http://localhost:8180/auth/realms/jrcam/authz/protection/permission","policy_endpoint":"http://localhost:8180/auth/realms/jrcam/authz/protection/uma-policy"}"
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << HTTP/1.1 200 OK
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Cache-Control: no-cache, must-revalidate, no-transform, no-store
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-XSS-Protection: 1; mode=block
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-Frame-Options: SAMEORIGIN
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Referrer-Policy: no-referrer
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Date: Thu, 17 Mar 2022 17:09:50 GMT
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Connection: keep-alive
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Strict-Transport-Security: max-age=31536000; includeSubDomains
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-Content-Type-Options: nosniff
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Content-Type: application/json
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Content-Length: 1836
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Connection can be kept alive indefinitely
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection [id: 0][route: {}->http://localhost:8180] can be kept alive indefinitely
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection released: [id: 0][route: {}->http://localhost:8180][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
- 17-03-22 13:09:50 | DEBUG | logging | Logging Provider: org.jboss.logging.Log4jLoggerProvider
- 17-03-22 13:09:50 | DEBUG | RequestAddCookies | CookieSpec selected: default
- 17-03-22 13:09:50 | DEBUG | RequestAuthCache | Auth cache not set in the context
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection request: [route: {}->http://localhost:8180][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection leased: [id: 0][route: {}->http://localhost:8180][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Executing request POST /auth/realms/jrcam/protocol/openid-connect/token HTTP/1.1
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Proxy auth state: UNCHALLENGED
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> POST /auth/realms/jrcam/protocol/openid-connect/token HTTP/1.1
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Authorization: Basic eHl6MmFwMTEyLXdlYi1hcGk6TXlrZVhnMkdicjNZZ1hqamozZmw4OVlmNDFiQ2J3WnI=
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Content-Length: 50
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Host: localhost:8180
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Connection: Keep-Alive
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5 (Java/11.0.13)
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 >> Accept-Encoding: gzip,deflate
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "POST /auth/realms/jrcam/protocol/openid-connect/token HTTP/1.1[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Authorization: Basic eHl6MmFwMTEyLXdlYi1hcGk6TXlrZVhnMkdicjNZZ1hqamozZmw4OVlmNDFiQ2J3WnI=[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Content-Length: 50[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Host: localhost:8180[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5 (Java/11.0.13)[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 >> "password=sesamo&grant_type=password&username=jorge"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "HTTP/1.1 400 Bad Request[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Cache-Control: no-store[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-XSS-Protection: 1; mode=block[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Pragma: no-cache[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-Frame-Options: SAMEORIGIN[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Referrer-Policy: no-referrer[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Date: Thu, 17 Mar 2022 17:09:50 GMT[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Connection: keep-alive[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "X-Content-Type-Options: nosniff[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Content-Type: application/json[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "Content-Length: 72[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "[\r][\n]"
- 17-03-22 13:09:50 | DEBUG | wire | http-outgoing-0 << "{"error":"invalid_client","error_description":"Bearer-only not allowed"}"
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << HTTP/1.1 400 Bad Request
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Cache-Control: no-store
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-XSS-Protection: 1; mode=block
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Pragma: no-cache
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-Frame-Options: SAMEORIGIN
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Referrer-Policy: no-referrer
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Date: Thu, 17 Mar 2022 17:09:50 GMT
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Connection: keep-alive
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Strict-Transport-Security: max-age=31536000; includeSubDomains
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << X-Content-Type-Options: nosniff
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Content-Type: application/json
- 17-03-22 13:09:50 | DEBUG | headers | http-outgoing-0 << Content-Length: 72
- 17-03-22 13:09:50 | DEBUG | MainClientExec | Connection can be kept alive indefinitely
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection [id: 0][route: {}->http://localhost:8180] can be kept alive indefinitely
- 17-03-22 13:09:50 | DEBUG | PoolingHttpClientConnectionManager | Connection released: [id: 0][route: {}->http://localhost:8180][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
- Exception in thread "main" java.lang.RuntimeException: Failed to obtain authorization data
- at org.keycloak.authorization.client.util.Throwables.retryAndWrapExceptionIfNecessary(Throwables.java:91)
- at org.keycloak.authorization.client.resource.AuthorizationResource.authorize(AuthorizationResource.java:98)
- at org.xyz.jax.rs.client.util.KeycloakUtils.getRequestingPartyToken(KeycloakUtils.java:51)
- at org.xyz.jax.rs.client.base.AbstractServiceClient.setUsernamePassword(AbstractServiceClient.java:52)
- at org.xyz.jax.rs.client.base.AbstractServiceClient.build(AbstractServiceClient.java:37)
- at org.xyz.jax.rs.client.base.AbstractFacadeServiceClient.build(AbstractFacadeServiceClient.java:23)
- at xyz2.BarrioFacadeClient.init(BarrioFacadeClient.java:35)
- at xyz2.BarrioFacadeClient.<init>(BarrioFacadeClient.java:31)
- at xyz2.BarrioFacadeClient.main(BarrioFacadeClient.java:23)
- Caused by: org.keycloak.authorization.client.util.HttpResponseException: Unexpected response from server: 400 / Bad Request / Response from server: {"error":"invalid_client","error_description":"Bearer-only not allowed"}
- at org.keycloak.authorization.client.util.HttpMethod.execute(HttpMethod.java:95)
- at org.keycloak.authorization.client.util.HttpMethodResponse$2.execute(HttpMethodResponse.java:50)
- at org.keycloak.authorization.client.util.TokenCallable.obtainAccessToken(TokenCallable.java:135)
- at org.keycloak.authorization.client.util.TokenCallable.call(TokenCallable.java:59)
- at org.keycloak.authorization.client.resource.AuthorizationResource$1.call(AuthorizationResource.java:84)
- at org.keycloak.authorization.client.resource.AuthorizationResource$1.call(AuthorizationResource.java:74)
- at org.keycloak.authorization.client.resource.AuthorizationResource.authorize(AuthorizationResource.java:96)
- ... 7 more
- [ERROR] Command execution failed.
- org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
- at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
- at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
- at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:982)
- at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:929)
- at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:457)
- at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
- at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
- at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
- at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
- at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
- at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
- at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
- at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
- at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
- at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
- at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
- at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
- at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
- at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
- at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
- at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
- at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke (Method.java:566)
- at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
- at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
- at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
- at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
- [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project jax-rs-client: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
- [ERROR]
- [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
- [ERROR] Re-run Maven using the -X switch to enable full debug logging.
- [ERROR]
- [ERROR] For more information about the errors and possible solutions, please read the following articles:
- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Advertisement
Add Comment
Please, Sign In to add comment