Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过源代码编译利用LeaLone,运行PetStore报NoSuchMethodError #2

Closed
liujian16 opened this issue Dec 31, 2020 · 1 comment
Closed

Comments

@liujian16
Copy link

因为PetStore依赖的Lealone无法从github下载,clone了LeaLone的源代码,install到本地仓库。

运行PetStoreDemoTest报NoSuchMethodError

INFO 09:49:20.908 Lealone version: 5.0.0-SNAPSHOT
INFO 09:49:20.922 Loading config from file:/Users/xxx/codework/Lealone-Examples/petstore/petstore-test/target/test-classes/lealone.yaml
INFO 09:49:21.061 Base dir: ./target/data
INFO 09:49:21.134 Init storage engines: 13 ms
INFO 09:49:21.273 Init transaction engines: 138 ms
INFO 09:49:21.279 Init sql engines: 4 ms
INFO 09:49:21.329 Init protocol server engines: 49 ms
INFO 09:49:21.540 Init lealone database: 211 ms
INFO 09:49:21.540 Starting nio net server
INFO 09:49:21.570 TcpServer started, host: 127.0.0.1, port: 9210
INFO 09:49:22.241 Web root: ../petstore-web/web
INFO 09:49:22.242 Sockjs path: /_lealone_sockjs_/*
INFO 09:49:22.242 HttpServer is now listening on port: 9000
INFO 09:49:22.242 HttpServer started, host: 127.0.0.1, port: 9000
INFO 09:49:22.242 Total time: 1329 ms (Load config: 148 ms, Init: 479 ms, Start: 702 ms)
INFO 09:49:22.242 Exit with Ctrl+C
Exception in thread "PeriodicLogSyncService" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at org.lealone.db.DataBuffer.getAndFlipBuffer(DataBuffer.java:497)
	at org.lealone.transaction.aote.log.RedoLogChunk.write(RedoLogChunk.java:133)
	at org.lealone.transaction.aote.log.RedoLogChunk.save(RedoLogChunk.java:117)
	at org.lealone.transaction.aote.log.RedoLog.save(RedoLog.java:147)
	at org.lealone.transaction.aote.log.LogSyncService.sync(LogSyncService.java:101)
	at org.lealone.transaction.aote.log.LogSyncService.run(LogSyncService.java:76)

屏幕快照 2020-12-31 09 55 46

@liujian16
Copy link
Author

问题解决了。原因是我编译LeaLone是用的是Java 11, 换成Java 8就好了。 具体原因参见 plasma-umass/doppio#497 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant