ActiveObjectsSqlException when I try to create an entity

Hi there,

I am developing a plugin for JIRA 5 and was using ActiveObjects to store custom data. Everything was working fine, I was able to store my own entities in the database and so on. But when I recently created another new entity interface and tried to create/store one of these entities in the exact same way i did before, it threw this error:

com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:HSQL Database Engine
	- version:1.8.0
	- minor version:8
	- major version:1
Driver:
	- name:HSQL Database Engine Driver
	- version:1.8.0

java.sql.SQLException: Table not found in statement [INSERT INTO AO_9B23C2_INVOICE (ID) VALUES (NULL)]
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:93)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.create(DelegatingActiveObjects.java:56)
	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)
	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)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy1407.create(Unknown Source)


My interface looks like this:

public interface Invoice extends Entity{

	String getName();
	
	void setName(String name);


}

But when I try to create and store an entity of the type Invoice the error above is thrown:

ao.executeInTransaction(new TransactionCallback<Invoice>() {
				
				@Override
				public Invoice doInTransaction() {
					
					final Invoice entry = ao.create(Invoice.class);
					entry.setName(name);
					entry.save();
					return entry;
				}
				
			});


The result is the same if I just do this:

final Invoice invoice = ao.create(Invoice.class);
invoice.setName("Example");
invoice.save();

As I mentioned above, I am using ActiveObjects for quite a while now and I just dont see what I am doing wrong. I am developing on the usual development-environment that is started with atlas-run/atlas-debug and so on. Is there a limit of own entities that I can create in the HSQL Database?

Thank You!

1 answer

1 accepted

This widget could not be displayed.

Maybe you didn't add it to your ao object in atlassian-plugin.xml?

<ao key="aoEntities" name="Active Object Entities">

<description>The module configuring the Active Objects service used by this plugin</description>

<entity>com.xyz</entity>

</ao>

You're my savior! :-)

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 7 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

36 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you