Hi Olivier,

>> First I tried Cassandra 4.0.4, but Archiva could not connect. Is it
>> correct that Archiva needs Thrift (which was removed in Cassandra 4)?
>
> oh yes we need some update there.

A small hint in the docs would be enough to save other lost souls like me. :)


>> "InvalidRequestException(why:unconfigured table metadatafacet)"
>>
>> I have created a keyspace in Cassandra, but nothing else. Do I have to
>> create some tables by hand?
>
> normally not keyspace should work. maybe you could try with some debug
> level activated to have more details?

Please find the logs with "debug" level here: 
https://raw.githubusercontent.com/muhkuh-sys/archiva_cassandra_test/master/logs/archiva.log
I tried to find something useful, but no luck. Here is the exception:

2022-07-18 18:12:59,294 [WrapperSimpleAppMain] DEBUG 
me.prettyprint.cassandra.connection.client.HThriftClient [] - keyspace reseting 
from null to archiva
2022-07-18 18:12:59,305 [WrapperSimpleAppMain] DEBUG 
me.prettyprint.cassandra.connection.client.HThriftClient [] - Closing client 
CassandraClient<10.4.34.2:9160-2>
2022-07-18 18:12:59,305 [WrapperSimpleAppMain] DEBUG 
me.prettyprint.cassandra.connection.client.HThriftClient [] - Creating a new 
thrift connection to 10.4.34.2(10.4.34.2):9160
2022-07-18 18:12:59,306 [WrapperSimpleAppMain] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory [] - 
Retrieved dependent beans for bean 'metadataResolver#default': 
[repositorySessionFactory#jcr, repositorySessionFactory#cassandra]
2022-07-18 18:12:59,306 [WrapperSimpleAppMain] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory [] - 
Retrieved dependent beans for bean 'auditListener#metadata': 
[remoteRepositoryAdmin#default]
2022-07-18 18:12:59,306 [WrapperSimpleAppMain] DEBUG 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor [] - 
Invoking destroy method on bean 'remoteRepositoryAdmin#default': private void 
org.apache.archiva.admin.repository.remote.DefaultRemoteRepositoryAdmin.shutdown()
 throws org.apache.archiva.admin.model.RepositoryAdminException
2022-07-18 18:12:59,310 [WrapperSimpleAppMain] WARN  
org.springframework.web.context.support.XmlWebApplicationContext [] - Exception 
encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'ldapGroupMappingService#rest': Injection of autowired dependencies 
failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.redback.common.ldap.role.LdapRoleMapper 
org.apache.archiva.redback.rest.services.DefaultLdapGroupMappingService.ldapRoleMapper;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'ldapRoleMapper#default': Injection of autowired 
dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private 
org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory 
org.apache.archiva.redback.common.ldap.role.DefaultLdapRoleMapper.ldapConnectionFactory;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'ldapConnectionFactory#archiva': Injection of 
autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.redback.configuration.UserConfiguration 
org.apache.archiva.redback.common.ldap.connection.ConfigurableLdapConnectionFactory.userConf;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'redbackRuntimeConfigurationAdmin#default': 
Injection of autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private java.util.List 
org.apache.archiva.admin.repository.AbstractRepositoryAdmin.auditListeners; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'auditListener#metadata': Injection of autowired 
dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.metadata.repository.RepositorySessionFactory 
org.apache.archiva.audit.MetadataAuditListener.repositorySessionFactory; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'repositorySessionFactory#file': Injection of autowired 
dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.metadata.repository.MetadataResolver 
org.apache.archiva.metadata.repository.file.FileRepositorySessionFactory.metadataResolver;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'metadataResolver#default': Injection of 
autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.metadata.repository.storage.RepositoryStorage 
org.apache.archiva.metadata.repository.DefaultMetadataResolver.repositoryStorage;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'repositoryStorage#maven2': Injection of 
autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin 
org.apache.archiva.metadata.repository.storage.maven2.Maven2RepositoryStorage.managedRepositoryAdmin;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'managedRepositoryAdmin#default': Injection of 
autowired dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private 
org.apache.archiva.scheduler.repository.model.RepositoryArchivaTaskScheduler 
org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin.repositoryTaskScheduler;
 nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'archivaTaskScheduler#repository': Invocation of 
init method failed; nested exception is 
me.prettyprint.hector.api.exceptions.HInvalidRequestException: 
InvalidRequestException(why:unconfigured table metadatafacet)
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
 ~[spring-beans-4.2.1.RELEASE.jar:4.2.1.RELEASE]


I dumped my steps into an Ansible script in this repo: 
https://github.com/muhkuh-sys/archiva_cassandra_test
It sets up a Cassandra cluster on 3 VMs, creates the keyspace and installs 
Archiva.
Here are the Archiva configuration files: 
https://github.com/muhkuh-sys/archiva_cassandra_test/tree/master/roles/archiva/files
Maybe it helps to find my error.

Thanks for your time,
--
Chris

________________________________
From: Olivier Lamy <ol...@apache.org>
Sent: Thursday, July 14, 2022 10:02 AM
To: users@archiva.apache.org <users@archiva.apache.org>
Subject: Re: Cassandra setup

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. Never provide your password!
VORSICHT: Diese E-Mail kommt von einem externen Absender. Bitte keine Links 
anklicken oder Anlagen öffnen falls Sie den Absender nicht kennen. Niemals Ihr 
Kennwort eingeben!


On Mon, 11 Jul 2022 at 22:06, Christoph Thelen <cthe...@hilscher.com> wrote:

> Hi all,
>
> I'm trying to run Archiva 2.2.8 standalone with Cassandra for Metadata as
> described here:
> https://archiva.apache.org/docs/2.2.8/adminguide/repositories-content-storage.html
> . First I tried Cassandra 4.0.4, but Archiva could not connect. Is it
> correct that Archiva needs Thrift (which was removed in Cassandra 4)?
>

oh yes we need some update there.


> Next try was Cassandra 3.11.13, but Archiva stopped with the following
> exception:
>
> "InvalidRequestException(why:unconfigured table metadatafacet)"
>
> I have created a keyspace in Cassandra, but nothing else. Do I have to
> create some tables by hand?
>

normally not keyspace should work. maybe you could try with some debug
level activated to have more details?

cheers
Olivier


>
> Thanks for your help,
> --
> Chris
>
>
> Hilscher Gesellschaft für Systemautomation mbH   |  Rheinstrasse 15  |
> 65795 Hattersheim  |  Germany  |  www.hilscher.com<http://www.hilscher.com
> >
> Sitz der Gesellschaft / place of business: Hattersheim  |  Geschäftsführer
> / managing director: Sebastian Hilscher, Hans-Jürgen Hilscher
> Handelsregister / commercial register: Frankfurt B 26873  |  Ust. Idnr. /
> VAT No.: DE113852715
> Registergericht / register court: Amtsgericht Frankfurt/Main
>
> Important Information:
> This e-mail message including its attachments contains confidential and
> legally protected information solely intended for the addressee. If you are
> not the intended addressee of this message, please contact the addresser
> immediately and delete this message including its attachments. The
> unauthorized dissemination, copying and change of this e-mail are strictly
> forbidden. The addresser shall not be liable for the content of such
> changed e-mails.
>
> Wichtiger Hinweis:
> Diese E-Mail einschließlich ihrer Anhänge enthält vertrauliche und
> rechtlich geschützte Informationen, die nur für den Adressaten bestimmt
> sind. Sollten Sie nicht der bezeichnete Adressat sein, so teilen Sie dies
> bitte dem Absender umgehend mit und löschen Sie diese Nachricht und ihre
> Anhänge. Die unbefugte Weitergabe, das Anfertigen von Kopien und jede
> Veränderung der E-Mail ist untersagt. Der Absender haftet nicht für Inhalte
> von veränderten E-Mails.
>

Hilscher Gesellschaft für Systemautomation mbH   |  Rheinstrasse 15  |  65795 
Hattersheim  |  Germany  |  www.hilscher.com<http://www.hilscher.com>
Sitz der Gesellschaft / place of business: Hattersheim  |  Geschäftsführer / 
managing director: Sebastian Hilscher, Hans-Jürgen Hilscher
Handelsregister / commercial register: Frankfurt B 26873  |  Ust. Idnr. / VAT 
No.: DE113852715
Registergericht / register court: Amtsgericht Frankfurt/Main

Important Information:
This e-mail message including its attachments contains confidential and legally 
protected information solely intended for the addressee. If you are not the 
intended addressee of this message, please contact the addresser immediately 
and delete this message including its attachments. The unauthorized 
dissemination, copying and change of this e-mail are strictly forbidden. The 
addresser shall not be liable for the content of such changed e-mails.

Wichtiger Hinweis:
Diese E-Mail einschließlich ihrer Anhänge enthält vertrauliche und rechtlich 
geschützte Informationen, die nur für den Adressaten bestimmt sind. Sollten Sie 
nicht der bezeichnete Adressat sein, so teilen Sie dies bitte dem Absender 
umgehend mit und löschen Sie diese Nachricht und ihre Anhänge. Die unbefugte 
Weitergabe, das Anfertigen von Kopien und jede Veränderung der E-Mail ist 
untersagt. Der Absender haftet nicht für Inhalte von veränderten E-Mails.

Reply via email to