File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Tomcat issues under Intellij IDEA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Tomcat issues under Intellij IDEA" Watch "Tomcat issues under Intellij IDEA" New topic
Author

Tomcat issues under Intellij IDEA

Adrian Sosialuk
Ranch Hand

Joined: Jun 07, 2007
Posts: 57
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

Joined: Jun 25, 2001
Posts: 15951
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Adrian Sosialuk
Ranch Hand

Joined: Jun 07, 2007
Posts: 57
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

Joined: Jun 25, 2001
Posts: 15951
    
  19

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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat issues under Intellij IDEA
 
Similar Threads
Reasons to convert to IntelliJ
Debugging using tomcat server in idea
Remote debugging in idea for Tomcat server
Netbeans VS. IDEA
Tomcat issues under Intellij IDEA