NullPointerException while deploying project on Weblogic 12.2.1
<p>We have a JSF application that was on Weblogic 10.3.6 and that we try to deploy on Weblogic 12.2.1.<br>
For information, we succeeded in deploying on Weblogic 12.1.3 without any changes in the project.<br>
We are facing a NullPointerException while deploying on Weblogic 12.2.1 :</p>

<pre><code>.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000
.
CLASSPATH=C:\tools\java8\JDK18~1.0_1\lib\tools.jar;C:\BEA122~1.1\wlserver\server\lib\weblogic.jar;C:\BEA122~1.1\oracle_common\modules\net.sf.antcontrib_1.1.0.0_1-0b3\lib\ant-contrib.jar;C:\BEA122~1.1\wlserver\modules\features\oracle.wls.common.nodemanager.jar;C:\BEA122~1.1\oracle_common\modules\com.oracle.cie.config-wls-online_8.2.0.0.jar;C:\BEA122~1.1\wlserver\common\derby\lib\derbyclient.jar;C:\BEA122~1.1\wlserver\common\derby\lib\derby.jar;C:\PROGRA~2\INSTAN~1\ojdbc14.jar
.
PATH=C:\BEA122~1.1\USER_P~1\domains\myDomain\bin;;C:\BEA122~1.1\wlserver\server\native\win\x64;C:\BEA122~1.1\wlserver\server\bin;C:\BEA122~1.1\oracle_common\modules\org.apache.ant_1.9.2\bin;C:\tools\java8\JDK18~1.0_1\jre\bin;C:\tools\java8\JDK18~1.0_1\bin;C:\PROGRA~3\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WINDOW~1\v1.0\;C:\PROGRA~2\QUICKT~1\QTSystem;C:\PROGRA~2\INSTAN~1\;C:\PROGRA~1\TORTOI~1\bin;C:\tools\org\apache\maven\maven\303812~1.3\bin;C:\tools\com\sun\java\jdk\6U23-W~1\bin;C:\PROGRA~2\NETCDF~1;C:\BEA122~1.1\wlserver\server\native\win\x64\oci920_8
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http:\\hostname:port\console        *
***************************************************
Starting WLS with line:
C:\tools\java8\JDK18~1.0_1\bin\java -server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE  -Xms256m -Xmx512m -XX:CompileThreshold=8000 -Dweblogic.Name=AdminServer -Djava.security.policy=C:\BEA122~1.1\wlserver\server\lib\weblogic.policy  -Xverify:none -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader  -javaagent:C:\BEA122~1.1\wlserver\server\lib\debugpatch-agent.jar -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dwls.home=C:\BEA122~1.1\wlserver\server -Dweblogic.home=C:\BEA122~1.1\wlserver\server      weblogic.Server
Listening for transport dt_socket at address: 8453
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;Security&gt; &lt;BEA-090905&gt; &lt;Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;Security&gt; &lt;BEA-090906&gt; &lt;Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;WebLogicServer&gt; &lt;BEA-000377&gt; &lt;Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.112-b15 from Oracle Corporation.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;RCM&gt; &lt;BEA-2165021&gt; &lt;"ResourceManagement" is not enabled in this JVM. Enable "ResourceManagement" to use the WebLogic Server "Resource Consumption Management" feature. To enable "ResourceManagement", you must specify the following JVM options in the WebLogic Server instance in which the JVM runs: -XX:+UnlockCommercialFeatures -XX:+ResourceManagement.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;Management&gt; &lt;BEA-141107&gt; &lt;Version: WebLogic Server 12.2.1.0.0 Tue Oct  6 10:05:47 PDT 2015 1721936&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;WorkManager&gt; &lt;BEA-002900&gt; &lt;Initializing self-tuning thread pool.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Info&gt; &lt;WorkManager&gt; &lt;BEA-002942&gt; &lt;CMM memory level becomes 0. Setting standby thread pool size to 256.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170019&gt; &lt;The server log file weblogic.logging.FileStreamHandler instance=892551724
Current log file=C:\bea12.2.1\user_projects\domains\myDomain\servers\AdminServer\logs\AdminServer.log
Rotation dir=C:\bea12.2.1\user_projects\domains\myDomain\servers\AdminServer\logs
 is opened. All server side log events will be written to this file.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090946&gt; &lt;Security pre-initializing using security realm: myrealm&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090947&gt; &lt;Security post-initializing using security realm: myrealm&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090082&gt; &lt;Security initialized using administrative security realm: myrealm&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STANDBY.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to STARTING.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170036&gt; &lt;The Logging monitoring service timer has started to check for logged message counts every 30 seconds.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Log Management&gt; &lt;BEA-170027&gt; &lt;The server has successfully established a connection with the Domain level Diagnostic Service.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to ADMIN.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RESUMING.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Warning&gt; &lt;Server&gt; &lt;BEA-002611&gt; &lt;The hostname "DSP0761974.atlas.edf.fr", maps to multiple IP addresses: 163.81.65.152, 0:0:0:0:0:0:0:1.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default" is now listening on 163.81.65.152:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000331&gt; &lt;Started the WebLogic Server Administration Server "AdminServer" for domain "myDomain" running in development mode.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[2]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default" is now listening on 163.81.65.152:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;Server&gt; &lt;BEA-002613&gt; &lt;Channel "Default[2]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000360&gt; &lt;The server started in RUNNING mode.&gt; 
&lt;30 déc. 2016 10 h 11 CET&gt; &lt;Notice&gt; &lt;WebLogicServer&gt; &lt;BEA-000365&gt; &lt;Server state changed to RUNNING.&gt; 
&lt;30 déc. 2016 10 h 12 CET&gt; &lt;Error&gt; &lt;Deployer&gt; &lt;BEA-149265&gt; &lt;Failure occurred in the execution of deployment request with ID "1668134555370" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.NullPointerException"
weblogic.application.ModuleException: java.lang.NullPointerException
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
    at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.createSpringInstrumentorEngineIfNecessary(SpringClassPreprocessor.java:67)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.&lt;init&gt;(SpringClassPreprocessor.java:26)
    at weblogic.spring.monitoring.instrumentation.SpringInstrumentationUtils.addSpringInstrumentor(SpringInstrumentationUtils.java:87)
    Truncated. see log file for complete stacktrace
&gt; 
&lt;30 déc. 2016 10 h 12 CET&gt; &lt;Warning&gt; &lt;Deployer&gt; &lt;BEA-149004&gt; &lt;Failures were detected while initiating deploy task for application "MyProject-ear".&gt; 
&lt;30 déc. 2016 10 h 12 CET&gt; &lt;Warning&gt; &lt;Deployer&gt; &lt;BEA-149078&gt; &lt;Stack trace for message 149004
weblogic.application.ModuleException: java.lang.NullPointerException
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
    at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.createSpringInstrumentorEngineIfNecessary(SpringClassPreprocessor.java:67)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.&lt;init&gt;(SpringClassPreprocessor.java:26)
    at weblogic.spring.monitoring.instrumentation.SpringInstrumentationUtils.addSpringInstrumentor(SpringInstrumentationUtils.java:87)
    Truncated. see log file for complete stacktrace
</code></pre>

<p>Here is the full stacktrace :</p>

<pre><code>weblogic.application.ModuleException: java.lang.NullPointerException
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    at weblogic.application.utils.StateMachineDriver.nextStateInParallel(StateMachineDriver.java:144)
    at weblogic.application.internal.flow.ModuleStateDriver.parallelPrepare(ModuleStateDriver.java:50)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:76)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:730)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:242)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:67)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:229)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:103)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:237)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:792)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1306)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:264)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:177)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643)
    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused By: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
    at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.createSpringInstrumentorEngineIfNecessary(SpringClassPreprocessor.java:67)
    at weblogic.spring.monitoring.instrumentation.SpringClassPreprocessor.&lt;init&gt;(SpringClassPreprocessor.java:26)
    at weblogic.spring.monitoring.instrumentation.SpringInstrumentationUtils.addSpringInstrumentor(SpringInstrumentationUtils.java:87)
    at weblogic.servlet.internal.WebAppInternalModuleExtension$SpringInstrumentationExtension.doInstrumentation(WebAppInternalModuleExtension.java:113)
    at weblogic.servlet.internal.WebAppInternalModuleExtension$SpringInstrumentationExtension.access$400(WebAppInternalModuleExtension.java:102)
    at weblogic.servlet.internal.WebAppInternalModuleExtension.prePrepare(WebAppInternalModuleExtension.java:57)
    at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:293)
    at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:285)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:109)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:196)
    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:191)
    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
    at weblogic.application.utils.StateMachineDriver.nextStateInParallel(StateMachineDriver.java:144)
    at weblogic.application.internal.flow.ModuleStateDriver.parallelPrepare(ModuleStateDriver.java:50)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:76)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:730)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:242)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:67)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:229)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:103)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:237)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:792)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1306)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:264)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:177)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643)
    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
</code></pre>

<p>As you can see in the stacktrace, all classes involved are weblogic's classes and no class from my project.<br>
Does anyone have an idea for this problem ?<br>
Thanks in advance</p>