我想让我们的onfluence插件在Confluence 5.10.5下运行。 该插件需要一些在confluence / WEB-INF / lib中的依赖项。 我已经在我的pom.xml中定义了它们。 ...... org.hsqldb HSQLDB 2.3.4 提供
<dependency>
<groupId>.org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.1.0.Final</version>
<scope>provided</scope>
</dependency>
执行插件时,我收到错误
[INFO] [talledLocalContainer] org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDialects' in class info.novatec.testit.livingdoc.confluence.actions.server.InstallationAction threw exception java.lang.NoClassDefFoundError: org/hibernate/dialect/MySQL5Dialect at templates/livingdoc/configuration/installation/configurationDbmsEdit.vm[line 20, column 50]
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:237)
....
...
Caused by: java.lang.ClassNotFoundException:
org.hibernate.dialect.MySQL5Dialect not found by
info.novatec.testit.livingdoc.confluence.plugin [250]
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
如果我将所需的包添加到atlassia-plugin.xml 。org.hibernate.dialect *;分辨率:=&#34;强制性&#34; 在汇合启动时加载插件时出现以下错误
org.osgi.framework.BundleException: Unresolved constraint in bundle livingdoc.confluence.plugin [250]: Unable to resolve 250.0: missing requirement [250.0] osgi.wiring. package; (osgi.wiring.package=org.hibernate.dialect)
为了获得为插件类路径加载的confluence jar,我需要做什么?
答案 0 :(得分:0)
所以如果有人遇到同样的问题.. 我已经了解到hibernate不会因汇合而导致导入。 所以我不得不像hibernate-envers一样添加它作为依赖。