[infinispan-dev] Quick start maven archetype (ISPN-817)

Galder Zamarreño galder at redhat.com
Tue Dec 7 09:41:08 EST 2010


On Dec 6, 2010, at 8:06 PM, Manik Surtani wrote:

> Early days yet, but if you feel like playing around with it, do:
> 
> $ mvn archetype:create \
>   -DarchetypeGroupId=org.infinispan \
>   -DarchetypeArtifactId=sample-project \
>   -DarchetypeVersion=5.0.0-SNAPSHOT \
>   -DgroupId=<YOUR_GROUP_ID> \
>   -DartifactId=<YOUR_ARTIFACT_ID>
> 
> This will create a skeleton project all set up to work with Infinispan 5.0.0-SNAPSHOT.  Replace 5.0.0-SNAPSHOT to 4.2.0-SNAPSHOT for a 4.2.0-ready project.  The skeleton project will include some sample configs as well.  Pls have a look and provide feedback!  

Just run the archetype and tried to run Application from IDEA and got this:

4.  Demonstrating use of listeners.
Dec 7, 2010 3:38:30 PM org.infinispan.factories.AbstractComponentRegistry internalStart
INFO: Infinispan version: Infinispan 'Pagoa' 5.0.0-SNAPSHOT
Exception in thread "main" org.infinispan.notifications.IncorrectListenerException: Cache listener class MUST be public!
	at org.infinispan.notifications.AbstractListenerImpl.testListenerClassValidity(AbstractListenerImpl.java:144)
	at org.infinispan.notifications.AbstractListenerImpl.validateAndAddListenerInvocation(AbstractListenerImpl.java:106)
	at org.infinispan.notifications.AbstractListenerImpl.addListener(AbstractListenerImpl.java:87)
	at org.infinispan.CacheDelegate.addListener(CacheDelegate.java:280)
	at com.acme.Application.registeringListeners(Application.java:81)
	at com.acme.Application.main(Application.java:99)

It appears that MyListener us is not declared as public. Where's the code for this to change it?

Also, it'd be good if the exception indicated the actual class name that's not been public.

> 
> The sample application is a command-line one.  To watch it in action, in your newly created project, do this:
> 
> 	$ mvn install -Prun
> 
> Cheers
> Manik
> --
> Manik Surtani
> manik at jboss.org
> Lead, Infinispan
> Lead, JBoss Cache
> http://www.infinispan.org
> http://www.jbosscache.org
> 
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list