Hello.
I want to program with ejb3.
However, one Warning and one fatal error occur in the start log when I dispose 
the following programs and persistence.xml to jboss. 
When the program is actually executed, it is displayed, "MH001_001Bean not 
bound ". 
It is possible to execute it normally at the program not accessed DB.
I don't understand what the cause.
Could anyone have advice for me?

Environment
JBOSS4.0.3SP1 + EJB3.0RC5
JDK1.5.0_06
Postgres8.1.2

Session Bean Class
@Stateful
  | @javax.ejb.Remote(MH001_001.class)
  | public class MH001_001Bean implements MH001_001, Serializable{
  |     private String  userId;
  |     private String  passwd;
  |     private String  name;
  | 
  |     @PersistenceContext(unitName="ejb3mn")
  |     protected  EntityManager em;
  | 
  |     public Value doBiz(Hashtable param){
  |         boolean ret = true;
  |         String      page = "/jsp/MH003.jsp";
  |         String      error = "";
  |         Value value = new Value();
  |         String userId = (String)param.get("sesuserId");
  |         String passwd = (String)param.get("sespasswd");
  |         
  |         try{
  |             Context ctx = new InitialContext();
  |             em = (EntityManager)ctx.lookup("java:/EntityManager/ejb3mn");
  |         }catch(Exception e){
  |             System.out.println(e.getMessage());
  |         }
  | 
  |         UserBean obj = em.find(UserBean.class, userId);
  |         String pass = obj.getPasswd();
  |         value.setForwardPage(page);
  |         return value;
  |     }
  | }

Persistence.xml
<?xml version="1.0" encoding="EUC-JP"?> 
  | <persistence> 
  |     <persistence-unit name="ejb3mn">
  |         <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |         <jta-data-source>java:/PostgresDS</jta-data-source>
  |         <properties>
  |             <property name="hibernate.dialect" 
value="org.hibernate.dialect.PostgreSQLDialect"/>    
  |             <property name="hibernate.hbm2ddl.auto" value="update"/>
  |             <property name="jboss.entity.manager.jndi.name" 
value="java:/EntityManager/ejb3mn"/>
  |             <property name="hibernate.transaction.manager_lookup_class" 
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
  |             <property name="jboss.no.implicit.datasource.dependency" 
value="true"/>
  |         </properties>
  |     </persistence-unit>
  | </persistence>


JBOSS start log(a part of log)
10:11:05,965 INFO  [TreeCache] setEvictionPolicyConfig(): [config: null]
  | 10:11:05,973 WARN  [TreeCache] No transaction manager lookup class has been 
defined. Transactions cannot be used
  | 10:11:06,005 INFO  [TreeCache] interceptor chain is:
  | class org.jboss.cache.interceptors.CallInterceptor
  | class org.jboss.cache.interceptors.LockInterceptor
  | class org.jboss.cache.interceptors.CacheLoaderInterceptor
  | class org.jboss.cache.interceptors.UnlockInterceptor
  | class org.jboss.cache.interceptors.ReplicationInterceptor
  | class org.jboss.cache.interceptors.CacheStoreInterceptor
  | 10:11:06,025 INFO  [TreeCache] cache mode is REPL_SYNC
  | 10:11:06,467 INFO  [STDOUT]
  |  .
  |  .
  |  .
  | 10:11:30,339 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, 
warUrl=.../deploy/jmx-console.war/
  | 10:11:30,597 INFO  [TomcatDeployer] deploy, ctxPath=/massageboard, 
warUrl=.../tmp/deploy/tmp30188massageboard.war/
  | 10:11:30,696 INFO  [TomcatDeployer] deploy, ctxPath=/webPrj, 
warUrl=.../tmp/deploy/tmp30189webPrj.war/
  | 10:11:30,811 INFO  [EARDeployer] Init J2EE application: 
file:/usr/local/jboss-4.0.3SP1/server/all/deploy/test3.ear/
  | 10:11:31,030 INFO  [Ejb3AnnotationHandler] found EJB3: 
ejbName=MH001_001Bean, class=MH001_001Bean, type=STATEFUL
  | 10:11:31,166 FATAL [PersistenceXmlLoader] ejb3mn JTA
  | 10:11:31,178 INFO  [Ejb3Deployment] EJB3 deployment time took: 205
  | 10:11:31,189 INFO  [JmxKernelAbstraction] installing MBean: 
persistence.units:ear=test3.ear.ear,jar=ejb.jar.jar,unitName=ejb3mn with 
dependencies:
  | 10:11:31,349 INFO  [Environment] Hibernate 3.1.2
  | 10:11:31,364 INFO  [Environment] hibernate.properties not found
  | 10:11:31,368 INFO  [Environment] using CGLIB reflection optimizer
  | 10:11:31,368 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
  | 10:11:31,667 INFO  [Ejb3Configuration] found EJB3 Entity bean: UserBean
  | 10:11:31,878 INFO  [AnnotationBinder] Binding entity from annotated class: 
UserBean
  | 10:11:32,050 INFO  [EntityBinder] Bind entity UserBean on table user_test
  | 10:11:32,469 INFO  [ConnectionProviderFactory] Initializing connection 
provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
  | 10:11:32,474 INFO  [InjectedDataSourceConnectionProvider] Using provided 
datasource
  | 10:11:32,626 INFO  [SettingsFactory] RDBMS: PostgreSQL, version: 8.1.2
  | 10:11:32,627 INFO  [SettingsFactory] JDBC driver: PostgreSQL Native Driver, 
version: PostgreSQL 8.1 JDBC3 with SSL (build 405)
  | 10:11:32,658 INFO  [Dialect] Using dialect: 
org.hibernate.dialect.PostgreSQLDialect
  | 10:11:32,670 INFO  [TransactionFactoryFactory] Using default transaction 
strategy (direct JDBC transactions)
  | 10:11:32,674 INFO  [TransactionManagerLookupFactory] instantiating 
TransactionManagerLookup: 
org.hibernate.transaction.JBossTransactionManagerLookup
  | 10:11:32,678 INFO  [TransactionManagerLookupFactory] instantiated 
TransactionManagerLookup


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

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


-------------------------------------------------------
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