Re: java.lang.VerifyError class net.sf.cglib.core.DebuggingClassWriter overrides final method visit.(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V

866 views
Skip to first unread message

David Whittaker

unread,
Jun 30, 2015, 12:21:25 PM6/30/15
to squ...@googlegroups.com
Hm... this is a new one for me.  It seems to be an issue with cglib, which is one of the libraries that Squeryl uses.  I wonder if finatra, which I have no experience with, uses cglib (or some other dependency you've introduced) and that's causing a different version of cglib to appear in the project?  Are you able to take a look at your dependency tree and see if that's the case?

On Thu, Jun 25, 2015 at 12:43 PM, carlo <cla...@gmail.com> wrote:
Hi guys, I'm receiving a weird error when I try integrate squeryl with finatra (I did a post yesterday but I can't find it in the group, so I reopen it)

I've this code
trait Schemas extends Schema {
val video = table[Video]
}

class VideoM extends Schemas{

def getVideos(off: Int = 0, pageCount: Int = 100) = {
inTransaction {
from(video)(b =>
select(b)).page(off, pageCount)
}

}
}

class HelloWorldServer extends HttpServer {
override def modules = Seq(LogbackModule)

Class.forName("org.h2.Driver")
SessionFactory.concreteFactory = Some(() =>
Session.create(
java.sql.DriverManager.getConnection("jdbc:h2:~/Downloads/proj/scalaPROJ/myVideoteca/db", "sa", ""),
new H2Adapter)
)


override def configureHttp(router: HttpRouter) {
router
.filter[LoggingMDCFilter[Request, Response]]
.filter[TraceIdMDCFilter[Request, Response]]
.filter[CommonFilters]
//.filter[SampleFilter3]
//.filter[SimpleLog]
.add (new HelloWorldController(new VideoM))
}
}

I'm receiving this error

java.lang.VerifyError: class net.sf.cglib.core.DebuggingClassWriter overrides final method visit.(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at net.sf.cglib.core.AbstractClassGenerator.<init>(AbstractClassGenerator.java:38)
	at net.sf.cglib.core.KeyFactory$Generator.<init>(KeyFactory.java:127)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:112)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
	at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
	at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
	at org.squeryl.internals.PosoMetaData.<init>(PosoMetaData.scala:221)
	at org.squeryl.View.<init>(View.scala:66)
	at org.squeryl.Table.<init>(Table.scala:29)
	at org.squeryl.Schema$class.table(Schema.scala:340)
	at com.twitter.hello.VideoM.table(Db.scala:80)
	at org.squeryl.Schema$class.table(Schema.scala:336)
	at com.twitter.hello.VideoM.table(Db.scala:80)
	at com.twitter.hello.Schemas$class.$init$(Db.scala:55)
	at com.twitter.hello.VideoM.<init>(Db.scala:80)
	at com.twitter.hello.HelloWorldServer.configureHttp(HelloWorldServer.scala:70)
	at com.twitter.finatra.http.HttpServer$class.postStartup(HttpServer.scala:39)
	at com.twitter.hello.HelloWorldServer.postStartup(HelloWorldServer.scala:51)
	at com.twitter.inject.app.App$class.main(App.scala:48)
	at com.twitter.hello.HelloWorldServer.com$twitter$inject$server$TwitterServer$$super$main(HelloWorldServer.scala:51)
	at com.twitter.inject.server.TwitterServer$class.main(TwitterServer.scala:33)
	at com.twitter.hello.HelloWorldServer.main(HelloWorldServer.scala:51)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.twitter.app.App$$anonfun$nonExitingMain$3.apply(App.scala:167)
	at com.twitter.app.App$$anonfun$nonExitingMain$3.apply(App.scala:166)
	at scala.Option.foreach(Option.scala:257)
	at com.twitter.app.App$class.nonExitingMain(App.scala:166)
	at com.twitter.hello.HelloWorldServer.nonExitingMain(HelloWorldServer.scala:51)
	at com.twitter.app.App$class.main(App.scala:132)
	at com.twitter.hello.HelloWorldServer.main(HelloWorldServer.scala:51)
	at com.twitter.hello.HelloWorldServerMain.main(HelloWorldServer.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at sbt.Run.invokeMain(Run.scala:67)
	at sbt.Run.run0(Run.scala:61)
	at sbt.Run.sbt$Run$$execute$1(Run.scala:51)
	at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:55)
	at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
	at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
	at sbt.Logger$$anon$4.apply(Logger.scala:85)
	at sbt.TrapExit$App.run(TrapExit.scala:248)
	at java.lang.Thread.run(Thread.java:745)
Exception thrown in main on startup

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
java.lang.RuntimeException: Nonzero exit code: 1
	at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last compile:run for the full output.
[error] (compile:run) Nonzero exit code: 1
[error] Total time: 21 s, completed Jun 25, 2015 12:08:08 PM


I don't know what this mean: java.lang.VerifyError: class net.sf.cglib.core.DebuggingClassWriter overrides final method visit.(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V

I suppose this must be a noob error but I can't found the reason, the code works perfect after integrate it with finatra, seems a problem between both codes...do you know what could be the cause? thanks!!!

--
You received this message because you are subscribed to the Google Groups "Squeryl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to squeryl+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages