scooter startup problem - java.lang.ClassNotFoundException: classWork failed on XXX

80 views
Skip to first unread message

stark

unread,
Jan 16, 2013, 4:45:38 AM1/16/13
to scooter-...@googlegroups.com
Hello John,


Happy New Year! waaazzuupp..


I think i just found out a bug, i have encountered this like three times already since the last recent version, but filing it now... 

Everything's ok on my side but this time, when i just started scooter, i quickly did an alt+tab, switched to my browser and keep on spamming refresh on my page, then suddenly this.

Even if I restart the app. 

The only solution that i did was to delete the work directory of jetty AND delete on my existing class files, then let scooter again regenerate it again, then restarted scooter and it worked.



Thank You.






---------------- start snip ------------------


13/01/16 17:28:08,978 ERROR EmployeeController - Failed to instantiate class "com.dev1.models.Employee". Details: java.lang.ClassNotFoundException: classWork failed on com.dev1.models.Employee: by java.lang.ClassFormatError: Truncated class file.
com.scooterframework.common.exception.ObjectCreationException: Failed to instantiate class "com.dev1.models.Employee". Details: java.lang.ClassNotFoundException: classWork failed on com.dev1.models.Employee: by java.lang.ClassFormatError: Truncated class file.
at com.scooterframework.common.util.ObjectFactory.newInstance(ObjectFactory.java:53)
at com.scooterframework.orm.activerecord.ActiveRecordUtil.getHomeInstance(ActiveRecordUtil.java:412)
at com.scooterframework.orm.activerecord.RelationManager.setupRelation(RelationManager.java:116)
at com.scooterframework.orm.activerecord.ActiveRecord.hasMany(ActiveRecord.java:1946)
at com.dev1.models.Employee.registerRelations(Employee.java:25)
at com.scooterframework.orm.activerecord.RelationManager._registerRelations(RelationManager.java:756)
at com.scooterframework.orm.activerecord.RelationManager.getRelation(RelationManager.java:327)
at com.scooterframework.orm.activerecord.IncludeHelper.constructIncludeNode(IncludeHelper.java:132)
at com.scooterframework.orm.activerecord.IncludeHelper.initializeIncludeNodeList(IncludeHelper.java:100)
at com.scooterframework.orm.activerecord.IncludeHelper.<init>(IncludeHelper.java:64)
at com.scooterframework.orm.activerecord.IncludeHelper.<init>(IncludeHelper.java:70)
at com.scooterframework.orm.activerecord.TableGateway.internal_findAll_include(TableGateway.java:1756)
at com.scooterframework.orm.activerecord.TableGateway.findAll(TableGateway.java:903)
at com.scooterframework.orm.activerecord.TableGateway.findFirst(TableGateway.java:1132)
at com.scooterframework.orm.activerecord.QueryBuilder.getRecord(QueryBuilder.java:61)
at com.dev1.controllers.EmployeeController.show(EmployeeController.java:40)
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 com.scooterframework.web.controller.BaseRequestProcessor.executeControllerAction(BaseRequestProcessor.java:390)
at com.scooterframework.web.controller.BaseRequestProcessor.executeRequest(BaseRequestProcessor.java:186)
at com.scooterframework.web.controller.RestfulRequestProcessor.executeRequest(RestfulRequestProcessor.java:63)
at com.scooterframework.web.controller.BaseRequestProcessor.process(BaseRequestProcessor.java:108)
at com.scooterframework.web.controller.MainActionServlet.process(MainActionServlet.java:199)
at com.scooterframework.web.controller.MainActionServlet.service(MainActionServlet.java:168)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at com.scooterframework.web.controller.ScooterRequestFilter.doFilter(ScooterRequestFilter.java:138)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:322)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.ClassNotFoundException: classWork failed on com.dev1.models.Employee: by java.lang.ClassFormatError: Truncated class file
at com.scooterframework.autoloader.ClassWork.changeClass(ClassWork.java:72)
at com.scooterframework.autoloader.MyClassLoader.loadClass(MyClassLoader.java:66)
at com.scooterframework.autoloader.MyClassLoader.loadMyClass(MyClassLoader.java:50)
at com.scooterframework.autoloader.ClassManager.loadMyClass(ClassManager.java:47)
at com.scooterframework.orm.sqldataexpress.util.OrmObjectFactory.loadClass(OrmObjectFactory.java:34)
at com.scooterframework.common.util.ObjectFactory.newInstance(ObjectFactory.java:50)
... 49 more
Caused by: javassist.CannotCompileException: by java.lang.ClassFormatError: Truncated class file
at javassist.ClassPool.toClass(ClassPool.java:1085)
at javassist.CtClass.toClass(CtClass.java:1151)
at com.scooterframework.autoloader.ClassWork.changeClass(ClassWork.java:63)
... 54 more
Caused by: java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
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 javassist.ClassPool.toClass2(ClassPool.java:1098)
at javassist.ClassPool.toClass(ClassPool.java:1079)
... 56 more
13/01/16 17:28:08,983 DEBUG RestfulRequestProcessor - execution result: render=>


---------------- end snip ------------------



John Chen

unread,
Jan 16, 2013, 8:43:39 PM1/16/13
to scooter-...@googlegroups.com
Happy New Year!

Not quite clear what happened to your app. Did you do "Alt+Tab" too quickly before Scooter compiles model classes? :)
Reply all
Reply to author
Forward
0 new messages