Seam « cfg « JPA Q&A

1. Could not parse configuration hibernate.cfg.xml

Hey all. I've been trying to setup simple Seam/Hibernate application using examples from tutorial and some others. When I add Hibernate I get an exception saying it can't parse hibernate.cfg.xml. The very same hibernate.cfg.xml I used in a pure hibernate test app just to test it and it's ok. So here we go :

2. Error: hibernate.cfg.xml not found when l launch a test

FAILED CONFIGURATION: @BeforeSuite startSeam org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm at org.jboss.seam.Component.newInstance( at org.jboss.seam.contexts.Contexts.startup( at org.jboss.seam.contexts.Contexts.startup( at org.jboss.seam.contexts.ServletLifecycle.endInitialization( at org.jboss.seam.init.Initialization.init( at org.jboss.seam.mock.AbstractSeamTest.startSeam( at org.jboss.seam.mock.SeamTest.startSeam( Caused by: java.lang.RuntimeException: could not deploy a process definition at org.jboss.seam.bpm.Jbpm.installProcessDefinitions( at org.jboss.seam.bpm.Jbpm.startup( at org.jboss.seam.util.Reflections.invoke( at org.jboss.seam.util.Reflections.invokeAndWrap( at org.jboss.seam.Component.callComponentMethod( at org.jboss.seam.Component.callCreateMethod( at org.jboss.seam.Component.newInstance( ... 21 more Caused by: org.hibernate.HibernateException: hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream( at org.hibernate.cfg.Configuration.getConfigurationInputStream( ...

3. externalize hibernate.cfg.xml

4. hibernate.cfg.xml is not picked up by Seam