I am trying to use prototypes in my EOModel.
By default I can use the prototypes provided by Wonder via the ERPrototypes Framework. But I want to extend them, I want to add two more prototypes.
Y tried creating an Entity named EOJDBCMyPostgresqlPrototypes, and selecting it on my Database Config, that way I could select prototypes from the Original EOJDBCPostgresqlPrototypes and from mine. But When I tried to generate SQL using the Generate SQL button I received the following exception:
java.lang.RuntimeException: Failed to generate SQL.
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory$ReflectionSQLGenerator.generateSchemaCreationScript(EOFSQLGeneratorFactory.java:60)
at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog.generateSql(GenerateSQLDialog.java:298)
at org.objectstyle.wolips.eomodeler.actions.GenerateSQLDialog$1.run(GenerateSQLDialog.java:279)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.reflect.InvocationTargetException
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:585)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGeneratorFactory$ReflectionSQLGenerator.generateSchemaCreationScript(EOFSQLGeneratorFactory.java:58)
... 3 more
Caused by: java.lang.NullPointerException
at com.webobjects.jdbcadaptor.JDBCExpression.columnTypeStringForAttribute(JDBCExpression.java:286)
at com.webobjects.eoaccess.EOSQLExpression.addCreateClauseForAttribute(EOSQLExpression.java:2498)
at com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatementsForEntityGroup(EOSynchronizationFactory.java:318)
at com.webobjects.eoaccess.EOSynchronizationFactory.createTableStatementsForEntityGroups(EOSynchronizationFactory.java:487)
at com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationStatementsForEntities(EOSynchronizationFactory.java:951)
at com.webobjects.eoaccess.EOSynchronizationFactory.schemaCreationScriptForEntities(EOSynchronizationFactory.java:747)
at org.objectstyle.wolips.eomodeler.core.sql.EOFSQLGenerator.generateSchemaCreationScript(EOFSQLGenerator.java:483)
... 8 more
I thought maybe I was wrong mixing prototypes, so I removed the ERPrototypes Framework from my project, renamed my entity to EOJDBCPostgresqlPrototypes and I created the prototypes I needed.
But the same exception appears once I try to generate SQL.
If I rename my entity that defines the prototypes, add the ERPrototypes Framework and use just prototypes defined there I can generate the sql without any problems.
Does anyone have a clue how to solve this?
Thanks in advanced.