mybatis / cdi

MyBatis CDI Extension
Apache License 2.0
24 stars 19 forks source link

CDI injection does not work in WebSphere Application Server 8.5.5.5 #19

Closed isaiasbsf closed 7 years ago

isaiasbsf commented 9 years ago

I have a web application with JSF 2.0, mybatis-3.3.0 and mybatis-cdi-1.0.0-beta2. The following two cases does not work running on WebSphere Application Server 8.5.5.5:

@Inject private SqlSession session;

or

@Inject @Mapper private InerfaceXXXMapper mapper;

Eclipse IDE gives me a warning at the @Inject mentioned above: "No bean is eligible for injection to the injection point [JSR-299 §5.2.1]"

I have a Producer method with ApplicationScoped:

@ApplicationScoped @Produces public SqlSessionFactory produceFactory() {...}

When I run my application on WebSphere Liberty Profile V8.5 it works since it does not have injection points validation at start up. When the application is accessed the @Produces method is called and the factory is loaded with session and mapper proxies.This scenario works fine.

However, when I run my application on the Application Server Full, it uses the OpenWebBeans CDI Container and it tries to validate all injection points at startup, but does not find any class of type "SqlSession" or "InerfaceXXXMapper" being produced. The type produced is "SqlSessionFactory" that holds the proxys for SqlSession and its Mappers registred.

Here is the exception I get at start up:

[7/23/15 16:33:42:226 BRT] 000000b0 WebContainerL I WebContainerLifecycle startApplication OpenWebBeans Container is starting... [7/23/15 16:33:44:486 BRT] 000000b0 Extension I MyBatis CDI Module - Activated [7/23/15 16:33:46:196 BRT] 000000b0 BeansDeployer E BeansDeployer deploy javax.enterprise.inject.UnsatisfiedResolutionException: Api type [org.apache.ibatis.session.SqlSession] is not found with the qualifiers

How can I make it work?

Thanks,

Isaias

hazendaz commented 9 years ago

Possibly using @any might work.

Sent by Outlook for Android

On Thu, Jul 23, 2015 at 1:47 PM -0700, "isaiasbsf" notifications@github.com wrote: I have a web application with JSF 2.0, mybatis-3.3.0 and mybatis-cdi-1.0.0-beta2. The fllowing two cases does not work running on WebSphere Application Server 8.5.5.5:

@Inject private SqlSession session;

or

@Inject @Mapper private InerfaceXXXMapper mapper;

Eclipse IDE gives me a warnning at the @Inject mentioned abouve: "No bean is eligible for injection to the injection point [JSR-299 §5.2.1]"

I have a Producer method with ApplicationScoped:

@ApplicationScoped @Produces public SqlSessionFactory produceFactory() {...}

When I run my application on WebSphere Liberty Profile V8.5 it woks since it does not have injection points validation at start up. When the application is acessed the @Produces method is called and the factory is loaded with session and mapper proxys.This cenario works fine.

But when I run my application on the Application Server Full, it uses the OpenWebBeans CDI Container and it tries to validate all injection points at startup and does not find any class of type "SqlSession" or "InerfaceXXXMapper" being produced. The type produced is "SqlSessionFactory" that holds the proxys for SqlSession and its Mappers registred.

How can I make it work?

Thanks,

Isaias


Reply to this email directly or view it on GitHub: https://github.com/mybatis/cdi/issues/19

isaiasbsf commented 9 years ago

I got the same resut:

@Inject @Any private SqlSession session;

[7/23/15 20:42:56:172 BRT] 0000007e WebContainerL I WebContainerLifecycle startApplication OpenWebBeans Container is starting... [7/23/15 20:42:58:058 BRT] 0000007e Extension I MyBatis CDI Module - Activated [7/23/15 20:42:58:673 BRT] 0000007e BeansDeployer E BeansDeployer deploy javax.enterprise.inject.UnsatisfiedResolutionException: Api type [org.apache.ibatis.session.SqlSession] is not found with the qualifiers Qualifiers: [@javax.enterprise.inject.Any()]

hazendaz commented 9 years ago

Is your producer class also scoped in application scope?

Sent by Outlook for Android

On Thu, Jul 23, 2015 at 5:05 PM -0700, "isaiasbsf" notifications@github.com wrote: I got the same resut:

@Inject @Any private SqlSession session;

[7/23/15 20:42:56:172 BRT] 0000007e WebContainerL I WebContainerLifecycle startApplication OpenWebBeans Container is starting... [7/23/15 20:42:58:058 BRT] 0000007e Extension I MyBatis CDI Module - Activated [7/23/15 20:42:58:673 BRT] 0000007e BeansDeployer E BeansDeployer deploy javax.enterprise.inject.UnsatisfiedResolutionException: Api type [org.apache.ibatis.session.SqlSession] is not found with the qualifiers Qualifiers: [@javax.enterprise.inject.Any()]


Reply to this email directly or view it on GitHub: https://github.com/mybatis/cdi/issues/19#issuecomment-124273253

isaiasbsf commented 9 years ago

I wasn´t, but now it is and didn´t work.

@ApplicationScoped public class SqlSessionFactoryProvider {

@ApplicationScoped @Produces public SqlSessionFactory produceFactory() {...}

It seems like it needs to load the factory at startup so that it doesn´t fail the following validation. Is there a way to load the factory at startup?

at org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92) at org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:96) at org.apache.webbeans.container.InjectionResolver.checkInjectionPoints(InjectionResolver.java:189) at org.apache.webbeans.container.BeanManagerImpl.validate(BeanManagerImpl.java:1161) at org.apache.webbeans.config.BeansDeployer.validate(BeansDeployer.java:394) at org.apache.webbeans.config.BeansDeployer.validateInjectionPoints(BeansDeployer.java:332) at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:183) at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78) at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85) at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85) at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85)

ilkomiliev commented 8 years ago

It doesn't work for me too. I'm on WAS 8.5.5.3 with mybatis-cdi 1.0.0-beta3. Same errors at start-up.

mnesarco commented 7 years ago

Hi @isaiasbsf and @ilkomiliev thanks for reporting this, can you give a try with beta5? Take into accout there are breaking changes: http://www.mybatis.org/cdi/changes.html

mnesarco commented 7 years ago

I have tested beta5 with Payara 4.1 (Glassfish 4.1), TomEE-Plus 7.0.1, WildFly 10.1.0 Please take a look at the code (bare minimum): https://github.com/mnesarco/mybatis-cdi-samples Can you please test it against WAS?

mcbeelen commented 7 years ago

In version beta6 (SNAPSHOT for now) a fix for issue #40 was implemented, which solved the UnsatisfiedResolutionException in WebBeans. This fix might solve the WebSphere issues as well. Could you please verify?

  1. Please build the cdi-project locally.
  2. Upgrade the version of the mybatis-cdi dependency to 1.0.0-beta6-SNAPSHOT in your application.
  3. Adjust your code to adapt to the breaking changes: http://www.mybatis.org/cdi/changes.html
  4. Deploy your application.
  5. Test and provide feedback.

Cheers, Marco

mnesarco commented 7 years ago

Hi @isaiasbsf , @ilkomiliev , can you help us testing if beta6 fixed the issue?

ilkomiliev commented 7 years ago

Hi,

I'm sorry but I don't have access to WAS installations anymore. Perhaps someone else could help here.

On 17 Feb 2017, at 18:53, Frank David Martínez M notifications@github.com wrote:

Hi @isaiasbsf , @ilkomiliev , can you help us testing if beta6 fixed the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

isaiasbsf commented 7 years ago

Hi,

We had to look for another solution since it took too long to solve. However, I got a copy of the project from the time we were using MyBatis CDI, upgraded my dependencies to mybatis-3.4.2.jar / mybatis-cdi-1.0.0-beta6.jar and adjusted the code to the breaking changes:

@Mapper annotation is now mandatory in Mapper Interfaces and forbidden in injection points. @SessionFactoryProvider is now mandatory in SqlSessionFactory producers.

The server started up ok, but when I tried to access a bean which injects a service that has a Mapper interface injected, I get the following error:

Caused by: java.lang.IllegalStateException: Unable to access CDI at javax.enterprise.inject.spi.CDI.current(CDI.java:65) at org.mybatis.cdi.CDIUtils.findSqlSessionFactory(CDIUtils.java:47) at org.mybatis.cdi.SerializableMapperProxy.getMapper(SerializableMapperProxy.java:60) at org.mybatis.cdi.SerializableMapperProxy.(SerializableMapperProxy.java:47) at org.mybatis.cdi.MyBatisBean.create(MyBatisBean.java:116) at org.apache.webbeans.component.third.ThirdpartyBeanImpl.create(ThirdpartyBeanImpl.java:93) at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:862) at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:742) at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136) at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324) at org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:95) at org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76) at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181) at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:862) at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:742) at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136) at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324) at org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:95) at org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76) at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181) at org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:81) at org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:179) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:154) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:114) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108) at br.com.sodexo.araras.gestaosistema.gestaoacesso.mbean.PesquisarUsuarioMBean_$$_javassist10.loadView(PesquisarUsuarioMBean$$_javassist_10.java)

mnesarco commented 7 years ago

Hi @isaiasbsf ,

Caused by: java.lang.IllegalStateException: Unable to access CDI at javax.enterprise.inject.spi.CDI.current(CDI.java:65)

Sounds like a container / configuration problem. Do you have a bean.xml file properly placed? Can you share your code? I am trying to solve this in the darkness.

isaiasbsf commented 7 years ago

Yes I do. CDI is working in the project, except for the bean I changed to inject the Mapper interface directly in the new way according to the breaking changes. My project uses JSF with @ConversationScoped beans.

In my SqlSessionFactoryProvider.java I have two providers:

@ApplicationScoped @Produces @ArarasFactory @SessionFactoryProvider public SqlSessionFactory produceArarasFactory() {...}

@ApplicationScoped @Produces @ArarasSegFactory @SessionFactoryProvider public SqlSessionFactory produceArarasSegFactory() {...}

@ArarasFactory and @ArarasSegFactory are just qualifiers to resolve ambiguities.

In my conversationScoped bean I have:

@Named @ConversationScoped public class CadastroUsuarioMBean { .... @Inject private UsuarioService service;

In my service implementation I have:

public class UsuarioServiceImpl implements UsuarioService, Serializable { .... @Inject @ArarasSegFactory UsuarioMapper usuarioMapper;

In this Mapper interface I Have:

@Mapper public interface UsuarioMapper extends Serializable { .... }

If I change the service implementation to inject the SqlSessionFactory instead of the Mapper interface it works, but than I lose the transactional features of MyBatisCDI, which is the reason I wanted to use.

public class UsuarioServiceImpl implements UsuarioService, Serializable { .... @Inject @ArarasSegFactory SqlSessionFactory sessionFactorySeg; .... sessionFactorySeg.openSession().getMapper(UsuarioMapper.class).buscarUsuarios(param);

mnesarco commented 7 years ago

Ok. Sounds like a "Passivation issue with the Conversation Scope" I have commited a fix for Issue #45 and it can be related. Please try beta7-snapshot. It works with payara and tomee.

isaiasbsf commented 7 years ago

I didn't find beta7 in Maven central.

hazendaz commented 7 years ago

@mnesarco Please take a look at the change I made to make serialization tests pass. If that seems appropriate, I can release beta7.

@isaiasbsf Are you ok if we force java 7 usage?

isaiasbsf commented 7 years ago

No problem, we're already using Java 7.

mnesarco commented 7 years ago

@hazendaz your addition is ok. (I have removed Serializable by accident)

hazendaz commented 7 years ago

@isaiasbsf I have released 1.0.0-beta7. It should be available via poms immediately and will show in maven central in a couple of hours. Can you try this again and let us know if it works? Thanks.

isaiasbsf commented 7 years ago

@hazendaz I changed to beta 7 but got the same error:

Caused by: java.lang.IllegalStateException: Unable to access CDI at javax.enterprise.inject.spi.CDI.current(CDI.java:65) at org.mybatis.cdi.CDIUtils.findSqlSessionFactory(CDIUtils.java:46) at org.mybatis.cdi.SerializableMapperProxy.getMapper(SerializableMapperProxy.java:57) at org.mybatis.cdi.SerializableMapperProxy.(SerializableMapperProxy.java:44) at org.mybatis.cdi.MyBatisBean.create(MyBatisBean.java:116) at org.apache.webbeans.component.third.ThirdpartyBeanImpl.create(ThirdpartyBeanImpl.java:93) at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:862) at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:742) at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136) at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324) at org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:95) at org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76) at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181) at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:862) at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:742) at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136) at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387) at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324) at org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:95) at org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76) at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181) at org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:81) at org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:179) at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:144) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:154) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:114) at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)

mnesarco commented 7 years ago

@isaiasbsf This is very strange. It works with OpenWebBeans in Tomee. Can you deploy the Sample App just to see if it works? (https://github.com/mnesarco/mybatis-cdi-samples/). TomEE uses OpenWebBeans 1.6.3, maybe WAS uses some different version?

mnesarco commented 7 years ago

@isaiasbsf @hazendaz I have tested it today with WebSphere Application Server Version 16.0.0.4 Liberty and it works out of the box.

isaiasbsf commented 7 years ago

We're using the WebSphere Application Server 8.5.5.3 (Liberty Profile) for development and WebSphere Application Server 8.5.5.5 (Full application server) on production environment. I deployed the sample App (https://github.com/mnesarco/mybatis-cdi-samples/) and got the following error when accessing the web context:

Caused by: javax.servlet.ServletException: SRVE0320E: O filtro [SampleWebFilter] foi localizado, mas ocorreu uma falha na injeção de recursos. ... 3 more Caused by: com.ibm.wsspi.injectionengine.InjectionException: Unable to obtain an instance for @Inject java.lang.reflect.Field.userMapper: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject(InjectionBinding.java:1123) ... 1 more Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI at org.mybatis.cdi.CDIUtils.findSqlSessionFactory(CDIUtils.java:46) at org.mybatis.cdi.SerializableMapperProxy.getMapper(SerializableMapperProxy.java:57) at org.mybatis.cdi.SerializableMapperProxy.(SerializableMapperProxy.java:44) at org.mybatis.cdi.MyBatisBean.create(MyBatisBean.java:116) at org.apache.webbeans.component.third.ThirdpartyBeanImpl.create(ThirdpartyBeanImpl.java:93) ... 1 more

mnesarco commented 7 years ago

java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI Means that it is using an old version of webbeans or there is another problem with the container not with mybatis-cdi.

With WAS Liberty with Java EE 7 Full Platform 16.0.0.4 it works out of the box.

On Thu, Mar 2, 2017 at 1:54 PM, isaiasbsf notifications@github.com wrote:

We're using the WebSphere Application Server 8.5.5.3 (Liberty Profile) for development and WebSphere Application Server 8.5.5.5 (Full application server) on production environment. I deployed the same App ( https://github.com/mnesarco/mybatis-cdi-samples/) and got the following error when accessing the web context:

Caused by: javax.servlet.ServletException: SRVE0320E: O filtro [SampleWebFilter] foi localizado, mas ocorreu uma falha na injeção de recursos. ... 3 more Caused by: com.ibm.wsspi.injectionengine.InjectionException: Unable to obtain an instance for @Inject https://github.com/Inject java.lang.reflect.Field.userMapper: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectionObject( InjectionBinding.java:1123) ... 1 more Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/spi/CDI at org.mybatis.cdi.CDIUtils.findSqlSessionFactory(CDIUtils.java:46) at org.mybatis.cdi.SerializableMapperProxy.getMapper( SerializableMapperProxy.java:57) at org.mybatis.cdi.SerializableMapperProxy.(SerializableMapperProxy.java: 44) at org.mybatis.cdi.MyBatisBean.create(MyBatisBean.java:116) at org.apache.webbeans.component.third.ThirdpartyBeanImpl. create(ThirdpartyBeanImpl.java:93) ... 1 more

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mybatis/cdi/issues/19#issuecomment-283744528, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCXVTsO8gs5DUVsDGR5nYreBS6oGK-Qks5rhxB0gaJpZM4FetP0 .

-- Frank D. Martínez M.

mnesarco commented 7 years ago

@isaiasbsf @hazendaz WAS CDI support started in 8.5.5 (CDI 1.0 I suppose), but it was updated to CDI 1.2 in 8.5.5.6. ref: https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.wdt.doc/topics/wdt_overview.htm

You need at least CDI 1.1 to use mybatis-cdi.

isaiasbsf commented 7 years ago

It's true, we're using cdi-1.0 since it is the CDI version supported on our version of the application server. I understand now that MyBatis-CDI minimal compliance is cdi-1.1. However, we're not upgrading our application server at this time because of this. The CDI container works for everything else, except for MyBatis CDI. This issue was opened almost 2 years ago and we were using the latest version of WebSphere Application Server at the time. As I said before, we switched to another solution (MyBatis-Guice) and I was just trying to help solve the problem with our version. When we decide to upgrade our application server in the future, we'll consider switching back to MyBatis-CDI. Thanks for your time.

hazendaz commented 7 years ago

Thanks. So based on everything I think we can close this. If we don't already note minimum supported versions we should add that to the Readme. Given overall age of original support need I'd say this is good enough so we can bring into GA release under version 1.0.0. Thanks for all the effort in testing and confirming overall state.

Get Outlook for Androidhttps://aka.ms/ghei36


From: isaiasbsf notifications@github.com Sent: Thursday, March 2, 2017 3:52:53 PM To: mybatis/cdi Cc: Jeremy Landis; Mention Subject: Re: [mybatis/cdi] CDI injection does not work in WebSphere Application Server 8.5.5.5 (#19)

It's true, we're using cdi-1.0 since it is the CDI version supported on our version of the application server. I understand now that MyBatis-CDI minimal compliance is cdi-1.1. However, we're not upgrading our application server at this time because of this. The CDI container works for everything else, except for MyBatis CDI. This issue was opened almost 2 years ago and we were using the latest version of WebSphere Application Server at the time. As I said before, we switched to another solution (MyBatis-Guice) and I was just trying to help solve the problem with our version. When we decide to upgrade our application server in the future, we'll consider switching back to MyBatis-CDI. Thanks for your time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mybatis/cdi/issues/19#issuecomment-283776638, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA7ho1IrIcW8zb2BtWt1botM5x83b3frks5rhywlgaJpZM4FetP0.

mnesarco commented 7 years ago

@isaiasbsf @hazendaz Ok Guys, Thanks for your help. I am closing this now. I have updated the README with info about the CDI versions supported.

znzlspt17 commented 2 years ago

I have an UnsatisfiedResolutionException problem with the mapper like isaiasbspf.

Was there a solution to this problem afterwards?

hazendaz commented 2 years ago

@znzlspt17 What version of WAS and mybatis-cdi are you using? Based on this thread, you need to be at cdi 1.1 which is least supported version. We have profiles in pleace on github actions to run through all configuration needs from 1.1 to 2.0 with various java configurations. Those are known supported. This thread was in regards to WAS 8.5.5.5 which I'm guessing from context here was still cdi 1.0. I'd sort of hope you were not still trying to use that as it is long vulnerable and well over 5 years old based at this point in time.

znzlspt17 commented 2 years ago

@hazendaz hello im using mybatis 3.5.9, mybatis-cdi 1.1.2, owb 2.0.17, aries cdi 1.1.5 using on java 11 base karaf 4.3.7 Should I create a new post?

hazendaz commented 2 years ago

@znzlspt17 Yes open new ticket with stack trace of issue you are facing. This ticket is specific to WAS and legacy usage which was noted as resolved in indicating newer version necessary. The library usage you have looks ok.

znzlspt17 commented 2 years ago

@hazendaz Hello, I opened a new ticket. https://github.com/mybatis/cdi/issues/302#issue-1278589951