Still fighting with Direct2Web and the Movie
EOModel.
Migration is failing with a NPE that I could
trace to the ERTag not having a columnName
and therefore not externalType for
its id attribute. As I have been
watching videos and noticed that this EOModel is
always being used, I assume I am doing something wrong
or my properties file is not correct.
As you can see in this EOEntity, the second
EOAttribute is missing something:
<EOEntity MovieTag
<EOAttribute item_movieID
columnName : 'item_MOVIE_ID'
name : 'item_movieID'
externalType : 'integer'
>
<EOAttribute tag_id
columnName : 'tag_null'
name : 'tag_id'
>
<EORelationship ERTag
joinSemantic : 'EOInnerJoin'
isToMany : 'N'
joins : '({sourceAttribute = "tag_id";
destinationAttribute = "id"; })'
name : 'ERTag'
destination : 'ERTag'
isMandatory : 'Y'
>
<EORelationship Movie
joinSemantic : 'EOInnerJoin'
isToMany : 'N'
joins : '({sourceAttribute = "item_movieID";
destinationAttribute = "movieID"; })'
name : 'Movie'
destination : 'Movie'
isMandatory : 'Y'
>
Caused by: java.lang.NullPointerException
at
com.webobjects.jdbcadaptor.JDBCExpression.columnTypeStringForAttribute(JDBCExpression.java:160)
at
com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory._columnCreationClauseForAttribute(EOSchemaSynchronizationFactory.java:2124)
at
com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory.createTableStatementsForEntityGroup(EOSchemaSynchronizationFactory.java:350)
at
er.taggable.migrations.ERTaggableEntity0.upgrade(ERTaggableEntity0.java:103)
at
er.taggable.migrations.ERTaggableEntity0.upgrade(ERTaggableEntity0.java:75)
at
er.extensions.migration.ERXMigrationDatabase$Migration.upgrade(ERXMigrationDatabase.java:440)
at
er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(ERXMigrator.java:481)
Thanks again.
On 06.08.2016 21:39,
Theodore Petrosky wrote:
I had the same problem myself. My ‘solution’ was to
switch the database to postgresql. I realize this
doesn’t address the problem, but sometimes you just
have to get work done.
Ted
Hello,
I have decided that I was going to spend
some time learning D2W. I have been trying
to get the ERMovies example to work, but
the h2 database seems to not be started
when the application is run. Am I supposed
to start the jdbc:h2:file myself in the
code or is the example supposed to start
the database automatically? Here is the
error that I get:
failed to open database
channel. Check your connection
dictionary, and ensure your database is
correctly configured.
Thanks,
_______________________________________________
Do not post admin requests to the list. They
will be ignored.
Webobjects-dev mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden