[jboss-user] [JBoss Seam] - Re: problem in a simple seam application

mnrz do-not-reply at jboss.com
Thu Oct 19 05:15:13 EDT 2006


I think something wrong with database connection and these exception just misleading us. In my opinion "@In User user" causes this RegisterAction not being instanciated properly.

here is jboss-beans.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
  | 	xmlns="urn:jboss:bean-deployer">
  | 
  | 	<bean name="testDatasourceBootstrap"
  | 		class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
  | 		<property name="driverClass">com.mysql.jdbc.Driver</property>
  | 		<property name="connectionURL">
  | 			jdbc:mysql://192.168.0.157:3306/seamtest?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF8
  | 		</property>
  | 		<property name="userName">root</property>
  | 		<property name="password">root</property>
  | 		<property name="jndiName">jdbc:/testDatasource</property>
  | 		<property name="minSize">0</property>
  | 		<property name="maxSize">10</property>
  | 		<property name="blockingTimeout">1000</property>
  | 		<property name="idleTimeout">100000</property>
  | 		<property name="transactionManager">
  | 			<inject bean="TransactionManager" />
  | 		</property>
  | 		<property name="cachedConnectionManager">
  | 			<inject bean="CachedConnectionManager" />
  | 		</property>
  | 		<property name="initialContextProperties">
  | 			<inject bean="InitialContextProperties" />
  | 		</property>
  | 	</bean>
  | 
  | 	<bean name="testDatasource" class="java.lang.Object">
  | 		<constructor factoryMethod="getDatasource">
  | 			<factory bean="testDatasourceBootstrap" />
  | 		</constructor>
  | 	</bean>
  | 
  | </deployment>
  | 

I have doubt about those red codes!!!

and persistence.xml

  | <persistence>
  | 	<persistence-unit name="testDatabase">
  | 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
  | 		<jta-data-source>jdbc:/testDatasource</jta-data-source>
  | 		<properties>
  | 			<property name="hibernate.hbm2ddl.auto" value="create-drop" />
  | 			<property name="hibernate.show_sql" value="true" />
  | 			<!-- These are the default for JBoss EJB3, but not for HEM: -->
  | 			<property name="hibernate.cache.provider_class"
  | 				value="org.hibernate.cache.HashtableCacheProvider" />
  | 			<property name="hibernate.transaction.manager_lookup_class"
  | 				value="org.hibernate.transaction.JBossTransactionManagerLookup" />
  | 			<property name="hibernate.dialect"
  | 				value="org.hibernate.dialect.MySQLDialect" />
  | 		</properties>
  | 	</persistence-unit>
  | </persistence>
  | 
  | 

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

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



More information about the jboss-user mailing list