I have been working on a project to add support for jasypt types on hibernate tools.
The idea was to define a parametrized type in a mapping file and use the name to override the type used for certain columns in the reverse engeniering definition xml
and from there generate hbm, and java classes
However the current version of the tools project is using hibernate 3.5 and it takes literally the type name in the reverse enginierring file and use it as the type in java classes
I want hibernate tools to read my typedef and the parameters from a mapping file specified in a cfg.xml, use the reverse engeniering xml to override the type for a certain column, and use the defined type in the exporters as if it was a native hibernate type.
I know I could generate the file mapping and modify it adding a meta attribute to override the type in the generated java classes.
However my goal is to modify the eclipse plugins to support this feature and do it in the most simple way using a wizard to indicate the parameters for the type defs and the columns to override.
I managed to get a version of the tools working with hibernate 3.6 wich would allow me to use the type registry introduced in that version.
However the biggest problem I have is to make it work with the eclipse plugins, got the trunk and a multiversion2 branch from svn
I changed some files that were using features from 3.5 to use the new registry from 3.6, I also changed the lib project to use version 3.6 and its dependencies
Everything compiles from console and from eclipse but the test for the console configuration fails with a class def not foud exception for the logger library
If I run it on eclipse it launches but as soon as I try to do somenthing involving a hibernate configuration I get the same error as in the test.
This is a fragment of the output from the test?
What am I doing wrong? should I be using other branch?
Code:
Tests run: 44, Failures: 6, Errors: 9, Skipped: 0, Time elapsed: 25.267 sec <<< FAILURE!
testBuildConfiguration(org.hibernate.eclipse.console.test.ConsoleConfigurationTest) Time elapsed: 0.043 sec <<< ERROR!
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:197)
at org.hibernate.console.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:183)
at org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:96)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:240)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:237)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:188)
at org.hibernate.eclipse.console.test.ConsoleConfigurationTest.testBuildConfiguration(ConsoleConfigurationTest.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:72)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:35)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:114)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 58 more
testHQLComments(org.hibernate.eclipse.console.test.ConsoleConfigurationTest) Time elapsed: 0.001 sec <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configuration
at org.hibernate.console.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:183)
at org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:96)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:240)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:237)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:188)
at org.hibernate.eclipse.console.test.ConsoleConfigurationTest.testHQLComments(ConsoleConfigurationTest.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)