Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat issues under Intellij IDEA

 
Adrian Sosialuk
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I know that this is not the best place to ask that sort of questions,
but I couldn't find any information related to my problem.

I had my Netbeans installation already configured to work with Tomcat 6.
Then I downloaded Intellij IDEA ide and I can't get it working with
Tomcat. I use Tomcat HOME as the one where the tomcat got installed
and Tomcat BASE as ~/.netbeans/6.0/apache-tomcat-6.0_base.

When I run my project it gets copied under webapps folder under Tomcat BASE
and I can't access it from a web browser.

Could anybody plase help me with that or at least point me to the right direction ?

Cheers,

Adrian
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, this probably is the best place to ask this question.

IntelliJ has 2 ways to run Tomcat. For simple webapps, it dynamically spawns a Tomcat server under its direct control. This is good enough for the basics, but unfortunately, if you want to run 2 webapps at once in the same copy of Tomcat or if you need to take advantage of information that would be stored in the application Context (such as security realm or JNDI definitions), it's not sufficient.

For the more complex cases, you need to start an independent copy of Tomcat with remote debugging enabled. By "remote" I mean that it doesn't have to be on another machine, just outside of IntelliJ. IntelliJ has a remote debugging feature that allows it to attach to that copy of Tomcat and then you debug in the usual way.
 
Adrian Sosialuk
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for your reply.

I still can not get Tomcat working with IDEA.
I don't have such issues with Netbeans or Eclipse.

Nothing gets written to log files directly (checked HOME and BASE directory).

I get only this on output:

Tomcat log:

14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter HTTPMonitorFilter
java.lang.ClassNotFoundException: org.netbeans.modules.web.monitor.server.MonitorFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

The above repeats 3 times.


Console:

/home/adrian/apache-tomcat-6.0.16/bin/catalina.sh run
14-Apr-2008 17:43:44 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_05/jre/lib/i386/server:/usr/lib/jvm/jdk1.6.0_05/jre/lib/i386:/usr/lib/jvm/jdk1.6.0_05/jre/../lib/i386:.::/usr/java/packages/lib/i386:/lib:/usr/lib
14-Apr-2008 17:43:44 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
14-Apr-2008 17:43:44 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 607 ms
14-Apr-2008 17:43:44 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
14-Apr-2008 17:43:44 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext start
SEVERE: Context [/adrianeczek] startup failed due to previous errors
14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
14-Apr-2008 17:43:45 org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
14-Apr-2008 17:43:45 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
14-Apr-2008 17:43:45 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14-Apr-2008 17:43:45 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/48 config=null
14-Apr-2008 17:43:45 org.apache.catalina.startup.Catalina start
INFO: Server startup in 445 ms
Connected to server
/home/adrian/apache-tomcat-6.0.16/bin/catalina.sh stop
14-Apr-2008 17:43:56 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8084
14-Apr-2008 17:43:57 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
14-Apr-2008 17:43:57 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8084
Disconnected from server

Any idea what it might be ?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. The failing class name is part of the org.netbeans package. You're not running NetBeans anymore. You need to remove that filter, replace it with something IntelliJ friendly, or supply IntelliJ with the missing class (if it's supposed to be usable outside of NetBeans).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic