groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Eclipse Bugzilla by rtdigenielogiciel_gdc, 1 year ago
Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
via eclipse.org by Unknown author, 2 years ago
Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
via Stack Overflow by carlspring
, 1 year ago
Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
via eclipse.org by Unknown author, 1 year ago
Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
via eclipse.org by Unknown author, 1 year ago
Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
via Jenkins JIRA by Jesse Glick, 1 year ago
Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:578)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:156)
at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:115)
at hudson.remoting.LocalChannel.call(LocalChannel.java:38)
at hudson.util.RemotingDiagnostics.executeScript(RemotingDiagnostics.java:112)
at hudson.model.Hudson.doScript(Hudson.java:3574)
at hudson.model.Hudson.doScript(Hudson.java:3549)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:274)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:141)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:80)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:95)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:45)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:566)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:651)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:482)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:86)
at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:162)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:89)
at org.hudsonci.servlets.internal.ServletRegistrationFilterAdapter.doFilter(ServletRegistrationFilterAdapter.java:162)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:89)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:78)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:81)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:47)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:73)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:157)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at java.lang.Thread.run(Thread.java:744)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.