[jboss-user] [JBoss Seam] - Re: Local server is not initialized error when calling a met

fmi2 do-not-reply at jboss.com
Tue Nov 21 15:17:20 EST 2006


Yes, the persistence.xml does specify a unit name. Here it is


  | <persistence 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" version="1.0">
  |     <persistence-unit name="portaltest">
  |         <!-- provider must be explicitly stated for Java SE, but not Java EE-->
  | 
  |         <!-- javax.persistence.EntityManagerFactory -->
  |       
  |         <provider>org.hibernate.ejb.HibernatePersistence</provider>
  | 
  |         <!-- I don't think that we need this for external testing -->
  |         <!-- <jta-data-source>java:/DefaultDS</jta-data-source> -->
  | 
  |         <class>myapp.OutputParameter</class>
  |         <class>myapp.DomainObject</class>
  |         <class>myapp.Fault</class>
  |         <class>myapp.Service</class>
  |         <class>myapp.InputParameter</class>
  |         <class>myapp.PointOfContact</class>
  |         <class>myapp.Operation</class>
  |         <class>myapp.ResearchCenter</class>
  | 
  |         <properties>
  | 
  |                 <property name="hibernate.hbm2ddl.auto" value="update"/>
  |             <!-- 
  |                 <property name="hibernate.hbm2ddl.auto" value="update"/>
  |                 <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
  |             -->
  | 
  |             <!-- DB connection properties -->
  |             <!-- <property name="jdbc.driver"    value="org.hsqldb.jdbcDriver" />        --> 
  |             <!-- <property name="jdbc.url"       value="jdbc:hsqldb:hsql://localhost" /> -->
  |             <!-- <property name="jdbc.user"      value="sa" />                           -->
  |             <!-- <property name="jdbc.password"  value="" />                             -->
  | 
  |             <property name="hibernate.dialect"                 value="org.hibernate.dialect.HSQLDialect" />
  |             <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"             />
  |             <property name="hibernate.connection.url"          value="jdbc:hsqldb:hsql://localhost"      />
  |             <property name="hibernate.connection.user"         value="sa"                                />
  |             <property name="hibernate.connection.password"     value=""                                  />
  |         </properties>
  |     </persistence-unit>
  | </persistence>
  | 
  | <!--
  |     vim: sw=4:ts=4:et:sm:ai:textwidth=70:nohlsearch:syntax=off
  | -->
  | 

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

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



More information about the jboss-user mailing list