We're updating the issue view to help you get more done. 

SQLException with @Polymorphic entity with @Indexed field

Description

There is a SQLException at startup if I have an entity inheriting from another one with an Indexed field even if I put the @Polymorphic attribute on the inhereted entity

Code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 @Polymorphic public interface ReferencableEntity extends Entity { @Indexed @NotNull @Unique public String getRef(); public void setRef(String ref); } public interface Achievement extends ReferencableEntity { }

Trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 [INFO] [talledLocalContainer] 2011-04-23 18:30:07,875 main ERROR [sal.core.lifecycle.DefaultLifecycleManager] Error occurred while starting component 'com.madgnome.jira.plugins.jirachievements.PluginInitializer'. java.sql.SQLException: Table not found in statement [CREATE INDEX index_ao_7a05d7_referencable_entity_ref ON AO_7A05D7_REFERENCABLE_ENTITY] [INFO] [talledLocalContainer] net.java.ao.sql.ActiveObjectSqlException: java.sql.SQLException: Table not found in statement [CREATE INDEX index_ao_7a05d7_referencable_entity_ref ON AO_7A05D7_REFERENCABLE_ENTITY] [INFO] [talledLocalContainer] at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:44) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:52) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:39) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.internal.RegistryBasedActiveObjectsProvider.get(RegistryBasedActiveObjectsProvider.java:29) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.getDelegate(DelegatingActiveObjects.java:126) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.executeInTransaction(DelegatingActiveObjects.java:111) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at $Proxy878.executeInTransaction(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:33) [INFO] [talledLocalContainer] at $Proxy880.createUserWrapper(Unknown Source) [INFO] [talledLocalContainer] at com.madgnome.jira.plugins.jirachievements.PluginInitializer.initUserWrappers(PluginInitializer.java:50) [INFO] [talledLocalContainer] at com.madgnome.jira.plugins.jirachievements.PluginInitializer.initDatabase(PluginInitializer.java:36) [INFO] [talledLocalContainer] at com.madgnome.jira.plugins.jirachievements.PluginInitializer.start(PluginInitializer.java:31) [INFO] [talledLocalContainer] at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.notifyOnStart(JiraLifecycleManager.java:83) [INFO] [talledLocalContainer] at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:50) [INFO] [talledLocalContainer] at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:60) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56) [INFO] [talledLocalContainer] at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:151) [INFO] [talledLocalContainer] at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:70) [INFO] [talledLocalContainer] at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17) [INFO] [talledLocalContainer] at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23) [INFO] [talledLocalContainer] at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:84) [INFO] [talledLocalContainer] at com.atlassian.jira.upgrade.PluginUpgradeLauncher.start(PluginUpgradeLauncher.java:39) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:41) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:57) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:52) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130) [INFO] [talledLocalContainer] at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:85) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) [INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) [INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardService.start(StandardService.java:516) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [INFO] [talledLocalContainer] at org.apache.catalina.startup.Catalina.start(Catalina.java:583) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [INFO] [talledLocalContainer] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [INFO] [talledLocalContainer] Caused by: java.sql.SQLException: Table not found in statement [CREATE INDEX index_ao_7a05d7_referencable_entity_ref ON AO_7A05D7_REFERENCABLE_ENTITY] [INFO] [talledLocalContainer] at org.hsqldb.jdbc.Util.sqlException(Unknown Source) [INFO] [talledLocalContainer] at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source) [INFO] [talledLocalContainer] at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source) [INFO] [talledLocalContainer] at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) [INFO] [talledLocalContainer] at net.java.ao.schema.SchemaGenerator.executeUpdate(SchemaGenerator.java:70) [INFO] [talledLocalContainer] at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:56) [INFO] [talledLocalContainer] at net.java.ao.EntityManager.migrate(EntityManager.java:142) [INFO] [talledLocalContainer] at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:40) [INFO] [talledLocalContainer] ... 74 more

Environment

None

Testing Notes

None

Status

Assignee

Unassigned

Reporter

Julien Hoarau

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Components

Fix versions

Affects versions

ao-plugin 0.9.6

Priority

Major