[DNSSHIM] Migration from version 1.x

Francisco Barretto kikobarretto at gmail.com
Mon Sep 3 17:43:18 BRT 2012


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/20120903/b73e1be2/attachment.html>


More information about the DNSSHIM mailing list