What version of httpclient is compatible with the Amazon SDK v 1.11.5? - httpclient

I’m using the Amazon Java SDK, version 1.11.5 (I included the aws-java-sdk-1.11.5.jar in my WEB-INF/lib directory). What version of the Apache httpclient library do I need to include that is compatible with this version of the AWS SDK? I tried httpclient-4.3.4.jar, but I get the below error
15:34:25,366 ERROR [io.undertow.request] (default task-34) UT005023: Exception handling request to /pluginwiris_engine/app/service: java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.<init>(SdkTLSSocketFactory.java:56)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:87)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:46)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:37)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:213)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:145)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:393)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:373)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:355)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:327)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:309)
Thanks for additional help, - Dave

Looking at the source for the Java AWS SDK, under tag 1.11.5, you can see the in the POM file they have specified the following:
<httpcomponents.httpclient.version>4.5.2</httpcomponents.httpclient.version>
So I'd say HTTP Client version 4.5.2 is compatible with the AWS SDK version 1.11.5. If you are using a dependency management tool like Maven you could always just let it pull in the version of HTTP Client specified the the AWS SDK.

Look at the compile dependencies at maven repo for aws-java-sdk-core
You can see it's dependent on org.apache.httpcomponents » httpclient -- 4.5.2. Further check if you've all the dependencies of httpclient-4.5.2. You might be missing correct version of httpcore

Related

axis2 jar version 1.8.0 with axiom version 1.3.0 throws SOAP11HeaderImpl

We were using axis2 1.7.9 and axiom 1.2.22 in our application along with commons-httpclient 3.1. We tried removing commons-httpclient 3.1 from our application and since commons-httpclient is required by axis2 1.7.9 we had to upgrade axis2 to its latest version 1.8.0 and in process of upgrading axis2 to 1.8.0 we also upgraded axiom to 1.3.0 but when we are running our application we get below error.
org.apache.axiom.soap.SOAPProcessingException: org.apache.axiom.om.impl.llom.OMElementImpl is not allowed as a child of org.apache.axiom.soap.impl.llom.soap11.SOAP11HeaderImpl
at org.apache.axiom.soap.impl.mixin.AxiomSOAPElementSupport.ajc$interMethod$org_apache_axiom_soap_impl_mixin_AxiomSOAPElementSupport$org_apache_axiom_soap_impl_intf_AxiomSOAPElement$checkChild(AxiomSOAPElementSupport.aj:35)
at org.apache.axiom.soap.impl.llom.SOAPElement.checkChild(SOAPElement.java:1)
at org.apache.axiom.om.impl.mixin.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_mixin_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$prepareNewChild(AxiomContainerSupport.aj:160)
at org.apache.axiom.om.impl.llom.OMElementImpl.prepareNewChild(OMElementImpl.java:1)
at org.apache.axiom.om.impl.mixin.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_mixin_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$prepareNewChild(AxiomContainerSupport.aj)
at org.apache.axiom.om.impl.mixin.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_mixin_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$addChild(AxiomContainerSupport.aj:166)
at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:1)
at org.apache.axis2.client.ServiceClient.addHeadersToEnvelope(ServiceClient.java:673)
we checked and found that SOAP11HeaderImpl is child of OMElementImpl.
I am not sure why above exception is thrown.
This should be fixed by https://github.com/apache/ws-axiom/commit/2d9b87f40d3851fbf0f78fe4949190f15a7977ec. There may be a simple workaround (namely to create a SOAPHeaderBlock instead of an OMElement), but unfortunately the stack trace you provided is too short to tell that.

Upgrading to aem62 issue

Attempting to migrate from aem6.0SP3 to 6.2 throws an error while compiling our project:
missing requirement [ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))
Unresolved requirements: [[ewcs.my-bundle [474](R 474.3)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.commons)(version>=5.7.0)(!(version>=6.0.0)))]
We do not see the library referenced in our pom.xml even when we do dependency:tree, any suggestion?
Update: missing twitter4j v.3.0.5 but mvn repo does not have it
Make sure you are using the latest ACE Commons package for 6.2. You can download the relevant version from:
https://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/uber-jar/
Note that there is a new version of Uber-Jar for 6.2 SP1 so make sure you are using the correct version.
Twitterfj is not a part of Adobe public repo but if you really want it, you can download it from here:
https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.twitter4j/releases/tag/com.adobe.acs.bundles.twitter4j-1.0.0
More information is available at:
http://adobe-consulting-services.github.io/acs-aem-commons/features/twitter.html

WSO2IS 5.1.0 - IWA not working in Internet Explorer - com.sun.jna.platform.win32.Win32Exception: The token supplied to the function is invalid

We are using WSO2 identity server for user authentication in our product suite. Recently we have upgraded its version from 5.0.0 to 5.1.0.
After upgrading to WSO2 identity server 5.1.0 version we are getting following exception when we enable IWA (Integrated Windows Authentication)
TID: [-1234] [] [2016-07-21 18:46:52,606] DEBUG {waffle.servlet.spi.NegotiateSecurityFilterProvider} - security package: Negotiate, connection id: fe80:0:0:0:f1da:6adb:d83e:18d6%6:64966
TID: [-1234] [] [2016-07-21 18:46:52,622] DEBUG {waffle.servlet.spi.NegotiateSecurityFilterProvider} - token buffer: 1629 byte(s)
TID: [-1234] [] [2016-07-21 18:46:52,675] ERROR {org.apache.catalina.core.StandardWrapperValve} - Servlet.service() for servlet [bridgeservlet] in context with path [/] threw exception
com.sun.jna.platform.win32.Win32Exception: The token supplied to the function is invalid
at waffle.windows.auth.impl.WindowsAuthProviderImpl.acceptSecurityToken(WindowsAuthProviderImpl.java:137)
at waffle.servlet.spi.NegotiateSecurityFilterProvider.doFilter(NegotiateSecurityFilterProvider.java:102)
at waffle.servlet.spi.SecurityFilterProviderCollection.doFilter(SecurityFilterProviderCollection.java:116)
at org.wso2.carbon.identity.application.authenticator.iwa.servlet.IWAServelet.doPost(IWAServelet.java:89)
at org.wso2.carbon.identity.application.authenticator.iwa.servlet.IWAServelet.doGet(IWAServelet.java:64)
After searching for the problem on Google we came across following post.
https://github.com/dblock/waffle/issues/107
It looks like there was some issue in the earlier version of Waffle library which is resolved in 1.7.4 version.
WSO2 Identity server 5.1.0 comes with Waffle library version 1.6.0 (waffle-jna_1.6.0.wso2v4.jar).
Now my question is do we have any WSO2 Identity server patch available which includes the latest Waffle library (version 1.7.4 or above)?
Can we simply download the latest version of Waffle and put into “wso2is-5.1.0\repository\components\plugins” folder? Will it work?
We need to see if it resolves the above stated problem. We are unable to find any other solution to this issue.
Putting the new version in the plugins folder won't work. You'll need to follow these steps,
Get the waffle 1.7.4 wrapped as an OSGi bundle. You can refer this pom file which does the same for 1.6 version. Make sure the versions are properly updated in the new pom file.
Build from the pom file you created above to get the OSGi bundle
Put it into repository\components\dropins\ folder and restart the IS
[Validation Step][Optional] Start IS in OSGI console with wso2server.bat -DosgiConsole. Once the server is up run ss in the osgi console and locate the bundle id for org.wso2.carbon.identity.application.authenticator.iwa (This will be an integer below ~500). And then b <bundle_id> and make sure it binds the 1.7 versions of waffle packages.

An Import-Package could not be resolved Error in Deploying Flex UI project

I am developing simple VSphere Web Client plugin in Eclipse Juno with Vijava 5.5 and Vsphere sdk 5.5.. My project was working fine till yesterday. Today I tried to change the sdk to Vsphere sdk 6.0. From that onwards I am getting Following Error while deploying my UI project in Virgo Server.
Later, I again reverted to my Vsphere sdk 5.5 itself. But still i am getting this error. I don't know what I missed. Why it showing in my UI project? Is there anything i can change my dependencies there?
Error is,
2015-06-11 19:27:26.160] [INFO ] TCP Connection(11)-127.0.0.1 <DE0004I> Starting bundle 'test-provider' version '0.0.0'.
[2015-06-11 19:27:26.160] [INFO ] start-signalling-1 <DE0005I> Started bundle 'test-provider' version '0.0.0'.
[2015-06-11 19:27:26.957] [INFO ] TCP Connection(11)-127.0.0.1 <DE0000I> Installing bundle 'com.mycompany.testui.testui' version '1.0.0'.
[2015-06-11 19:27:27.051] [INFO ] TCP Connection(11)-127.0.0.1 <ME0003I> Dump 'C:\ProgramData\vmware\vSphere Web Client\serviceability\dump\2015-06-11-19-27-051' generated
[2015-06-11 19:27:27.066] [ERROR] TCP Connection(11)-127.0.0.1 <DE0002E> Installation of bundle 'com.mycompany.testui.testui' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.mycompany.testui.testui' at version '1.0.0': Cannot resolve: com.mycompany.testui.testui
Resolver report:
An Import-Package could not be resolved. Resolver error data <Import-Package: com.mycompany.testprovider; version="0.0.0">. Caused by missing constraint in bundle <com.mycompany.testui.testui_1.0.0>
constraint: <Import-Package: com.mycompany.testprovider; version="0.0.0">
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:359)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
When you deploy your UI, you must deploy your service com.mycompany.testprovide previously
Service provider is not linked with Plugin UI project. In order to do that,
need to do the following..
Right-click on the Plugin UI project and select vSphere SDK Tools > Package vSphere Client plugin.
In that, select your service provider project. That's it.
To make sure the service bundle is deployed before the ui bundle use the <bundlesOrder> tag in the plugin-package.xml.
vSphere Client (HTML) versions 6.5U1 and above improve on this by introducing a dedicated scope for each plugin (OSGi sandboxing feature).

How to exclude work module from the compile, when deploying to GAE?

Our standard module file is: Myproject.gwt.xml
We have added an extra modulefile for fast compilation called:
MyprojectWork.gwt.xml
When deploying to GAE, it compiles both Myproject.gwt.xml and
MyprojectWork.gwt.xml.
How to exclude MyprojectWork.gwt.xml from the compile, when deploying
to GAE ?
Config:
GWT SDK 1.7.0
Google Plugin for Eclipse 3.5
GAE SDK 1.2.2
If you use Maven than this may solve your problem: stackoverflow #1745315