[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Persistence Problem with Jboss 4.0.3, Hibernate

darretta do-not-reply at jboss.com
Thu Nov 8 14:09:46 EST 2007


In gathering the requested logs, I noticed for the first time this message:

Persistence unit name: vram-dos-server-ejbs-CURRENT

This is the actual name of my EJB jar file, not my persistence unit name configured in persistence.xml. I changed my code to reference this name, and everything works! I do have a new persistence.xml file as well (though I don't think this changed anything). Below is the file. I you have any thoughts as to why the persistence unit name is my jar file name and not the name given in the XML file, that would be helpful. Thanks!

<?xml version="1.0" encoding="UTF-8"?>
  | <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  |   <persistence-unit name="vramPu">
  |     <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |     <jta-data-source>java:/nicweb/DataSource</jta-data-source>
  |     <jar-file>vram-dos-server-ejbs-CURRENT.jar</jar-file>
  |     <properties>
  |       <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
  |     </properties>
  |   </persistence-unit>
  | </persistence>
  | 

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

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



More information about the jboss-user mailing list