我正在尝试部署 Java Play!2 应用。我的 Bamboo 服务器正在运行play clean dist
,它会生成一个包含已部署应用程序的 zip 文件。Bamboo 然后解压缩文件,并将符号(命名为当前)链接更改为这个新文件夹。
然后,手动(现在)我想运行start
脚本但java.lang.IncompatibleClassChangeError
抛出异常:
root # pwd
/home/webserver/current/
root # ./start
Play server process ID is 9795
[info] play - datasource [jdbc:mysql://XXX/XXX] bound to JNDI as DefaultDS
[debug] c.j.b.BoneCPDataSource - JDBC URL = jdbc:mysql://XXX/XXX, Username = lmc, artitions = 3, max (per partition) = 5, min (per partition) = 2, helper threads = 3, idle max ge = 10 min, idle test period = 5 min
[info] play - database [default] connected at jdbc:mysql://XXX/XXX
Oops, cannot start the server.
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
at play.db.jpa.JPAPlugin.onStart(JPAPlugin.java:35)
at play.api.Play$$anonfun$start$1.apply(Play.scala:60)
at play.api.Play$$anonfun$start$1.apply(Play.scala:60)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at play.api.Play$.start(Play.scala:60)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:51)
at play.core.server.NettyServer$.createServer(NettyServer.scala:133)
at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:162)
at play.core.server.NettyServer$$anonfun$main$5.apply(NettyServer.scala:161)
at scala.Option.map(Option.scala:133)
at play.core.server.NettyServer$.main(NettyServer.scala:161)
at play.core.server.NettyServer.main(NettyServer.scala)
我已经阅读了很多关于这个错误的帖子,但现在没有什么可以解决我的问题。我试图将文件夹复制到另一个地方,就像这样:
root # cp -r /home/webserver/current /root/webserver-current
root # cd /root/webserver-current
root # ./start
在这里,我的应用程序正在运行,而不是异常!:-O 我的结论是它不适用于/home
分区,但我不敢相信!你有什么想法或解决方案让它工作吗?
问候,塞缪尔。