- This topic has 2 replies, 2 voices, and was last updated 13 years, 3 months ago by
paul ford.
-
AuthorPosts
-
paul fordParticipantI followed Dave Meurer’s demo on scaffolding & deploying to GAE verbatim. Only differences is that I am connecting to Google Cloud SQL not amazon cloud db. My database connects fine within MyEclipse connection wizard. But the scaffolding wizard fails in last step with following stack trace:
java.lang.RuntimeException: Error invoking function: initializeCrud with parameters: [Ljava.lang.Object;@71bfa007
at org.skyway.core.generate.snippet.function.FunctionInvoker.invoke(FunctionInvoker.java:102)
at org.skyway.core.generate.snippet.function.FunctionSnippetExpression.evaluate(FunctionSnippetExpression.java:26)
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:24)
at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
at org.skyway.core.generate.generator.control.ResourceGenerator.generate(ResourceGenerator.java:19)
at org.skyway.core.generate.execute.GenerationJob.generate(GenerationJob.java:115)
at org.skyway.core.generate.execute.GenerationJob$1.run(GenerationJob.java:59)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.skyway.core.generate.execute.GenerationJob.run(GenerationJob.java:55)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.RuntimeException: Unable to load data type from table(s): [org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInput@3a749623, org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInput@3c2cf1d0]
at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.generateDataTypes(TableDataTypeInputProvider.java:222)
at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.getDataTypes(TableDataTypeInputProvider.java:73)
at com.skyway.scaffolding.crud.datatype.FilteredDataTypeInputProvider.getDataTypes(FilteredDataTypeInputProvider.java:33)
at com.skyway.scaffolding.crud.util.ContextAwareCrudFunctions.getDataTypes(ContextAwareCrudFunctions.java:181)
at com.skyway.scaffolding.crud.util.ContextAwareCrudFunctions.initializeCrud(ContextAwareCrudFunctions.java:55)
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)
… 13 more
Caused by: org.hibernate.exception.GenericJDBCException: Could not get list of tables from database. Probably a JDBC driver problem.
Configured schema:null
Configured catalog:null
Available schemas:
Available catalogs:
information_schema
example
guestbook
mysql
performance_schemaat org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getTables(OracleMetaDataDialect.java:257)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:121)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:94)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:42)
at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.createJDBCConfiguration(HibernateModelGenerator.java:227)
at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.generateModel(HibernateModelGenerator.java:96)
at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.generateDataTypes(TableDataTypeInputProvider.java:208)
… 22 more
Caused by: java.sql.SQLException: No database selected
at com.google.cloud.sql.jdbc.internal.Exceptions.newSqlException(Exceptions.java:208)
at com.google.cloud.sql.jdbc.internal.SqlProtoClient.check(SqlProtoClient.java:198)
at com.google.cloud.sql.jdbc.internal.SqlProtoClient.executeSql(SqlProtoClient.java:87)
at com.google.cloud.sql.jdbc.internal.SqlProtoClient.executeSql(SqlProtoClient.java:76)
at com.google.cloud.sql.jdbc.Connection.executeSql(Connection.java:520)
at com.google.cloud.sql.jdbc.PreparedStatement.executeSqlImpl(PreparedStatement.java:141)
at com.google.cloud.sql.jdbc.Statement.executeImpl(Statement.java:154)
at com.google.cloud.sql.jdbc.Statement.executeQuery(Statement.java:327)
at com.google.cloud.sql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:128)
at com.google.cloud.sql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:57)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getTableResultSet(OracleMetaDataDialect.java:667)
at org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect.getTables(OracleMetaDataDialect.java:221)
… 31 moreBasically, on the select database tables dialog of this wizard The Dialect is ‘Auto Detect’ and MetaData Dialect is set to Default. This is true for the video as well. It fails on my end. After retrying and selecting dialect as hibernate mysql or mysql 5 still fails. Retrying with metadata dialect as only option org.hibernate.cfg.reveng.dialect.OracleMetaDataDialect. fails again. I’m assuming that the dialects and MetaDAta Dialects support for google cloud mysql 5.5 are not currently available in version 10 of myeclipse and this is the reason for the failure.
Please validate, provide thoughts. Clearly integration to google cloud sql for GAE / J is going to be an important feature moving forward. Any help would be appreciated at this point.
Best
paul
cconwayMemberHi Paul,
Before going into detail on this issue, I want to make sure that you’re aware that the GAE scaffolding feature of MyEclipse for Spring is experimental and not fully supported. After developing the GAE integration, we realized that a larger more Google-centric product was required to really support the Google stack. Unfortunately, that product development is on hold so there is no release date scheduled.
For your MySQL issue, can you check these:
1. Make sure the database name is in the connection URL. You can post the URL to this thread if that is unclear.
2. What jdbc driver are you using?
3. Is there a default schema/database in the MyEclipse instance? Are there tables in that schema?
paul fordParticipantUnderstood about the GAE integration is experimental no problem.
1.) JDBC connection is good test it and it connects just fine.
2.) using the google.sql.jar provided by google cloud sql which is essentially a mysql jar since that is what is hosted.
3.) How ever my first example is just to 3 java beans so no connection to any db is required. The example video on your website does not require a db connection since it is code generation to Java beans. the scaffolding is failing to inject through autowiring. I’m not a spring guru so this will take some more understanding on my part.Does this help clarify the problem?
All the best
paul
-
AuthorPosts