Hi, The error states that Tapestry Plastic failed to build a proxy class for the Session interface because it found duplicate method signature. I saw this error once when I tried to implement generic support and had two methods with same erasure types. Maybe if you find the name of the method that fails -- it'd help? Try attaching with debugger and lookup name of the method.
On Mon, May 8, 2017 at 8:56 AM, Thomas Mayer <thomas.ma...@student.kit.edu> wrote: > 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.ReloadableServiceImplementatio > nObjectCreator.createInstance(ReloadableServiceImplementatio > nObjectCreator.java:54) > at > org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreato > r$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.AbstractReloadableObjectCreato > r.createInstance(AbstractReloadableObjectCreator.java:129) > at > org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreato > r.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 > > -- Dmitry Gusev AnjLab Team http://anjlab.com