SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-663
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Kenny MacLeod
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

NPE in JavassistClassMetaData when using <compass:scan/>

Created: 25/Jun/08 08:32 AM   Updated: 05/Jul/08 05:29 AM
Component/s: Compass::Core
Affects Version/s: 2.0.1
Fix Version/s: 2.0.2, 2.1.0 M1


 Description  « Hide
I've been using <compass:scan/> in my spring config to scan a whole package for Compass-annotated classes. When Compass encounters a class which does not have annotations, I get a NPE from JavassistClassMetaData. If I narrow the scan to match only that class, then I still get the exception.

If, however, I use <compass:class/> to specify the class, I get a more useful "no annotations found"-type exception.

Stack trace as follows

Caused by: java.lang.NullPointerException
at org.compass.core.config.binding.metadata.JavassistClassMetaData.hasAnnotation(JavassistClassMetaData.java:96)
at org.compass.annotations.config.binding.AnnotationsMappingBinding.isApplicable(AnnotationsMappingBinding.java:97)
at org.compass.core.config.binding.AbstractClassMetaDataMappingBinding.doAddInputStream(AbstractClassMetaDataMappingBinding.java:35)

at org.compass.core.config.binding.AbstractInputStreamMappingBinding.internalAddInputStream(AbstractInputStreamMappingBinding.java:1
92)
at org.compass.core.config.binding.AbstractInputStreamMappingBinding.addInputStream(AbstractInputStreamMappingBinding.java:174)
at org.compass.core.config.CompassMappingBinding.addInputStream(CompassMappingBinding.java:185)
at org.compass.core.config.CompassConfiguration.addScan(CompassConfiguration.java:507)
at org.compass.core.config.builder.SchemaConfigurationBuilder.bindMappings(SchemaConfigurationBuilder.java:714)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.compass.core.config.builder.SchemaConfigurationBuilder.processCompass(SchemaConfigurationBuilder.java:85)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 26/Jun/08 02:22 PM
I fixed it in case visible and invisible are null. Can you try with a nightly build (later today)