1

我有一个需要使用 PlayORM 来完成插入/查询等工作的网络应用程序。我的代码在本地运行没有任何问题,但出现以下警告消息:

com.alvazan.orm.impl.meta.scan.ScannerForClass processIdFieldWorksWARN:我们避免重复扫描一个 class=class com.alvazan.orm.impl.meta.data.MetaClassSingle 一切仍然可以正常工作,但请向我们发送堆栈跟踪,以便我们可以看到为什么会发生这种情况 java.lang.RuntimeException: null at com.alvazan.orm.impl.meta.scan.ScannerForClass.processIdFieldWorks(ScannerForClass.java:234) [playorm-1.4.3.jar:1.4.3 December 13 2012]

但是当我尝试在 JSF 页面上执行该代码时,该代码不起作用。以下是错误信息:

INFO caoimpl.meta.scan.ScannerForClass - 扫描类=类 com.alvazan.orm.api.z8spi.meta.DboColumnMeta java.lang.RuntimeException: 失败扫描类(参见链式异常)=类 com.alvazan.orm.api。 z8spi.meta.DboColumnMeta

有人知道我能做些什么来解决这个问题吗?

更新:

  • 第一个堆栈跟踪 - 在本地运行良好(运行外部网站)

2013-02-13 19:20:18,173 com.alvazan.orm.impl.meta.scan.ScannerForClass processIdFieldWorksWARN:我们避免双重扫描一个类=类 com.alvazan.orm.impl.meta.data.MetaClassSingle 一切仍然有效很好,但是请向我们发送堆栈跟踪,以便我们了解为什么会发生这种情况 java.lang.RuntimeException: null at com.alvazan.orm.impl.meta.scan.ScannerForClass.processIdFieldWorks(ScannerForClass.java:234) [playorm- 1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectFieldImpl(ScannerForClass.java:206) [playorm-1.4.3.jar:1.4.3 December 13 2012] 在 com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectField(ScannerForClass.java:193) [playorm-1.4.3.jar:1.4.3 December 13 2012] 在 com.alvazan.orm.impl。 meta.scan.ScannerForClass.scanFields(ScannerForClass.java:188) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanSingle(ScannerForClass.java:111) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm .impl.meta.scan.ScannerForClass.scanMultipleClasses(ScannerForClass.java:104) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.impl.meta.scan.ScannerForClass.addClass( ScannerForClass.java:64) [playorm-1.4.3.jar:1.4.3 December 13 2012] 在 com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:42) [playorm-1.4.3。 jar:1.4.3 December 13 2012] at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.discovered(MyClassAnnotationDiscoveryListener.java:34) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.impetus .annovention.Discoverer.discoverAndIntimateForClassAnnotations(Discoverer.java:197) [playorm-1.4.3.jar:1.4.3 2012 年 12 月 13 日] 在 com.impetus.annovention.Discoverer.discover(Discoverer.java:155) [playorm-1.4.3.jar:1.4.3 2012 年 12 月 13 日] at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.rescan(BaseEntityManagerFactoryImpl.java:82) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl .setup(BaseEntityManagerFactoryImpl.java:133) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstanceImpl(BootstrapImpl.java:64) [playorm-1.4 .3.jar:1.4.3 December 13 2012] at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstance(BootstrapImpl.java:35) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:57) [playorm-1.4.3.jar:1.4.3 December 13 2012] 在 com。alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:52) [playorm-1.4.3.jar:1.4.3 December 13 2012] at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap .java:45) [playorm-1.4.3.jar:1.4.3 December 13 2012] 在 com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:24) [playorm-1.4.3.jar :1.4.3 December 13 2012] at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45) [classes/:na] at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager( PlayOrmConfiguration.java:51) [classes/:na] 在 com.s1mbi0se.dmp.da.dao.AbstractDao.getEm(AbstractDao.java:10) [classes/:na] 在 com.s1mbi0se.dmp.da.dao。 UserDao.findInputPhase(UserDao.java:201) [classes/:na] 在 com.s1mbi0se.dmp.da.bean.InputPhaseStru.manageInputPhase(InputPhaseStru.java:105) [classes/:na] 在 com.s1mbi0se.dashboard。服务。DashboardService.readSolrLogFile(DashboardService.java:44) [classes/:na] at com.s1mbi0se.dashboard.service.DashboardService.main(DashboardService.java:29) [classes/:na]

  • 第二个堆栈跟踪 - 不起作用(网络环境)

19:05:54.090 [http-bio-8080-exec-3] 信息 c.alvazan.orm.logging.NoSqlRawLogger - [rawlogger] 启动 NoSQL 服务提供程序并连接 19:05:54.101 [http-bio-8080-exec- 3] INFO caolsdcColumnFamilyHelper - On keyspace=dmpExisting column family=[inputphasestru, stringindice, dbocolumnmeta, integerindice, user, dbodatabasemeta, dbotablemeta] 注意:我们将在您保存没有列族的实体时自动创建新的列族 19:05:54.101 [http-bio-8080-exec-3] INFO caolbBaseEntityManagerFactoryImpl - 使用 nosql.Persistence.class 19:05:54.102 开始扫描 jars [http-bio-8080-exec-3] INFO ciannovention.ClasspathDiscoverer - 添加 jar 文件进行扫描=jar:file:/opt/apache-tomcat-7.0.30/wtpwebapps/teste28/WEB-INF/lib/playorm-1.4.3.jar!/ 19:05:54.102 [http-bio-8080-exec-3 ] 信息annovention.ClasspathDiscoverer - 添加用于扫描的 jar 文件=jar:file:/opt/apache-tomcat-7.0.30/lib/playorm-1.4.3.jar!/ 19:05:54.102 [http-bio-8080-exec- 3] INFO ciannovention.ClasspathDiscoverer - 添加用于扫描的 jar 文件=jar:file:/opt/apache-tomcat-7.0.30/wtpwebapps/teste28/WEB-INF/lib/dmpDataAccess-0.0.1-SNAPSHOT.jar!/ 19 :05:54.119 [http-bio-8080-exec-3] 调试 caolbMyClassAnnotationDiscoveryListener - class=com.alvazan.orm.api.z8spi.meta.DboColumnMeta anno=com.alvazan.orm.api.base.anno.NoSqlEntity 19: 05:54.119 [http-bio-8080-exec-3] INFO caoimpl.meta.scan.ScannerForClass - 扫描类=类 com.alvazan.orm.api.z8spi.meta.DboColumnMeta java.lang.RuntimeException:失败扫描类(见链式异常)=com.alvazan.orm.layer0.base 的类 com.alvazan.orm.api.z8spi.meta.DboColumnMeta。MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:44) 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) 在 com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.rescan(BaseEntityManagerFactoryImpl.java:82) 在 com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.setup (BaseEntityManagerFactoryImpl.java:133) 在 com.alvazan.orm.impl.bindings.BootstrapImpl.createInstanceImpl(BootstrapImpl.java:64) 在 com.alvazan.orm.impl.bindings.BootstrapImpl.createInstance(BootstrapImpl.java:35) 在com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:57) 在 com。alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:52) 在 com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:45) 在 com.alvazan.orm.api.base。 Bootstrap.create(Bootstrap.java:24) 在 com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45) 在 com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager(PlayOrmConfiguration.java: 51) 在 com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45) 在 com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager(PlayOrmConfiguration.java:51) 在 com.s1mbi0se.dmp .da.dao.AbstractDao.getEm(AbstractDao.java:10) 在 com.s1mbi0se.dmp.da.dao.UserDao.findInputPhase(UserDao.java:201) 在 com.s1mbi0se.dmp.da.bean.InputPhaseStru.manageInputPhase (InputPhaseStru.java:105) 在 com.s1mbi0se.dashboard.service.DashboardService。在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 javax.el.BeanELResolver.getValue(BeanELResolver.java:87 ) 在 javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67) 在 org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169) 在 org.apache.el.parser.AstValue。 getValue(AstValue.java:183) 在 org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185) 在 org.apache.jasper.el.JspValueExpression。getValue(JspValueExpression.java:106) 在 javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246) 在 javax.faces.component.UIOutput.getValue(UIOutput.java:67) 在 javax.faces.component.UIInput .getValue(UIInput.java:150) 在 org.apache.myfaces.shared.renderkit.RendererUtils.getValue(RendererUtils.java:505) 在 org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(RendererUtils.java:331 ) 在 org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:186) 在 org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.renderInputBegin(HtmlTextRendererBase.java:197)。 apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:75) 在 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:580) 在 javax。faces.component.UIComponent.encodeAll(UIComponent.java:762) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:758) at org.apache.myfaces.shared.view.JspViewDeclarationLanguageBase.actuallyRenderView(JspViewDeclarationLanguageBase.java: 362) 在 org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285) 在 org.apache.myfaces.lifecycle .RenderResponseExecutor.execute(RenderResponseExecutor.java:115) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199) at org. org.apache.catalina.core 中的 apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)。ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 在 org .apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) 在 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve .java:99) 在 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 在 org.apache.catalina。 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent .ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 原因: com.google.inject.ProvisionException:Guice 配置错误:908) 在 java.lang.Thread.run(Thread.java:662) 引起:com.google.inject.ProvisionException:Guice 提供错误:908) 在 java.lang.Thread.run(Thread.java:662) 引起:com.google.inject.ProvisionException:Guice 提供错误:

1) 注入构造函数时出错,java.lang.NoClassDefFoundError: Could not initialize class com.alvazan.orm.api.z8spi.meta.DboTableMeta at com.alvazan.orm.impl.meta.data.MetaClassInheritance.(MetaClassInheritance.java:25 ) 同时定位 com.alvazan.orm.impl.meta.data.MetaClassInheritance

在 com.alvazan.orm.impl.meta.data.MetaInfo.findOrCreate(MetaInfo.java:58) 在 com.alvazan 的 com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987) 出现 1 个错误。 orm.impl.meta.scan.ScannerForClass.addClass(ScannerForClass.java:59) at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:42) ... 63 更多原因:java.lang .NoClassDefFoundError:无法在 com.alvazan.orm.impl.meta.data.MetaAbstractClass.(MetaAbstractClass.java:17) 在 com.alvazan.orm.impl 初始化类 com.alvazan.orm.api.z8spi.meta.DboTableMeta .meta.data.MetaClassInheritance.(MetaClassInheritance.java:25) 在 com.alvazan.orm.impl.meta.data.MetaClassInheritance$$FastClassByGuice$$9298a112.newInstance() 在 com.google.inject.internal.cglib.reflect .$FastConstructor。newInstance(FastConstructor.java:40) 在 com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60) 在 com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) 在 com. google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) 在 com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) 在 com.google.inject.internal.InjectorImpl。 callInContext(InjectorImpl.java:1024) 在 com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ... 66 更多inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) 在 com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) 在 com.google.inject.internal.InjectorImpl.callInContext( InjectorImpl.java:1024) 在 com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ... 66 更多inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) 在 com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) 在 com.google.inject.internal.InjectorImpl.callInContext( InjectorImpl.java:1024) 在 com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ... 66 更多


遵循整个堆栈跟踪...

*** first stack trace - works fine locally (running outsite web)**

2013-02-13 19:20:18,173 com.alvazan.orm.impl.meta.scan.ScannerForClass processIdFieldWorksWARN: We avoided double scanning a class=class com.alvazan.orm.impl.meta.data.MetaClassSingle Everything will still work fine, but please send us the stack trace so we can see why this is happening
java.lang.RuntimeException: null
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.processIdFieldWorks(ScannerForClass.java:234) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectFieldImpl(ScannerForClass.java:206) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.inspectField(ScannerForClass.java:193) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanFields(ScannerForClass.java:188) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanSingle(ScannerForClass.java:111) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.scanMultipleClasses(ScannerForClass.java:104) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.addClass(ScannerForClass.java:64) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:42) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.discovered(MyClassAnnotationDiscoveryListener.java:34) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.impetus.annovention.Discoverer.discoverAndIntimateForClassAnnotations(Discoverer.java:197) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.impetus.annovention.Discoverer.discover(Discoverer.java:155) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.rescan(BaseEntityManagerFactoryImpl.java:82) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.setup(BaseEntityManagerFactoryImpl.java:133) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstanceImpl(BootstrapImpl.java:64) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.impl.bindings.BootstrapImpl.createInstance(BootstrapImpl.java:35) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:57) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:52) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:45) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:24) [playorm-1.4.3.jar:1.4.3 December 13 2012]
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45) [classes/:na]
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager(PlayOrmConfiguration.java:51) [classes/:na]
    at com.s1mbi0se.dmp.da.dao.AbstractDao.getEm(AbstractDao.java:10) [classes/:na]
    at com.s1mbi0se.dmp.da.dao.UserDao.findInputPhase(UserDao.java:201) [classes/:na]
    at com.s1mbi0se.dmp.da.bean.InputPhaseStru.manageInputPhase(InputPhaseStru.java:105) [classes/:na]
    at com.s1mbi0se.dashboard.service.DashboardService.readSolrLogFile(DashboardService.java:44) [classes/:na]
    at com.s1mbi0se.dashboard.service.DashboardService.main(DashboardService.java:29) [classes/:na]


*** second stack trace - not works ( web environment)**


19:05:54.090 [http-bio-8080-exec-3] INFO  c.alvazan.orm.logging.NoSqlRawLogger - [rawlogger] starting NoSQL Service Provider and connecting
19:05:54.101 [http-bio-8080-exec-3] INFO  c.a.o.l.s.d.c.ColumnFamilyHelper - On keyspace=dmpExisting column families=[inputphasestru, stringindice, dbocolumnmeta, integerindice, user, dbodatabasemeta, dbotablemeta]
NOTE: WE WILL CREATE new column families automatically as you save entites that have no column family
19:05:54.101 [http-bio-8080-exec-3] INFO  c.a.o.l.b.BaseEntityManagerFactoryImpl - Begin scanning for jars with nosql.Persistence.class
19:05:54.102 [http-bio-8080-exec-3] INFO  c.i.annovention.ClasspathDiscoverer - adding jar file for scanning=jar:file:/opt/apache-tomcat-7.0.30/wtpwebapps/teste28/WEB-INF/lib/playorm-1.4.3.jar!/
19:05:54.102 [http-bio-8080-exec-3] INFO  c.i.annovention.ClasspathDiscoverer - adding jar file for scanning=jar:file:/opt/apache-tomcat-7.0.30/lib/playorm-1.4.3.jar!/
19:05:54.102 [http-bio-8080-exec-3] INFO  c.i.annovention.ClasspathDiscoverer - adding jar file for scanning=jar:file:/opt/apache-tomcat-7.0.30/wtpwebapps/teste28/WEB-INF/lib/dmpDataAccess-0.0.1-SNAPSHOT.jar!/
19:05:54.119 [http-bio-8080-exec-3] DEBUG c.a.o.l.b.MyClassAnnotationDiscoveryListener - class=com.alvazan.orm.api.z8spi.meta.DboColumnMeta anno=com.alvazan.orm.api.base.anno.NoSqlEntity
19:05:54.119 [http-bio-8080-exec-3] INFO  c.a.o.impl.meta.scan.ScannerForClass - scanning class=class com.alvazan.orm.api.z8spi.meta.DboColumnMeta
java.lang.RuntimeException: Failure scanning class(see chained exception)=class com.alvazan.orm.api.z8spi.meta.DboColumnMeta
    at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:44)
    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:82)
    at com.alvazan.orm.layer0.base.BaseEntityManagerFactoryImpl.setup(BaseEntityManagerFactoryImpl.java:133)
    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.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:45)
    at com.alvazan.orm.api.base.Bootstrap.create(Bootstrap.java:24)
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45)
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager(PlayOrmConfiguration.java:51)
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45)
    at com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.getEntityManager(PlayOrmConfiguration.java:51)
    at com.s1mbi0se.dmp.da.dao.AbstractDao.getEm(AbstractDao.java:10)
    at com.s1mbi0se.dmp.da.dao.UserDao.findInputPhase(UserDao.java:201)
    at com.s1mbi0se.dmp.da.bean.InputPhaseStru.manageInputPhase(InputPhaseStru.java:105)
    at com.s1mbi0se.dashboard.service.DashboardService.readSolrLogFile(DashboardService.java:44)
    at com.s1mbi0se.dashboard.mbean.DashboardMBean.getTestehash(DashboardMBean.java:18)
    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 javax.el.BeanELResolver.getValue(BeanELResolver.java:87)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)
    at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:169)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:183)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
    at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:106)
    at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:67)
    at javax.faces.component.UIInput.getValue(UIInput.java:150)
    at org.apache.myfaces.shared.renderkit.RendererUtils.getValue(RendererUtils.java:505)
    at org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(RendererUtils.java:331)
    at org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.renderInputBegin(HtmlTextRendererBase.java:197)
    at org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:186)
    at org.apache.myfaces.shared.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:75)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:580)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:762)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:758)
    at org.apache.myfaces.shared.view.JspViewDeclarationLanguageBase.actuallyRenderView(JspViewDeclarationLanguageBase.java:362)
    at org.apache.myfaces.shared.view.JspViewDeclarationLanguageBase.renderView(JspViewDeclarationLanguageBase.java:199)
    at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:115)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: Could not initialize class com.alvazan.orm.api.z8spi.meta.DboTableMeta
  at com.alvazan.orm.impl.meta.data.MetaClassInheritance.<init>(MetaClassInheritance.java:25)
  while locating com.alvazan.orm.impl.meta.data.MetaClassInheritance

1 error
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
    at com.alvazan.orm.impl.meta.data.MetaInfo.findOrCreate(MetaInfo.java:58)
    at com.alvazan.orm.impl.meta.scan.ScannerForClass.addClass(ScannerForClass.java:59)
    at com.alvazan.orm.layer0.base.MyClassAnnotationDiscoveryListener.scanClass(MyClassAnnotationDiscoveryListener.java:42)
    ... 63 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.alvazan.orm.api.z8spi.meta.DboTableMeta
    at com.alvazan.orm.impl.meta.data.MetaAbstractClass.<init>(MetaAbstractClass.java:17)
    at com.alvazan.orm.impl.meta.data.MetaClassInheritance.<init>(MetaClassInheritance.java:25)
    at com.alvazan.orm.impl.meta.data.MetaClassInheritance$$FastClassByGuice$$9298a112.newInstance(<generated>)
    at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
    at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
    at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
    at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
    ... 66 more

谢谢 !

安德烈

4

1 回答 1

1

好的,确实有两个不同的问题正在发生

  1. 你为什么要进行第二次扫描
  2. NoClassDefFoundError

让我们先解决 NoClassDefFoundError。请不要生气,但我将从基础开始,因为我不知道你的水平,所以你可能已经知道这些东西。

  1. 我们看到 NoClassDefError 或基本上是http://docs.oracle.com/javase/6/docs/api/java/lang/NoClassDefFoundError.html
  2. 我们知道如果缺少 jar 可能会发生这种情况,但是在代码中我们看到它是从另一个应该在同一个 jar 中的类调用的
  3. 另一次我们得到这个错误是我们在某个框架新创建的类加载器中
  4. 在这条线上 com.s1mbi0se.dmp.da.dao.PlayOrmConfiguration.init(PlayOrmConfiguration.java:45) 你应该像这样添加一行

    类 temp = DboColumnMeta.class 类 temp2 = MetaAbstractClass.class temp.getSimpleName(); temp2.​​getSimpleName();

如果您的代码看不到该类,那么这当然是您的代码无法访问它的问题。这是否通过?

让我们跳到问题#1,这不是一个关键问题。在最新版本中,我们添加了 if(log.isDebugEnabled()) savePreviousTrace() 以便我们可以同时获取两个跟踪。如果你有时间,你可以从 git 中检查出来,如果你在 windows 上运行“./gradlew build”或“gradle.bat build”。

让我知道数字 2 的状态,因为如果它在代码下方失败,那么“应该”上面的那些行会失败。

谢谢,院长

于 2013-02-14T21:01:46.633 回答