Hello Kishan,
sorry for taking so long to answer - I was on holiday. Your solution
works and I can now continue with implementing the Huawei object store.
BIG THANKS to ALL for your help!
Regards,
Ronald
On 12/15/23 19:29, Kishan Kavala wrote:
Hi Ronald,
Here is what I found from the logs:
Error:
WARN [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Failed to
start module [root-ca] due to: [Failed to start bean 'cloudStackLifeCycle';
nested exception is java.lang.LinkageError: loader constraint violation: when
resolving method 'org.bouncycastle.cert.X509v3CertificateBuilder
org.bouncycastle.cert.X509v3CertificateBuilder.addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier,
boolean, org.bouncycastle.asn1.ASN1Encodable)' the class loader
org.eclipse.jetty.webapp.WebAppClassLoader @1d9295e2 of the current class,
org/apache/cloudstack/utils/security/CertUtils, and the class loader
org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f for the method's
defining class, org/bouncycastle/cert/X509v3CertificateBuilder, have different
Class objects for the type org/bouncycastle/asn1/ASN1ObjectIdentifier used in
the signature (org.apache.cloudstack.utils.security.CertUtils is in unnamed
module of loader org.eclipse.jetty.webapp.WebAppClassLoader @1d9295e2, parent
loader org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f;
org.bouncycastle.cert.X509v3CertificateBuilder is in unnamed module of loader
org.codehaus.plexus.classworlds.realm.ClassRealm @7fecc26f, parent loader
'bootstrap')].
Reason:
ASN1ObjectIdentifier has different versions in the dependencies of root-ca and
Huawei OBS(huaweicloud-sdk-iam) packages. java.lang.LinkageError happens when
code is compiled with dependency version say v1 and then is running with
dependency version say v2.
Solution:
Add provided scope to huaweicloud-sdk-iam dependency in Huawei OBS project.
This will mark dependencies that should be provided at runtime.
com.huaweicloud.sdk
huaweicloud-sdk-iam
3.1.69
provided
Regards,
Kishan
-Original Message-
From: Kishan Kavala
Sent: Friday, December 15, 2023 6:42 PM
To:dev@cloudstack.apache.org
Subject: RE: New Object Storage - Huawei OBS
Ronald,
The error is coming from rootca project after adding Huawei OBS plugin.
org.apache.cloudstack
cloud-plugin-ca-rootca
${project.version}
After removing the above from client/pom.xml, Huawei OBS plugin was loaded.
On the other hand, if I remove Huawei OBS plugin and keep rootca project, I see
no issues.
I'm investigating further, in the meantime removing rootca project can unblock
your development.
Regards,
Kishan
-Original Message-
From: Ronald Feicht
Sent: Friday, December 15, 2023 2:12 PM
To:dev@cloudstack.apache.org
Subject: Re: New Object Storage - Huawei OBS
Hi Kishan,
when I add my module to client/pom.xml I get the following error
andhttp://192.168.17.252:8080/client/ returns "HTTP ERROR 503 Service
Unavailable" because of the following exception:
[WARNING] Failed startup of context
o.e.j.m.p.JettyWebAppContext@1df8ea34{/client,file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/,UNAVAILABLE}{file:///opt/cloudstack-huawei-obs/client/target/classes/META-INF/webapp/}
java.lang.NullPointerException
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$1.with
(DefaultModuleDefinitionSet.java:104)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:263)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:268)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:268)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:268)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:268)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:268)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule
(DefaultModuleDefinitionSet.java:251)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.startContexts
(DefaultModuleDefinitionSet.java:96)
at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load
(DefaultModuleDefinitionSet.java:79)
at
org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules
(ModuleBasedContextFactory.java:37)
at
org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init
(CloudStackSpringContext.java:70)