Exceção ao fazer deploy de aplicação usando seam

15/09/2009

1

Estava desenvolvendo uma aplicação para aprender sobre o JBoss Seam
coloquei todos os jars corretamento mas recebo esta exceção, qual o problema?


SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
org.jboss.seam.InstantiationException: Could not instantiate Seam component: hibernateSessionFactory
at org.jboss.seam.Component.newInstance(Component.java:2144)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113)
at org.jboss.seam.init.Initialization.init(Initialization.java:740)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.RuntimeException: exception invoking: startup
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
at org.jboss.seam.Component.newInstance(Component.java:2132)
... 20 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
... 23 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)
at org.jboss.seam.persistence.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:93)

... 29 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 32 more
15/09/2009 16:10:10 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context ´/testTomcat´
15/09/2009 16:10:11 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<clinit>(ChameleonRenderKitFactory.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:519)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:405)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135)
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:717)

at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:186)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:131)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 29 more
Responder

Posts

15/09/2009

Anonymous

<?xml version=´1.0´ encoding=´UTF-8´&63>
<components xmlns=´http://jboss.com/products/seam/components´
xmlns:core=´http://jboss.com/products/seam/core´
xmlns:persistence=´http://jboss.com/products/seam/persistence´
xmlns:transaction=´http://jboss.com/products/seam/transaction´
xmlns:security=´http://jboss.com/products/seam/security´
xmlns:xsi=´http://www.w3.org/2001/XMLSchema-instance´
xsi:schemaLocation=
´http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd´>

<core:manager conversation-timeout=´120000´ concurrent-request-timeout=´500´ conversation-id-parameter=´cid´></core:manager>
<persistence:hibernate-session-factory name=´hibernateSessionFactory´></persistence:hibernate-session-factory>
<persistence:managed-hibernate-session name=´seamDataBase´ session-factory=´´ auto-create=´true´></persistence:managed-hibernate-session>

</components>
Responder

15/09/2009

Anonymous

<!DOCTYPE hibernate-configuration PUBLIC
´-//Hibernate/Hibernate Configuration DTD 3.0//EN´
´http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd´>

<hibernate-configuration>
<session-factory>
<property name=´show_sql´>false</property>
<property name=´connection.datasource´>java:comp/env/jdbc/SeamTestDS</property>
<property name=´hbm2ddl.auto´>create-drop</property>
<property name=´cache.provider_class´>org.hibernate.cache.HashtableCacheProvider</property>
<property name=´transaction.flush_before_completion´>true</property>
<property name=´transaction.factory_class´>org.hibernate.transaction.JDBCTransactionFactory</property>

</session-factory>
</hibernate-configuration>
Responder

16/09/2009

Dyego.carmo

Falta a biblitoeca commons loggin da Apache !

http://jakarta.apache.org
Responder

16/09/2009

Anonymous

segue as libs do meu projeto

antlr.jar
asm.jar
cglib.jar
common-annotations.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-lang.jar
commons-logging.jar
concurrent.jar
dom4j.jar
hibernate.jar
hibernate-annotations.jar
hibernate-commons.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate-validator.jar
hsqldb.jar
javassist.jar
jboss-common-core.jar
jboss-el.jar
jboss-seam.jar
jboss-seam-debug.jar
jboss-seam-ui.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jsf-tlds.jar
jstl.jar
jta.jar
persistence-api.jar
richfaces-api.jar
richfaces-impl.jar
richfaces-ui.jar
standard.jar
Responder