0

I try to deploy my web application on Tomcat by IntelliJ. This application is in WAR. I run server and start deploy, but I get the following error:

cze 21, 2017 2:18:39 PM org.apache.tomcat.util.modeler.BaseModelMBean invoke
SEVERE: Exception invoking method createStandardContext
java.lang.NullPointerException
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:633)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1471)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1312)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1404)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:832)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I have Tomcat v. 7.0.62 bundle with Liferay Portal 6.2 CE GA6 and IntelliJ Idea Ultimate 2017.1. What can I do with this problem?

EDIT: My run configuration in IntelliJ: run configuration

kuba44
  • 1,838
  • 9
  • 34
  • 62
  • in your server configuration there is a tab where you define the context of your application, probably it's blank there – Ramon Marques Jun 21 '17 at 14:35
  • @RamonMarques No, I have `/` context here :( – kuba44 Jun 21 '17 at 14:46
  • `SEVERE: Exception invoking method createStandardContext java.lang.NullPointerException` fix that NPE and it will work. –  Jun 21 '17 at 16:15
  • @JarrodRoberson But how to fix it it configuration problem? I didn't change anything in my code – kuba44 Jun 22 '17 at 07:04

1 Answers1

0

Change run configuration to war:exploded and try again. If isn't share your intellij run configuration. It seems its a problem with your code.

Jeet
  • 185
  • 1
  • 2
  • 10
  • I have `war:exploded` artifacts set but it not help. And code is good because I can run app outside of IntelliJ without any problem. – kuba44 Jun 21 '17 at 14:49
  • what do you want to know about run configuration? – kuba44 Jun 21 '17 at 14:51
  • Are you able to run tomcat without war using Intellij ? If you are using some specific configuration related for tomcat then check instance option in configuration. – Jeet Jun 21 '17 at 14:57
  • yes, without this WAR I can run Tomcat without error. I think my configuration is not specific. I edit my question to show it. Do you need any other information about run configuration? – kuba44 Jun 21 '17 at 15:00
  • In your intellij server configuration tab you have something run instance like checkbox check that and give a hit. It should work. – Jeet Jun 22 '17 at 11:07
  • sorry I don't understand. About which tab and which checkbox do you mean? – kuba44 Jun 23 '17 at 11:06
  • See you screen shot and you have one tab call "server" . In right bottom corner you have two check box check there. – Jeet Jun 23 '17 at 13:24