I build the plugin and I have the query like this:
Query query = Query.select()
.alias(WikiEntity.class, "wiki")
.alias(PanelEntity.class, "panel")
.join(PanelEntity.class, "wiki.PANEL_ID = panel.ID")
.order("panel.NAME").offset(offset).limit(limit)
I run my plugin with H2, MySQL, Postgres is ok.
But cannot run it with Oracle.
I got this error:
Database:
- name:Oracle
- version:Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
- minor version:0
- major version:18
Driver:
- name:Oracle JDBC driver
- version:12.1.0.1.0
java.sql.SQLSyntaxErrorException: ORA-00904: "panel"."NAME": invalid identifier
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:152)
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.find(TenantAwareActiveObjects.java:302)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy9278.find(Unknown Source)
at com.mgmtp.jira.addon.issuepanelsaddon.dao.repository.wikipanel.WikiPanelRepositoryImpl.getPanelByOffsetLimit(WikiPanelRepositoryImpl.java:214)
at com.mgmtp.jira.addon.issuepanelsaddon.service.wikipanel.WikiPanelServiceImpl.getPanelByPage(WikiPanelServiceImpl.java:224)
at com.mgmtp.jira.addon.issuepanelsaddon.action.admin.panelconfiguration.customizedpanel.ViewConfigurationPanelsAction.getWikiPanels(ViewConfigurationPanelsAction.java:93)
... 3 filtered
Anybody has the idea, how to make the plugin can run with all DB H2, MySQL, Postgres, and Oracle?
Many thanks,
Hi @Dang Thi Thuy Tien
Check this topic, it seems you have the same problem. Basically, the accepted answer is to make "panel"(which I assume to be an alias) uppercase in your query
https://community.atlassian.com/t5/Jira-questions/Using-active-objects-alias-causes-error-ORA-00904-invalid/qaq-p/677687
Please let me know if it helped.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.