[infinispan-issues] [JBoss JIRA] (ISPN-4751) Hibernate search, infinispan and Amazon S3 - IllegalArgumentException: bucketId: A96137216.bz2 (expected: integer)

Lance Ess (JIRA) issues at jboss.org
Tue Sep 23 16:59:02 EDT 2014


    [ https://issues.jboss.org/browse/ISPN-4751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005504#comment-13005504 ] 

Lance Ess edited comment on ISPN-4751 at 9/23/14 4:58 PM:
----------------------------------------------------------

I realise that {{jclouds}} is not abandonware. I was referring to {{infinispan-cachestore-cloud}}. There's just so many abstractions with hibernate, hibernate search, infinispan, jclouds and amazon s3 that I thought I could remove one level of abstraction.

I tried increasing my {{jclouds}} dependency version but it seems that the dependency groupId was renamed from {{org.jclouds.provider}} to {{org.apache.jclouds.provider}} after version 1.6.0. I can only assume that the package structure changed along with it so using {{<exclude />}} in maven for the old groupId won't solve much.

I've had a look at {{CloudCacheStore}} and it's not trivial so I guess it's best I have a go at bringing {{infinispan-cachestore-cloud}} up to date.

Before I try this, I'd like to know that the {{IllegalArgumentException}} for the bucketId is fixed in {{jclouds}}. Any chance you'd know where to look?




was (Author: lance.java):
I tried increasing my {{jclouds}} dependency version but it seems that the dependency groupId was renamed from {{org.jclouds.provider}} to {{org.apache.jclouds.provider}} after version 1.6.0. I can only assume that the package structure changed along with it so using {{<exclude />}} in maven for the old groupId won't solve much.

I've had a look at {{CloudCacheStore}} and it's not trivial so I guess it's best I have a go at bringing {{infinispan-cachestore-cloud}} up to date.

Before I try this, I'd like to know that the {{IllegalArgumentException}} for the bucketId is fixed in {{jclouds}}. Any chance you'd know where to look?



> Hibernate search, infinispan and Amazon S3 - IllegalArgumentException: bucketId: A96137216.bz2 (expected: integer)
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: ISPN-4751
>                 URL: https://issues.jboss.org/browse/ISPN-4751
>             Project: Infinispan
>          Issue Type: Bug
>            Reporter: Lance Ess
>            Assignee: Mircea Markus
>
> I'm trying to use hibernate-search to host a Lucene index on Amazon S3 but I'm getting the following exception:
> {code}
> Exception in thread "LuceneIndexesData-CloudCacheStore-0" java.lang.IllegalArgumentException: bucketId: A96137216.bz2 (expected: integer)
>     at org.infinispan.loaders.bucket.Bucket.setBucketId(Bucket.java:84)
>     at org.infinispan.loaders.cloud.CloudCacheStore.readFromBlob(CloudCacheStore.java:450)
>     at org.infinispan.loaders.cloud.CloudCacheStore.scanBlobForExpiredEntries(CloudCacheStore.java:292)
>     at org.infinispan.loaders.cloud.CloudCacheStore.purge(CloudCacheStore.java:284)
>     at org.infinispan.loaders.cloud.CloudCacheStore.purgeInternal(CloudCacheStore.java:336)
>     at org.infinispan.loaders.AbstractCacheStore$2.run(AbstractCacheStore.java:111)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>     at java.lang.Thread.run(Unknown Source)
> {code}
> The documentation for persisting Lucene indexes on Amazon-S3 is a little sparse but I think I'm on the right track. I'm trying to start infinispan embedded within my application so I've specified a path to the infinispan XML as follows in my hibernate.cfg.xml
> {code:xml}
> <property name="hibernate.search.default.directory_provider">infinispan</property>
> <property name="hibernate.search.infinispan.configuration_resourcename">infinispan-amazons3.xml</property>
> <property name="hibernate.search.infinispan.chunk_size">300000000</property>
> {code}
> And my infinispan-amazons3.xml is:
> {code:xml}
> <infinispan>
>     <default>
>         <loaders>
>             <cloudStore xmlns="urn:infinispan:config:cloud:5.3"
>                 cloudService="aws-s3"
>                 identity="user"
>                 password="password"
>                 bucketPrefix="bucket">
>             </cloudStore>
>         </loaders>
>     </default>
> </infinispan>
> {code}
> I'm using the following versions (maven pom.xml)
> {code}
> <dependency>
>     <groupId>org.hibernate</groupId>
>     <artifactId>hibernate-search</artifactId>
>     <version>4.4.4.Final</version>
> </dependency>
> <dependency>
>     <groupId>org.hibernate</groupId>
>     <artifactId>hibernate-search-infinispan</artifactId>
>     <version>4.4.4.Final</version>
> </dependency>
> <dependency>
>     <groupId>org.infinispan</groupId>
>     <artifactId>infinispan-cachestore-cloud</artifactId>
>     <version>5.3.0.Final</version>
> </dependency>        
> <dependency>
>     <groupId>org.jclouds.provider</groupId>
>     <artifactId>aws-s3</artifactId>
>     <version>1.4.1</version>
> </dependency>
> {code}
> I initially thought this was related to ISPN-1909 but my version is after the fix for that issue (5.1.3.CR1, 5.1.3.FINAL)
> FYI here's my maven dependency tree (grepped for infinispan)
> {code}
> $ mvn dependency:tree | grep infinispan
> [INFO] +- org.hibernate:hibernate-search-infinispan:jar:4.4.4.Final:compile
> [INFO] |  \- org.infinispan:infinispan-lucene-directory:jar:5.3.0.Final:compile
> [INFO] +- org.infinispan:infinispan-cachestore-cloud:jar:5.3.0.Final:compile
> [INFO] |  \- org.infinispan:infinispan-core:jar:5.3.0.Final:compile
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the infinispan-issues mailing list