Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error trying Active Objects

delterreno November 24, 2015

I'm trying to use Active Objects with the tutorial:

https://developer.atlassian.com/docs/atlassian-platform-common-components/active-objects/getting-started-with-active-objects

But I'm getting the following error accesing to the servlet:

org.springframework.aop.AopInvocationException: AOP configuration seems to be invalid: tried calling method [public abstract javax.sql.DataSource com.atlassian.activeobjects.spi.DataSourceProvider.getDataSource()] on target [com.atlassian.activeobjects.confluence.ConfluenceDataSourceProvider@198b380]; nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:315)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
.....

Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
	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:597)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	... 165 more

 

I'm using Confluence 3.4.9 and Active Objects plugin 0.9.1.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2015

Have you tried flushing your cache? Often an object was saved to the cache, the plugin reloaded, then saved objects can't be reused because the plugin's classes were replaced by the new one (same name, but not the same binary).

More generally

  • I'm not sure ActiveObjects has been much tested on Confluence 3.4, or even runs. 
  • Developing with a very old version of Confluence makes it much harder to find documentation. The initial release of 3.4 was more than 5 years ago, the last bugfix version for it was 4 years ago. You're hugely increasing the risk of not finding help and being blocked in the middle of your project.

Lastly, have you evaluated the opportunity of storing data in Bandana/SAL storage? AO has several problems such as cross-database compatibility and OSGi headaches. It's often much simpler to use a well proven library (gson/jaxb) to serialize data and store it as strings. The drawback with serialized/Bandana is, you can't look up data other than by primary key.

delterreno November 24, 2015

I cleaned the cache and I get the same error. I think I'm going to use Bandana. Thank you for your help.

TAGS
AUG Leaders

Atlassian Community Events