1. 程式人生 > >SpagoBI圓夢繫列1——Metamodel Service returns null value

SpagoBI圓夢繫列1——Metamodel Service returns null value

在建立完資料來源,資料集和商業模型目錄後,在我的資料中點選之前建立的模型,報錯:

【後臺控制檯異常】

it.eng.spagobi.utilities.engines.EngineStartupExceptionTrapAction.logError: Impossible to create engine instance for document [null].
The root cause of the error is: Metamodel Service returns null value
it.eng.spagobi.utilities.engines.EngineStartupExceptionTrapAction.logError: The error root cause is: Metamodel Service returns null value
it.eng.spagobi.utilities.engines.EngineStartupExceptionTrapAction.logError: The error root cause stack trace is:
it.eng.spagobi.utilities.engines.SpagoBIEngineRuntimeException: Impossible to load jar file of metamodel [zhjfdbmodel] from SpagoBiServer

at it.eng.spagobi.tools.dataset.utils.datamart.DefaultEngineDatamartRetriever.downloadJarFile(DefaultEngineDatamartRetriever.java:123)
at it.eng.spagobi.tools.dataset.utils.datamart.DefaultEngineDatamartRetriever.retrieveDatamartFile(DefaultEngineDatamartRetriever.java:95)
at it.eng.spagobi.engines.qbe.datasource.QbeDataSourceManager.getORMDataSource(QbeDataSourceManager.java:73)
at it.eng.spagobi.engines.qbe.datasource.QbeDataSourceManager.getDataSource(QbeDataSourceManager.java:51)
at it.eng.spagobi.engines.qbe.QbeEngineInstance.<init>(QbeEngineInstance.java:86)
at it.eng.spagobi.engines.qbe.QbeEngineInstance.<init>(QbeEngineInstance.java:58)
at it.eng.spagobi.engines.qbe.QbeEngine.createInstance(QbeEngine.java:53)
at it.eng.spagobi.engines.qbe.services.initializers.QbeEngineStartAction.service(QbeEngineStartAction.java:81)
at it.eng.spago.dispatching.action.ActionCoordinator.invokeServiceBusiness(ActionCoordinator.java:209)
at it.eng.spago.dispatching.action.ActionCoordinator.service(ActionCoordinator.java:158)
at it.eng.spago.dispatching.httpchannel.AdapterHTTP.service(AdapterHTTP.java:496)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at it.eng.spagobi.utilities.filters.AntiInjectionFilter.doFilter(AntiInjectionFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at it.eng.spagobi.utilities.filters.SpagoBIAccessFilter.doFilter(SpagoBIAccessFilter.java:190)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at it.eng.spagobi.utilities.filters.EngineCheckSessionFilter.doFilter(EngineCheckSessionFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at it.eng.spagobi.utilities.filters.EncodingFilter.doFilter(EncodingFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: it.eng.spagobi.utilities.engines.SpagoBIEngineRuntimeException: Metamodel Service returns null value
at it.eng.spagobi.tools.dataset.utils.datamart.DefaultEngineDatamartRetriever.downloadJarFile(DefaultEngineDatamartRetriever.java:120)
... 44 more


【分析】

1.百度上搜索不到任何有價值的東西

2.google上搜出一兩篇,結果只有提問,沒有解答!看到這些提問覺得挺好笑的——看來SpagoBI能用好的實在太少!

3、後來進行程式碼debug跟蹤,發現問題出現是因為沒有在SBI_META_MODELS_VERSIONS這張表中建立對應的記錄,通過仔細的程式碼閱讀,發現問題源自商業模型目錄建立,是因為需要上傳模型jar包才行(這麼重要的資訊,頁面居然沒有強校驗或者提示,汗)!看看官方例子就知道了。



【解決方案】

怎麼建立這個jar包呢,搜尋一番發現了一片好文章,《spagobi_server_Create+the+datamart》,照著做就可以了。

然後重新匯入這個jar包,即可。

至於裡面需要填寫的相關元資料,後續有空再補上吧。


文章結束。


chanson 2017-06-09 廈門