Problem importing a database for a new instance with tool org.cyclos.db.DeleteNetworkData

Bug and problem reporting on Cyclos 4 version

Moderators: rmvanarkel, hugo, alexandre

Post Reply
aurelienbisotti
Posts: 18
Joined: Tue Dec 08, 2020 4:01 pm

Problem importing a database for a new instance with tool org.cyclos.db.DeleteNetworkData

Post by aurelienbisotti »

Hello,

We have a 4.12 database dump.

We want to transfer the configuration to a new 4.14 instance, but delete all the data about users and transactions.
So we'll only keep configuration and translations.


We followed this :
https://documentation.cyclos.org/4.12/c ... nance.html

1.4.1 OK with Cyclos 4.12 instance
1.4.2 OK with 4.14 instance
1.4.5 OK
From there we can connect on the 4.14 instance and all seems fine

1.4.6 : NOK
We stop the instance, then we type :
java -cp "WEB-INF/classes:../../lib/*:WEB-INF/lib/*:/path-to-tomcat/lib" \
org.cyclos.db.DeleteNetworkData

But we have this error :
WARN AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cyclosProperties' defined in org.cyclos.db.DeleteNetworkData$SpringConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.cyclos.server.utils.CyclosProperties]: Factory method 'cyclosProperties' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cyclosPropertiesFactory' defined in org.cyclos.db.DeleteNetworkData$SpringConfiguration: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.cyclos.bootstrap.CyclosPropertiesFactoryBean] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cyclosProperties' defined in org.cyclos.db.DeleteNetworkData$SpringConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.cyclos.server.utils.CyclosProperties]: Factory method 'cyclosProperties' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cyclosPropertiesFactory' defined in org.cyclos.db.DeleteNetworkData$SpringConfiguration: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.cyclos.bootstrap.CyclosPropertiesFactoryBean] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82]


On this instance, we use docker (cyclos/cyclos:4.14)

Any idea why the tool "java -cp "WEB-INF/classes:../../lib/*:WEB-INF/lib/*:/path-to-tomcat/lib" \
org.cyclos.db.DeleteNetworkData " did not work ?

Thanks
aurelienbisotti
Posts: 18
Joined: Tue Dec 08, 2020 4:01 pm

Re: Problem importing a database for a new instance with tool org.cyclos.db.DeleteNetworkData

Post by aurelienbisotti »

Update : there seems to be a typo in the documentation.

The devs say this works :

cd /usr/local/cyclos
java -cp "WEB-INF/classes:WEB-INF/lib/*:/usr/local/tomcat/lib/*" org.cyclos.db.DeleteNetworkData
Post Reply