[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: 5.0.0CR1: deployment error with @PersistenceContext and

Juergen.Zimmermann do-not-reply at jboss.com
Mon Jul 7 05:38:04 EDT 2008


As mentioned before: it's an application that works fine with 4.2.2.

Here is the Interface without any annotation:public interface Bestellverwaltung {
  | 
  | 	Bestellung findBestellungById(Long id) throws BestellungNotFoundException;
  | ...

Here is the bean class:@Stateless
  | @Local(Bestellverwaltung.class)
  | public class BestellverwaltungBean implements Bestellverwaltung {
  | 	@SuppressWarnings("unused")
  | 	@PersistenceContext(name="hskaPersistence")
  | 	private EntityManager em;
  | 	
  | 	@EJB
  | 	private Kundenverwaltung kv;
  | 	
  | 	@EJB
  | 	private BestellverwaltungDao dao;
  | 
  | 	@SuppressWarnings("unused")
  | 	@PreDestroy
  | 	private void preDestroy() {...}
  | ...

And also the persistence.xml:<?xml version="1.0" encoding="ISO-8859-1"?>
  | 
  | <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="hskaPersistence">
  | 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
  | 
  | 		<!-- Hibernate Console: in Kommentar setzen -->
  | 		<jta-data-source>java:/hskaDS</jta-data-source>
  | 		
  | 		<properties>
  | 			<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
  | 			
  | 			<!-- Keine proprietaeren Erweiterungen von HQL nutzen -->
  | 			<property name="hibernate.query.jpaql_strict_compliance" value="true"/>
  | 
  | 			<!-- In der Log-Datei die SQL-Anweisungen lesbarer rausschreiben -->
  | 			<property name="hibernate.format_sql" value="true"/>
  | 
  | 			<!-- In der Log-Datei auch Kommentare zu den generierten SQL-Anweisungen hinzufuegen -->
  | 			<property name="hibernate.use_sql_comments" value="true"/>
  | 			
  | 			<!-- Batch fuer DML von automatisch versionierten Datensaetzen -->
  | 			<property name="hibernate.jdbc.batch_versioned_data" value="true"/>
  | 			
  | 			<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
  | 
  | 			<property name="hibernate.cache.use_query_cache" value="true"/>
  | 			
  | 			<!-- Klassen und Collections fuer Caching der persistenten Objekte -->
  | 			<!-- falls TreeCache statt HashtableCache: read-write aendern in transactional -->
  | 			<property name="hibernate.ejb.classcache.de.hska.kundenverwaltung.db.Kunde" value="read-write, /kunden"/>
  | 			<property name="hibernate.ejb.collectioncache.de.hska.kundenverwaltung.db.Kunde.bestellungen" value="read-write, /bestellungen"/>
  | 			<property name="hibernate.ejb.classcache.de.hska.bestellverwaltung.db.Bestellung" value="read-write, /bestellungen"/>
  | 			<property name="hibernate.ejb.classcache.de.hska.bestellverwaltung.db.Lieferung" value="read-write, /lieferungen"/>
  | 		</properties>
  | 	</persistence-unit>
  | </persistence>

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

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



More information about the jboss-user mailing list