nullPointerException when deploy webLogic 12c appl

2020-03-27 08:55发布

when i deploy my first web app on webLogic i get this error:

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:172) at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:167) at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80) Truncated. see log file for complete stacktrace Caused By: java.lang.NullPointerException at weblogic.servlet.internal.WebAnnotationProcessor.processMultipartConfigAnnotation(WebAnnotationProcessor.java:286) at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotationForClasses(AnnotationProcessingManager.java:169) at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotations(AnnotationProcessingManager.java:114) at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotationsOutsideWebFragment(AnnotationProcessingManager.java:141) at weblogic.servlet.internal.AnnotationProcessingManager.processAnnotations(AnnotationProcessingManager.java:102) Truncated. see log file for complete stacktrace

6条回答
▲ chillily
2楼-- · 2020-03-27 09:12

The same solution worked on NetBeans8. From projects, go to your war project, right click over Libraries > JSF2.2 and click Remove. Rebuild the project and deploy. Remember to deploy as shared library the JSF on WLS.

查看更多
唯我独甜
3楼-- · 2020-03-27 09:24

I deploy from Eclipse (OEPE), same problem here without JSF. Here is what solved my problem:

  1. Quit Eclipse
  2. Delete the workspace's .metadata folder
  3. Launch Eclipse
查看更多
欢心
4楼-- · 2020-03-27 09:28

Edit the file web.xml and put:

<welcome-file-list>
  <welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>

<servlet-mapping>`enter code here`
 <servlet-name>Faces Servlet</servlet-name>
 <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
查看更多
我欲成王,谁敢阻挡
5楼-- · 2020-03-27 09:30

I had the exact same NPE. It was started by an instantiation of an factory that went wrong. I had to remote debug in to find this. An exception in the initialisation of the factory is swallowed and we don't get the real exception.

In my case the problem was antlr.Token and antlr.CommonToken not arriving from the same source. This gave me an ClassCastException. I solved it by moving all libraries from the ear to war to get more control over them.

查看更多
一夜七次
6楼-- · 2020-03-27 09:32

I had this problem and resolved it by removing JSF 2.2 Mojarra 2.2.0 from the application libraries. It only needs to be in the classpath.

In Eclipse, edit properties for the project, go to Project Facets-->Java Server Faces and uncheck "Include libraries with this application" and Apply change.

查看更多
时光不老,我们不散
7楼-- · 2020-03-27 09:32

This seems to be a duplicate of Maven generated ear file fails during deploying weblogic server. Some details about the solution can be found in this post https://roundwheeltech.wordpress.com/2016/06/15/deploying-a-jsf-2-2-to-weblogic-12-1-3/.

Because WebLogic 12.1.3 ships with JSF 2.1, the required JSF jars have to be bundles within the WAR file (specified as dependencies in pom.xml). WebLogic must also be instructed to use the libraries packaged in the WAR file instead of the ones that are provided by the container.

查看更多
登录 后发表回答