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>
  |  <name>auth</name>
  |  <jta-data-source>java:/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-name>ValidJBoss</display-name>
  |     <module>
  |             <ejb>entities.par</ejb>
  |     </module>
  |     <module>
  |             <ejb>business.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 substitutions: {}
  | 10:01:49,244 INFO  [SettingsFactory] Second-level cache: enabled
  | 10:01:49,244 INFO  [SettingsFactory] Query cache: disabled
  | 10:01:49,244 INFO  [SettingsFactory] Cache provider: 
org.hibernate.cache.HashtableCacheProvider
  | 10:01:49,284 INFO  [SettingsFactory] Optimize cache for minimal puts: 
disabled
  | 10:01:49,284 INFO  [SettingsFactory] Structured second-level cache entries: 
disabled
  | 10:01:49,344 INFO  [SettingsFactory] Statistics: disabled
  | 10:01:49,344 INFO  [SettingsFactory] Deleted entity synthetic identifier 
rollback: enabled
  | 10:01:49,364 INFO  [SettingsFactory] Default entity-mode: POJO
  | 10:01:50,315 INFO  [SessionFactoryImpl] building session factory
  | 10:01:52,639 INFO  [SessionFactoryObjectFactory] Not binding factory to 
JNDI, no JNDI name configured
  | 10:01:52,659 INFO  [NamingHelper] JNDI InitialContext 
properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
 java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
  | 10:01:52,679 INFO  [SessionFactoryImpl] Checking 0 named queries
  | 10:01:52,679 INFO  [Ejb3Deployment] Create EntityManager with JNDI name: 
auth
  | 10:01:52,719 INFO  [JaccHelper] JACC Policy Configuration for deployment 
has been put in service
  | 10:01:52,719 INFO  [Ejb3Deployment] EJB3 deployment time took: 9574
  | 10:01:53,320 INFO  [ProxyDeployer] no declared remote bindings for : 
test.auth.business.UtilisateurManagerBean
  | 10:01:53,390 INFO  [ProxyDeployer] there is remote interfaces for 
test.auth.business.UtilisateurManagerBean
  | 10:01:53,420 INFO  [ProxyDeployer] default remote binding has jndiName of 
test.auth.business.UtilisateurManager
  | 10:01:55,082 INFO  [EJB3Deployer] Deployed: file:/C:/Program 
Files/jboss-4.0.3SP1/server/default/tmp/deploy/tmp32297validjboss.ear-contents/business.ejb3
  | 10:01:55,082 INFO  [EJB3Deployer] Deployed: file:/C:/Program 
Files/jboss-4.0.3SP1/server/default/tmp/deploy/tmp32297validjboss.ear-contents/entities.par
  | 10:01:55,152 INFO  [EARDeployer] Started J2EE application: file:/C:/Program 
Files/jboss-4.0.3SP1/server/default/deploy/validjboss.ear
  | 

I see no error or exception in this part of the code of the client (called in 
the init method):
 
  | InitialContext ic;
  | try {
  |     ic = new InitialContext();
  |     um = (UtilisateurManager)ic.lookup(UtilisateurManager.class.getName());
  |       } catch (NamingException e1) {
  |     System.out.println("Probleme a l'initialisation");
  |     e1.printStackTrace();                           
  |       }
  | 

I obtain an error when i call a method on "um" in the jButtonOK_actionPerformed 
method : 
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: 
antlr/RecognitionException
  |     at java.lang.Class.getDeclaredFields0(Native Method)
  |     at java.lang.Class.privateGetDeclaredFields(Class.java:2232)
  |     at java.lang.Class.getDeclaredField(Class.java:1852)
  |     at 
java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1555)
  |     at java.io.ObjectStreamClass.access$600(ObjectStreamClass.java:47)
  |     at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:381)
  |     at java.security.AccessController.doPrivileged(Native Method)
  |     at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)
  |     at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)
  |     at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:504)
  |     at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
  |     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
  |     at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
  |     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
  |     at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
  |     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
  |     at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
  |     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
  |     at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
  |     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
  |     at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
  |     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
  |     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
  |     at 
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:73)
  |     at 
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:242)
  |     at 
org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:112)
  |     at org.jboss.remoting.Client.invoke(Client.java:226)
  |     at org.jboss.remoting.Client.invoke(Client.java:189)
  |     at 
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
  |     at 
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
  |     at 
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
  |     at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:41)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
  |     at 
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:88)
  |     at $Proxy0.isUtilisateur(Unknown Source)
  |     at 
test.auth.gui.GUIAuthentification.jButtonOK_actionPerformed(GUIAuthentification.java:112)
  |     at 
test.auth.gui.Authentification_jButtonOK_actionAdapter.actionPerformed(GUIAuthentification.java:134)
  |     at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
  |     at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
  |     at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
  |     at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
  |     at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
  |     at java.awt.Component.processMouseEvent(Component.java:5488)
  |     at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
  |     at java.awt.Component.processEvent(Component.java:5253)
  |     at java.awt.Container.processEvent(Container.java:1966)
  |     at java.awt.Component.dispatchEventImpl(Component.java:3955)
  |     at java.awt.Container.dispatchEventImpl(Container.java:2024)
  |     at java.awt.Component.dispatchEvent(Component.java:3803)
  |     at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
  |     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
  |     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
  |     at java.awt.Container.dispatchEventImpl(Container.java:2010)
  |     at java.awt.Window.dispatchEventImpl(Window.java:1774)
  |     at java.awt.Component.dispatchEvent(Component.java:3803)
  |     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
  |     at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
  |     at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
  |     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
  |     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
  |     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I hope it is clear but if you need more information to answer please tell me.

If you could help me it would be really great ^_^


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

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


-------------------------------------------------------
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=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to