title: Unable to get CDI working in Weblogic 12c, hibernate 5.2.4, hibernate-validator/cdi 5.3.1
body: <p>My env: 
  weblogic 12c</p>
  
  <p>with jpa2.1 patch that sets: SET PRE_CLASSPATH=%MW_HOME%\oracle_common\modules\javax.persistence_2.1.jar;%MW_HOME%\wlserver\modules\com.oracle.weblogic.jpa21support_1.0.0.0_2-1.jar</p>
  
  <p>my-ear/APP-INF/lib contains:</p>
  
  <pre><code>hibernate-release-5.2.4.Final/lib/required/*.jar 
  hibernate-validator-5.3.1/dist/*.jar and hibernate-validator-5.3.1/dist/lib/required/*
  </code></pre>
  
  <p>my persistence.xml:</p>
  
  <pre><code>&lt;persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
    http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
    version="2.1"&gt;
  &lt;persistence-unit name="myPersistenceUnit" transaction-type="JTA"&gt;
  &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
  &lt;jta-data-source&gt;myDataSource&lt;/jta-data-source&gt;
  </code></pre>
  
  <p><strong>I am able to use persistence.xml and entityManager gets injected into my session bean without any issues.</strong> However when I add beans.xml (to use CDI) in one of the ejb-jar/META-INF I get:</p>
  
  <pre><code>org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.hibernate.validator.internal.engine.ValidatorImpl is not proxyable because it has no no-args constructor - ValidatorBean [id=org.hibernate.validator.internal.cdi.ValidatorBean_default]. 
  </code></pre>
  
  <p>My weblogic-application.xml contains:</p>
  
  <pre><code>&lt;prefer-application-packages&gt;       
   &lt;package-name&gt;antlr.*&lt;/package-name&gt;
   &lt;package-name&gt;org.hibernate.*&lt;/package-name&gt;
   &lt;package-name&gt;org.hibernate.validator.*&lt;/package-name&gt;
   &lt;package-name&gt;org.hibernate.validator.internal.cdi.*&lt;/package-name&gt;        
   &lt;package-name&gt;javax.validation.*&lt;/package-name&gt;
   &lt;package-name&gt;javax.validation.spi.*&lt;/package-name&gt;
  &lt;package-name&gt;javax.validation.bootstrap.*&lt;/package-name&gt;
  </code></pre>
  
  <p>Complete stacktrace:</p>
  
  <pre><code>Exception 0 :
  org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean class org.hibernate.validator.internal.engine.ValidatorImpl is not proxyable because it has no no-args constructor - ValidatorBean [id=org.hibernate.validator.internal.cdi.ValidatorBean_default].
      at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:214)
      at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:180)
      at org.jboss.weld.util.Proxies.getUnproxyableTypesExceptionInt(Proxies.java:195)
      at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:169)
      at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:151)
      at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:388)
      at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:371)
      at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
      at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:110)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:76)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:49)
      at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:37)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
      at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
  
      at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:398)
      at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:371)
      at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
      at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:110)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:76)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:49)
      at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:37)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
      at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
  </code></pre>
  
  <p>What am I missing? How do I get beans.xml/CDI working in this environment? </p>