[jboss-user] [EJB 3.0] - [Jboss 5.0.0.GA] problem with JNDI name persistent unit
pKoster
do-not-reply at jboss.com
Fri Jan 30 04:45:09 EST 2009
I have an application that works in Jboss 4.2.3.GA, but doesn't work in Jboss5GA.
This is the stacktrace (cleaned for readability:
anonymous wrote :
| WARN [EhCacheProvider] Could not find configuration [persistence.unit:unitName=foo.ear/bar-ejb.jar#foo-PU.be.foo.bar.domain.user]; using defaults.
| ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=foo.ear/bar-ejb.jar#foo-PU state=Create
| java.lang.IllegalArgumentException: Cache name cannot contain '/' characters.
| at net.sf.ehcache.config.CacheConfiguration.setName(CacheConfiguration.java:163)
| at net.sf.ehcache.Cache.setName(Cache.java:1721)
| at net.sf.ehcache.CacheManager.addCache(CacheManager.java:632)
| at org.hibernate.cache.EhCacheProvider.buildCache(EhCacheProvider.java:94)
I think this is caused by the not working of the jboss.entity.manager.factory.jndi.name
this is the persistence.xml:
| <?xml version="1.0" encoding="UTF-8" standalone="no"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
| <persistence-unit name="foo-PU" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:fooDS</jta-data-source>
| <properties>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:foo-PU" />
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
| <property name="hibernate.cache.use_query_cache" value="true" />
| <property name="hibernate.cache.use_second_level_cache" value="true" />
| <property name="hibernate.generate_statistics" value="false" />
| <property name="hibernate.cache.provider_configuration_file_resource_path" value="ehcache.xml"/>
| </properties>
| </persistence-unit>
| </persistence>
I'm using Spring 2.5.6 in the applicationContext I simply use:
| <jee:jndi-lookup id="emf" jndi-name="java:foo-PU"/>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205784#4205784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205784
More information about the jboss-user
mailing list