[1.3.0] AbstractMethodError after upgrading from 1.2.7

296 views
Skip to first unread message

Johan Vosloo

unread,
Jan 21, 2015, 12:23:21 PM1/21/15
to play-fr...@googlegroups.com
Hi chaps

Trying to upgrade a 1.2.7. based app to the recently released 1.3.0 and running into an Hibernate related AbstractMethodError exception which is driving me nuts.

Here is an example stacktrace:

Caused by: java.lang.AbstractMethodError

at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)

at org.hibernate.type.AbstractType.hydrate(AbstractType.java:106)

at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2924)

at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1695)

at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1627)

at org.hibernate.loader.Loader.getRow(Loader.java:1509)

at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:719)

at org.hibernate.loader.Loader.processResultSet(Loader.java:949)

at org.hibernate.loader.Loader.doQuery(Loader.java:917)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:318)

at org.hibernate.loader.Loader.loadEntity(Loader.java:2145)

at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)

at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:161)

at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:2374)

at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:765)

at org.hibernate.type.EntityType.resolve(EntityType.java:505)

at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:168)

at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:137)

at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1112)

at org.hibernate.loader.Loader.processResultSet(Loader.java:969)

at org.hibernate.loader.Loader.doQuery(Loader.java:917)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)

at org.hibernate.loader.Loader.doList(Loader.java:2550)

at org.hibernate.loader.Loader.doList(Loader.java:2536)

at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366)

at org.hibernate.loader.Loader.list(Loader.java:2361)

at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495)

at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:357)

at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:198)

at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1194)

at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)

at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:268)

at play.db.jpa.GenericModel$JPAQuery.first(GenericModel.java:366)

at models.Statement.isAnyAllocatedByDateRange(Statement.java:654)



The last line is where my application code calls this method:

public static boolean isAnyAllocatedByDateRange(Date startDate, Date endDate) {
return (find("statementDate between ? and ? and allocationStatus = ?", startDate, endDate, Constants.Status.Statement.ALLOCATED).first() != null);
}


which, as you can see is as simple as can get. It certainly doesn't seem to be related to my app code, as it happens all over the place, on many different method calls.


The thing that is stumping me is that the exact same code initially works fine (log into an app with certain account) and then after switching accounts and going to the exact same screens (ie calling the exact same methods that were working a minute ago), it breaks, always on this Hibernate method:


Caused by: java.lang.AbstractMethodError

at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127)

        ...


The only plugins that might be relevant at this point are: spring and deadbolt ... although neither of those seems to be involved at the point of failure.

Any advice/pointers will be much appreciated!

Regards
Johan




Ciaran Treanor

unread,
Jan 21, 2015, 12:47:11 PM1/21/15
to play-fr...@googlegroups.com
Can you post you your dependencies.yml?

ct

Johan Vosloo

unread,
Jan 21, 2015, 3:30:36 PM1/21/15
to play-fr...@googlegroups.com
Sure - here it is:

# Application dependencies
require:
    - play
    - play -> crud
    - play -> spring 1.0.3
    - play -> deadbolt 1.5.4
    - play -> play-auditlog 0.4
    - play  -> press 1.0.37    
    - play  -> s3blobs 0.5
    - org.springframework.integration -> spring-integration-sftp 2.1.3.RELEASE
    - org.springframework  ->  spring-test 3.2.2.RELEASE:
        transitive: false
    - net.sourceforge.javacsv -> javacsv 2.0
    - net.sourceforge.htmlcleaner -> htmlcleaner 2.4
    - net.sourceforge.jexcelapi -> jxl 2.6.12
    - net.sf.jasperreports -> jasperreports 5.5.1:
        transitive: false
    - com.lowagie -> itext 2.1.7:
        transitive: false
    - commons-digester -> commons-digester 2.1
    - ar.com.fdvs -> DynamicJasper-core-fonts 1.0
    - ar.com.fdvs -> DynamicJasper 5.0.0:
        transitive: false
    - com.newrelic.agent.java -> newrelic-api 3.11.0
    - io.airbrake -> airbrake-java 2.2.8
    - uk.com.robust-it -> cloning 1.9.0
    - org.mindrot -> jbcrypt 0.3m
    - org.apache.tika -> tika-parsers 1.5:
        exclude:
            - org.ow2.asm -> *
            - asm -> *
# My custom repositories
repositories:
    - fdvs:
        type: iBiblio
        root: "http://archiva.fdvs.com.ar/repository/public1/"
        contains:
            - ar.com.fdvs -> *

Johan Vosloo

unread,
Jan 22, 2015, 4:11:03 AM1/22/15
to play-fr...@googlegroups.com
Oh and btw.... this only happens when I'm connected to the real DB (MySQL) - when the app is using the in-memory DB (db=mem), the error doesn't occur.

Ciaran Treanor

unread,
Jan 22, 2015, 11:02:56 AM1/22/15
to play-fr...@googlegroups.com
Oh, did you do a 'play clean; play deps --sync' before launched your app?

ct

Johan Vosloo

unread,
Jan 22, 2015, 4:23:04 PM1/22/15
to play-fr...@googlegroups.com
Yes, cleaned and resynced several times to be sure

tazmaniac

unread,
Jan 23, 2015, 1:22:13 PM1/23/15
to play-fr...@googlegroups.com
I'm not seeing an issue with my Hibernate/MySQL app and the 1.3 release so I would say it is likely to be a dependency issue in your app

Johan Vosloo

unread,
Jan 25, 2015, 12:03:24 PM1/25/15
to play-fr...@googlegroups.com
Thanks Tazmaniac.

I will figure it out and report back here if it's worth doing so.

Johan Vosloo

unread,
Jan 25, 2015, 3:07:53 PM1/25/15
to play-fr...@googlegroups.com
Found the issue: it was in the S3Blobs plugin. 

FWIW, here's the issue explained:

Some deprecated methods were removed in Hib4 (see here for the details https://developer.jboss.org/wiki/HibernateCoreMigrationGuide40), specifically:

nullSafeGet(ResultSet rs, String name) 

and 
 
nullSafeSet(PreparedStatement st, T value, int index)

which the the S3Blobs plugin was overriding.
I updated the 2 method overrides with the new signatures as required by Hib4 and voila!

On Wednesday, 21 January 2015 19:23:21 UTC+2, Johan Vosloo wrote:

Chris Webb

unread,
Jan 26, 2015, 3:04:46 AM1/26/15
to play-fr...@googlegroups.com
Johan, great to hear you managed to resolve the issue.

--
You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/lySJPnIn0e8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
UK: +44 77 8639 2359
AUS: +61 4 9113 2581
Reply all
Reply to author
Forward
0 new messages