[jboss-user] [JBoss Seam] - Re: What's wrong with this components.xml / persistence.xml
mlh496
do-not-reply at jboss.com
Mon Mar 12 17:43:38 EDT 2007
Here is my persistence.xml file:
<persistence>
| <persistence-unit name="omegaFactory">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/omegaDatasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
| <property name="hibernate.transaction.flush_before_completion" value="true"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/omegaDatasource"/>
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| </properties>
| </persistence-unit>
| </persistence>
And here is my jboss-beans.xml file:
<?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:2.0">
|
| <bean name="omegaDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
| <property name="driverClass">com.mysql.jdbc.Driver</property>
| <property name="connectionURL">jdbc:mysql://localhost:3306/omega</property>
| <property name="userName"><value class="java.lang.String">username</value></property>
| <property name="password"><value class="java.lang.String">password</value></property>
| <property name="jndiName">java:/omegaDatasource</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="omegaDatasource" class="java.lang.Object">
| <constructor factoryMethod="getDatasource">
| <factory bean="omegaDatasourceBootstrap"/>
| </constructor>
| </bean>
| </deployment>
When I turn logging to debug, this seems to be the error that starts it all:
Caused by: java.lang.NullPointerException
| at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:96)
|
Thank you for taking a look at this,
-Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027354#4027354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027354
More information about the jboss-user
mailing list