Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-3311

org.infinispan.lifecycle.ModuleLifecycle service definitions missing from Lucene Directory jar

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.0.0.Final
    • 5.3.0.Final
    • None
    • None

      Error:

      Caused by: org.infinispan.CacheException: Type of data read is
      unknown. Id=-2147482348 is not amongst known reader indexes.
      at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:222)

      Full stacktrace: https://gist.github.com/galderz/770679223e02f5b211f8

            [ISPN-3311] org.infinispan.lifecycle.ModuleLifecycle service definitions missing from Lucene Directory jar

            With this fix, Sanne's original problem is solved.

            Galder Zamarreño added a comment - With this fix, Sanne's original problem is solved.

            Sorted, using <Include-Resource> configuration in maven-bundle-plugin.

            Galder Zamarreño added a comment - Sorted, using <Include-Resource> configuration in maven-bundle-plugin.

            I'll try a newer version and see if that works, otherwise I'll report it and see if I can fix it.

            Galder Zamarreño added a comment - I'll try a newer version and see if that works, otherwise I'll report it and see if I can fix it.

            It's a bug in the Maven Bundle plugin. If you change lucene-directory to produce a jar instead of a bundle, it's there:

            [g@:~/Go/code/infinispan.git]% (t_3311_m⚡) jar tf lucene/lucene-directory/target/infinispan-lucene-directory.jar | grep services
            META-INF/services/
            META-INF/services/org.infinispan.lifecycle.ModuleLifecycle

            Galder Zamarreño added a comment - It's a bug in the Maven Bundle plugin. If you change lucene-directory to produce a jar instead of a bundle, it's there: [g@:~/Go/code/infinispan.git]% (t_3311_m⚡) jar tf lucene/lucene-directory/target/infinispan-lucene-directory.jar | grep services META-INF/services/ META-INF/services/org.infinispan.lifecycle.ModuleLifecycle

            This is either a Maven bug or is configurable behind some weird, obscure flag:

            [g@:~/Go/test/infinispan.git]% jar tf lucene/lucene-directory/target/infinispan-lucene-directory.jar | grep META-INF
            META-INF/MANIFEST.MF
            META-INF/
            META-INF/DEPENDENCIES.txt
            META-INF/LICENSE.txt
            META-INF/maven/
            META-INF/maven/org.infinispan/
            META-INF/maven/org.infinispan/infinispan-lucene-directory/
            META-INF/maven/org.infinispan/infinispan-lucene-directory/pom.properties
            META-INF/maven/org.infinispan/infinispan-lucene-directory/pom.xml
            [g@:~/Go/test/infinispan.git]% l lucene/lucene-directory/target/classes/META-INF                                
            total 80
            drwxr-xr-x  7 g  staff   238B Jul 23 13:30 .
            drwxr-xr-x  4 g  staff   136B Jul 23 13:39 ..
            -rw-r--r--  1 g  staff   2.5K Jul 23 13:39 DEPENDENCIES.txt
            -rw-r--r--  1 g  staff    26K Jul 23 13:39 LICENSE.txt
            -rw-r--r--  1 g  staff   4.9K Jul 23 13:39 MANIFEST.MF
            drwxr-xr-x  3 g  staff   102B Jul 23 13:30 maven
            drwxr-xr-x  3 g  staff   102B Jul 23 13:29 services
            [g@:~/Go/test/infinispan.git]% 

            It includes everything except the 'services' subfolder. Can't think of a workaround right now, so gonna debug the Maven code.

            Galder Zamarreño added a comment - This is either a Maven bug or is configurable behind some weird, obscure flag: [g@:~/Go/test/infinispan.git]% jar tf lucene/lucene-directory/target/infinispan-lucene-directory.jar | grep META-INF META-INF/MANIFEST.MF META-INF/ META-INF/DEPENDENCIES.txt META-INF/LICENSE.txt META-INF/maven/ META-INF/maven/org.infinispan/ META-INF/maven/org.infinispan/infinispan-lucene-directory/ META-INF/maven/org.infinispan/infinispan-lucene-directory/pom.properties META-INF/maven/org.infinispan/infinispan-lucene-directory/pom.xml [g@:~/Go/test/infinispan.git]% l lucene/lucene-directory/target/classes/META-INF total 80 drwxr-xr-x 7 g staff 238B Jul 23 13:30 . drwxr-xr-x 4 g staff 136B Jul 23 13:39 .. -rw-r--r-- 1 g staff 2.5K Jul 23 13:39 DEPENDENCIES.txt -rw-r--r-- 1 g staff 26K Jul 23 13:39 LICENSE.txt -rw-r--r-- 1 g staff 4.9K Jul 23 13:39 MANIFEST.MF drwxr-xr-x 3 g staff 102B Jul 23 13:30 maven drwxr-xr-x 3 g staff 102B Jul 23 13:29 services [g@:~/Go/test/infinispan.git]% It includes everything except the 'services' subfolder. Can't think of a workaround right now, so gonna debug the Maven code.

            Once that is sorted, as mentioned earlier, other things might fail in that particular test... if so, send it back to me and I'll have a look

            Galder Zamarreño added a comment - Once that is sorted, as mentioned earlier, other things might fail in that particular test... if so, send it back to me and I'll have a look

            great, thanks!
            I guess we didn't spot that as the fact the the test runs in a different directory (as the sources were moved) made sure the cacheloader started clean.

            Sanne Grinovero (Inactive) added a comment - - edited great, thanks! I guess we didn't spot that as the fact the the test runs in a different directory (as the sources were moved) made sure the cacheloader started clean.

            Indeed:

            [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]% jar tf 5.2.5.Final/infinispan-lucene-directory-5.2.5.Final.jar| grep services
            META-INF/services/
            META-INF/services/org.infinispan.lifecycle.ModuleLifecycle
            [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]% jar tf 5.3.0.Final/infinispan-lucene-directory-5.3.0.Final.jar| grep services
            [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]% 

            Galder Zamarreño added a comment - Indeed: [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]% jar tf 5.2.5.Final/infinispan-lucene-directory-5.2.5.Final.jar| grep services META-INF/services/ META-INF/services/org.infinispan.lifecycle.ModuleLifecycle [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]% jar tf 5.3.0.Final/infinispan-lucene-directory-5.3.0.Final.jar| grep services [g@:~/.m2/repository/org/infinispan/infinispan-lucene-directory]%

            @Sanne, what if when the merge was done, the META-INF/services files were not included?

            Galder Zamarreño added a comment - @Sanne, what if when the merge was done, the META-INF/services files were not included?

            Yeah, the class is still there in 5.3.x version. Very odd why it's not loaded though. We need to find out what's wrong with it to be able to understand what's causing it. I'll keep you posted.

            Galder Zamarreño added a comment - Yeah, the class is still there in 5.3.x version. Very odd why it's not loaded though. We need to find out what's wrong with it to be able to understand what's causing it. I'll keep you posted.

              rh-ee-galder Galder Zamarreño
              rh-ee-galder Galder Zamarreño
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: