IncompleteElementException after upate from 3.2.3 to 3.4.1

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IncompleteElementException after upate from 3.2.3 to 3.4.1

gfrancis1@gmail.com
I just updated Mybatis in my Tomcat/Spring webapp from 
Mybatis 3.2.3 (Mybatis-Spring-1.2.1) to:
Mybatis 3.4.1 (Mybatis-Spring-1.3.0)

Now when my application starts I'm getting: BeanCreationException 


Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not find a parent resultmap with id 'com.mycompany.bi.mapper.BillMapper.BaseResultMap'

        at org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:188)

       at org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47)

       at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:748)

       at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:730)

       at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:725)

       at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:210)

       at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)

       at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)

       at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)


My application is entirely annotation-configured as follows:


@Configuration

@EnableWebMvc

@Lazy


@MapperScan(basePackages = { "com.mycompany.enterprise.mapper", "com.mycompany.enterprise.custom", "com.mycompany.ic.mapper", "com.mycompany.bi.mapper", "com.mycompany.bi.custom" }, sqlSessionFactoryRef = "sqlSessionFactory")


@ComponentScan(basePackages = "com.mycompany.ic", excludeFilters = { @Filter(type = FilterType.CUSTOM, value = { MapperPackageFilter.class }) })


public class ApplicationConfiguration extends WebMvcConfigurerAdapter implements ServletContextAware {...


I've read the release notes for the versions in between these releases, but I can't find anything that suggests why this might be happening.
Can anyone suggest how to diagnose this?
Thanks,

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IncompleteElementException after upate from 3.2.3 to 3.4.1

Iwao AVE!
Hi,

Could you provide a simplified version of your webapp so that we can
reproduce the problem on our end?

Or, it is even better if the issue is reproducible without container.
I'm trying to make it easier for contributors to create SSCCE.
https://github.com/harawata/mybatis-issues
I would appreciate if you could give it a try.

Thank you!
Iwao

2016-07-12 14:28 GMT+09:00 blackfrancis <[hidden email]>:

> I just updated Mybatis in my Tomcat/Spring webapp from
> Mybatis 3.2.3 (Mybatis-Spring-1.2.1) to:
> Mybatis 3.4.1 (Mybatis-Spring-1.3.0)
>
> Now when my application starts I'm getting: BeanCreationException
>
>
> Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not
> find a parent resultmap with id
> 'com.mycompany.bi.mapper.BillMapper.BaseResultMap'
>
>         at
> org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:188)
>
>        at
> org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47)
>
>        at
> org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:748)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:730)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:725)
>
>        at
> org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:210)
>
>        at
> org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
>
>        at
> org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)
>
>        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
>
>
> My application is entirely annotation-configured as follows:
>
>
> @Configuration
>
> @EnableWebMvc
>
> @Lazy
>
>
> @MapperScan(basePackages = { "com.mycompany.enterprise.mapper",
> "com.mycompany.enterprise.custom", "com.mycompany.ic.mapper",
> "com.mycompany.bi.mapper", "com.mycompany.bi.custom" }, sqlSessionFactoryRef
> = "sqlSessionFactory")
>
>
> @ComponentScan(basePackages = "com.mycompany.ic", excludeFilters = {
> @Filter(type = FilterType.CUSTOM, value = { MapperPackageFilter.class }) })
>
>
> public class ApplicationConfiguration extends WebMvcConfigurerAdapter
> implements ServletContextAware {...
>
>
> I've read the release notes for the versions in between these releases, but
> I can't find anything that suggests why this might be happening.
> Can anyone suggest how to diagnose this?
> Thanks,

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IncompleteElementException after upate from 3.2.3 to 3.4.1

gfrancis1@gmail.com
The issue seems to stem from the use of @PostConstruct.  
If I try to run queries via Mapper Beans in a @PostConstruct annotated method, I get the BeanCreationException; otherwise it's fine.


On Wednesday, July 13, 2016 at 3:42:17 AM UTC+10, Iwao AVE! wrote:
Hi,

Could you provide a simplified version of your webapp so that we can
reproduce the problem on our end?

Or, it is even better if the issue is reproducible without container.
I'm trying to make it easier for contributors to create SSCCE.
<a href="https://github.com/harawata/mybatis-issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fharawata%2Fmybatis-issues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWLWIlMVmbRMLlHGscVpJTQFca-A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fharawata%2Fmybatis-issues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWLWIlMVmbRMLlHGscVpJTQFca-A&#39;;return true;">https://github.com/harawata/mybatis-issues
I would appreciate if you could give it a try.

Thank you!
Iwao

2016-07-12 14:28 GMT+09:00 blackfrancis <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="ABnoWLw7AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gfra...@...>:

> I just updated Mybatis in my Tomcat/Spring webapp from
> Mybatis 3.2.3 (Mybatis-Spring-1.2.1) to:
> Mybatis 3.4.1 (Mybatis-Spring-1.3.0)
>
> Now when my application starts I'm getting: BeanCreationException
>
>
> Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not
> find a parent resultmap with id
> 'com.mycompany.bi.mapper.BillMapper.BaseResultMap'
>
>         at
> org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:188)
>
>        at
> org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47)
>
>        at
> org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:748)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:730)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:725)
>
>        at
> org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:210)
>
>        at
> org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
>
>        at
> org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)
>
>        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
>
>
> My application is entirely annotation-configured as follows:
>
>
> @Configuration
>
> @EnableWebMvc
>
> @Lazy
>
>
> @MapperScan(basePackages = { "com.mycompany.enterprise.mapper",
> "com.mycompany.enterprise.custom", "com.mycompany.ic.mapper",
> "com.mycompany.bi.mapper", "com.mycompany.bi.custom" }, sqlSessionFactoryRef
> = "sqlSessionFactory")
>
>
> @ComponentScan(basePackages = "com.mycompany.ic", excludeFilters = {
> @Filter(type = FilterType.CUSTOM, value = { MapperPackageFilter.class }) })
>
>
> public class ApplicationConfiguration extends WebMvcConfigurerAdapter
> implements ServletContextAware {...
>
>
> I've read the release notes for the versions in between these releases, but
> I can't find anything that suggests why this might be happening.
> Can anyone suggest how to diagnose this?
> Thanks,

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IncompleteElementException after upate from 3.2.3 to 3.4.1

Alexandros Melakis
Hi all,


I can confirm this behaviour, but it doesn't only happen when using the @PostConstruct annotation but also, when trying to invoke a mapper from afterPropertiesSet() (as specified in InitializingBean interface).

My workaround has been to implement the BeanPostProcessor interface and do the tasks I needed in postProcessAfterInitialization() (be careful as it is called multiple times).

Can we expect to see a fix of this soon?


On Thursday, July 14, 2016 at 3:56:08 AM UTC+3, blackfrancis wrote:
The issue seems to stem from the use of @PostConstruct.  
If I try to run queries via Mapper Beans in a @PostConstruct annotated method, I get the BeanCreationException; otherwise it's fine.


On Wednesday, July 13, 2016 at 3:42:17 AM UTC+10, Iwao AVE! wrote:
Hi,

Could you provide a simplified version of your webapp so that we can
reproduce the problem on our end?

Or, it is even better if the issue is reproducible without container.
I'm trying to make it easier for contributors to create SSCCE.
<a href="https://github.com/harawata/mybatis-issues" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fharawata%2Fmybatis-issues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWLWIlMVmbRMLlHGscVpJTQFca-A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fharawata%2Fmybatis-issues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWLWIlMVmbRMLlHGscVpJTQFca-A&#39;;return true;">https://github.com/harawata/mybatis-issues
I would appreciate if you could give it a try.

Thank you!
Iwao

2016-07-12 14:28 GMT+09:00 blackfrancis <[hidden email]>:

> I just updated Mybatis in my Tomcat/Spring webapp from
> Mybatis 3.2.3 (Mybatis-Spring-1.2.1) to:
> Mybatis 3.4.1 (Mybatis-Spring-1.3.0)
>
> Now when my application starts I'm getting: BeanCreationException
>
>
> Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not
> find a parent resultmap with id
> 'com.mycompany.bi.mapper.BillMapper.BaseResultMap'
>
>         at
> org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:188)
>
>        at
> org.apache.ibatis.builder.ResultMapResolver.resolve(ResultMapResolver.java:47)
>
>        at
> org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:748)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:730)
>
>        at
> org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:725)
>
>        at
> org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:210)
>
>        at
> org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
>
>        at
> org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:59)
>
>        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
>
>
> My application is entirely annotation-configured as follows:
>
>
> @Configuration
>
> @EnableWebMvc
>
> @Lazy
>
>
> @MapperScan(basePackages = { "com.mycompany.enterprise.mapper",
> "com.mycompany.enterprise.custom", "com.mycompany.ic.mapper",
> "com.mycompany.bi.mapper", "com.mycompany.bi.custom" }, sqlSessionFactoryRef
> = "sqlSessionFactory")
>
>
> @ComponentScan(basePackages = "com.mycompany.ic", excludeFilters = {
> @Filter(type = FilterType.CUSTOM, value = { MapperPackageFilter.class }) })
>
>
> public class ApplicationConfiguration extends WebMvcConfigurerAdapter
> implements ServletContextAware {...
>
>
> I've read the release notes for the versions in between these releases, but
> I can't find anything that suggests why this might be happening.
> Can anyone suggest how to diagnose this?
> Thanks,

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...