Ticket #894 (closed defect: fixed)
Blitz API Mapping Failures
| Reported by: | callan | Owned by: | callan |
|---|---|---|---|
| Priority: | critical | Milestone: | 3.0-Beta3 |
| Component: | API | Version: | |
| Keywords: | Cc: | donald, jmoore, atarkowska |
Description
While putting in the logic required for #891, the following was added to API.ice:
omero::RLong copyAndResizePixels(long pixelsId,
omero::RInt sizeX,
omero::RInt sizeY,
omero::RInt sizeZ,
omero::RInt sizeT,
string methodology);
It would appear that somehow, the nullable omero::RInt is not mapped correctly by the API consistency check to java.lang.Integer.
Now ignoring the obvious missing throws ServerError checked exception declaration, this method miraculously causes an ApiConsistencyException even though it appears to match perfectly with the following interface declaration:
public Long copyAndResizePixels(long pixelsId, Integer sizeX, Integer sizeY,
Integer sizeZ, Integer sizeT,
String methodology);
Specifically, the following ApiConsistencyException stack trace is generated:
Method mismatch between:
native Java:[public abstract void ome.api.IPixels.saveRndSettings(ome.model.display.RenderingDef), public abstract ome.model.IObject ome.api.IPixels.getEnumeration(java.lang.Class,java.lang.String), public abstract ome.model.core.Pixels ome.api.IPixels.retrievePixDescription(long), public abstract java.lang.Long ome.api.IPixels.copyAndResizePixels(long,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.String), public abstract ome.model.display.RenderingDef ome.api.IPixels.retrieveRndSettings(long), public abstract int ome.api.IPixels.getBitDepth(ome.model.enums.PixelsType), public abstract java.util.List ome.api.IPixels.getAllEnumerations(java.lang.Class)]
and Blitz:[public abstract void omero.api._IPixelsOperations.saveRndSettings(omero.model.RenderingDef,Ice.Current) throws omero.ServerError, public abstract omero.RObject omero.api._IPixelsOperations.getEnumeration(java.lang.String,java.lang.String,Ice.Current) throws omero.ServerError, public abstract omero.model.Pixels omero.api._IPixelsOperations.retrievePixDescription(long,Ice.Current) throws omero.ServerError, public abstract omero.RLong omero.api._IPixelsOperations.copyAndResizePixels(long,omero.RInt,omero.RInt,omero.RInt,omero.RInt,java.lang.String,Ice.Current) throws omero.ServerError, public abstract omero.model.RenderingDef omero.api._IPixelsOperations.retrieveRndSettings(long,Ice.Current) throws omero.ServerError, public abstract int omero.api._IPixelsOperations.getBitDepth(omero.model.PixelsType,Ice.Current) throws omero.ServerError, public abstract java.util.List omero.api._IPixelsOperations.getAllEnumerations(java.lang.String,Ice.Current) throws omero.ServerError]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at ome.system.OmeroContext.<init>(OmeroContext.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:83)
... 17 more
Caused by: ome.services.blitz.util.ApiConsistencyException:
Parameter type mismatch: class java.lang.Integer & class omero.RInt
Parameter type mismatch: class java.lang.Integer & class omero.RInt
Parameter type mismatch: class java.lang.Integer & class omero.RInt
Parameter type mismatch: class java.lang.Integer & class omero.RInt
Method mismatch between:
native Java:[public abstract void ome.api.IPixels.saveRndSettings(ome.model.display.RenderingDef), public abstract ome.model.IObject ome.api.IPixels.getEnumeration(java.lang.Class,java.lang.String), public abstract ome.model.core.Pixels ome.api.IPixels.retrievePixDescription(long), public abstract java.lang.Long ome.api.IPixels.copyAndResizePixels(long,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.Integer,java.lang.String), public abstract ome.model.display.RenderingDef ome.api.IPixels.retrieveRndSettings(long), public abstract int ome.api.IPixels.getBitDepth(ome.model.enums.PixelsType), public abstract java.util.List ome.api.IPixels.getAllEnumerations(java.lang.Class)]
and Blitz:[public abstract void omero.api._IPixelsOperations.saveRndSettings(omero.model.RenderingDef,Ice.Current) throws omero.ServerError, public abstract omero.RObject omero.api._IPixelsOperations.getEnumeration(java.lang.String,java.lang.String,Ice.Current) throws omero.ServerError, public abstract omero.model.Pixels omero.api._IPixelsOperations.retrievePixDescription(long,Ice.Current) throws omero.ServerError, public abstract omero.RLong omero.api._IPixelsOperations.copyAndResizePixels(long,omero.RInt,omero.RInt,omero.RInt,omero.RInt,java.lang.String,Ice.Current) throws omero.ServerError, public abstract omero.model.RenderingDef omero.api._IPixelsOperations.retrieveRndSettings(long,Ice.Current) throws omero.ServerError, public abstract int omero.api._IPixelsOperations.getBitDepth(omero.model.PixelsType,Ice.Current) throws omero.ServerError, public abstract java.util.List omero.api._IPixelsOperations.getAllEnumerations(java.lang.String,Ice.Current) throws omero.ServerError]
at ome.services.blitz.util.ApiConsistencyCheck.postProcessAfterInitialization(ApiConsistencyCheck.java:107)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1368)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
... 34 more
Change History
Note: See
TracTickets for help on using
tickets.
