IDEA 10 and Tomcat 7 integration - tomcat-juli.jar issues

I could be completely missing something really obvious here, but I tried to run Tomcat 7.0.5 from IDEA today for the first time and I cannot get past bootstrapping because of the fact that tomcat-juli.jar is no longer in the bootstrap.jar manifest file classpath. So the startup chokes trying to find org.apache.juli.logging.LogFactory.

IDEA's default script uses the -jar bootstrap.jar approach to firing up Tomcat, which negates the ability to specify a classpath, but nevermind that, surely somebody else will have had this problem if it truly were a problem?! And yet I find nothing in these forums related to Tomcat 7.0. This leads me to believe I'm at fault here somehow. What am I missing that I encounter this issue? Specifically I get the following error on startup:

Connected to the target VM, address: '127.0.0.1:54262', transport: 'socket'
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 1 more
Disconnected from the target VM, address: '127.0.0.1:54262', transport: 'socket'
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
Exception in thread "main" Disconnected from server


So it does find the Bootstrap class, but can't load it because the tomcat-juli.jar is not in the system classpath/classloader. Am I missing something really obvious? Please help.

Just to also mention that Tomcat 7.0.5 starts up just fine from the command line - well actually it's a Windows service in this case but nevertheless.

Thanks,
Darryl Pentz

2 comments
Comment actions Permalink

By default IDEA starts Tomcat using catalina.bat file. bootstrap.jar is used only if catalina.bat file doesn't exist. We will fix the problem with
classpath in IDEA 10.0.x bugfix update.

As a workaround you can ensure that catalina.bat exist in /bin directory or create your own startup script and specify it in run
configuration settings.

I could be completely missing something really obvious here, but I tried to run Tomcat 7.0.5 from IDEA today for the first time and I cannot get past bootstrapping because of the fact that tomcat-juli.jar is no longer in the bootstrap.jar manifest file classpath. So the startup chokes trying to find org.apache.juli.logging.LogFactory.

>

IDEA's default script uses the -jar bootstrap.jar approach to firing up Tomcat, which negates the ability to specify a classpath, but nevermind that, surely somebody else will have had this problem if it truly were a problem?! And yet I find nothing in these forums related to Tomcat 7.0. This leads me to believe I'm at fault here somehow. What am I missing that I encounter this issue? Specifically I get the following error on startup:

>

Connected to the target VM, address: '127.0.0.1:54262', transport: 'socket'
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
     at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
     ... 1 more
Disconnected from the target VM, address: '127.0.0.1:54262', transport: 'socket'
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program will exit.
Exception in thread "main" Disconnected from server

>
>

So it does find the Bootstrap class, but can't load it because the tomcat-juli.jar is not in the system classpath/classloader. Am I missing something really obvious? Please help.

>

Just to also mention that Tomcat 7.0.5 starts up just fine from the command line - well actually it's a Windows service in this case but nevertheless.

>

Thanks,
Darryl Pentz

>

---
Original message URL: http://devnet.jetbrains.net/message/5281191#5281191



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks Nikolay, I'll give that a try.

0

Please sign in to leave a comment.