- This topic has 6 replies, 2 voices, and was last updated 14 years, 4 months ago by skassam.
-
AuthorPosts
-
skassamMemberI am getting the following error creating the scaffolding for 1 particular table in my SQL Anywhere 10 database. I am new to MyEclipse and Spring so any advice is greatly appreciated. TIA, Shinan
eclipse.buildId=unknown
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86Error
Wed Sep 15 11:25:30 CDT 2010
Generation job failedjava.lang.RuntimeException: Error invoking function: initializeCrud with parameters: [Ljava.lang.Object;@a80d36
at org.skyway.core.generate.snippet.function.FunctionInvoker.invoke(FunctionInvoker.java:102)
at org.skyway.core.generate.snippet.function.FunctionSnippetExpression.evaluate(FunctionSnippetExpression.java:25)
at org.skyway.core.generate.snippet.SnippetRegistry.evaluate(SnippetRegistry.java:88)
at org.skyway.core.generate.snippet.SnippetRegistry.getObjectAttribute(SnippetRegistry.java:99)
at org.skyway.core.generate.generator.invoke.InvokeSnippetGenerator.generate(InvokeSnippetGenerator.java:25)
at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:23)
at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:16)
at org.skyway.core.generate.generator.control.ProtectGenerator.generate(ProtectGenerator.java:32)
at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:23)
at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:16)
at org.skyway.core.generate.generator.control.ResourceGenerator.generate(ResourceGenerator.java:21)
at org.skyway.core.generate.execute.GenerationJob.generate(GenerationJob.java:90)
at org.skyway.core.generate.execute.GenerationJob.runInWorkspace(GenerationJob.java:46)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.RuntimeException: Unable to load resource: L/FixedBase/.springDSL/com/neptune/fixedbase/domain/CollectorCfg.datatype
at org.skyway.integration.data.persistence.importer.hibernate.StringCoreTemplateGenerator.getCore(StringCoreTemplateGenerator.java:133)
at org.skyway.integration.data.persistence.importer.hibernate.CoreExporter.getCores(CoreExporter.java:154)
at org.skyway.integration.data.persistence.importer.hibernate.DataTypeExporter.getDataTypes(DataTypeExporter.java:52)
at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.generateDataTypes(HibernateModelGenerator.java:174)
at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.generateModel(HibernateModelGenerator.java:97)
at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.generateDataTypes(TableDataTypeInputProvider.java:206)
at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.getDataTypes(TableDataTypeInputProvider.java:71)
at com.skyway.scaffolding.crud.datatype.FilteredDataTypeInputProvider.getDataTypes(FilteredDataTypeInputProvider.java:33)
at com.skyway.scaffolding.crud.util.ContextAwareCrudFunctions.getDataTypes(ContextAwareCrudFunctions.java:152)
at com.skyway.scaffolding.crud.util.ContextAwareCrudFunctions.initializeCrud(ContextAwareCrudFunctions.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.skyway.core.generate.snippet.function.FunctionInvoker.invoke(FunctionInvoker.java:94)
… 16 more
davemeurerMemberHello,
Would you be able to reply with the table definition? Specifically the field names and types, please. It looks like the error is due to a particular data type that may be causing an error during the generation.
Kind regards,
Dave
skassamMemberThanks Dave,
Actually, I tried removing the table then reading it and I was able to create the scaffold.
I do have a question about mapping SQL TIME datatype. It seems to have mapped to a Calendar Java type.
I get the following error when retreiving the objects from the table. If I remove the columns of datatype TIME then it works fine
INFO: atomikos non-xa connection proxy for ianywhere.ml.jdbcodbc.jdbc3.IConnection@43487e: calling prepareStatement on vendor connection…
2010-09-15 14:32:48,664 INFO [http-8080-2] NullableType – could not read column value from result set: cfg23_0_; Unsupported data conversion
2010-09-15 14:32:48,680 WARN [http-8080-2] JDBCExceptionReporter – SQL Error: 0, SQLState: null
2010-09-15 14:32:48,680 ERROR [http-8080-2] JDBCExceptionReporter – Unsupported data conversionTIA,
Shinan
davemeurerMemberHello Shinan,
Yes, all date/time fields are reverse engineered into the Calendar data type, but the database integration is managed by hibernate and the JPA annotations on that field.
One particular annotation to look at is the @Temporal above the TIME field in question. If the temporal type value is TemporalType.DATE, try to change that to TemporalType.TIMESTAMP and see if this resolves it.
You can also feel free to change the Calendar type to Date or another type and either run, or “re-scaffold” and use the JPA option.
Let me know if this helps,
Kind regards,
Dave
skassamMember@davemeurer wrote:
Hello Shinan,
Yes, all date/time fields are reverse engineered into the Calendar data type, but the database integration is managed by hibernate and the JPA annotations on that field.
One particular annotation to look at is the @Temporal above the TIME field in question. If the temporal type value is TemporalType.DATE, try to change that to TemporalType.TIMESTAMP and see if this resolves it.
You can also feel free to change the Calendar type to Date or another type and either run, or “re-scaffold” and use the JPA option.
Let me know if this helps,
Kind regards,
DaveThanks,
It is already a TIMESTAMP.Could you explain the “”re-scaffold” and use the JPA option.”?
Thank you!
davemeurerMemberCould you explain the “re-scaffold” and use the JPA option.?
Sure thing!
Rescaffolding: or regeneration through scaffolding again in the same project comes up many times in the development process when it is useful to have the ability to scaffold the inputs again, usually due to a change in the inputs.
JPA option: When scaffolding, you can choose from Database, JPA Entities, or Java Beans as the input in the first pane. JPA Entities are any existing JPA annotated domain objects in your project.
Here are some helpful links with more info:
–Rescaffolding tutorial
–Rescaffolding Video
–Double Rainbow guy scaffolds from JPA EntityHTH,
Dave
skassamMember@davemeurer wrote:
Could you explain the “re-scaffold” and use the JPA option.?
Sure thing!
Rescaffolding: or regeneration through scaffolding again in the same project comes up many times in the development process when it is useful to have the ability to scaffold the inputs again, usually due to a change in the inputs.
JPA option: When scaffolding, you can choose from Database, JPA Entities, or Java Beans as the input in the first pane. JPA Entities are any existing JPA annotated domain objects in your project.
Here are some helpful links with more info:
–Rescaffolding tutorial
–Rescaffolding Video
–Double Rainbow guy scaffolds from JPA EntityHTH,
DaveThanks for the information. Dbl Rainbow video was great! Funny and useful!
-
AuthorPosts