[DNSSHIM] Migration from version 1.x

Francisco Barretto kikobarretto at gmail.com
Tue Sep 4 13:49:05 BRT 2012


Mauro,

It was worthy trying adding the quotes ahahah. Anyway, the variable was not
exported. I'm not sure if I missed that part of exporting this variable or
it was missing from the migration instructions. So I did export the
variable and the db-migration runned smooth, no errors. Now I'll try to use
it and see if everything runs fine.

Tue Sep 04 13:45:28 BRT 2012: Building zone paths
Tue Sep 04 13:45:28 BRT 2012: Reading zone files
Tue Sep 04 16:45:29 UTC 2012:204 zones read
Tue Sep 04 16:45:29 UTC 2012: reading key files
Tue Sep 04 16:45:31 UTC 2012: Saving to database
Tue Sep 04 16:45:31 UTC 2012: Done migrating 204 zones

Thanks!

Francisco Barretto
Doutorando PPG-Arte - Arte e Tecnologia

Laboratório de Pesquisa em Arte Computacional (Midialab)
Departamento de Artes Visuais
Instituto de Artes
Universidade de Brasília - UnB
Campus Universitário Darcy Ribeiro
Asa Norte
70910-900, Brasília - DF

www.ciurbi.wordpress.com
www.wikinarua.com
www.tectecbaratinha.wordpress.com
www.flickr.com/photos/meiotijolo


2012/9/4 Mauro Romano Trajber <mauro at registro.br>

>  Francisco,
>
> Quotes are not necessary on xfrd.properties.
>
> It seems that db-migration is parsing another configuration file. Is
> DNSSHIM_HOME environment variable exported ?
>
>
>
>
> On 09/04/2012 11:35 AM, Francisco Barretto wrote:
>
> Hi Mauro!
>
> Thanks for you answer. Here is what my xfrd.properties looks like:
>
> database_dialect=org.hibernate.dialect.MySQL5InnoDBDialect
> database_driver_class=com.mysql.jdbc.Driver
> database_host=localhost
> database_name='dns' (already tried with and without quotes)
> database_password='******' (already tried with and without quotes)
> database_port=3306
> database_username='root' (already tried with and without quotes)
> database_vendor=mysql
>
> I've kept the folder hierarchies found on compressed file. I mean these
> files/folders are at the same level:
> ChangeLog          dnsshim-signer.jar  lib                      README.txt
> CreateZoneDirs.sh  dnsshim-xfrd.jar    log4j-signer.properties
> SlaveSync.sh
> db-migration.jar   doc                 log4j-xfrd.properties
>
>
>
>
> Francisco Barretto
> Doutorando PPG-Arte - Arte e Tecnologia
>
> Laboratório de Pesquisa em Arte Computacional (Midialab)
> Departamento de Artes Visuais
> Instituto de Artes
> Universidade de Brasília - UnB
> Campus Universitário Darcy Ribeiro
> Asa Norte
> 70910-900, Brasília - DF
>
> www.ciurbi.wordpress.com
> www.wikinarua.com
> www.tectecbaratinha.wordpress.com
> www.flickr.com/photos/meiotijolo
>
>
> 2012/9/4 Mauro Romano Trajber <mauro at registro.br>
>
>>  Hi Francisco,
>>
>> Can I see your xfrd.properties entries that start with "database_" ?
>>
>> For MySQL as DBMS, the configuration must be something like that:
>>
>> database_dialect=org.hibernate.dialect.MySQL5InnoDBDialect
>> database_driver_class=com.mysql.jdbc.Driver
>> database_host=<your mysql host>
>> database_name=dnsshim
>> database_password=<your password>
>> database_port=3306
>> database_username=<database username>
>> database_vendor=mysql
>>
>>
>> PS: db-migration utility, like xfrd and signer, must be executed at the
>> same level of directory lib/, that contains all library dependencies.
>>
>>
>> On 09/03/2012 05:43 PM, Francisco Barretto wrote:
>>
>> Hi There!
>>
>> I'm currenlty trying to migrate a DNSSHIM server which is a 1.x version
>> to the latest 2.0. I've installed mysql-server 5.1, edited xfrd.properties
>> and created the database which will be used by the newest dnsshim version
>> but when I try to run db-migration.jar it throws the class not found
>> exception below:
>>
>> root at nsmasterdev:/etc/dnsshim-2.0# java -jar db-migration.jar
>> log4j:WARN No appenders could be found for logger
>> (br.registro.dnsshim.xfrd.dao.filesystem.XfrdConfigDao).
>> log4j:WARN Please initialize the log4j system properly.
>> Sep 3, 2012 5:36:19 PM org.hibernate.annotations.common.Version <clinit>
>> INFO: Hibernate Commons Annotations 3.2.0.Final
>> Sep 3, 2012 5:36:19 PM org.hibernate.cfg.Environment <clinit>
>> INFO: Hibernate 3.6.6.Final
>> Sep 3, 2012 5:36:19 PM org.hibernate.cfg.Environment <clinit>
>> *INFO: hibernate.properties not found*
>> Sep 3, 2012 5:36:19 PM org.hibernate.cfg.Environment buildBytecodeProvider
>> INFO: Bytecode provider name : javassist
>> Sep 3, 2012 5:36:19 PM org.hibernate.cfg.Environment <clinit>
>> INFO: using JDK 1.4 java.sql.Timestamp handling
>> Sep 3, 2012 5:36:19 PM org.hibernate.ejb.Version <clinit>
>> INFO: Hibernate EntityManager 3.6.6.Final
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.TsigKeyInfo
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.TsigKeyInfo on table
>> tsig
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.User
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.User on table user
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.DnskeyInfo
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.DnskeyInfo on table
>> dnskey
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.ZoneInfo
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.ZoneInfo on table zone
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.SlaveGroup
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.SlaveGroup on table
>> slavegroup
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.Slave
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.Slave on table slave
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.AnnotationBinder bindClass
>> INFO: Binding entity from annotated class:
>> br.registro.dnsshim.xfrd.domain.ZoneSync
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.EntityBinder
>> bindTable
>> INFO: Bind entity br.registro.dnsshim.xfrd.domain.ZoneSync on table
>> zone_sync
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.CollectionBinder
>> bindOneToManySecondPass
>> INFO: Mapping collection: br.registro.dnsshim.xfrd.domain.Slave.tsigKeys
>> -> tsig
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.CollectionBinder
>> bindOneToManySecondPass
>> INFO: Mapping collection: br.registro.dnsshim.xfrd.domain.ZoneInfo.keys
>> -> dnskey
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.annotations.CollectionBinder
>> bindOneToManySecondPass
>> INFO: Mapping collection:
>> br.registro.dnsshim.xfrd.domain.SlaveGroup.syncZones -> zone_sync
>> Sep 3, 2012 5:36:20 PM org.hibernate.cfg.Configuration
>> applyHibernateValidatorLegacyConstraintsOnDDL
>> INFO: Hibernate Validator not found: ignoring
>> Sep 3, 2012 5:36:20 PM
>> org.hibernate.cfg.search.HibernateSearchEventListenerRegister
>> enableHibernateSearch
>> INFO: Unable to find
>> org.hibernate.search.event.FullTextIndexEventListener on the classpath.
>> Hibernate Search is not enabled.
>> Sep 3, 2012 5:36:20 PM org.hibernate.connection.ConnectionProviderFactory
>> initializeConnectionProviderFromConfig
>> INFO: Initializing connection provider:
>> org.hibernate.connection.C3P0ConnectionProvider
>> Sep 3, 2012 5:36:20 PM org.hibernate.connection.C3P0ConnectionProvider
>> configure
>> *INFO: C3P0 using driver:  at URL: jdbc:://:/*
>> Sep 3, 2012 5:36:20 PM org.hibernate.connection.C3P0ConnectionProvider
>> configure
>> *INFO: Connection properties: {user=, password=****, autocommit=true,
>> release_mode=auto}*
>> Sep 3, 2012 5:36:20 PM org.hibernate.connection.C3P0ConnectionProvider
>> configure
>> INFO: autocommit mode: true
>> Sep 3, 2012 5:36:20 PM org.hibernate.connection.C3P0ConnectionProvider
>> configure
>> *SEVERE: JDBC Driver class not found:
>> java.lang.ClassNotFoundException: *
>>     at java.lang.Class.forName0(Native Method)
>>     at java.lang.Class.forName(Class.java:186)
>>     at
>> org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
>>     at
>> org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:118)
>>     at
>> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
>>     at
>> org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:51)
>>     at
>> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90)
>>     at
>> org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
>>     at
>> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
>>     at
>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
>>     at
>> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
>>     at
>> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
>>     at
>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
>>     at
>> br.registro.dnsshim.util.DatabaseUtil.getInstance(DatabaseUtil.java:23)
>>     at
>> br.registro.dnsshim.xfrd.migration.DbMigration.main(DbMigration.java:15)
>> Exception in thread "main" javax.persistence.PersistenceException:
>> [PersistenceUnit: dnsshim_db] Unable to build EntityManagerFactory
>>     at
>> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
>>     at
>> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57)
>>     at
>> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
>>     at
>> br.registro.dnsshim.util.DatabaseUtil.getInstance(DatabaseUtil.java:23)
>>     at
>> br.registro.dnsshim.xfrd.migration.DbMigration.main(DbMigration.java:15)
>> Caused by: org.hibernate.HibernateException: JDBC Driver class not found:
>>     at
>> org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:123)
>>     at
>> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
>>     at
>> org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:51)
>>     at
>> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90)
>>     at
>> org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
>>     at
>> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
>>     at
>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
>>     at
>> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
>>     ... 4 more
>> Caused by: java.lang.ClassNotFoundException:
>>     at java.lang.Class.forName0(Native Method)
>>     at java.lang.Class.forName(Class.java:186)
>>     at
>> org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
>>     at
>> org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:118)
>>     ... 11 more
>>
>> I've followed exactly the steps mentioned in the 2.0 english manual (rev
>> 1498), including the xfrd.properties entries order. Is there a more
>> complete tutorial on migration? Is there any relation with the hierarchical
>> folders? Do db-migration.jar need to be in any specific folder? What about
>> the hibernate configuration not found?
>>
>> I'm using
>> java version "1.6.0_20"
>> OpenJDK Runtime Environment (IcedTea6 1.9.13)
>> (6b20-1.9.13-0ubuntu1~10.04.1)
>> OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
>>
>> Ubuntu 10.04
>>
>> Thanks!
>>
>> Francisco Barretto
>> Doutorando PPG-Arte - Arte e Tecnologia
>>
>> Laboratório de Pesquisa em Arte Computacional (Midialab)
>> Departamento de Artes Visuais
>> Instituto de Artes
>> Universidade de Brasília - UnB
>> Campus Universitário Darcy Ribeiro
>> Asa Norte
>> 70910-900, Brasília - DF
>>
>> www.ciurbi.wordpress.com
>> www.wikinarua.com
>> www.tectecbaratinha.wordpress.com
>> www.flickr.com/photos/meiotijolo
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://eng.registro.br/pipermail/dnsshim/attachments/20120904/686e2567/attachment-0001.html>


More information about the DNSSHIM mailing list