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!
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>
Yes most likely!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're my savior! :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.