java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity

Apache's JIRA Issue Tracker | Krzysztof Sobkowiak | 2 years ago
  1. 0

    I have built the {{cxf-ws-security-signature}} example contained in the assembly and installed it in ServiceMix. Next I have run {{mvn exec:java}} in the sample directory and got following error {code} java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at org.apache.servicemix.examples.cxf.Client.sendRequest(Client.java:47) at org.apache.servicemix.examples.cxf.Client.main(Client.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:745) {code} Looking into the log I have found following error {code} Caused by: org.apache.wss4j.common.ext.WSSecurityException: Cannot create Crypto class org.apache.ws.security.components.crypto.Merlin Original Exception was org.apache.wss4j.common.ext.WSSecurityException: Failed to load credentials. Original Exception was java.io.IOException: Invalid keystore format at org.apache.wss4j.common.crypto.CryptoFactory.getInstance(CryptoFactory.java:132)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.loadCrypto(WSHandler.java:1045)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.loadSignatureCrypto(WSHandler.java:963)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.decodeSignatureParameter2(WSHandler.java:1398)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.doReceiverAction(WSHandler.java:347)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:266)[195:org.apache.cxf.cxf-rt-ws-security:3.0.4] ... 39 more Caused by: org.apache.wss4j.common.ext.WSSecurityException: Failed to load credentials. Original Exception was java.io.IOException: Invalid keystore format at org.apache.wss4j.common.crypto.Merlin.load(Merlin.java:407)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.Merlin.loadProperties(Merlin.java:224)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.Merlin.<init>(Merlin.java:160)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.CryptoFactory.getInstance(CryptoFactory.java:127)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] ... 44 more Caused by: java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)[:1.7.0_76] at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)[:1.7.0_76] at java.security.KeyStore.load(KeyStore.java:1214)[:1.7.0_76] at org.apache.wss4j.common.crypto.Merlin.load(Merlin.java:401)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] ... 47 more {code} Checking the original {{server-truststore.jks}} gives following result {code} $ file server-truststore.jks server-truststore.jks: Java KeyStore $ file -bi server-truststore.jks application/x-java-keystore; charset=binary {code} but the same check with the file contained in the assemblied examples gives following result {code} $ file server-truststore.jks server-truststore.jks: data $ file -bi server-truststore.jks application/octet-stream; charset=binary {code} Something must be changed by the assembly plugin

    Apache's JIRA Issue Tracker | 2 years ago | Krzysztof Sobkowiak
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity
  2. 0

    I have built the {{cxf-ws-security-signature}} example contained in the assembly and installed it in ServiceMix. Next I have run {{mvn exec:java}} in the sample directory and got following error {code} java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at org.apache.servicemix.examples.cxf.Client.sendRequest(Client.java:47) at org.apache.servicemix.examples.cxf.Client.main(Client.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:745) {code} Looking into the log I have found following error {code} Caused by: org.apache.wss4j.common.ext.WSSecurityException: Cannot create Crypto class org.apache.ws.security.components.crypto.Merlin Original Exception was org.apache.wss4j.common.ext.WSSecurityException: Failed to load credentials. Original Exception was java.io.IOException: Invalid keystore format at org.apache.wss4j.common.crypto.CryptoFactory.getInstance(CryptoFactory.java:132)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.loadCrypto(WSHandler.java:1045)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.loadSignatureCrypto(WSHandler.java:963)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.decodeSignatureParameter2(WSHandler.java:1398)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.wss4j.dom.handler.WSHandler.doReceiverAction(WSHandler.java:347)[189:org.apache.wss4j.wss4j-ws-security-dom:2.0.3] at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:266)[195:org.apache.cxf.cxf-rt-ws-security:3.0.4] ... 39 more Caused by: org.apache.wss4j.common.ext.WSSecurityException: Failed to load credentials. Original Exception was java.io.IOException: Invalid keystore format at org.apache.wss4j.common.crypto.Merlin.load(Merlin.java:407)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.Merlin.loadProperties(Merlin.java:224)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.Merlin.<init>(Merlin.java:160)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] at org.apache.wss4j.common.crypto.CryptoFactory.getInstance(CryptoFactory.java:127)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] ... 44 more Caused by: java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)[:1.7.0_76] at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)[:1.7.0_76] at java.security.KeyStore.load(KeyStore.java:1214)[:1.7.0_76] at org.apache.wss4j.common.crypto.Merlin.load(Merlin.java:401)[188:org.apache.wss4j.wss4j-ws-security-common:2.0.3] ... 47 more {code} Checking the original {{server-truststore.jks}} gives following result {code} $ file server-truststore.jks server-truststore.jks: Java KeyStore $ file -bi server-truststore.jks application/x-java-keystore; charset=binary {code} but the same check with the file contained in the assemblied examples gives following result {code} $ file server-truststore.jks server-truststore.jks: data $ file -bi server-truststore.jks application/octet-stream; charset=binary {code} Something must be changed by the assembly plugin

    Apache's JIRA Issue Tracker | 2 years ago | Krzysztof Sobkowiak
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity
  3. 0

    Deploying /usr/local/apache-tomcat-7.0.54/webapps/jenkins/jobs/buildproject/workspace/AntExample1/dist/AntExample.war to container Tomcat 7.x Remote ERROR: Build step failed with exception org.codehaus.cargo.container.ContainerException: Failed to redeploy [/usr/local/apache-tomcat-7.0.54/webapps/jenkins/jobs/buildproject/workspace/AntExample1/dist/AntExample.war] at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:189) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username you provided is not allowed to use the text-based Tomcat Manager (error 403) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:555) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174) ... 16 more Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:2020/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:544) ... 19 more org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username you provided is not allowed to use the text-based Tomcat Manager (error 403) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:555) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699) at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174) at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116) at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103) at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:2020/manager/text/list at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:544) ... 19 more Build step 'Deploy war/ear to a container' marked build as failure Finished: FAILURE

    Jenkins JIRA | 2 years ago | bujji dd
    org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The username you provided is not allowed to use the text-based Tomcat Manager (error 403)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    UI Failed to load from CDN

    GitHub | 2 years ago | cloudnautique
    java.io.IOException: Server returned HTTP response code: 422 for URL: http://cdn.rancher.io/ui/0.6.5/static/index.html
  6. 0

    Why does Java properly fetch one webpage's content, but not another?

    Stack Overflow | 3 years ago | Supuhstar
    java.io.IOException: Server returned HTTP response code: 403 for URL: http://prog.bhstudios.org/prog/bhmi/database/get/

  1. tyson925 571 times, last 3 weeks ago
  2. jedcua 2 times, last 4 months ago
  3. thiago.santos 2 times, last 4 months ago
  4. kkandda 4 times, last 6 months ago
  5. hari haran 1 times, last 7 months ago
2 more registered users
40 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    Server returned HTTP response code: 500 for URL: http://localhost:8181/cxf/HelloWorldSecurity

    at sun.net.www.protocol.http.HttpURLConnection.getInputStream()
  2. Java RT
    HttpURLConnection.getInputStream
    1. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
    1 frame
  3. org.apache.servicemix
    Client.main
    1. org.apache.servicemix.examples.cxf.Client.sendRequest(Client.java:47)
    2. org.apache.servicemix.examples.cxf.Client.main(Client.java:31)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  5. org.codehaus.mojo
    ExecJavaMojo$1.run
    1. org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    1 frame
  6. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame