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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to using alias in Active Object with Oracle DB?

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,

1 answer

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

525 views 18 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you