- This topic has 52 replies, 12 voices, and was last updated 17 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
pppooleMemberI am having this issue as well (even after doing your suggested “restore defaults”). My issue is a security exception caused by the jar signing: “Caused by: java.lang.SecurityException: class “x.x.x.Address$$EnhancerByCGLIB$$1005217a”‘s signer information does not match signer information of other classes in the same package”
Any other solutions?
Scott AndersonParticipantCan you post the fully qualified name of the class with the problem so we can tell what Jar it comes from please?
Only by doing that can we tell what the issue might be. Also, what version of MyEclipse are you using? There were some signing issues as late as 6.0M1 that should have been resolved in the 6.0GA release we just put out.
denmillsMemberNo, I was having the same problem as the original poster with the commons-collections.jar.
%%%% Error Creating SessionFactory %%%%
java.lang.SecurityException: class “org.apache.commons.collections.SequencedHashMap”‘s signer information does not match signer information of other classes in the same packageI tried several of the suggestions on this thread, but the only thing that worked for me was to remove the commons-collections.jar (vsn 2.1.1) from the hibernate 3.1 core libraries via the Project Capabilities menu. Since I’m using myfaces with this project (default myeclipse version), I guess the version of commons-collections.jar (vsn 3.1) in that library solved the signed jar issue for the moment.
pppooleMemberI am using the latest release of MyEclipse 6.0GA. I had been using 6.0M1 and had hoped that the final release of 6.0 would solve this issue. I am playing around with the JPA/Spring capabilities of MyEclipse in a test project. Here is my full stacktrace:
java.lang.ExceptionInInitializerError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘entityManagerFactory’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException–>null
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at net.paulpoole.jpa.app.TestApp.<clinit>(TestApp.java:16)
Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException–>null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:127)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:91)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
… 11 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
… 33 more
Caused by: java.lang.SecurityException: class “net.paulpoole.jpa.app.dao.Address$$EnhancerByCGLIB$$1005217a”‘s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
… 39 more
Exception in thread “main”
Riyad KallaMemberCaused by: java.lang.SecurityException: class “net.paulpoole.jpa.app.dao.Address$$EnhancerByCGLIB$$1005217a”‘s signer information does not
Are you using a different set of JPA libraries than the TopLink ones we ship?
pppooleMemberNo, I am using the hibernate 3.2 libraries that you ship with MyEclipse. All of the libraries that I am using (except MySql jdbc drivers) are provided by MyEclipse. I am at work and don’t have access to my machine, but off the top of my head, I am using the following MyEclipse libraries:
Spring Core/AOP/Persistence Core
Hibernate 3.2 core/annotations and entities
Peter ScholzMember@support-rkalla wrote:
Alejandro,
This is a known issue and we no longer sign those JARs in our upcoming 6.0 release. In the mean time,what you can do (and might need to do) is download the version of Hibernate you were using from the Hibernate site, and create a User Library with all those JARs in it, and add that to your build path of your project and remove the MyEclipse Hibernate libraries for the time being.We are really sorry for the trouble.
I have just installed the MyEclipse GA6.0 and have excatly the same problem.
I have tracked it down, that the problem arises when using hibernate and struts together in one project.
As far as I can see, there is a conflict for Hibernate’s commons-collections-2.1.1.jar which is not signed and Struts’ commons-beanuitls-1.7.0.jar which is signed by GENUITEC (as all commons jar files) and within beanutils there are some classes in the org.apache.commons package.
regards
peter
gcstangMemberIs there a fix for this yet?
I’m having the same issue and the fix on page one didn’t fix anything. I keep getting this popup telling me that an error has occured and see details just say’s Error.
When starting tomcat I get this in the output:
java.lang.SecurityException: class “org.apache.commons.collections.SequencedHashMap”‘s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.hibernate.mapping.Table.<init>(Table.java:32)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:120)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:251)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:236)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:152)
at org.hibernate.cfg.Configuration.add(Configuration.java:362)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:400)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:245)
at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:530)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:711)
denmillsMemberReferring to what Peter stated in the previous post about using struts and hibernate together:
This also happening when using Hibernate and myfaces together without struts because of the commons-collections.jar used in the myfaces libraries
gcstangMemberI’m using Hibernate and Spring together and having this issue.
Eclipse 3.3
MyEclipseIDE 6GA
Peter ScholzMemberThere seems to be a workaround:
download commons-beanutils-1.7.0.jar from commons.apache.org
Goto Window->Prefs->MyEclipse->Project Capabilities-> <whatever cap u r using>
remove commons-beanutils-1.7.0.jar from the list of jarsadd the downloaded commons-beanutils-1.7.0.jar to the list
If you don’t use hibernate you have to add commons-collections to the list as well, since commons-collections has a partial dependency on commons-collections
Now I did pass session initialization in hibernate, but still have some problems which do not seem to be related to the swapping of jars, but I’m not sure for now
Riyad KallaMemberGuys thank you for following up with so much detail, marking this as high-priority for our maintenence release. we are really sorry about this one.
Riyad KallaMemberpiet, thank you for providing a workaround until we get this fixed and pushed out.
gcstangMemberI downloaded hibernate and spring and created my own user libs. This is the only way I could get it to work.
gcstangMemberI’ve tried piet’s solution but still get this error:
Caused by: java.lang.SecurityException: class “org.hibernate.cfg.SecondPass”‘s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:267) -
AuthorPosts