Hibernate Search conflicts with Spring's class path scanning

Description

Hibernate Search conflicts with Spring's class path scanning. When Hibernate Search is on the classpath Spring throws an exception while reading annotation metadata.

3.1.0 Beta1 and 3.0.x versions had no problems.

Stacktrace:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 50432
at org.springframework.asm.ClassReader.readUTF8(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.getAnnotationMetadata(SimpleMetadataReader.java:55)
at org.springframework.core.type.filter.AnnotationTypeFilter.matchSelf(AnnotationTypeFilter.java:68)
at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter.match(AbstractTypeHierarchyTraversingFilter.java:55)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:224)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:182)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:85)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1255)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1245)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)

Attachments

1

Activity

Show:

Emmanuel Bernard April 12, 2010 at 12:05 PM

Unfortunately unable to reproduce at this stage.
If someone can preproduce, let's reopen a new report.

Amin Mohammed-Coleman April 8, 2010 at 10:34 AM

Yep. I can't still reproduce. The attachment contains spring 3.0 with component scanning and no exceptions. I'm not sure what the original reporter was doing to get this. It could be a spring configuration issue. But from my side I couldn't reproduce it even with Spring 2.5.6 and using @Configurable with @Indexed.

Emmanuel Bernard April 8, 2010 at 10:16 AM

So the attachment is not enough to reproduce?

Amin Mohammed-Coleman April 7, 2010 at 8:31 PM

Sorry, just attached a maven project which shows hibernate search and spring component scanning, just to show it works.

Amin Mohammed-Coleman April 7, 2010 at 8:29 PM

Hi

I've just did a test with Spring 3.0 and Hibernate Search 3.1.0.GA no exceptions. I'm using component-scanning using Spring and no issues. I can post a small maven project to verify.

Cheers
Amin

Cannot Reproduce

Details

Assignee

Reporter

Affects versions

Priority

Created December 5, 2008 at 5:51 PM
Updated July 1, 2010 at 12:41 PM
Resolved April 12, 2010 at 12:05 PM