Opened 17 years ago
Closed 17 years ago
#655 closed defect (fixed)
Plugins -> defintions fails with 'illegal attempt to dereference collection'
Reported by: | Jari Häkkinen | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.5 |
Component: | web | Version: | trunk |
Keywords: | Cc: |
Description
illegal attempt to dereference collection [plugindefi0_.id
.guiContexts] with element property reference [itemType] [SELECT COUNT(DISTINCT pld) FROM net.sf.basedb.core.data.PluginDefinitionData pld LEFT JOIN pld.guiContexts alj1 LEFT JOIN pld.guiContexts ctx WHERE ((pld.requiresConfiguration = :p12519437) AND (pld.guiContexts.itemType = :p11113345))]
when I try to list plugin defintions as a "normal" user. As administrator the listing works.
My configuration is
Version BASE 2.4.0pre (build #3530; schema #36) Web server Apache Tomcat/5.5.20 Database Server MySQL 5.0.27-standard Database Dialect org.hibernate.dialect.MySQLInnoDBDialect JDBC Driver com.mysql.jdbc.Driver (version 5.0) Java runtime Java(TM) 2 Runtime Environment, Standard Edition (1.5.0_07-164), Apple Computer, Inc. Operating system Mac OS X i386 10.4.10 Memory Total: 36.5 MB Free: 13.1 MB Max: 494.5 MB
Change History (13)
comment:1 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Milestone: | → BASE 2.4 |
---|---|
Priority: | major → minor |
Resolution: | worksforme |
Status: | closed → reopened |
I can now get this error when:
- I try to use an import plug-in and use the auto-detect function
- If no file format is found I get the "No matching file format" message
- I click on the "Add file format" button
- In the "Create configuration" I click "Select" to select a plug-in
- Now the error message in the description of this ticket appears.
The workaround is to open the 'view/presets' dropdown and select 'clear filter'. The bug is caused by the "Add file format" setting an invalid filter on the plug-ins list. This filter is remembered and is used the next time entering the plug-ins list, also when accessed from the menu.
comment:3 by , 17 years ago
Summary: | Plugins -> defintions fails with ... → Plugins -> defintions fails with 'illegal attempt to dereference collection' |
---|
comment:4 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:5 by , 17 years ago
Status: | new → assigned |
---|
comment:6 by , 17 years ago
In case there are existing presets which filters on the invalid filter these should be changed by an update script.
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:8 by , 17 years ago
Milestone: | BASE 2.4 → BASE 2.4.1 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
We never fixed the "Add file format" button from the auto-detect file format dialog. It is still creating invalid filters. This should be fixed in 2.4.1. We must also fix bad values that has gone into the database. This can't be done until 2.5 because it requires updating the schemaVersion.
comment:9 by , 17 years ago
comment:10 by , 17 years ago
Milestone: | BASE 2.4.2 → BASE 2.5 |
---|
comment:11 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:12 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
There is still a problem with this. Users that installed the first (partial) fix may have got new bad filters. When the second update is executed the bad filters will collide with the good filters. In this case, the bad filters should actually be removed, not changed to good filters. Stack trace is:
--Updating schema version: 42 -> 43...16:34:37,334 ERROR Update:1671 - updateToSchemaVersion43: FAILED net.sf.basedb.core.BaseException: could not execute native bulk manipulation query at net.sf.basedb.core.HibernateUtil.executeUpdate(HibernateUtil.java:1254) at net.sf.basedb.core.Update.updateToSchemaVersion43(Update.java:1659) at net.sf.basedb.core.Update.updateDatabase(Update.java:745) at net.sf.basedb.install.InitDB.main(InitDB.java:73) Caused by: org.hibernate.exception.ConstraintViolationException: could not execute native bulk manipulation query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:174) at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1163) at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334) at net.sf.basedb.core.HibernateUtil.executeUpdate(HibernateUtil.java:1250) ... 3 more Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '3161-$ctx.itemType' for key 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708) at com.mysql.jdbc.Connection.execSQL(Connection.java:3255) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1566) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1480) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1465)
I am not able to reproduce this