For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 9 replies, 5 voices, and was last updated 18 years, 7 months ago by
Riyad Kalla.
-
AuthorPosts
-
I’m building a web app that includes Spring (for business tier) and Hiberate (for the DAO tier).
After adding the ‘Spring capabilities’ the package explorer includes….
Spring 2.0 core libraries
Spring 2.0 AOP libraries
Spring 2.0 ORM/DAO/Hibernate librariesDo I now have to separate add Hibernate via the ‘Hibernate capabilities’ menu option or what?
Having down this before the ‘Hibernate 3.0 core libraries’ appears to be a duplicate of what’s in the ‘Spring 2.0 ORM/DAO/Hibernate libraries’ area.
July 2, 2007 at 1:52 pm #272261
Riyad KallaMemberYes you do need to now add Hibernate capabilities as well. This allows MyEclipse to understand the project as a combined “Hibernate-Spring” project.
July 2, 2007 at 5:22 pm #272282The problem is that by including both Spring 2 and Hibernate 3 capabilities in the same project I’m generating all sorts of conflicts with jars that appear in both areas.
Elsewhere I’ve already explained about ‘asm.jar’, I’ve now found a similar problems with ‘ehcache’.jar’.
Where duplicates appear, where should I be removing the jar from?
July 2, 2007 at 5:31 pm #272284Also for web apps where the code is being deployed to a Tomcat server, in what order are the jar files copied from the project list to the Tomcat webapps lib folder? If capability ‘a’ includes a jar file called ‘xxx.jar’, and capability ‘b’ includes the same named jar, and ‘a’ appears before ‘b’ in the package explorer, what version of the ‘xxx.jar’ file will be copied to the lib folder?
December 21, 2007 at 4:03 pm #279932
vgurbuxaniMemberhey All-
I just downloaded/installed the complete version of myeclipse 6 and created a new web project. added spring and hibernate capabilities.
and when i deploy my code i am getting the following error. Please advise.
1:31:53,078 ERROR [/dbTest]:3768 – Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘CheckInFactory’ defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
Caused by:
java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
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.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:245)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)December 21, 2007 at 9:14 pm #279941
Riyad KallaMemberWell you need to figure out which JAR provides the “java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor ” class and make sure it’s in your build path. If it’s from Hibernate, you can go to your Build Path properties under the project properties, go to the Libraries tab, and hit Add Libraries. If you go to the MyEclipse Library choice you should be able to find the appropriate Hibernate library that may be missing.
It’s possible it’s a Spring library as well? It’s hard to say, both of those frameworks are very large, so the core libraries are separated from the additional addon libraries in MyEclipse, and you may need to add some of the additional ones into your build path.
December 21, 2007 at 9:29 pm #279943
Riyad KallaMemberNOTE: This might help: http://forum.springframework.org/showthread.php?t=20324
it looks like it’s from the asm JAR.
December 29, 2007 at 6:35 am #280095
Michael J CaugheyParticipantThis is why I pay for the MyEclipse, these things are supposed to be capable of working together. Obviously someone didn’t test these two together. Spring 2.0 and Hibernate 3.0/3.1/3.2 use differing ASM libraries. This must be a recent change or I would have thougth i would find many more threads like this. This is a recent thread. i just doenloaded my updated IDE today.
January 9, 2008 at 9:03 am #280453Can I ask what you guys did to get started with Spring/Hibernate? I have two books on the way from amazon, but thought there might be help/examples available from some other source. I need it to be a Web (MVC) Spring/Hibernate example to be really effective.
When I click on MyEclipse->Examples on demand->Roadmap, I see that Spring tutorials are still only in the planning stages.
January 9, 2008 at 9:11 am #280458
Riyad KallaMemberDouglas,
I’m not sure what you mean by “MyEclipse > Examples On-Demand > Roadmap”, since MyEclipse 6.0.1 the MyEclipse > Examples On-Demand menu item has opened the Examples On-Demand web browser, it should show you a long list of example projects to pick from.There are a few hibernate, spring and hibernate+spring projects in there. Unfortunately no Spring MVC yet though.
You might want to make sure you are using the latest MyEclipse release.
-
AuthorPosts

