Problem with type aliases

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with type aliases

Mark Nolan
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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
|

Re: Problem with type aliases

Kazuki Shimizu
Hi Mark,

Could you try the mybatis-spring 2.0.2-SNAPSHOT?
If you cannot  resolve a problem using mybatis-spring 2.0.2-SNAPSHOT, please create new issue to GitHub issue tracker with small reproduce executable project.

Best Regards,
Kazuki


On Monday, April 15, 2019 at 9:12:26 AM UTC+9, Mark Nolan wrote:
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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
|

Re: Problem with type aliases

Mark Nolan

Sorry for the delay in replying. Took me a little while to get a chance to test.

2.0.2-SNAPSHOT works perfectly for my situation, thank you.

Do you have any idea when you expect this to be released? Not looking for an exact date, more an idea of whether we are talking weeks or months.

Thanks again,
Mark.
.


On Mon, 15 Apr 2019 at 04:15, Kazuki Shimizu <[hidden email]> wrote:
Hi Mark,

Could you try the mybatis-spring 2.0.2-SNAPSHOT?
If you cannot  resolve a problem using mybatis-spring 2.0.2-SNAPSHOT, please create new issue to GitHub issue tracker with small reproduce executable project.

Best Regards,
Kazuki


On Monday, April 15, 2019 at 9:12:26 AM UTC+9, Mark Nolan wrote:
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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.

--
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
|

Re: Problem with type aliases

Kazuki Shimizu
Hi Mark, Thanks for your feedback!!

> Do you have any idea when you expect this to be released?

We usually consider to release per about 3 months and decide to ship or skip it.
Therefore I think a next release will be about July.
If you cannot wait until July, we can consider to ship it more early.

Best Regards,
Kazuki

On Tuesday, April 16, 2019 at 9:38:10 AM UTC+9, Mark Nolan wrote:

Sorry for the delay in replying. Took me a little while to get a chance to test.

2.0.2-SNAPSHOT works perfectly for my situation, thank you.

Do you have any idea when you expect this to be released? Not looking for an exact date, more an idea of whether we are talking weeks or months.

Thanks again,
Mark.
.


On Mon, 15 Apr 2019 at 04:15, Kazuki Shimizu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="27wYdlwxBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kazuk...@...> wrote:
Hi Mark,

<a href="https://github.com/mybatis/spring/issues/362" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fspring%2Fissues%2F362\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCYAUQrnYPjPX1CWBm5pu5WgKVIg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fspring%2Fissues%2F362\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCYAUQrnYPjPX1CWBm5pu5WgKVIg&#39;;return true;">https://github.com/mybatis/spring/issues/362 may be affecting.
Could you try the mybatis-spring 2.0.2-SNAPSHOT?
If you cannot  resolve a problem using mybatis-spring 2.0.2-SNAPSHOT, please create new issue to GitHub issue tracker with small reproduce executable project.

Best Regards,
Kazuki


On Monday, April 15, 2019 at 9:12:26 AM UTC+9, Mark Nolan wrote:
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="27wYdlwxBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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
|

Re: Problem with type aliases

Mark Nolan

Thanks, July will be fine. I have a workaround for now and I now know why the workaround is needed, which was one of my goals, I can certainly wait for a few months before taking out the workaround.

Many thanks for your help,
Mark.
.


On Tue, 16 Apr 2019 at 05:24, Kazuki Shimizu <[hidden email]> wrote:
Hi Mark, Thanks for your feedback!!

> Do you have any idea when you expect this to be released?

We usually consider to release per about 3 months and decide to ship or skip it.
Therefore I think a next release will be about July.
If you cannot wait until July, we can consider to ship it more early.

Best Regards,
Kazuki

On Tuesday, April 16, 2019 at 9:38:10 AM UTC+9, Mark Nolan wrote:

Sorry for the delay in replying. Took me a little while to get a chance to test.

2.0.2-SNAPSHOT works perfectly for my situation, thank you.

Do you have any idea when you expect this to be released? Not looking for an exact date, more an idea of whether we are talking weeks or months.

Thanks again,
Mark.
.


On Mon, 15 Apr 2019 at 04:15, Kazuki Shimizu <[hidden email]> wrote:
Hi Mark,

Could you try the mybatis-spring 2.0.2-SNAPSHOT?
If you cannot  resolve a problem using mybatis-spring 2.0.2-SNAPSHOT, please create new issue to GitHub issue tracker with small reproduce executable project.

Best Regards,
Kazuki


On Monday, April 15, 2019 at 9:12:26 AM UTC+9, Mark Nolan wrote:
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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.

--
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.

--
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
|

Re: Problem with type aliases

Kazuki Shimizu
+1 :D

On Wednesday, April 17, 2019 at 2:22:09 AM UTC+9, Mark Nolan wrote:

Thanks, July will be fine. I have a workaround for now and I now know why the workaround is needed, which was one of my goals, I can certainly wait for a few months before taking out the workaround.

Many thanks for your help,
Mark.
.


On Tue, 16 Apr 2019 at 05:24, Kazuki Shimizu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1gUoUF5kCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kazuk...@...> wrote:
Hi Mark, Thanks for your feedback!!

> Do you have any idea when you expect this to be released?

We usually consider to release per about 3 months and decide to ship or skip it.
Therefore I think a next release will be about July.
If you cannot wait until July, we can consider to ship it more early.

Best Regards,
Kazuki

On Tuesday, April 16, 2019 at 9:38:10 AM UTC+9, Mark Nolan wrote:

Sorry for the delay in replying. Took me a little while to get a chance to test.

2.0.2-SNAPSHOT works perfectly for my situation, thank you.

Do you have any idea when you expect this to be released? Not looking for an exact date, more an idea of whether we are talking weeks or months.

Thanks again,
Mark.
.


On Mon, 15 Apr 2019 at 04:15, Kazuki Shimizu <[hidden email]> wrote:
Hi Mark,

<a href="https://github.com/mybatis/spring/issues/362" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fspring%2Fissues%2F362\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCYAUQrnYPjPX1CWBm5pu5WgKVIg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fspring%2Fissues%2F362\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCYAUQrnYPjPX1CWBm5pu5WgKVIg&#39;;return true;">https://github.com/mybatis/spring/issues/362 may be affecting.
Could you try the mybatis-spring 2.0.2-SNAPSHOT?
If you cannot  resolve a problem using mybatis-spring 2.0.2-SNAPSHOT, please create new issue to GitHub issue tracker with small reproduce executable project.

Best Regards,
Kazuki


On Monday, April 15, 2019 at 9:12:26 AM UTC+9, Mark Nolan wrote:
I have just tried upgrading an app to MyBatis Spring boot starter 2.0.1 to fix a problem where type aliases were not recognised correctly. This seems to gives problems with classes that have an inner class. It reports "The alias '' is already mapped to the value 'com.XXX.business.Client$1", where Client has a number of inner classes, but isn't the only class in that package that does.

Before upgrading, the app was using 1.3.4 with spring boot starter 2.1.2. I am aware that these are not known to be compatible.

The problem I was having with those versions is that type aliases would work fine in Eclipse, or when using mvn spring-boot:run at the command line, but would not work at all in an uber jar. I needed to use the FQNs. The app was doing manual configuration of MyBatis because it has more than one DataSource. If I change it to use only one DataSource and let it do automatic configuration, it worked even as an uber jar.

I clearly have a workaround for now by sticking with MyBatis Spring Boot starter 1.3.4 and using FQNs, but I may have a problem in the future. I have not yet tried 2.0.1 and FQNs to see if the inner classes are handled ok.

Is there a known problem with type aliases and inner classes?

Thanks,
Mark.
.

--
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 <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="1gUoUF5kCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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.