Ive already followed that, as I said the EAR DEPLOYS alright look:

14:16:37,423 INFO  [MainDeployer] Starting deployment of package: 
file:/usr/local/src/jboss-3.2.3/server/default/deploy/ejbhibernate.ear
14:16:37,425 INFO  [EARDeployer] Init J2EE application: 
file:/usr/local/src/jboss-3.2.3/server/default/deploy/ejbhibernate.ear
14:16:39,211 INFO  [EjbModule] Deploying test/EJBHibernate
14:16:39,395 INFO  [HibernateServiceMBean] starting service at JNDI name: 
java:/hibernate/HibernateFactory
14:16:39,396 INFO  [HibernateServiceMBean] service properties: 
{hibernate.session_factory_name=java:/hibernate/HibernateFactory, 
hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.JBossTransactionManagerLookup,
 hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, 
hibernate.show_sql=false, hibernate.use_outer_join=false, 
hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory,
 hibernate.connection.datasource=java:/PostgresDS, jta.UserTransaction=UserTransaction}
14:16:39,397 INFO  [Configuration] Mapping resource: mappings/User.hbm.xml
14:16:39,695 INFO  [Binder] Mapping class: org.jboss.ejbhibernate.User -> users
14:16:39,698 INFO  [Configuration] processing one-to-many association mappings
14:16:39,703 INFO  [Configuration] processing one-to-one association property 
references
14:16:39,703 INFO  [Configuration] processing foreign key constraints
14:16:39,706 INFO  [Dialect] Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
14:16:39,707 INFO  [SettingsFactory] Use outer join fetching: false
14:16:39,708 INFO  [NamingHelper] JNDI InitialContext properties:{}
14:16:40,131 INFO  [DatasourceConnectionProvider] Using datasource: java:/PostgresDS
14:16:40,132 INFO  [TransactionFactoryFactory] Transaction strategy: 
net.sf.hibernate.transaction.JTATransactionFactory
14:16:40,135 INFO  [NamingHelper] JNDI InitialContext properties:{}
14:16:40,167 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
14:16:40,170 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
14:16:40,171 INFO  [NamingHelper] JNDI InitialContext properties:{}
14:16:40,174 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: net.sf.hibernate.transaction.JBossTransactionManagerLookup
14:16:40,175 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
14:16:40,182 INFO  [SettingsFactory] Use scrollable result sets: true
14:16:40,182 INFO  [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
14:16:40,183 INFO  [SettingsFactory] Optimize cache for minimal puts: false
14:16:40,183 INFO  [SettingsFactory] Query language substitutions: {}
14:16:40,183 INFO  [SettingsFactory] cache provider: net.sf.ehcache.hibernate.Provider
14:16:40,185 INFO  [Configuration] instantiating and configuring caches
14:16:40,185 INFO  [SessionFactoryImpl] building session factory
14:16:40,485 INFO  [SessionFactoryObjectFactory] Factory name: 
java:/hibernate/HibernateFactory
14:16:40,486 INFO  [NamingHelper] JNDI InitialContext properties:{}
14:16:40,488 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: 
java:/hibernate/HibernateFactory
14:16:40,489 WARN  [SessionFactoryObjectFactory] InitialContext did not implement 
EventContext
14:16:40,490 INFO  [NamingHelper] JNDI InitialContext properties:{}
14:16:40,777 INFO  [StatelessSessionInstancePool] Started 
jboss.j2ee:jndiName=ejb/test/EJBHibernate,plugin=pool,service=EJB
14:16:40,778 INFO  [StatelessSessionContainer] Started 
jboss.j2ee:jndiName=ejb/test/EJBHibernate,service=EJB
14:16:40,779 INFO  [EjbModule] Started 
jboss.j2ee:module=ejbhibernate.jar,service=EjbModule
14:16:41,932 INFO  [EJBDeployer] Deployed: 
file:/usr/local/src/jboss-3.2.3/server/default/tmp/deploy/tmp461ejbhibernate.ear-contents/ejbhibernate.jar
14:16:43,275 INFO  [EmbeddedTomcatService] deploy, ctxPath=/ejbhibernate, 
warUrl=file:/usr/local/src/jboss-3.2.3/server/default/tmp/deploy/tmp461ejbhibernate.ear-contents/client.war/
14:16:43,739 INFO  [Engine] SingleSignOnContextConfig[/ejbhibernate]: Added 
certificates -> request attribute Valve
14:16:43,922 WARN  [EmbeddedTomcatService] Unable to invoke setDelegate on class 
loader:[EMAIL PROTECTED]
14:16:43,923 INFO  [Engine] StandardManager[/ejbhibernate]: Seeding random number 
generator class java.security.SecureRandom
14:16:44,007 INFO  [Engine] StandardManager[/ejbhibernate]: Seeding of random number 
generator has been completed
14:16:44,010 INFO  [Engine] StandardWrapper[/ejbhibernate:default]: Loading container 
servlet default
14:16:44,066 INFO  [Engine] StandardWrapper[/ejbhibernate:invoker]: Loading container 
servlet invoker
14:16:44,942 INFO  [EARDeployer] Started J2EE application: 
file:/usr/local/src/jboss-3.2.3/server/default/deploy/ejbhibernate.ear
14:16:44,943 INFO  [MainDeployer] Deployed package: 
file:/usr/local/src/jboss-3.2.3/server/default/deploy/ejbhibernate.ear

But when I run the servelt that calls the EJB Session(Who calls Hibernate) I receive:
pages and pages of errors, the hightlights are:(START)
2004-04-05 14:20:06,756 DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new 
thread data2004-04-05 14:20:07,528 INFO  
[org.jboss.security.plugins.JaasSecurityManagerService] Created [EMAIL PROTECTED]
2004-04-05 14:20:07,533 INFO  [org.jboss.security.plugins.JaasSecurityManagerService] 
setCachePolicy, [EMAIL PROTECTED]
2004-04-05 14:20:07,534 INFO  [org.jboss.security.plugins.JaasSecurityManagerService] 
Added LWebSec, [EMAIL PROTECTED] to map
(SNIP)
*********************************************************
2004-04-05 14:20:07,869 INFO  [net.sf.hibernate.cfg.Configuration] configuring from 
resource: /hibernate.cfg.xml
2004-04-05 14:20:07,870 INFO  [net.sf.hibernate.cfg.Configuration] Configuration 
resource: /hibernate.cfg.xml
2004-04-05 14:20:07,884 WARN  [net.sf.hibernate.cfg.Configuration] /hibernate.cfg.xml 
not found
2004-04-05 14:20:07,932 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error:
java.lang.ExceptionInInitializerError
        at org.jboss.ejbhibernate.EjbHibernateBean.SayHello(EjbHibernateBean.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

**********************************************
  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
        at java.lang.Thread.run(Thread.java:534)
14:20:08,065 ERROR [STDERR] java.rmi.ServerError: Unexpected Error; nested exception 
is:
        java.lang.NoClassDefFoundError
14:20:08,070 ERROR [STDERR]     at 
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:374)
********************************************
    at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.RuntimeException: Exception building SessionFactory: 
/hibernate.cfg.xml not
found
        at org.jboss.ejbhibernate.HibernateUtil.(HibernateUtil.java:14)
        ... 71 more
Caused by: net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found

I using the HibernateUtil.class to TRY

 static {
        try {
            sessionFactory = new Configuration().configure().buildSessionFactory();
        } catch (HibernateException ex) {
            throw new RuntimeException("Exception building SessionFactory: " + 
ex.getMessage(), ex);
        }
    }
And the configuration lines gives the error, maybe I SHOULD SET A PARAMETER on the 
function or on one of the XMLS??????????


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829271#3829271

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829271


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to