Hi, this report/question is for

tapestry-ioc 5.4.3
hibernate-core 5.2.10.Final
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

I'm trying to have a ServiceId for a hibernate Session:

@ServiceId("HibernateSession")
public static Session buildHibernateSession(
    ObjectLocator objectLocator
) {
    return new Configuration()
        .configure("hibernate.cfg.xml")
        .buildSessionFactory()
        .openSession();
}

As soon as the HibernateSession is invoked by Tapestry-IOC, I get an
error:  java.lang.ClassFormatError: Duplicate method name&signature in
class file $Session_350f95bde0b5

Please note thate I can serve the SessionFactory perfectly fine with
Tapestry-IoC (just by omitting the "openSession()").

Is there something wrong in the code above?
Can someone reproduce it?
Is this a bug in Tapestry-IoC?
Is this a bug/limitation in Hibernate?



2017-05-08 07:31:02 DEBUG HibernateSession:261 - Creating proxy for
service HibernateSession
Exception in thread "main" java.lang.ClassFormatError: Duplicate method
name&signature in class file $Session_350f95bde0b5
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
        at
org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:52)
        at
org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:160)
        at
org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:139)
        at
org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:648)
        at
org.apache.tapestry5.plastic.PlasticManager.createProxy(PlasticManager.java:253)
        at
org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.createProxy(PlasticProxyFactoryImpl.java:68)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:484)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.createProxy(ModuleImpl.java:478)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$900(ModuleImpl.java:40)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl$4.invoke(ModuleImpl.java:322)
        at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
        at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
        at 
org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:344)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$100(ModuleImpl.java:40)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl$1.invoke(ModuleImpl.java:198)
        at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:139)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl$2.invoke(ModuleImpl.java:215)
        at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:221)
        at
org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:112)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:497)
        at
org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:43)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils$22.run(InternalUtils.java:1429)
        at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)
        at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:60)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1254)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.extendPlanForInjectedFields(InternalUtils.java:1419)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.access$200(InternalUtils.java:50)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils$20.invoke(InternalUtils.java:1380)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils$20.invoke(InternalUtils.java:1366)
        at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
        at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
        at
org.apache.tapestry5.ioc.internal.util.InternalUtils.createConstructorConstructionPlan(InternalUtils.java:1363)
        at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.getPlan(ConstructorServiceCreator.java:52)
        at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
        at
org.apache.tapestry5.ioc.internal.ReloadableServiceImplementationObjectCreator.createInstance(ReloadableServiceImplementationObjectCreator.java:54)
        at
org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator$1.invoke(AbstractReloadableObjectCreator.java:136)
        at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
2017-05-08 07:31:02 ERROR Registry:208 - Duplicate method name&signature
in class file $Session_350f95bde0b5
        at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
2017-05-08 07:31:02 ERROR Registry:209 - Operations trace:
        at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
2017-05-08 07:31:02 ERROR Registry:218 - [ 1] Reloading class
dbla.dbla.controller.TraceImportController.
2017-05-08 07:31:02 ERROR Registry:218 - [ 2] Creating plan to
instantiate dbla.dbla.controller.TraceImportController via public
dbla.dbla.controller.TraceImportController()
2017-05-08 07:31:02 ERROR Registry:218 - [ 3] Calculating possible
injection value for field
dbla.dbla.controller.TraceImportController.hibernateSession
(org.hibernate.Session)
2017-05-08 07:31:02 ERROR Registry:218 - [ 4] Creating proxy for service
HibernateSession
        at
org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createInstance(AbstractReloadableObjectCreator.java:129)
        at
org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.createObject(AbstractReloadableObjectCreator.java:121)
        at $ControllerInterface_350f95bde0af.delegate(Unknown Source)
        at $ControllerInterface_350f95bde0af.execute(Unknown Source)
        at $ControllerInterface_350f95bde0ad.execute(Unknown Source)
        at dbla.dbla.DbLogAnonymizer.main(DbLogAnonymizer.java:19)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to