[JBoss-user] [Beginners Corner] - JBoss 4.0.3SP1 / Eclipse 3.1.2 / EJB 3.0

2006-03-02 Thread tdume
I want to use JBoss and EJB 3 to make a big application and i have first to 
validate these choices with a little application with an entity bean, a 
stateless session bean and a swing client. The problems began with this swing 
client because i have no problem when i use a servlet as client.

Here is my persistence.xml :

?xml version=1.0 encoding=UTF-8?
  | entity-manager
  |  nameauth/name
  |  jta-data-sourcejava:/AuthDS/jta-data-source
  |  properties
  |   property name=hibernate.hbm2ddl.auto
  |value=none / 
  |  /properties
  | /entity-manager

application.xml : 

?xml version=1.0 encoding=UTF-8?
  | application version=1.4
  | xmlns=http://java.sun.com/xml/ns/j2ee;
  | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  | xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  | http://java.sun.com/xml/ns/j2ee/application_1_4.xsd;
  | display-nameValidJBoss/display-name
  | module
  | ejbentities.par/ejb
  | /module
  | module
  | ejbbusiness.ejb3/ejb
  | /module
  | /application
  | 

I have an entity bean put in a .par and a stateless session bean put in a 
.ejb3. I finally make a .ear which is deployed on jboss. The listing is here :
10:01:40,491 INFO  [EARDeployer] Init J2EE application: file:/C:/Program 
Files/jboss-4.0.3SP1/server/default/deploy/validjboss.ear
  | 10:01:41,102 INFO  [JaccHelper] Initialising JACC Context for deployment: 
business.ejb3
  | 10:01:41,733 INFO  [Ejb3AnnotationHandler] found EJB3: 
ejbName=test.auth.business.UtilisateurManagerBean, 
class=test.auth.business.UtilisateurManagerBean, type=STATELESS
  | 10:01:43,085 INFO  [JaccHelper] test.auth.business.UtilisateurManagerBean 
has no @SecurityDomain - skipping JACC configuration
  | 10:01:43,095 INFO  [JaccHelper] JACC Policy Configuration for deployment 
has been put in service
  | 10:01:43,095 INFO  [Ejb3Deployment] EJB3 deployment time took: 1993
  | 10:01:43,145 INFO  [JaccHelper] Initialising JACC Context for deployment: 
entities.par
  | 10:01:43,415 INFO  [Ejb3Deployment] Found persistence.xml file in EJB3 jar
  | 10:01:43,876 INFO  [Environment] Hibernate 3.1
  | 10:01:43,936 INFO  [Environment] hibernate.properties not found
  | 10:01:43,946 INFO  [Environment] using CGLIB reflection optimizer
  | 10:01:43,946 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
  | 10:01:44,647 INFO  [Ejb3Configuration] found EJB3 Entity bean: 
test.auth.entity.Utilisateur
  | 10:01:46,249 INFO  [Configuration] processing extends queue
  | 10:01:46,249 INFO  [Configuration] processing collection mappings
  | 10:01:46,249 INFO  [Configuration] processing association property 
references
  | 10:01:46,249 INFO  [Configuration] processing foreign key constraints
  | 10:01:46,470 INFO  [Configuration] processing extends queue
  | 10:01:46,470 INFO  [Configuration] processing collection mappings
  | 10:01:46,480 INFO  [Configuration] processing association property 
references
  | 10:01:46,480 INFO  [Configuration] processing foreign key constraints
  | 10:01:47,261 INFO  [ConnectionProviderFactory] Initializing connection 
provider: org.hibernate.ejb.InjectedDataSourceConnectionProvider
  | 10:01:47,311 INFO  [InjectedDataSourceConnectionProvider] Using provided 
datasource
  | 10:01:48,593 INFO  [SettingsFactory] RDBMS: PostgreSQL, version: 8.1.3
  | 10:01:48,603 INFO  [SettingsFactory] JDBC driver: PostgreSQL Native Driver, 
version: PostgreSQL 8.1 JDBC3 with SSL (build 404)
  | 10:01:48,953 INFO  [Dialect] Using dialect: 
org.hibernate.dialect.HSQLDialect
  | 10:01:49,083 INFO  [TransactionFactoryFactory] Using default transaction 
strategy (direct JDBC transactions)
  | 10:01:49,103 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 10:01:49,164 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup
  | 10:01:49,164 INFO  [SettingsFactory] Automatic flush during 
beforeCompletion(): disabled
  | 10:01:49,164 INFO  [SettingsFactory] Automatic session close at end of 
transaction: disabled
  | 10:01:49,164 INFO  [SettingsFactory] JDBC batch size: 15
  | 10:01:49,164 INFO  [SettingsFactory] JDBC batch updates for versioned data: 
disabled
  | 10:01:49,174 INFO  [SettingsFactory] Scrollable result sets: enabled
  | 10:01:49,174 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
  | 10:01:49,174 INFO  [SettingsFactory] Connection release mode: 
after_statement
  | 10:01:49,184 INFO  [SettingsFactory] Default batch fetch size: 1
  | 10:01:49,184 INFO  [SettingsFactory] Generate SQL with comments: disabled
  | 10:01:49,184 INFO  [SettingsFactory] Order SQL updates by primary key: 
disabled
  | 10:01:49,184 INFO  [SettingsFactory] Query translator: 
org.hibernate.hql.ast.ASTQueryTranslatorFactory
  | 10:01:49,244 INFO  [ASTQueryTranslatorFactory] Using 
ASTQueryTranslatorFactory
  | 10:01:49,244 INFO  [SettingsFactory] Query language 

[JBoss-user] [Beginners Corner] - Re: JBoss 4.0.3SP1 / Eclipse 3.1.2 / EJB 3.0

2006-03-02 Thread tdume
I finally solved this problem by adding antlr.jar to the classpath. I changed 
also my persistence.xml (put the value of the property hibernate.hbm2ddl.auto 
to update) and i have errors when i try to deploy my ear file (here are the 
two errors): 
13:29:06,297 ERROR [SchemaUpdate] could not get database metadata
  | org.postgresql.util.PSQLException: ERROR: relation 
information_schema.system_sequences does not exist
  | at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
  | at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
  | at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
  | at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)
  | at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:332)
  | at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:231)
  | at 
org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
  | at 
org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:119)
  | at 
org.hibernate.tool.hbm2ddl.DatabaseMetadata.init(DatabaseMetadata.java:45)
  | at 
org.hibernate.tool.hbm2ddl.DatabaseMetadata.init(DatabaseMetadata.java:38)
  | at 
org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:133)
  | at 
org.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:298)
  | at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
  | at 
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:358)
  | at 
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:484)
  | at 
org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:202)
  | at 
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:78)
  | at 
org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:512)
  | at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:253)
  | at org.jboss.ejb3.Ejb3JmxDeployment.create(Ejb3JmxDeployment.java:230)
  | at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
  | at 
org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
  | at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
  | 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:585)
  | at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
  | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
  | at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
  | at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
  | at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
  | at $Proxy0.create(Unknown Source)
  | at org.jboss.system.ServiceController.create(ServiceController.java:341)
  | at org.jboss.system.ServiceController.create(ServiceController.java:284)
  | at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
  | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
  | at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
  | at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
  | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
  | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
  | at $Proxy10.create(Unknown Source)
  | at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:208)
  | 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:585)
  | at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
  | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
  | at 

[JBoss-user] [Beginners Corner] - Re: JBoss 4.0.3SP1 / Eclipse 3.1.2 / EJB 3.0

2006-03-02 Thread tdume
The problem was solved when i had this line in my persistence.xml file :
property name=hibernate.dialect 
value=org.hibernate.dialect.PostgreSQLDialect/

And now it works. I think that i will write a little tutorial on this subject 
because it was really what i needed and didn't find. It is a lot of little 
things and i am on this test from last week and i solve it just after 
exposing my problem here !



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3927501#3927501

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3927501


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user