フィルターのクリア

Overriding jar files on static classpath

2 ビュー (過去 30 日間)
Dean
Dean 2013 年 10 月 29 日
コメント済み: Ameya Deoras 2014 年 3 月 25 日
I'm trying to get the AWS SDK jar file to work in matlab. I started by trying to simply import it and use it. When I do, it sort of works, but on every write I get this error:
Java exception occurred:
java.lang.IllegalStateException: Content has been consumed
at org.apache.http.entity.BasicHttpEntity.getContent(BasicHttpEntity.java:84)
at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:89)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:452)
at com.amazonaws.http.AmazonHttpClient.execute0(AmazonHttpClient.java:266)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:236)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3104)
at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1233)
at edu.xxxxx.aws.S3_Uploader.upload(S3_Uploader.java:31)
So I wrote a simple java class outside matlab to try to use my own version of the httpcore jar file. It works fine in eclipse, but if i import and run in matlab i get the same error. There is a httpcore jar file on the static classpath that seems to be getting used instead of the one I'm adding to the dynamic classpath, but it apparently is incompatible. Is there any way to get around this?
  1 件のコメント
Ameya Deoras
Ameya Deoras 2014 年 3 月 25 日
I commented out that JAR file ($matlabroot/java/jarext/axis2/httpcore.jar) in @matlabroot/toolbox/local/classpath.txt and confirmed that it fixes the issues. I'm sure this is not recommended as it will cause other bad things to happen, so try this at your own risk.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeJava Package Integration についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by