Error deploying 1.324 to tomcat

15 messages Options
Embed this post
Permalink
hopfrog238

Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
For my company's hudson deployment, w explode the hudson war file in a directory served by tomcat 6.0.18.  Today I un-warr'ed version 1.324.  Upon tomcat's startup, the included stack trace appears in the logs, and hudson is not available.

I can issue a bug report if needed.  Can anyone share any insight as to what may be available workarounds.

~ hf


SEVERE: Failed to initialize Hudson
java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at hudson.EnvVars.initMaster(EnvVars.java:206)
        at hudson.EnvVars.<clinit>(EnvVars.java:201)
        at hudson.WebAppMain.getHomeDir(WebAppMain.java:260)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:114)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        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:627)
        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:1149)
        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)
Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class hudson.WebAppMain
java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at hudson.EnvVars.initMaster(EnvVars.java:206)
        at hudson.EnvVars.<clinit>(EnvVars.java:201)
        at hudson.WebAppMain.getHomeDir(WebAppMain.java:260)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:114)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        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:627)
        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:1149)
        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)
Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/hudson] startup failed due to previous errors

Kohsuke Kawaguchi

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
hopfrog238 wrote:
> For my company's hudson deployment, w explode the hudson war file in a
> directory served by tomcat 6.0.18.  Today I un-warr'ed version 1.324.  Upon
> tomcat's startup, the included stack trace appears in the logs, and hudson
> is not available.
>
> I can issue a bug report if needed.  Can anyone share any insight as to what
> may be available workarounds.

I think you messed up your war file handling. You probably ended up
misplacing hudson.war!Main.class into
hudson.war!WEB-INF/classes/hudson/Main.class or something like that.

I think you should just let Tomcat extract the war file for you.

>
> ~ hf
>
>
> SEVERE: Failed to initialize Hudson
> java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>         at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at hudson.EnvVars.initMaster(EnvVars.java:206)
>         at hudson.EnvVars.<clinit>(EnvVars.java:201)
>         at hudson.WebAppMain.getHomeDir(WebAppMain.java:260)
>         at hudson.WebAppMain.contextInitialized(WebAppMain.java:114)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
>         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:627)
>         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:1149)
>         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)
> Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener instance of
> class hudson.WebAppMain
> java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>         at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at hudson.EnvVars.initMaster(EnvVars.java:206)
>         at hudson.EnvVars.<clinit>(EnvVars.java:201)
>         at hudson.WebAppMain.getHomeDir(WebAppMain.java:260)
>         at hudson.WebAppMain.contextInitialized(WebAppMain.java:114)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
>         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:627)
>         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:1149)
>         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)
> Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error listenerStart
> Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/hudson] startup failed due to previous errors
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment
olivne

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
Hi Koshuke,

Actually, he didn't. I am getting exactly the same error.
Also, recently versions of Hudson display empty stack traces in test failure pages. Is that a known bug?

Thanks,
Oren

> I think you messed up your war file handling. You probably ended up
> misplacing hudson.war!Main.class into
> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
doug.borg

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
Hi all,

I am also seeing this problem. I was upgrading from 1.323. After stopping tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the hudson.war and then restart the webserver. I get exactly the same error. I have tried re-downloading and even trying a couple of different tomcat installations (6.0.18 and 6.0.20) - same error.

Thanks,
Doug

olivne wrote:
Hi Koshuke,

Actually, he didn't. I am getting exactly the same error.
Also, recently versions of Hudson display empty stack traces in test failure pages. Is that a known bug?

Thanks,
Oren

> I think you messed up your war file handling. You probably ended up
> misplacing hudson.war!Main.class into
> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
Kohsuke Kawaguchi

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
doug.borg wrote:
> Hi all,
>
> I am also seeing this problem. I was upgrading from 1.323. After stopping
> tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> hudson.war and then restart the webserver. I get exactly the same error. I
> have tried re-downloading and even trying a couple of different tomcat
> installations (6.0.18 and 6.0.20) - same error.

OK, thanks for the additional info.

I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
6.0.20 from Apache but those started successfully.

Upon closer look at the stack trace, I see that I initially
misunderstood the problem. There's hudson/Main.class in
hudson-core-*.jar, and this is the class that's supposed to be found.

Hudson has several "Main" classes in various packages, but the error
message gives me an impression that somehow Tomcat picked up
hudson.war!Main.class, although I don't know how that could happen.

Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run

   javap -classpath hudson-core-*.jar hudson.Main

... to make sure you see "public class hudson.Main extends
java.lang.Object" ?


> Thanks,
> Doug
>
>
> olivne wrote:
>>
>> Hi Koshuke,
>>
>> Actually, he didn't. I am getting exactly the same error.
>> Also, recently versions of Hudson display empty stack traces in test
>> failure pages. Is that a known bug?
>>
>> Thanks,
>> Oren
>>
>>> I think you messed up your war file handling. You probably ended up
>>> misplacing hudson.war!Main.class into
>>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
>>
>>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment
Kohsuke Kawaguchi

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
In reply to this post by olivne
olivne wrote:
> Hi Koshuke,
>
> Actually, he didn't. I am getting exactly the same error.
> Also, recently versions of Hudson display empty stack traces in test failure
> pages. Is that a known bug?

I think the empty stack trace issue needs to be discussed separately,
and it would be great if we can get more info about the problem you see.

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment
Bouiaw

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
In reply to this post by Kohsuke Kawaguchi
Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.

On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <[hidden email]> wrote:
doug.borg wrote:
> Hi all,
>
> I am also seeing this problem. I was upgrading from 1.323. After stopping
> tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> hudson.war and then restart the webserver. I get exactly the same error. I
> have tried re-downloading and even trying a couple of different tomcat
> installations (6.0.18 and 6.0.20) - same error.

OK, thanks for the additional info.

I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
6.0.20 from Apache but those started successfully.

Upon closer look at the stack trace, I see that I initially
misunderstood the problem. There's hudson/Main.class in
hudson-core-*.jar, and this is the class that's supposed to be found.

Hudson has several "Main" classes in various packages, but the error
message gives me an impression that somehow Tomcat picked up
hudson.war!Main.class, although I don't know how that could happen.

Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run

  javap -classpath hudson-core-*.jar hudson.Main

... to make sure you see "public class hudson.Main extends
java.lang.Object" ?


> Thanks,
> Doug
>
>
> olivne wrote:
>>
>> Hi Koshuke,
>>
>> Actually, he didn't. I am getting exactly the same error.
>> Also, recently versions of Hudson display empty stack traces in test
>> failure pages. Is that a known bug?
>>
>> Thanks,
>> Oren
>>
>>> I think you messed up your war file handling. You probably ended up
>>> misplacing hudson.war!Main.class into
>>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
>>
>>
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

Bouiaw

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
Hi, is there some news about this issue (workaround, fix) ?

On Sun, Sep 27, 2009 at 6:37 PM, Bouiaw <[hidden email]> wrote:
Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.


On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <[hidden email]> wrote:
doug.borg wrote:
> Hi all,
>
> I am also seeing this problem. I was upgrading from 1.323. After stopping
> tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> hudson.war and then restart the webserver. I get exactly the same error. I
> have tried re-downloading and even trying a couple of different tomcat
> installations (6.0.18 and 6.0.20) - same error.

OK, thanks for the additional info.

I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
6.0.20 from Apache but those started successfully.

Upon closer look at the stack trace, I see that I initially
misunderstood the problem. There's hudson/Main.class in
hudson-core-*.jar, and this is the class that's supposed to be found.

Hudson has several "Main" classes in various packages, but the error
message gives me an impression that somehow Tomcat picked up
hudson.war!Main.class, although I don't know how that could happen.

Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run

  javap -classpath hudson-core-*.jar hudson.Main

... to make sure you see "public class hudson.Main extends
java.lang.Object" ?


> Thanks,
> Doug
>
>
> olivne wrote:
>>
>> Hi Koshuke,
>>
>> Actually, he didn't. I am getting exactly the same error.
>> Also, recently versions of Hudson display empty stack traces in test
>> failure pages. Is that a known bug?
>>
>> Thanks,
>> Oren
>>
>>> I think you messed up your war file handling. You probably ended up
>>> misplacing hudson.war!Main.class into
>>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
>>
>>
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


Michel R

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
I am having the same issue (Tomcat 6.0.18 and upgrading from hudson 1.316 to 1.327).


Bouiaw wrote:
Hi, is there some news about this issue (workaround, fix) ?

On Sun, Sep 27, 2009 at 6:37 PM, Bouiaw <bouiaw@gmail.com> wrote:

> Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.
>
>
> On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <
Michel R

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
Strangely after restarting tomcat once again, it worked ...

Sorry about the noise


Michel R wrote:
I am having the same issue (Tomcat 6.0.18 and upgrading from hudson 1.316 to 1.327).


Bouiaw wrote:
Hi, is there some news about this issue (workaround, fix) ?

On Sun, Sep 27, 2009 at 6:37 PM, Bouiaw <bouiaw@gmail.com> wrote:

> Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.
>
>
> On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <
hopfrog238

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bouiaw
Receiving the same error, upgrading from 1.323 to 1.327.  However -- after restarting tomcat the problem went away.  Nevertheless, I grabbed the result of the javap command:

javap -classpath hudson-core-*.jar hudson.Main
Compiled from "Main.java"
public class hudson.Main extends java.lang.Object{
    public static boolean isUnitTest;
    public hudson.Main();
    public static void main(java.lang.String[]);
    public static int run(java.lang.String[])       throws java.lang.Exception;
    public static int remotePost(java.lang.String[])       throws java.lang.Exception;
    static {};
}

I'm not entirely sure what, if anything, I might have done between the restart.  I do remember removing everything in tomcat's work directory, but I think I did that prior to upgrading.

Anyway, thank you for your attention.  I'm glad to say I'm now able to use 1.327.

~ hf
Bouiaw wrote:
Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.

On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <
Kohsuke.Kawaguchi@sun.com> wrote:

> doug.borg wrote:
> > Hi all,
> >
> > I am also seeing this problem. I was upgrading from 1.323. After stopping
> > tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> > hudson.war and then restart the webserver. I get exactly the same error.
> I
> > have tried re-downloading and even trying a couple of different tomcat
> > installations (6.0.18 and 6.0.20) - same error.
>
> OK, thanks for the additional info.
>
> I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
> 6.0.20 from Apache but those started successfully.
>
> Upon closer look at the stack trace, I see that I initially
> misunderstood the problem. There's hudson/Main.class in
> hudson-core-*.jar, and this is the class that's supposed to be found.
>
> Hudson has several "Main" classes in various packages, but the error
> message gives me an impression that somehow Tomcat picked up
> hudson.war!Main.class, although I don't know how that could happen.
>
> Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run
>
>   javap -classpath hudson-core-*.jar hudson.Main
>
> ... to make sure you see "public class hudson.Main extends
> java.lang.Object" ?
>
>
> > Thanks,
> > Doug
> >
> >
> > olivne wrote:
> >>
> >> Hi Koshuke,
> >>
> >> Actually, he didn't. I am getting exactly the same error.
> >> Also, recently versions of Hudson display empty stack traces in test
> >> failure pages. Is that a known bug?
> >>
> >> Thanks,
> >> Oren
> >>
> >>> I think you messed up your war file handling. You probably ended up
> >>> misplacing hudson.war!Main.class into
> >>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
> >>
> >>
> >
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
hopfrog238

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
I continually receive the error I described with each new release.  Oddly, I find if I use tomcat's auto-deploy mechanism (i.e. having it unpack and deploy hudson from the war file), everything seems to work OK.


hopfrog238 wrote:
Receiving the same error, upgrading from 1.323 to 1.327.  However -- after restarting tomcat the problem went away.  Nevertheless, I grabbed the result of the javap command:

javap -classpath hudson-core-*.jar hudson.Main
Compiled from "Main.java"
public class hudson.Main extends java.lang.Object{
    public static boolean isUnitTest;
    public hudson.Main();
    public static void main(java.lang.String[]);
    public static int run(java.lang.String[])       throws java.lang.Exception;
    public static int remotePost(java.lang.String[])       throws java.lang.Exception;
    static {};
}

I'm not entirely sure what, if anything, I might have done between the restart.  I do remember removing everything in tomcat's work directory, but I think I did that prior to upgrading.

Anyway, thank you for your attention.  I'm glad to say I'm now able to use 1.327.

~ hf
Bouiaw wrote:
Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.

On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <
Kohsuke.Kawaguchi@sun.com> wrote:

> doug.borg wrote:
> > Hi all,
> >
> > I am also seeing this problem. I was upgrading from 1.323. After stopping
> > tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> > hudson.war and then restart the webserver. I get exactly the same error.
> I
> > have tried re-downloading and even trying a couple of different tomcat
> > installations (6.0.18 and 6.0.20) - same error.
>
> OK, thanks for the additional info.
>
> I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
> 6.0.20 from Apache but those started successfully.
>
> Upon closer look at the stack trace, I see that I initially
> misunderstood the problem. There's hudson/Main.class in
> hudson-core-*.jar, and this is the class that's supposed to be found.
>
> Hudson has several "Main" classes in various packages, but the error
> message gives me an impression that somehow Tomcat picked up
> hudson.war!Main.class, although I don't know how that could happen.
>
> Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run
>
>   javap -classpath hudson-core-*.jar hudson.Main
>
> ... to make sure you see "public class hudson.Main extends
> java.lang.Object" ?
>
>
> > Thanks,
> > Doug
> >
> >
> > olivne wrote:
> >>
> >> Hi Koshuke,
> >>
> >> Actually, he didn't. I am getting exactly the same error.
> >> Also, recently versions of Hudson display empty stack traces in test
> >> failure pages. Is that a known bug?
> >>
> >> Thanks,
> >> Oren
> >>
> >>> I think you messed up your war file handling. You probably ended up
> >>> misplacing hudson.war!Main.class into
> >>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
> >>
> >>
> >
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
zpino

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
Just upgrading from 1.323 to 1.330 I got the same error. What I did was restart Tomcat again and everything worked Ok.

Zvonko.

hopfrog238 wrote:
I continually receive the error I described with each new release.  Oddly, I find if I use tomcat's auto-deploy mechanism (i.e. having it unpack and deploy hudson from the war file), everything seems to work OK.


hopfrog238 wrote:
Receiving the same error, upgrading from 1.323 to 1.327.  However -- after restarting tomcat the problem went away.  Nevertheless, I grabbed the result of the javap command:

javap -classpath hudson-core-*.jar hudson.Main
Compiled from "Main.java"
public class hudson.Main extends java.lang.Object{
    public static boolean isUnitTest;
    public hudson.Main();
    public static void main(java.lang.String[]);
    public static int run(java.lang.String[])       throws java.lang.Exception;
    public static int remotePost(java.lang.String[])       throws java.lang.Exception;
    static {};
}

I'm not entirely sure what, if anything, I might have done between the restart.  I do remember removing everything in tomcat's work directory, but I think I did that prior to upgrading.

Anyway, thank you for your attention.  I'm glad to say I'm now able to use 1.327.

~ hf
Bouiaw wrote:
Same error on Tomcat 6.0.20 after upgrading from 1.323 to 1.324.

On Fri, Sep 25, 2009 at 9:06 PM, Kohsuke Kawaguchi <
Kohsuke.Kawaguchi@sun.com> wrote:

> doug.borg wrote:
> > Hi all,
> >
> > I am also seeing this problem. I was upgrading from 1.323. After stopping
> > tomcat and rm -rf hudson* in the <CATALINA_HOME>/webapps dir, I wget the
> > hudson.war and then restart the webserver. I get exactly the same error.
> I
> > have tried re-downloading and even trying a couple of different tomcat
> > installations (6.0.18 and 6.0.20) - same error.
>
> OK, thanks for the additional info.
>
> I just tried a fresh Hudson 1.323 and 1.324 install on a fresh Tomcat
> 6.0.20 from Apache but those started successfully.
>
> Upon closer look at the stack trace, I see that I initially
> misunderstood the problem. There's hudson/Main.class in
> hudson-core-*.jar, and this is the class that's supposed to be found.
>
> Hudson has several "Main" classes in various packages, but the error
> message gives me an impression that somehow Tomcat picked up
> hudson.war!Main.class, although I don't know how that could happen.
>
> Can you go to $TOMCAT_HOME/webapps/hudson/WEB-INF/lib and run
>
>   javap -classpath hudson-core-*.jar hudson.Main
>
> ... to make sure you see "public class hudson.Main extends
> java.lang.Object" ?
>
>
> > Thanks,
> > Doug
> >
> >
> > olivne wrote:
> >>
> >> Hi Koshuke,
> >>
> >> Actually, he didn't. I am getting exactly the same error.
> >> Also, recently versions of Hudson display empty stack traces in test
> >> failure pages. Is that a known bug?
> >>
> >> Thanks,
> >> Oren
> >>
> >>> I think you messed up your war file handling. You probably ended up
> >>> misplacing hudson.war!Main.class into
> >>> hudson.war!WEB-INF/classes/hudson/Main.class or something like that.
> >>
> >>
> >
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/
>
Sebastian Sanitz

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
In reply to this post by hopfrog238
Hello,
I have the same problem with 1.324... and dont know what to do. The problems remains after a restart of tomcat (6.0.20). I tried it to install it as war-file in the webapps directory and uploaded the war with tomcats manager.
Any ideas or hints?

hopfrog238 wrote:
For my company's hudson deployment, w explode the hudson war file in a directory served by tomcat 6.0.18.  Today I un-warr'ed version 1.324.  Upon tomcat's startup, the included stack trace appears in the logs, and hudson is not available.

I can issue a bug report if needed.  Can anyone share any insight as to what may be available workarounds.

~ hf


SEVERE: Failed to initialize Hudson
java.lang.NoClassDefFoundError: hudson/Main (wrong name: Main)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        ....
Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 23, 2009 2:45:05 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/hudson] startup failed due to previous errors
bogo

Re: Error deploying 1.324 to tomcat

Reply Threaded More More options
Print post
Permalink
In reply to this post by hopfrog238
Had similar issue with 1.335, and yes, I got it resolved by commenting the entry in /etc/profile:
JAVA_HOME=/usr/lib/jvm/java-6-sun

I am not sure how it helped, but once I commented this entry in profile Hudson has started working. Maybe this hint will help someone.


Cheers,
/b