Borrar filtros
Borrar filtros

Overriding jar files on static classpath

2 visualizaciones (últimos 30 días)
Dean
Dean el 29 de Oct. de 2013
Comentada: Ameya Deoras el 25 de Mzo. de 2014
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 comentario
Ameya Deoras
Ameya Deoras el 25 de Mzo. de 2014
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Java Package Integration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by