playorm cassandra日期转换错误

z4bn682m  于 2021-06-15  发布在  Cassandra
关注(0)|答案(2)|浏览(370)

我已经通过maven建立了playorm。
我的主类基本上是从这里的示例复制的。
每件事都设置正确,似乎很好,但我得到一些日期转换错误排序。
堆栈跟踪如下:

Exception in thread "main" java.lang.NoSuchMethodError: org.joda.time.LocalDateTime.toDate()Ljava/util/Date;
at com.alvazan.orm.api.base.spi.UniqueKeyGenerator.<clinit>(UniqueKeyGenerator.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.alvazan.orm.api.z8spi.meta.ReflectionUtil.create(ReflectionUtil.java:11)
at com.alvazan.orm.impl.meta.scan.ScannerForField.processId(ScannerForField.java:94)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.processIdFieldWorks(ScannerForClass.java:235)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectFieldImpl(ScannerForClass.java:207)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectField(ScannerForClass.java:194)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanFields(ScannerForClass.java:189)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanSingle(ScannerForClass.java:112)
at com.alvazan.orm.impl.meta.scan.ScannerForClass.addClass(ScannerForClass.java:69)
at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:42)
at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.discovered(MyClassAnnotationDiscoveryListener.java:34)
at com.impetus.annovention.Discoverer.discoverAndIntimateForClassAnnotations(Discoverer.java:197)
at com.impetus.annovention.Discoverer.discover(Discoverer.java:155)
at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.rescan(BaseEntityManagerFactoryImpl.java:80)
at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.setup(BaseEntityManagerFactoryImpl.java:131)
at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstanceImpl(BootstrapImpl.java:64)
at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstance(BootstrapImpl.java:35)
at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:57)
at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:52)
at com.sample.cass.store.Example.main(Example.java:22)
llycmphe

llycmphe1#

我也有同样的问题。原因是“jruby-complete-1.6.5”库附带了“jodatime1.6.2”。

piztneat

piztneat2#

你能在这里复制粘贴你的代码并填写错误日志吗。从您粘贴的日志来看,似乎:
在你的类路径中有一些不同版本的jodatime的jar,它没有这个方法。

您复制的stacktrace不完整,问题类似于playorm能否利用顺序数据布局?当它抛出错误时(uniquekeygenerator.java的第32行)

相关问题