Ant MappingTool NoSuchMethodError (kodo 4.0)
I switched to Kodo 4.0 from Kodo 3.4 and the ant build file that was using the MappingToolTask now throws an error
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_06\jre
Detected OS: Windows XP
Build sequence for target `modelsdb-mapping' is [resource, modelsdb-mapping]
resource:
[copy] db\data\models\models.jdo omitted as db/data/models/models.jdo is up to date.
[copy] db\data\models\models.mapping omitted as db/data/models/models.mapping is up to date.
[copy] db\data\referencedb\referencedb.jdo omitted as db/data/referencedb/referencedb.jdo is up to date.
[copy] db\data\referencedb\referencedb.mapping omitted as db/data/referencedb/referencedb.mapping is up to date.
[copy] db\data\system\system.jdo omitted as db/data/system/system.jdo is up to date.
[copy] db\data\system\system.mapping omitted as db/data/system/system.mapping is up to date.
modelsdb-mapping:
[mappingtool] 15 WARN [main] kodo.Runtime - The property named "kodo.jdbc.VersionIndicator" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.MappingFactory".
[mappingtool] 31 WARN [main] kodo.Runtime - The property named "kodo.MetaDataLoader" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.MetaDataFactory".
[mappingtool] 31 WARN [main] kodo.Runtime - The property named "kodo.jdbc.SequenceFactory" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.SchemaFactory".
[mappingtool] 47 WARN [main] kodo.Runtime - The property named "kodo.jdbc.SubclassMapping" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.SubclassFetchMode".
[mappingtool] 47 WARN [main] kodo.Runtime - The property named "kodo.PersistenceManagerImpl" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.PersistenceServer".
[mappingtool] 47 WARN [main] kodo.Runtime - The property named "kodo.RetainValuesInOptimistic" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.Optimistic".
[mappingtool] 296 WARN [main] kodo.Runtime - The property named "kodo.CopyObjectIds" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.Compatibility".
[mappingtool] 296 WARN [main] kodo.Runtime - The property named "kodo.jdbc.ForeignKeyConstraints" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.ConnectionDecorators".
[mappingtool] 296 WARN [main] kodo.Runtime - The property named "kodo.PersistentClasses" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.PersistenceServer".
[mappingtool] 546 WARN [main] kodo.Runtime - The property named "kodo.jdbc.ClassIndicator" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.MappingFactory".
[mappingtool] 546 WARN [main] kodo.Runtime - The property named "kodo.SubclassFetchMode" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.SubclassFetchMode".
[mappingtool] 546 WARN [main] kodo.Runtime - The property named "kodo.ObjectLookupMode" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.TransactionMode".
[mappingtool] 795 WARN [main] kodo.Runtime - The property named "kodo.RestoreMutableValues" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.RestoreState".
[mappingtool] 795 WARN [main] kodo.Runtime - The property named "kodo.PersistenceManagerServer" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.PersistenceServer".
[mappingtool] 795 WARN [main] kodo.Runtime - The property named "kodo.EagerFetchMode" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.EagerFetchMode".
[mappingtool] 1045 WARN [main] kodo.Runtime - The property named "kodo.jdbc.DataSourceMode" was not recognized and will be ignored, although the name closely matches a valid property called "kodo.jdbc.EagerFetchMode".
[mappingtool] 1045 WARN [main] kodo.Runtime - The property named "kodo.RemoteCommitTransmitAddObjectIds" was not recognized and will be ignored.
[mappingtool] 1918 INFO [main] kodo.Tool - Mapping tool running on type "class db.data.models.JlpConfigData" with action "refresh".
[mappingtool] java.lang.NoSuchMethodError: kodo.meta.AbstractMetaDataFactory.access$001(Lkodo/jdo/DeprecatedJDOMetaDataFactory;)Lkodo/meta/MetaDataRepository;
[mappingtool] at kodo.jdo.DeprecatedJDOMetaDataFactory$ExtensionTranslatingParser.<init>(DeprecatedJDOMetaDataFactory.java:238)
[mappingtool] at kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory$1.<init>(AbstractDeprecatedJDOMappingFactory.java:245)
[mappingtool] at kodo.jdo.jdbc.AbstractDeprecatedJDOMappingFactory.newParser(AbstractDeprecatedJDOMappingFactory.java:243)
[mappingtool] at kodo.jdo.JDOMetaDataFactory.getParser(JDOMetaDataFactory.java:65)
[mappingtool] at kodo.jdo.JDOMetaDataFactory.load(JDOMetaDataFactory.java:95)
[mappingtool] at kodo.jdo.jdbc.MappingFileDeprecatedJDOMappingFactory.load(MappingFileDeprecatedJDOMappingFactory.java:86)
[mappingtool] at kodo.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:432)
[mappingtool] at kodo.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:274)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:241)
[mappingtool] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:755)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:689)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:1133)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:214)
[mappingtool] at com.solarmetric.ant.AbstractTask.execute(AbstractTask.java:167)
[mappingtool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[mappingtool] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[mappingtool] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Does anyone have any clue as to why this is happening?
Mark
Basically what I did was I just got rid of my 3.4 properties files and started with something very basic
# Kodo JDO Properties configuration
#LICENSE KEY
kodo.LicenseKey: xxxxx
javax.jdo.PersistenceManagerFactoryClass: kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: org.hsqldb.jdbcDriver
javax.jdo.option.ConnectionUserName: sa
javax.jdo.option.ConnectionPassword:
javax.jdo.option.ConnectionURL: jdbc:hsqldb:MepDatabase
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: true
javax.jdo.option.NontransactionalWrite: false
javax.jdo.option.DetachAllOnCommit: true
#kodo stuff
kodo.AutoDetach: commit
kodo.Log: DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=TRACEThen I just looked at the 3.4 properties one by one to find the 4.0 equivalent. What actually worked for me was something very basic actually - appearently a lot of the properties in the legacy file were really unneeded or actually set to their default.
Oh yeah, I think this line gave me trouble.
javax.jdo.PersistenceManagerFactoryClass: kodo.jdbc.runtime.JDBCPersistenceManagerFactoryThe 3.4 value for this property was kodo.jdbc.runtime.JDBCPersistenceManagerFactory but according to the 4.0 documentation it should be kodo.jdo.PeristenceManagerFactoryImpl.
Hope that helps, good luck.
Similar Messages
-
Greetings
I have a problem using the mappingtool from ant
with kodo 3.0.0b1.
I realize that some ant integration problems are
being fixed in beta2 but I hadn't seen this
problem mentioned so I thought I'd let you know...
Please let me know if I'm doing something wrong.
Note that it seems to work fine when I use the
commandline mappingtool utility.
The ant tasks are set up as follows:
<taskdef name="mappingtool"
classname="kodo.jdbc.ant.MappingToolTask"
classpathref="kodo-tool-classpath" />
<target name="killdb" depends="deploy-runtime" description="Drop JDO specific tables" >
<mappingtool action="drop" ignoreErrors="true">
<fileset refid="all-jdo-files" />
<classpath refid="runtime-path" />
</mappingtool>
</target>
When I execute this target, I see the following exception:
killdb:
[mappingtool] java.lang.IllegalAccessError: tried to access method serp.util.ReferenceMap.removeExpired()V from class com.solarmetric.jdbc.ConnectionPoolImpl
[mappingtool] at com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:120)
[mappingtool] at com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:230)
[mappingtool] at com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:128)
[mappingtool] at kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:235)
[mappingtool] at kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:169)
[mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionary(JDBCConfigurationImpl.java:489)
[mappingtool] at kodo.jdbc.schema.DataSourceFactory.configureDataSource(DataSourceFactory.java:136)
[mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:759)
[mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:842)
[mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:851)
[mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:64)
[mappingtool] at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:186)
[mappingtool] at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:176)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:774)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:136)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:319)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
[mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)Thanks for your response, but this wasn't the problem.
I don't have (never had) serp.jar lying around.
serp appears to be in both kodo-jdo.jar and
kodo-jdo-runtime.jar but no other jar files...
Before running ant, my CLASSPATH is set to
"nf.jar:ojdbc14.jar"
(nf.jar contains the kodo.properties file -
required here to pick up license key, etc)
I printed out the CLASSPATH being used inside my
ant target and it is as follows:
antExtensions.jar:
common.jar: (one of mine)
gnu-getopt.jar:
j2ee.jar:
jakarta-commons-collections-2.1.jar:
jakarta-commons-lang-1.0.1.jar:
jakarta-commons-logging-1.0.2.jar:
jakarta-commons-pool-1.0.1.jar:
jakarta-oro-2.0.7.jar:
jakarta-regexp-1.1.jar:
jca1.0.jar:
jdbc-hsql-1_7_0.jar:
jdbc2_0-stdext.jar:
jdo1_0.jar:
jndi.jar:
jta-spec1_0_1.jar:
junit-3.8.1.jar:
kodo-jdo-runtime.jar:
kodo-jdo.jar:
log4j-1.2.8.jar:
nf.jar: (one of mine)
ojdbc14.jar:
sax.jar:
wl-startup.jar:
xalan.jar:
xercesImpl.jar:
xml-apis.jar
Abe White wrote:
If you still have the serp.jar that shipped with previous versions of
Kodo in your classpath, make sure you remove it. Kodo 3 bundles the
serp classes within the kodo jar.
Was that the problem? -
Trouble running mappingtool on Kodo-jdo 3.0.2
Hi
I was trying to run the Kodo tutorial. I was able to run jdoc
properties.jdo, but I am having trouble running mappingtool. I am having
trouble getting Oracle to work properly. Here is the output:
C:\kodoanimals\test\tutorial>mappingtool -action refresh package.jdo
Exception in thread "main" kodo.util.FatalDataStoreException:
oracle.jdbc.driver.OracleDriver
NestedThrowables:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:97)
at
kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
Caused by: java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
... 10 more
NestedThrowablesStackTrace:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
at
kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
Here is what my kodo.properties file looks like (located at
c:\kodo-jdo-3.0.2 directory)
kodo.LicenseKey: xxxx
javax.jdo.PersistenceManagerFactoryClass:com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
#javax.jdo.PersistenceManagerFactoryClass:kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName:oracle.jdbc.driver.OracleDriver
javax.jdo.option.ConnectionUserName:teckusr04
javax.jdo.option.ConnectionPassword:teckusr04
javax.jdo.option.ConnectionURL:jdbc:oracle:thin:casrvta6861dt11:1521:casrvta6
javax.jdo.option.Optimistic:true
javax.jdo.option.RetainValues:true
javax.jdo.option.NontransactionalRead:true
I have set my path to include both jre1.4, as well as the kodo\bin
directory. My classpath is shown here
C:\j2sdk1.4.2_03\bin;C:\j2sdk1.4.2_03\lib;C:\j2sdk1.4.2_03\jre\lib;C:\kodo-jdo-3.0.2;C:\kodo-jdo-3.0.2\lib;C:\oracle\ora92\jdbc\lib;.;
I suspect my error is either from my classpath or my kodo.properties file.
Is there any other reason that I am getting this error?
Thanks
JoeYou should add your classes12.jar to your classpath. If you are using
Kodo's scripts, you should edit bin/jdocmd.bat to include your library.
Joe DeVilla wrote:
>
Hi
I was trying to run the Kodo tutorial. I was able to run jdoc
properties.jdo, but I am having trouble running mappingtool. I am having
trouble getting Oracle to work properly. Here is the output:
C:\kodoanimals\test\tutorial>mappingtool -action refresh package.jdo
Exception in thread "main" kodo.util.FatalDataStoreException:
oracle.jdbc.driver.OracleDriver
NestedThrowables:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:97)
at
kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
Caused by: java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
... 10 more
NestedThrowablesStackTrace:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
kodo.jdbc.schema.DataSourceFactory.createDataSource(DataSourceFactory.java:55)
at
kodo.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:880)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:798)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:886)
at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:895)
at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:67)
at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:243)
at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:233)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:864)
at kodo.jdbc.meta.MappingTool.run(MappingTool.java:816)
at kodo.jdbc.meta.MappingTool.main(MappingTool.java:749)
Here is what my kodo.properties file looks like (located at
c:\kodo-jdo-3.0.2 directory)
kodo.LicenseKey: xxxx
javax.jdo.PersistenceManagerFactoryClass:com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
#javax.jdo.PersistenceManagerFactoryClass:kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName:oracle.jdbc.driver.OracleDriver
javax.jdo.option.ConnectionUserName:teckusr04
javax.jdo.option.ConnectionPassword:teckusr04
javax.jdo.option.ConnectionURL:jdbc:oracle:thin:casrvta6861dt11:1521:casrvta6
javax.jdo.option.Optimistic:true
javax.jdo.option.RetainValues:true
javax.jdo.option.NontransactionalRead:true
I have set my path to include both jre1.4, as well as the kodo\bin
directory. My classpath is shown here
C:\j2sdk1.4.2_03\bin;C:\j2sdk1.4.2_03\lib;C:\j2sdk1.4.2_03\jre\lib;C:\kodo-jdo-3.0.2;C:\kodo-jdo-3.0.2\lib;C:\oracle\ora92\jdbc\lib;.;
I suspect my error is either from my classpath or my kodo.properties file.
Is there any other reason that I am getting this error?
Thanks
Joe
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com -
Mappingtool Ant task classpath errors
Hello,
I'm trying to use the mappingtool in my build file, but I'm getting a
ClassNotFoundException:
[mappingtool] java.lang.ClassNotFoundException:
edu.uiuc.cs427.domain.BreakState
[mappingtool] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[mappingtool] at java.security.AccessController.doPrivileged(Native
Method)
[mappingtool] at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[mappingtool] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[mappingtool] at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1104)
[mappingtool] at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:938)
[mappingtool] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[mappingtool] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
[mappingtool] at java.lang.Class.forName0(Native Method)
[mappingtool] at java.lang.Class.forName(Class.java:219)
[mappingtool] at serp.util.Strings.toClass(Strings.java:149)
[mappingtool] at
com.solarmetric.meta.ClassArgParser.parseClasses(ClassArgParser.java:77)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:837)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:169)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
When I set kodo.properties to db MappingFactory, I do not get this
error. However, when I set kodo.properties to file MappingFactory, I get
this error. Nothing else is different.
I've checked several times to make sure the class path setting is correct:
<!-- run mappingtool -->
<mappingtool action="refresh">
<classpath>
<path refid="jdo.classpath"/>
<pathelement location="${build.classes.dir}"/>
</classpath>
<fileset dir="${build.classes.dir}" includes="package.jdo"/>
<config propertiesFile="${kodo.home}/kodo.properties"/>
</mappingtool>
and my file is in ${build.classes.dir}
Also note that the jdoc task works fine with this same classpath, so
this seems like an issue with mappingtool.
See my other mappingtool post for similar errors, maybe related.Abe White wrote:
Could it be that Kodo is in fact using the right dictionary, but is just
issuing bad SQL? What version of Kodo are you using? And what exactly
are the symptoms of the problem? The use of type names like int8(8)?
Is that generated for an existing database column, or a new one Kodo is
creating?Something strange is happening because my other Ant tasks, including a
mapping tool task that creates the database tables works fine.
Here is how I call the task that creates the schema file -
<pre>
<mappingToolTask action="refresh" sqlfile="${sql.schema.file}"
schemaaction="build">
<fileset dir="${project.src.dir}">
<include name="**/*.jdo" />
</fileset>
</mappingToolTask>
</pre>
Here is how I call the task that creates the database tables -
<pre>
<mappingToolTask action="${param.action}">
<fileset dir="${project.src.dir}">
<include name="**/*.jdo" />
</fileset>
</mappingToolTask>
</pre>
As you can see only only differnce between the two tasks is the sqlfile
and schemaaction properties - it is as if the code that writes the schema
file does use the same dictionary logic as when the database tables are
created.
Th error manifests itself as incorrect data types (for PostgreSQL). I get
int(8) instead of int8, etc. Currently I correct this as follows -
line = line.replaceAll("int8\\(8\\)","int8");
line = line.replaceAll("int4\\(4\\)","int4");
line = line.replaceAll("timestamp\\(8\\)","timestamp");
line = line.replaceAll("bigserial\\(8\\)","bigserial");
line = line.replaceAll("bool\\(1\\)","boolean");
line = line.replaceAll("text\\(-1\\)","text");
line = line.replaceAll("float8\\(8\\)","float8");
I'm using 3.3.4.
Andy. -
Kodo 3.1.2 + IBM DB2 7.2 = No Suitable Driver?
Hello there,
we are trying to use Kodo 3.1.2 with DB 7.2 Fixpak 5 and higher.
I've build an ant-script with the following snippet:
<target name="defineSchemaKodo" if="jdo.implementierung.kodo">
<taskdef name="mappingtool"
classname="kodo.jdbc.ant.MappingToolTask">
<classpath refid="build.classpath"/>
</taskdef>
<taskdef name="schematool"
classname="kodo.jdbc.ant.SchemaToolTask">
<classpath refid="build.classpath"/>
</taskdef>
<mappingtool action="buildSchema" schemaFile="${basedir}/package.schema">
<classpath refid="build.classpath"/>
<fileset dir="${model.build.dir}">
<include name="*.jdo" />
</fileset>
</mappingtool>
<schematool action="createDB" file="${basedir}/schema.ddl">
<classpath refid="build.classpath"/>
<fileset dir=".">
<include name="${basedir}/package.schema" />
</fileset>
</schematool>
</target>
The property "compile.classpath" contains db2java.jar, so the driver
should be availiable at runtime.
When running the script I get this stacktrace:
defineSchemaKodo:
[mappingtool] kodo.util.FatalDataStoreException: No suitable driver
[mappingtool] NestedThrowables:
[mappingtool] java.sql.SQLException: No suitable driver
[mappingtool] at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
[mappingtool] at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
[mappingtool] at
kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:61)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:630)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:880)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:970)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:979)
[mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:78)
[mappingtool] at
kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:269)
[mappingtool] at
kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:259)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:898)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
[mappingtool] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at java.lang.reflect.Method.invoke(Unknown Source)
[mappingtool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[mappingtool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[mappingtool] at java.lang.Thread.run(Unknown Source)
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] java.sql.SQLException: No suitable driver
[mappingtool] at java.sql.DriverManager.getDriver(Unknown Source)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.getDriver(PoolingDataSource.java:271)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.newConnection(PoolingDataSource.java:313)
[mappingtool] at
com.solarmetric.jdbc.ConnectionPoolImpl.makeConnection(ConnectionPoolImpl.java:270)
[mappingtool] at
com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:178)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:237)
[mappingtool] at
com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:130)
[mappingtool] at
com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:81)
[mappingtool] at
com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:130)
[mappingtool] at
kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:295)
[mappingtool] at
kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:56)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:630)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:880)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:970)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:979)
[mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:78)
[mappingtool] at
kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:269)
[mappingtool] at
kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:259)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:898)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
[mappingtool] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at java.lang.reflect.Method.invoke(Unknown Source)
[mappingtool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[mappingtool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[mappingtool] at java.lang.Thread.run(Unknown Source)
[mappingtool] BUILD FAILED:
E:\bl04285\workspace\CRM\jdoTemporal\build.xml:170:
kodo.util.FatalDataStoreException: No suitable driver
NestedThrowables:
java.sql.SQLException: No suitable driver
Any ideas?You should also try using the jcc (preferred) or the net driver which is
more flexible in classpath and system configurations.
The DB2 driver is very sensitive to changes due to reliance on system
shared libraries.
Serge Arpin wrote:
Just a guess:
- do you use db2 type 2 driver (jdbc:db2:dbname) or type 3
(jdbc:db2:/server:port/dbname) ?
If you use type 2, JUST try Type 3. I had the same symptom under WSAD with
the DB2 v7.2.11 type 2 driver... and it worked with type 3 driver.
(And dont forget to start the db2-type-3-driver-listener on your DB2
server.
Knobloch wrote:
Hello there,
we are trying to use Kodo 3.1.2 with DB 7.2 Fixpak 5 and higher.
I've build an ant-script with the following snippet:
<target name="defineSchemaKodo" if="jdo.implementierung.kodo">
<taskdef name="mappingtool"
classname="kodo.jdbc.ant.MappingToolTask">
<classpath refid="build.classpath"/>
</taskdef>
<taskdef name="schematool"
classname="kodo.jdbc.ant.SchemaToolTask">
<classpath refid="build.classpath"/>
</taskdef>
<mappingtool action="buildSchema" schemaFile="$/package.schema">
<classpath refid="build.classpath"/>
<fileset dir="$">
<include name="*.jdo" />
</fileset>
</mappingtool>
<schematool action="createDB" file="$/schema.ddl">
<classpath refid="build.classpath"/>
<fileset dir=".">
<include name="$/package.schema" />
</fileset>
</schematool>
</target>
The property "compile.classpath" contains db2java.jar, so the driver
should be availiable at runtime.
When running the script I get this stacktrace:
defineSchemaKodo:
[mappingtool] kodo.util.FatalDataStoreException: No suitable driver
[mappingtool] NestedThrowables:
[mappingtool] java.sql.SQLException: No suitable driver
[mappingtool] at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
[mappingtool] at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
[mappingtool] at
kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:61)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:630)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:880)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:970)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:979)
[mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:78)
[mappingtool] at
kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:269)
[mappingtool] at
kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:259)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:898)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
[mappingtool] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at java.lang.reflect.Method.invoke(Unknown Source)
[mappingtool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[mappingtool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[mappingtool] at java.lang.Thread.run(Unknown Source)
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] java.sql.SQLException: No suitable driver
[mappingtool] at java.sql.DriverManager.getDriver(Unknown Source)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.getDriver(PoolingDataSource.java:271)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.newConnection(PoolingDataSource.java:313)
[mappingtool] at
com.solarmetric.jdbc.ConnectionPoolImpl.makeConnection(ConnectionPoolImpl.java:270)
[mappingtool] at
com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:178)
[mappingtool] at
com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:237)
[mappingtool] at
com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:130)
[mappingtool] at
com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:81)
[mappingtool] at
com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:130)
[mappingtool] at
kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:295)
[mappingtool] at
kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:56)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:630)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:880)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:970)
[mappingtool] at
kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:979)
[mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:78)
[mappingtool] at
kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:269)
[mappingtool] at
kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:259)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:898)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
[mappingtool] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:569)
[mappingtool] at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[mappingtool] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
[mappingtool] at java.lang.reflect.Method.invoke(Unknown Source)
[mappingtool] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[mappingtool] at
org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
[mappingtool] at java.lang.Thread.run(Unknown Source)
[mappingtool] BUILD FAILED:
E:bl04285workspaceCRMjdoTemporalbuild.xml:170:
kodo.util.FatalDataStoreException: No suitable driver
NestedThrowables:
java.sql.SQLException: No suitable driver
Any ideas?
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com -
Mappingtool - sybase don't know about CMD_LINE
Hi
I'm trying to get kodo 3.0.2 to work with sybase 12.5.1.
However, when running the mapping tool, it creates an invalid sql create
table statement. A field JDOCLASS with type CMD_LINE is created, but sybase
don't know about CMD_LINE!
Any ideas what is going on here?
Where does this CMD_LINE come from?
Regards
Jesper
[mappingtool] kodo.util.FatalException:
com.solarmetric.jdbc.ReportingSQLExcepti
on: Can't specify a length or scale on type 'CMD_LINE'.
[mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
NULL
, JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
ORDE
RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
NUMER
IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
state=Z
ZZZZ]
[mappingtool] NestedThrowables:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Can't specify a
length
or scale on type 'CMD_LINE'.
[mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
NULL
, JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
ORDE
RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
NUMER
IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
state=Z
ZZZZ]
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:491)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:878)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:
175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:193)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:341)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
[mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)
[mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Can't
speci
fy a length or scale on type 'CMD_LINE'.Hmm. It looks like your JDBC driver is returning faulty information as
for default JDBC types (we ask the driver what is the best datatype for
say Types.VARCHAR). Is your database up to date with patches/metadata?
A work around for now would be to use a subclass of
kodo.jdbc.sql.SybaseDictionary which calls setVarcharTypeName in the
constructor with the proper datatype.
Jesper Ladegaard wrote:
Hi
I'm trying to get kodo 3.0.2 to work with sybase 12.5.1.
However, when running the mapping tool, it creates an invalid sql create
table statement. A field JDOCLASS with type CMD_LINE is created, but sybase
don't know about CMD_LINE!
Any ideas what is going on here?
Where does this CMD_LINE come from?
Regards
Jesper
[mappingtool] kodo.util.FatalException:
com.solarmetric.jdbc.ReportingSQLExcepti
on: Can't specify a length or scale on type 'CMD_LINE'.
[mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
NULL
, JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
ORDE
RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
NUMER
IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
state=Z
ZZZZ]
[mappingtool] NestedThrowables:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Can't specify a
length
or scale on type 'CMD_LINE'.
[mappingtool] {stmnt 26357574: CREATE TABLE ORDER0 (JDOCLASS CMD_LINE(255)
NULL
, JDOID NUMERIC(38) NOT NULL, JDOVERSION INT NULL, ORDERDATE DATETIME NULL,
ORDE
RNO CMD_LINE(255) NULL, STATE INT NULL, SUBTOTAL FLOAT(32) NULL, UNQ_INDEX
NUMER
IC IDENTITY UNIQUE, CONSTRAINT P_ORDER PRIMARY KEY (JDOID))} [code=2716,
state=Z
ZZZZ]
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:491)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:878)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:
175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:193)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:341)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1255
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
[mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)
[mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Can't
speci
fy a length or scale on type 'CMD_LINE'.
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com -
When using the MappingTool via ant, I often get this error. This can happen whether the file package.mapping exists or not. Any ideas? Note the "premature end of file" ...
I'm on kodo 3.4.1 (applies to my last post as well).
Thanks!
P$
[mappingtool] 109 INFO [main] kodo.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.OracleDictionary".
[mappingtool] 125 INFO [main] kodo.Tool - Mapping tool running on type "class mykodotest.AbstractParent" with action "refresh".
[mappingtool] 281 INFO [main] kodo.MetaData - Parsing metadata resource "file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping".
[mappingtool] kodo.util.GeneralException: java.io.IOException: org.xml.sax.SAXException: file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping [Location: Unknown]: org.xml.sax.SAXParseException: Premature end of file.
[mappingtool] at kodo.jdbc.meta.FileMappingFactory.readMapping(FileMappingFactory.java:141)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInfo(MappingRepository.java:532)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:389)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
[mappingtool] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:192)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[mappingtool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] java.io.IOException: org.xml.sax.SAXException: file:/C:/Workspace/MyKodoTest/bin/mykodotest/package.mapping [Location: Unknown]: org.xml.sax.SAXParseException: Premature end of file.
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parseNew(XMLMetaDataParser.java:372)
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:298)
[mappingtool] at com.solarmetric.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:279)
[mappingtool] at kodo.jdbc.meta.FileMappingFactory.readMapping(FileMappingFactory.java:137)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInfo(MappingRepository.java:532)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:389)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
[mappingtool] at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
[mappingtool] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
[mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:192)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[mappingtool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[mappingtool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)My mistake. My ant target was copying the resulting .jdo file into a location where a file with that name already existed, and I had not specified overwrite="true". So I saw the old file contents and not the new contents.
Kind regards, Robin. -
Exception running enhancement with Kodo 3.x metadata
156 INFO [main] kodo.Tool - Enhancer running on type "class
com.peacetech.dts.jdo.TemplateContentImpl".
Exception in thread "main" java.lang.NoSuchMethodError:
kodo.meta.AbstractMetaDataFactory.access$001(Lkodo/jdo/Deprecate
dJDOMetaDataFactory;)Lkodo/meta/MetaDataRepository;
at
kodo.jdo.DeprecatedJDOMetaDataFactory$ExtensionTranslatingParser.<init>(DeprecatedJDOMetaDataFactory.java:238
at
kodo.jdo.DeprecatedJDOMetaDataFactory.newParser(DeprecatedJDOMetaDataFactory.java:113)
at kodo.jdo.JDOMetaDataFactory.getParser(JDOMetaDataFactory.java:86)
at kodo.jdo.JDOMetaDataFactory.load(JDOMetaDataFactory.java:117)
at
kodo.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:432)
at
kodo.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:274)
at kodo.enhance.PCEnhancer.<init>(PCEnhancer.java:113)
at kodo.enhance.PCEnhancer.run(PCEnhancer.java:3806)
at kodo.enhance.PCEnhancer.run(PCEnhancer.java:3754)
at kodo.enhance.PCEnhancer.main(PCEnhancer.java:3720)Hi Abe,
Great to have you back on this newsgroups. If release of 4.1 is expected
within next couple of months we would rather wait with migration
Thank you
Alex
<Abe White> wrote in message news:[email protected]..
I believe this is a known bug. If this is a blocking problem, please
contact support and request a patch. Tell them it's CR 285141. -
Horizontal mapping + embedded one-to-one problem
Hi,
this message corresponds to the article "Embedded One-to-One mapping
problem". But this article is more exactly then the first without less
unnessary information.
I got an abstract super-class Person which is mapped horizontal.
Student inherits from Person.
Person contains an attribute called location(instance of Class Location)
which should be mapped "embedded one-to-one".
Since Person is mapped horizontal no table will be used for Person.
I get following exception when running mappingtool on action "buildSchema"
kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
found for "xxx.yyy.zzz.persistence.jdo.business.Location.lat"
I think Kodo tries to map the field "location" since the field is declared
as embedded. But it can not embed the field since Person is horizontal
mapped and no table for Person exists where the corresponding field of
Location could be placed in. Also it is not possible to set the "embedded"
attribute in the subclass Student for the field "location" because it must
be specified in the superclass.
Can you help me ?
Thanks a lot,
Felix
Additional information:
=======================
Exception stack trace:
[mappingtool] kodo.jdbc.meta.MappingInfoNotFoundException: No mapping
information was found for "xxx.yyy.zzz.persistence.jdo.business.Location".
[mappingtool] at
kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:44)
[mappingtool] at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:352)
[mappingtool] at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:307)
[mappingtool] at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:162)
[mappingtool] at
kodo.jdbc.meta.MappingTool.buildSchema(MappingTool.java:646)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:951)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:301)
[mappingtool] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:632)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:183)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
Here is the JDO-Metadata:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="xxx.yyy.zzz.persistence.jdo.business">
<class name="Location"/>
<class name="Person" identity-type="application"
objectid-class="PersonId">
<field name="location" embedded="true"/>
<field name="id" primary-key="true"/>
</class>
<class name="Student" identity-type="application"
persistence-capable-superclass="Person"/>
</package>
</jdo>
Here is the mapping-metadata:
<?xml version="1.0" encoding="UTF-8"?>
<mapping>
<package name="xxx.yyy.zzz.persistence.jdo.business">
<class name="Person">
<jdbc-class-map type="horizontal"/>
</class>
<class name="Student">
<jdbc-class-map type="base" table="STUDENT"/>
<jdbc-version-ind type="version-number" column="JDOVERSION"/>
<jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
<field name="Person.birthDate">
<jdbc-field-map type="value" column="BIRTHDATE"/>
</field>
<field name="Person.city">
<jdbc-field-map type="value" column="CITY"/>
</field>
<field name="Person.id">
<jdbc-field-map type="value" column="ID"/>
</field>
<field name="Person.location">
<jdbc-field-map type="embedded"
null-ind-column="NULL_INDICATOR" synthetic="false">
<field name="lat">
<jdbc-field-map type="value" column="LATITUDE"/>
</field>
<field name="lon">
<jdbc-field-map type="value" column="LONGITUDE"/>
</field>
</jdbc-field-map>
</field>
<field name="Person.name">
<jdbc-field-map type="value" column="NAME"/>
</field>
<field name="Person.picture">
<jdbc-field-map type="value" column="PICTURE"/>
</field>
<field name="Person.state">
<jdbc-field-map type="value" column="STATE"/>
</field>
<field name="Person.street">
<jdbc-field-map type="value" column="STREET"/>
</field>
<field name="Person.zipcode">
<jdbc-field-map type="value" column="ZIPCODE"/>
</field>
</class>
<class name="Location">
<jdbc-class-map type="none"/>
<field name="lat">
<jdbc-field-map type="none"/>
</field>
<jdbc-class-map type="none"/>
<field name="lon">
<jdbc-field-map type="none"/>
</field>
</class>
</package>
</mapping>
Here are the class definitions:
Class Location:
public class Location {
private int lat;
private int lon;
Class Person:
public abstract class Person {
private int id;
private String name;
private String street;
private String city;
private String state;
private String zipcode;
private Date birthDate;
private String picture;
private Location location;
Class Person:
public class Student extends Person {You'll probably have much better luck sending this question to
[email protected]; the newsgroup is generally for quick questions
about certain features or problems the community might be able to solve
without input from SolarMetric developers. -
Requires-extent="false" problem
Hi,
I am evaluating kodo and try to migrate from jpox to kodo. Everything
works good so far. There is one problem which I can't solve. We are using
a class which has the
requires-extent="false"
attribute within the class definition. The class is used to select a value
directly from
the database tables :
Query query = pm.newQuery("javax.jdo.query.SQL", "SELECT
max(BANNER_NUMBER)+1 AS BANNER_NUMBER from BANNERS where
CAMPAIGN_ID=?cId?");
query.setClass(BannerNumber.class);
query.declareImports("import java.lang.Long");
query.declareParameters("Long cId");
Collection results = (Collection)query.execute(cId);
For this the BannerNumber class must be enhanced but not presistent. Using
requires-extent="false" prevents
jpox from creating the class in the DB but kodo.jdo fails when creating the
database table :
[mappingtool] kodo.util.FatalException:
com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
violation, message from server: "You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the right
syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163 CREATE
TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER, CONSTRAINT
P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064, state=42000]
[mappingtool] NestedThrowables:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Syntax error or
access violation, message from server: "You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server version for
the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163
CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER,
CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064,
state=42000]
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:518)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:912)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Syntax
error or access violation, message from server: "You have an error in your
SQL syntax. Check the manual that corresponds to your MySQL server version
for the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt
29477163 CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION
INTEGER, CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb}
[code=1064, state=42000]
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
tor.java:124)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$600(LoggingConnection
Decorator.java:19)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
tement.executeUpdate(LoggingConnectionDecorator.java:586)
[mappingtool] at
com.solarmetric.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.j
ava:125)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1178)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:926)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:425)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:256)
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:451)
[mappingtool] ... 13 more
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Syntax error or
access violation, message from server: "You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server version for
the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163
CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER,
CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064,
state=42000]
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
tor.java:124)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$600(LoggingConnection
Decorator.java:19)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
tement.executeUpdate(LoggingConnectionDecorator.java:586)
[mappingtool] at
com.solarmetric.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.j
ava:125)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1178)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:926)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:425)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:256)
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:451)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:912)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Now the question : Can I do the same with kodo.jdo or do I have to do it an
other way or how can I prevent kodo
from trying to create the table ?
Thanks,
MarkMark-
JPox seems to be using a fairly creative interpretation of the
"requires-extent" attribute. In order to prevent Kodo from trying to
create the table, can't you just exclude the mapping from the list of
mappings that Kodo runs the mappingtool against?
In article <[email protected]>, Mark Thielen wrote:
Hi,
I am evaluating kodo and try to migrate from jpox to kodo. Everything
works good so far. There is one problem which I can't solve. We are using
a class which has the
requires-extent="false"
attribute within the class definition. The class is used to select a value
directly from
the database tables :
Query query = pm.newQuery("javax.jdo.query.SQL", "SELECT
max(BANNER_NUMBER)+1 AS BANNER_NUMBER from BANNERS where
CAMPAIGN_ID=?cId?");
query.setClass(BannerNumber.class);
query.declareImports("import java.lang.Long");
query.declareParameters("Long cId");
Collection results = (Collection)query.execute(cId);
For this the BannerNumber class must be enhanced but not presistent. Using
requires-extent="false" prevents
jpox from creating the class in the DB but kodo.jdo fails when creating the
database table :
[mappingtool] kodo.util.FatalException:
com.solarmetric.jdbc.ReportingSQLException: Syntax error or access
violation, message from server: "You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the right
syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163 CREATE
TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER, CONSTRAINT
P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064, state=42000]
[mappingtool] NestedThrowables:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Syntax error or
access violation, message from server: "You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server version for
the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163
CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER,
CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064,
state=42000]
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:518)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:912)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[mappingtool] Caused by: com.solarmetric.jdbc.ReportingSQLException: Syntax
error or access violation, message from server: "You have an error in your
SQL syntax. Check the manual that corresponds to your MySQL server version
for the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt
29477163 CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION
INTEGER, CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb}
[code=1064, state=42000]
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
tor.java:124)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$600(LoggingConnection
Decorator.java:19)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
tement.executeUpdate(LoggingConnectionDecorator.java:586)
[mappingtool] at
com.solarmetric.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.j
ava:125)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1178)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:926)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:425)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:256)
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:451)
[mappingtool] ... 13 more
[mappingtool] NestedThrowablesStackTrace:
[mappingtool] com.solarmetric.jdbc.ReportingSQLException: Syntax error or
access violation, message from server: "You have an error in your SQL
syntax. Check the manual that corresponds to your MySQL server version for
the right syntax to use near ')) TYPE = innodb' at line 1" {stmnt 29477163
CREATE TABLE BANNERNUMBER (JDOCLASS VARCHAR(255), JDOVERSION INTEGER,
CONSTRAINT P_BANNERNUMBER PRIMARY KEY ()) TYPE = innodb} [code=1064,
state=42000]
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecora
tor.java:124)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator.access$600(LoggingConnection
Decorator.java:19)
[mappingtool] at
com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingSta
tement.executeUpdate(LoggingConnectionDecorator.java:586)
[mappingtool] at
com.solarmetric.jdbc.DelegatingStatement.executeUpdate(DelegatingStatement.j
ava:125)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1178)
[mappingtool] at
kodo.jdbc.schema.SchemaTool.createTable(SchemaTool.java:926)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:425)
[mappingtool] at kodo.jdbc.schema.SchemaTool.add(SchemaTool.java:256)
[mappingtool] at kodo.jdbc.meta.MappingTool.record(MappingTool.java:451)
[mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:912)
[mappingtool] at
kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:175)
[mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
[mappingtool] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[mappingtool] at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool] at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[mappingtool] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[mappingtool] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[mappingtool] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[mappingtool] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Now the question : Can I do the same with kodo.jdo or do I have to do it an
other way or how can I prevent kodo
from trying to create the table ?
Thanks,
Mark
Marc Prud'hommeaux
SolarMetric Inc. -
Schematool: build schema from stream
Hi there,
I'm currently evaluating Kodo 3.2.3.
I'm testing kodo within a sample application. The Database server is MS
SQL Server 2000.
I generate a schema file for all my persisent (enhanced) classes. At
deployment, I want to build the database-structure on the fly at the first
connect to the database and update the db-schema whenever there are
modifications in the classes.
My Ant task for generating the schema follows...
---snip
<target name="buildschema">
<echo>
================================================================
Refreshing the schema
================================================================
</echo>
<taskdef name="mappingtool" classname="kodo.jdbc.ant.MappingToolTask">
<classpath refid="cp"/>
</taskdef>
<mappingtool action="refresh" schemaFile="${basedir}\res\testapp.schema">
<classpath refid="cp"/>
<config propertiesFile="${basedir}\res\mssql.properties" />
<fileset dir="${basedir}\src">
<include name="**/*.jdo" />
</fileset>
</mappingtool>
</target>
----snip
The testapp.schema is creted as expected. I use this schema to create the
database tables etc. with schema tool. I've implemented the following
method according to a previous news thread:
---snip
public void createSchema(URL urlSchema) throws SQLException, IOException {
JDBCConfigurationImpl jdbcConf = new JDBCConfigurationImpl(false);
// m_props are some previously red properties.
jdbcConf.fromProperties(m_props);
XMLSchemaParser parser = new XMLSchemaParser (jdbcConf);
parser.parse (urlSchema);
SchemaGroup kodoSg = parser.getSchemaGroup ();
SchemaTool kodoSt = new SchemaTool (jdbcConf);
kodoSt.setSchemaGroup(kodoSg);
kodoSt.setDropTables(false);
kodoSt.refresh();
---snip
urlSchema points to testapp.schema created above. The code works fine for
the first time I connect to a new database. Whenever I change my schema
(due to new fields in the persistent classes) I want to refresh the
db-schema. Unfortunately, SchemaTool fails with
com.solarmetric.jdbc.ReportingSQLException: There is already an object
named 'JDO_SEQUENCE' in the database. {stmnt 29782600 CREATE TABLE
JDO_SEQUENCE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY
(ID))} [code=2714, state=42S01]
JDO_SEQUENCE is part of the schema (testapp.schema) and created with the
first creation of the db-schema. I profiled the SQL-statements. For each
other table, SchemaTool asks for it's properties, but not for
JDO_SEQUENCE.
What am I missing?
Any answer would be appreciated.
regards
MarkusTry adding:
kodoSt.setKodoTables(true);
Also, have you looked into Kodo's kodo.jdbc.SynchronizeMapping property? -
3.1.4 reverse mapping tool issue
(Sorry for the duplicate posting...I meant to start a new thread with
this but accidentally posted it as a reply to a 6-month old thread)
Hello,
I was running Kodo 3.0.2 when Abe and I had the exchange reproduced
below back in January to deal with Oracle tables with "$" in the column
names (which I subsequently updated to 3.0.3). The original subject of
this discussion was "3.0.2 reverse mapping tool generates invalid
..mapping file".
I was able to get this working by running the following commands to
implement Abe's suggestion:
reversemappingtool -p kodo.properties -package db \
-cp custom.properties -ds false schema.xml
sed -e 's/\$/__DOLLAR__/' db/package.mapping > db/package.mapping.new
mv db/package.mapping.new db/package.mapping
javac db/*.java
mappingtool -p kodo.properties -a import db/package.mapping
sed -e 's/__DOLLAR__/\$/' db/package.jdo > db/package.jdo.new
mv db/package.jdo.new db/package.jdo
In my custom.properties file, I had lines like these to put useful names
on my class's fields:
db.TransactionDetailHistory.y$an8.rename : addressNumber
As I said, in 3.0.3, this worked perfectly.
I picked this code back up for the first time since getting it working 6
months ago, and decided to update it to 3.1.4 (since I'm already using
that on other projects). Problem is, the reverse mapping tool has
changed and the code it generates no longer works as it once did. I
tried running the 3.1.2 and 3.1.0 reverse mapping tool, and it failed
the same way, so it looks like this change happened in the 3.0.x to
3.1.x version change.
What happens is this: In the generated Java source, my fields used to
end up with names as per my specification (e.g., the Oracle column named
"y$an8" showed up as "addressNumber" in the java source).
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumber
What do you make of this?
Thanks,
Bill
Abe White wrote:
> Hmmm... this is a problem. '$' is not legal in XML names, and there
is no standard way to escape it.
>
> Your best bet is probably to do the following:
> 1. In the generated .mapping file, replace all '$' characters with
another token, such as '--DOLLAR--'.
> 2. Switch your properties to use the metadata mapping factory:
> kodo.jdbc.MappingFactory: metadata
> 3. Import your mappings into the metadata mapping factory:
> mappingtool -a import package.mapping
> 4. Delete the mapping file.
> 5. In your .jdo file, replace '--DOLLAR--' with '$' again.
>
> The metadata mapping factory doesn't put column names in its XML
attribute names, so you should be able to use it safely.William-
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumberWell, the reverse mapping tool makes some assumptions based on common
naming strategies for relational databases and Java naming: columns like
"FIRST_NAME" will be renamed to "firstName". The Reverse Mapping tool is
seeing the "$" and treating it as a non-alphanumeric delimiter, so is
fixing it.
Can you try a couple of additional properties:
db.TransactionDetailHistory.y$An8.rename: addressNumber
db.TransactionDetailHistory.y$an8.rename: addressNumber
Also, are other rename properties working for you, or is that the only
field or class you attempt to rename? It might just be the case that
you aren't correctly specifying the properties file or something.
Finally, bear in mind that you can always implement your own
kodo.jdbc.meta.ReverseCustomizer and just use that; not the easiest
solution, but it can certainly be used to have very fine-grained control
over the exact names that are generated.
In article <[email protected]>, William Korb wrote:
(Sorry for the duplicate posting...I meant to start a new thread with
this but accidentally posted it as a reply to a 6-month old thread)
Hello,
I was running Kodo 3.0.2 when Abe and I had the exchange reproduced
below back in January to deal with Oracle tables with "$" in the column
names (which I subsequently updated to 3.0.3). The original subject of
this discussion was "3.0.2 reverse mapping tool generates invalid
.mapping file".
I was able to get this working by running the following commands to
implement Abe's suggestion:
reversemappingtool -p kodo.properties -package db \
-cp custom.properties -ds false schema.xml
sed -e 's/\$/__DOLLAR__/' db/package.mapping > db/package.mapping.new
mv db/package.mapping.new db/package.mapping
javac db/*.java
mappingtool -p kodo.properties -a import db/package.mapping
sed -e 's/__DOLLAR__/\$/' db/package.jdo > db/package.jdo.new
mv db/package.jdo.new db/package.jdo
In my custom.properties file, I had lines like these to put useful names
on my class's fields:
db.TransactionDetailHistory.y$an8.rename : addressNumber
As I said, in 3.0.3, this worked perfectly.
I picked this code back up for the first time since getting it working 6
months ago, and decided to update it to 3.1.4 (since I'm already using
that on other projects). Problem is, the reverse mapping tool has
changed and the code it generates no longer works as it once did. I
tried running the 3.1.2 and 3.1.0 reverse mapping tool, and it failed
the same way, so it looks like this change happened in the 3.0.x to
3.1.x version change.
What happens is this: In the generated Java source, my fields used to
end up with names as per my specification (e.g., the Oracle column named
"y$an8" showed up as "addressNumber" in the java source).
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumber
What do you make of this?
Thanks,
Bill
Abe White wrote:
Hmmm... this is a problem. '$' is not legal in XML names, and thereis no standard way to escape it.
Your best bet is probably to do the following:
1. In the generated .mapping file, replace all '$' characters withanother token, such as '--DOLLAR--'.
2. Switch your properties to use the metadata mapping factory:
kodo.jdbc.MappingFactory: metadata
3. Import your mappings into the metadata mapping factory:
mappingtool -a import package.mapping
4. Delete the mapping file.
5. In your .jdo file, replace '--DOLLAR--' with '$' again.
The metadata mapping factory doesn't put column names in its XMLattribute names, so you should be able to use it safely.--
Marc Prud'hommeaux
SolarMetric Inc. -
Hi,
I've been trying to use the various tools provided by kodo and have several questions on their usage. I'll start with this one:
I'm using the ant task for the MetaDataTool, and starting with only a few .java files but no .jdo or .mapping file yet (because that is what I want the tools to generate!). When I run the ant task the first time, package.jdo is created just fine, and there are no <extension> elements. If I simply run the task a second time, it adds the following extension elements to each class:
<extension vendor-name="kodo" key="data-cache-timeout" value="-1"/>I understand what this extension is all about, but why is it there the second time and not the first? When I run the ant task yet again, there are no changes made to the .jdo file. If I then add the line kodo.DataCacheTimeout=500 in kodo.properties and run the task, it changes
Here is my ant task:
<taskdef name="metadatatool" classname="kodo.ant.JDOMetaDataToolTask" classpathref="kodo.class.path" />
<target name="metadatatool" description="Generate package.jdo based on java files for domain objects.">
<metadatatool file="${domain.src.dir}/package.jdo" verbose="true">
<classpath refid="src.class.path" />
<config propertiesFile="${resources.dir}/kodo.properties" />
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</metadatatool>
</target>My domain model that I'm working on here is very simple, there are two classes:
public abstract class AbstractParent
public class SomeSubclass extends AbstractParent
When I first run the tool, package.jdo looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="mykodotest">
<class name="AbstractParent">
<field name="parentField"/>
</class>
<class name="SomeSubclass" persistence-capable-superclass="AbstractParent">
<field name="someField"/>
</class>
</package>
</jdo>Then if I simply run the tool again, package.jdo looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="mykodotest">
<class name="AbstractParent">
<field name="parentField"/>
</class>
<class name="SomeSubclass" persistence-capable-superclass="AbstractParent">
<extension vendor-name="kodo" key="data-cache-timeout" value="-1"/>
<field name="someField"/>
</class>
</package>
</jdo>Note that here only the subclass has the "data-cache-timeout" extension.
Now if I add the line kodo.DataCacheTimeout=500 to kodo.properties and run the tool again, package.jdo looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="mykodotest">
<class name="AbstractParent">
<extension vendor-name="kodo" key="data-cache-timeout" value="500"/>
<field name="parentField"/>
</class>
<class name="SomeSubclass" persistence-capable-superclass="AbstractParent">
<extension vendor-name="kodo" key="data-cache-timeout" value="-1"/>
<field name="someField"/>
</class>
</package>
</jdo>Note that the abstract class has the new value but not the subclass.
Now if in the begining I had started with the line in kodo.properties, then package.jdo would look like this on the 2nd run of the tool:
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="mykodotest">
<class name="AbstractParent">
<extension vendor-name="kodo" key="data-cache-timeout" value="500"/>
<field name="parentField"/>
</class>
<class name="SomeSubclass" persistence-capable-superclass="AbstractParent">
<extension vendor-name="kodo" key="data-cache-timeout" value="500"/>
<field name="someField"/>
</class>
</package>
</jdo>Note that the extension is added to both the abstract class and the subclass.
What gives? Any insight would be greatly appreciated.
Thanks,
P$That took care of it.
Thanks.
David
"Abe White" <[email protected]> wrote in message
news:aqon0l$hvr$[email protected]..
You're right; our apologies. I've sent you a new kodo-reverse-schema.jar
via email at your hotmail address. -
Set database dictionary in Mappingtool Ant Task
Hi,
I'm sure I'm not the only person that uses the MappingTool Ant task to
create SQL DDL, so why isn't there a way to tell it to use the correct
database
dictionary? When I run the ant task, the SQL producted is incorrect for my
database type.
I've checked the MappingTookTask.java file and I can that
JDBCConfiguration has a setter method to set the dictionary, but I can't
see how I would add this as a parameter to my Ant Task.
I've added
kodo.jdbc.DBDictionary=postgres
to my kodo.properties file but this doesn't seem to be used by the ant
task.
So for the momement I'm falling back on a sed script to correct the SQL
(i.e. int8(8) to int8, etc), but this is hardly ideal.
Thanks,
Andy.Abe White wrote:
Could it be that Kodo is in fact using the right dictionary, but is just
issuing bad SQL? What version of Kodo are you using? And what exactly
are the symptoms of the problem? The use of type names like int8(8)?
Is that generated for an existing database column, or a new one Kodo is
creating?Something strange is happening because my other Ant tasks, including a
mapping tool task that creates the database tables works fine.
Here is how I call the task that creates the schema file -
<pre>
<mappingToolTask action="refresh" sqlfile="${sql.schema.file}"
schemaaction="build">
<fileset dir="${project.src.dir}">
<include name="**/*.jdo" />
</fileset>
</mappingToolTask>
</pre>
Here is how I call the task that creates the database tables -
<pre>
<mappingToolTask action="${param.action}">
<fileset dir="${project.src.dir}">
<include name="**/*.jdo" />
</fileset>
</mappingToolTask>
</pre>
As you can see only only differnce between the two tasks is the sqlfile
and schemaaction properties - it is as if the code that writes the schema
file does use the same dictionary logic as when the database tables are
created.
Th error manifests itself as incorrect data types (for PostgreSQL). I get
int(8) instead of int8, etc. Currently I correct this as follows -
line = line.replaceAll("int8\\(8\\)","int8");
line = line.replaceAll("int4\\(4\\)","int4");
line = line.replaceAll("timestamp\\(8\\)","timestamp");
line = line.replaceAll("bigserial\\(8\\)","bigserial");
line = line.replaceAll("bool\\(1\\)","boolean");
line = line.replaceAll("text\\(-1\\)","text");
line = line.replaceAll("float8\\(8\\)","float8");
I'm using 3.3.4.
Andy. -
JWSC ant task getting java.lang.NoSuchMethodError
Hi all,
I am trying to build a webservice with JWSC ant task in JDK 1.6 which uses JWS annotations and a few weblogic specific annotations.
I am getting the following error while building it.
However, when I build it from my IDE (eclipse) it works fine.
i tried copying the libraries from eclipse and ran the build. But it didn't work.
any one have faced this issue and resolved it ? Please let me know your suggestions.
I am using weblogic 10.3 libraries to build the web service.
jwsctest:
[jwsc] JWS: processing module /CaseStatusWebService
BUILD FAILED
java.lang.NoSuchMethodError: weblogic.wsee.tools.anttasks.DelegatingJavacTask$ExposingJavac.getTempdir()Ljava/io/File;
at weblogic.wsee.tools.anttasks.DelegatingJavacTask.getTempdir(DelegatingJavacTask.java:170)
at weblogic.wsee.tools.anttasks.JwsModule.initialize(JwsModule.java:303)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:252)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:229)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Thanks,
SriramHi Sriram,
Before running the ant task did you run the following startup script?
/setWLSEnv.sh
I found one of the customer in oracle knowledge base facing the similar issue like you and issue was solved after running the setWLSEnv startup script.
If the issue is still not resolved after trying the above suggestion, please attach the build.xml to this thread to review the same.
Thanks,
Vijaya
Maybe you are looking for
-
hi experts what are the structure of logical database
-
How to make new Mac Pro with iWeb 08 see my existing .mac site.
About a year ago I bought a new Mac Pro. Before that I had a G4 that I had used with an older version of iWeb to create a basic website for my business. I figured with the new Mac when I opened iWeb 08 it would see my .mac settings in System prefs an
-
SUS-MM Lanscape with SRM 5.0 as an Add-on with ECC6.0
All- We are implementing SRM 5.0 as an add on with ECC 6.0. We are aware of all the constraints and those constraints do not matter within our scope. The open question that we have is that if SRM is installed as an Add on with ECC. Can we also levera
-
Hello Gurus, I have an issue with the transfer of data through IDOC. When I tried to resend data for a person through PFAL, I couldnt find a specific subtype for infotype 1001 in the subtype coloumn. I check the data model and the same subtype exist
-
Why did you omit the perspective check box in the crop tool?
I used the perspective frequently because I have sciolosis & most of my photos are askew. that easy checkbox was very convenient.