我目前正在關注Vespa教程,並遇到HTTP API use-case的問題。一切正常,從mvn install package
到vespa-deploy prepare target/application.zip
。Vespa教程 - HTTP API用例無法通過IllegalArgumentException激活
對vespa-deploy activate
的調用正常返回,但應用程序永遠無法在localhost:8080
上獲得。縱觀/opt/vespa/logs/vespa/vespa.log
(在VM)可以發現下面的堆棧跟蹤:
Container.com.yahoo.jdisc.core.StandaloneMain error Unexpected:
exception=
java.lang.IllegalArgumentException: Could not create a component with id 'com.mydomain.demo.DemoComponent'.
Tried to load class directly, since no bundle was found for spec: sample-app-http-api-searcher.
If a bundle with the same name is installed, there is a either a version mismatch or the installed bundle's version contains a qualifier string.
at com.yahoo.osgi.OsgiImpl.resolveFromClassPath(OsgiImpl.java:48)
...
發生這種情況,使用新的碼頭工人形象與sample-apps
git倉庫的乾淨克隆。準備和激活基本示例以及其他http示例都無縫工作。
我檢查了源和XML文件的明顯問題,但沒有任何線索有關什麼是失敗和在哪裏。
target/application.zip
包含
application/components/http-api-using-searcher-1.0.1-deploy.jar
application/hosts.xml
application/searchdefinitions/basic.sd
application/services.xml
而且罐子本身確實含有com/mydomain/demo/DemoComponent.class
文件(除其他事項外)。
在github上跟蹤潛在相關的問題:https://github.com/vespa-engine/vespa/issues/3479我將發佈一個鏈接到這個問題,有作爲,但我仍然認爲這是值得SO問題,至少要拿到vespa
標籤背後的一些行動:)
target/application.zip的內容是什麼?它抱怨說它無法將組件初始化爲'因爲沒有找到規範包:sample-app-http-api-searcher' – jkb
問題已更新。非常感謝您的及時答覆! – Shastick