JUnit mit Spring und Hibernate

Status
Nicht offen für weitere Antworten.

y0dA

Top Contributor
Hallo!

Ich versuche grade ein kleines Testprojekt mit Hibernate (mit Annotations) und Spring sowie einer Postgres Datenbank zu testen, leider bekomme ich immer folgende Exception:
Code:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'at.gv.brz.dao.impl.AdresseDaoTest': Unsatisfied dependency expressed through bean property 'adresseDao': Set this property value or disable dependency checking for this bean.
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1184)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1006)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:329)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:205)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:180)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

meine Testklasse, welche von "AbstractTransactionalDataSourceSpringContextTests" ableitet - damit dachte ich eigentlich dass ich keine Dependency Probleme beim Test habe..

Java:
package at.gv.brz.dao.impl;

import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

import at.gv.brz.domain.Adresse;

public class AdresseDaoTest extends
		AbstractTransactionalDataSourceSpringContextTests {
	private AdresseDao adresseDao;

	@Override
	protected void onSetUpInTransaction() throws Exception {
	}

	public void testSpeicherAdresse() {
		Adresse adresse = new Adresse("Ort123", 3214, "Hauptstrasse 1337");
		Integer id = null;
		id = this.adresseDao.speicherAdresse(adresse);
		assertNotNull(id);
	}

	public void setAdresseDao(AdresseDao adresseDao) {
		this.adresseDao = adresseDao;
	}

	@Override
	protected String[] getConfigLocations() {
		return new String[] { "applicationContext.xml" };
	}
}

Java:
package at.gv.brz.dao.impl;

import org.hibernate.SessionFactory;

import at.gv.brz.dao.IAdresseDao;
import at.gv.brz.domain.Adresse;

public class AdresseDao implements IAdresseDao {

	private SessionFactory sessionFactory;

	public Adresse getAdresse(Integer adresseId) {
		return (Adresse) this.sessionFactory.getCurrentSession().get(
				Adresse.class, adresseId);
	}

	public Integer speicherAdresse(Adresse adresse) {
		Integer ret = (Integer) this.sessionFactory.getCurrentSession().save(
				adresse);
		return ret;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
}

Java:
package at.gv.brz.dao.impl;

import org.hibernate.SessionFactory;

import at.gv.brz.dao.IPersonDao;

public class PersonDao implements IPersonDao {

	private SessionFactory sessionFactory;

	public PersonDao getPerson(Integer personId) {
		return (PersonDao) this.sessionFactory.getCurrentSession().get(
				PersonDao.class, personId);
	}

	public Integer speicherPerson(PersonDao person) {
		Integer ret = (Integer) this.sessionFactory.getCurrentSession().save(
				person);
		return ret;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
}

Und hier noch Konfigurationsdateien:
Java:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
	default-autowire="byType">

	<import resource="databaseContext.xml" />
	<import resource="transactionContext.xml" />

	<bean id="adresseDao" class="at.gv.brz.dao.impl.AdresseDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<!-- rem: can't use dependency-check="objects" -->
	<bean id="personDao" class="at.gv.brz.dao.impl.PersonDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
</beans>

Java:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
	xsi:schemaLocation="
[url=http://www.springframework.org/schema/beans]Index of /schema/beans[/url] [url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd[/url]
[url=http://www.springframework.org/schema/jee]Index of /schema/jee[/url] http://www.springframework.org/schema/jee/spring-jee-2.0.xsd"
	default-autowire="byType">

	<!-- hibernate template -->
	<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
		<property name="sessionFactory" ref="sessionFactory" />
		<!-- property name="cacheQueries" value="true" /-->
	</bean>
    
    <!-- Database -->
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="annotatedClasses">
			<list>
				<value>at.gv.brz.domain.Adresse</value>
				<value>at.gv.brz.domain.Person</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
				<prop key="hibernate.hbm2ddl.auto">create</prop>
				<prop key="hibernate.jdbc.batch_size">0</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.format_sql">true</prop>
				<prop key="hibernate.cache.use_second_level_cache">false</prop>
				<prop key="hibernate.cache.use_query_cache">false</prop>
				<prop key="hibernate.cache.provider_class"> net.sf.ehcache.hibernate.SingletonEhCacheProvider
				</prop>
			</props>
		</property>
	</bean>
	<!-- mit externen Properties ... -->
	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
		destroy-method="close">
		<property name="driverClass" value="${db.driverClass}" />
		<property name="jdbcUrl" value="${db.jdbcUrl}" />
		<property name="user" value="${db.user}" />
		<property name="password" value="${db.password}" />
	</bean>

	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="location" value="classpath:jdbc.properties" />
	</bean>
</beans>

Java:
<?xml version="1.0" encoding="UTF-8"?>
<beans default-init-method="init" default-destroy-method="destroy"
	xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
	[url=http://www.springframework.org/schema/beans]Index of /schema/beans[/url] [url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd[/url]
	[url=http://www.springframework.org/schema/tx]Index of /schema/tx[/url] [url]http://www.springframework.org/schema/tx/spring-tx-2.0.xsd[/url]
	[url=http://www.springframework.org/schema/aop]Index of /schema/aop[/url] http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<!-- deklarative Transaktion -->
	<tx:advice id="txAdvice" transaction-manager="transactionManager">
		<tx:attributes>
			<tx:method name="get*" read-only="true" propagation="REQUIRED" />
			<tx:method name="select*" read-only="true" propagation="REQUIRED" />
			<tx:method name="*" propagation="REQUIRED" />
		</tx:attributes>
	</tx:advice>

	<aop:config>
		<aop:pointcut id="daoMethods"
			expression="execution(* at.gv.brz.dao.impl.*Dao*.*(..))" />
		<aop:advisor advice-ref="txAdvice" pointcut-ref="daoMethods" />
	</aop:config>

	<aop:aspectj-autoproxy />

	<bean name="transactionTemplate"
		class="org.springframework.transaction.support.TransactionTemplate">
		<property name="transactionManager" ref="transactionManager" />
	</bean>
</beans>
 
Zuletzt bearbeitet:

byte

Top Contributor
Der Member adresseDao muss noch verdrahtet werden.

Du könntest es z.B. mit Autowiring machen:

Java:
@Autowired
private AdresseDao adresseDao;

[XML]<context:annotation-config />[/XML]
 

y0dA

Top Contributor
Danke euch beiden für die Info, habe nun einmal versucht was byte gepostet hat nur gibts hierbei noch immer Probleme :(

Also ich habe in meiner Testklasse den Member mit @Autowired "verdrahtet" und nun versucht in applicationContext.xml
Java:
<context:annotation-config />
[/JAVA 
zu adden - leider bekomme ich folgenden Fehler:

[CODE]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'at.gv.brz.dao.impl.AdresseDaoTest': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:329)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:205)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:180)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:435)
	at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)
	... 20 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)
	... 22 more

applicationContext.xml:
Java:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans [url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd[/url]
	[url=http://www.springframework.org/schema/context]Index of /schema/context[/url]
 http://www.springframework.org/schema/context/spring-context-2.5.xsd"
	default-autowire="byType">

	<context:annotation-config />

	<import resource="databaseContext.xml" />
	<import resource="transactionContext.xml" />

	<bean id="adresseDao" class="at.gv.brz.dao.impl.AdresseDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<!-- rem: can't use dependency-check="objects" -->
	<bean id="personDao" class="at.gv.brz.dao.impl.PersonDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
</beans>

Entschuldigt wenn ich mich hierbei ein wenig dämlich anstelle, ist Neuland für mich zu konfigurieren- bisher musste ich nur beans definieren.

Werde nun auch mal @Resource ansehen, sagt mir nämlich auch nichts.
 

byte

Top Contributor
Wird der ApplicationContext denn überhaupt angezogen? Das kannst Du einfach testen, indem Du in einer Bean (z.B. AdresseDao) einen Breakpoint im Konstruktor setzt und guckst, ob er da reinspringt.

Da fällt mir ein, Du musst der Testklasse auch noch mitteilen, welcher Context benutzt werden soll:

Java:
@ContextConfiguration(locations={"/testContext.xml"})
public class FoobarTest extends ... { ... }
 

y0dA

Top Contributor
Macht
Java:
@Override
	protected String[] getConfigLocations() {
		return new String[] { "/applicationContext.xml" };
	}
nicht das gleiche wie
Java:
@ContextConfiguration(locations={"/testContext.xml"})
public class FoobarTest extends ... { ... }
[
?

Weiters ist mir gerade aufgefallen dass man gar nicht in den Konstruktor von AdresseDAO reinkomme, es wird auf der Konsole noch eine andere Exception angezeigt:
Code:
2009-11-05 13:30:24,734 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null
2009-11-05 13:30:24,734 ERROR [org.hibernate.util.JDBCExceptionReporter] - Connections could not be acquired from the underlying database!
2009-11-05 13:30:24,734 WARN [org.hibernate.cfg.SettingsFactory] - Could not obtain connection to query metadata
java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:213)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:189)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:169)
	at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:140)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:98)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
	... 56 more
2009-11-05 13:30:55,453 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: null
2009-11-05 13:30:55,453 ERROR [org.hibernate.util.JDBCExceptionReporter] - Connections could not be acquired from the underlying database!
2009-11-05 13:30:55,453 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] - schema export unsuccessful
java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
	at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
	at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:252)
	at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:211)
	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:353)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:822)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:748)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:213)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:189)
	at org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:169)
	at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:140)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:98)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
	... 57 more
 

byte

Top Contributor
Offenbar fliegt er schon beim Erzeugen der DataSource auf die Nase. Bist Du sicher, dass die DB Daten alle richtig konfiguriert sind?
 

y0dA

Top Contributor
Gut, hab nun eine db.jdbcUrl angegeben welche funktioniert (getestet mit einem anderen Projekt!). Geht trotzdem nicht, was dazu kommt ist dass ich ja normalerweise sehen müsste (in der Console) dass folgendes durchgeführt wird:
Code:
Loading context for locations: applicationContext.xml
Wird aber nicht angezeigt, also irgendwie wird wohl meine applicationContext.xml nicht gefunden oder geladen?
 

byte

Top Contributor
Wenn das Logging richtig konfiguriert ist, solltest Du das sehen. Was funktioniert denn jetzt nicht? Gibts ne Exception? Hast Du mal Breakpoints gesetzt, ob die Testmethode ausgeführt wird?
 

y0dA

Top Contributor
Danke für deine Geduld.

In der Testklasse wird nur
Java:
	protected String[] getConfigLocations() {
		return new String[] { "applicationContext.xml" };
	}
aufgerufen, danach kommt folgende Exception:
Code:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'at.gv.brz.dao.impl.AdresseDaoTest': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:329)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:205)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:180)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:435)
	at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)
	... 20 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)
	... 22 more

Java:
package at.gv.brz.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

import at.gv.brz.domain.Adresse;

public class AdresseDaoTest extends
		AbstractTransactionalDataSourceSpringContextTests {

	@Autowired
	private AdresseDao adresseDao;

	@Override
	protected void onSetUpInTransaction() throws Exception {
	}

	public void testSpeicherAdresse() {
		Adresse adresse = new Adresse("Stockerau", 2000, "Hauptstrasse 1337");
		Integer id = null;
		id = this.adresseDao.speicherAdresse(adresse);
		assertNotNull(id);
	}

	public void setAdresseDao(AdresseDao adresseDao) {
		this.adresseDao = adresseDao;
	}

	@Override
	protected String[] getConfigLocations() {
		return new String[] { "applicationContext.xml" };
	}
}

Java:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans [url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd[/url]
	[url=http://www.springframework.org/schema/context]Index of /schema/context[/url]
 http://www.springframework.org/schema/context/spring-context-2.5.xsd"
	default-autowire="byType">

	<context:annotation-config />

	<import resource="databaseContext.xml" />
	<import resource="transactionContext.xml" />

	<bean id="adresseDao" class="at.gv.brz.dao.impl.AdresseDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<!-- rem: can't use dependency-check="objects" -->
	<bean id="personDao" class="at.gv.brz.dao.impl.PersonDao">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
</beans>

Hab ein Project refresh gemacht und nun bekomme ich auch Konsolenausgaben - siehe Anhang.


**EDIT**
Also im Log steht nichts --> java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE ist zu vernachlässigen.
 
Zuletzt bearbeitet:

byte

Top Contributor
Laut Logs scheint der AppContext ja korrekt hochzufahren. Dann kommt ein close(). Dabei fliegt noch eine Exception bei der Datasource. Sicher, dass der Test nicht durchgelaufen ist? Setz mal einen Breakpoint in die Testmethode.
 

y0dA

Top Contributor
Ich habe schon einen Breakpoint in die Testmethode gesetzt, er geht dort nicht rein.
Bekomme nach wie vor folgenden Fehler:
Code:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'at.gv.brz.dao.impl.AdresseDaoTest': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:329)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:205)
	at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:180)
	at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private at.gv.brz.dao.impl.AdresseDao at.gv.brz.dao.impl.AdresseDaoTest.adresseDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:435)
	at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)
	... 20 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [at.gv.brz.dao.impl.AdresseDao] is defined: Unsatisfied dependency of type [class at.gv.brz.dao.impl.AdresseDao]: expected at least 1 matching bean
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)
	... 22 more

Nun habe ich mich ein wenig bezüglich @Autowired eingelesen und gemerkt dass dies einfach die Anntotation für ein Property ist. Dies wollte ich ja eigentlich nicht (wir möchten mit XML die Dependencies eintragen).
Zur Testklasse, selbige erbt ja von AbstractTransactionalDataSourceSpringContextTests und selbige übernimmt doch die Dependency Injection sowie das Transaktionsmanagement für die Testklasse?
 
Zuletzt bearbeitet:

y0dA

Top Contributor
Gut habe nun die fehlerhafte Stelle entdeckt, nämlich war der Member der Testklasse:
falsch:
Java:
private AdresseDao adresseDao;

richtig:
Java:
private IAdresseDao adresseDao;

Danke für die Unterstützung.
 
Zuletzt bearbeitet:
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
D Mit Hibernate aus JUnit ein DB-Schema erzeugen Data Tier 6
T Hibernate/Spring JPA: eigene ID generieren Data Tier 5
D Spring Data JPA: equals und hashcode Data Tier 6
N Spring / OpenJPA Inheritance: Subklassen werden nicht erkannt Data Tier 4
S Spring HibernateTemplate mit ParameterList Data Tier 2
D Daten werden nicht gespeichert mit Spring + JPA (Hibernate): Data Tier 6
D Vorteile von Spring DAO bei Einsatz von JPA? Data Tier 1
I Hibernate / JPA: Eine Datenbank und pro User ein Schema Data Tier 9
Avalon @ManyToOne Hibernate oder JPA? Data Tier 5
D Hibernate Hibernate mit MariaDB Data Tier 1
ToBJo Hibernate Glassfish deploy mit Hibernate schlägt fehl Data Tier 1
C JPA Hibernate Map<String,String> richtig mappen Data Tier 2
S JPA Hibernate Search & EclipseLink (oder OpenJPA) Data Tier 0
R JPA Probleme mit Wechsel von EclipseLink auf Hibernate Data Tier 4
ARadauer Hibernate Entität readonly laden... Data Tier 1
G Hibernate SQL in Hibernate: Keine Parameter mit Index? Data Tier 2
P Wildfly + Hibernate + SQL Server Data Tier 0
E JPA Hibernate Query mit Timestamp hat seltsames Verhalten Data Tier 1
M Eclipse 4 RCP Hibernate Problem Data Tier 3
C Hibernate ProgressBar updaten mit Daten aus Hibernate Data Tier 4
B Hibernate und MySQL testen Data Tier 8
I Hibernate HQL: generiertes SQL ausgeben Data Tier 1
R mapping-file für hibernate zum Überschreiben der Annotationen Data Tier 7
R Hibernate Hibernate und Logback Data Tier 2
R Hibernate möchte Schema zwei mal undeployen Data Tier 2
F Hibernate Hibernate / JPA Data Tier 4
E Hibernate: Session vs EntityManager Data Tier 3
C Hibernate Hibernate Code Generation Data Tier 3
S Hibernate Mehrfachverbindung mit Hibernate Data Tier 3
M Hibernate Einstiegsfrage Data Tier 5
M Exception in thread "main" org.hibernate.MappingException: java.lang.ClassNotFoundException: Message Data Tier 4
S Hibernate Einstieg in Hibernate 3.2 sinnvoll? Data Tier 8
P JPA Eigene Vererbungsstrategie mit JPA / Hibernate Data Tier 2
J Hibernate Problem bei Master-Detail-Tabellen Data Tier 5
Y Jboss seam-hibernate-jpa Data Tier 5
RaoulDuke Hibernate Map<String,String> mit Annotations mappen Data Tier 2
M Hibernate Hibernate with GWT Data Tier 4
C Hibernate JPA mysql db erstellen Data Tier 4
M Hibernate Hibernate liest Daten zu oft aus! Data Tier 16
pg1337 Hibernate Fragen Data Tier 11
D Probleme bei Left Joins mit Hibernate createCriterias() Data Tier 2
D Hibernate probleme mit Verlinkungstabelle Data Tier 4
2 Hibernate Annotations Data Tier 7
G Hibernate select update no wait Data Tier 8
Z Hibernate: Many-To-Many nur eine bestimmte Spalte Data Tier 3
K Hibernate - Envers - Erzeugung der SQL Skripte Data Tier 4
G Hibernate 1:n Beziehung mit Vererbung Data Tier 5
D Hibernate-Criteria-API (Projections und MAX-Funktion) Data Tier 6
L Hibernate: failed to lazily initialize a collection of role Data Tier 3
S Hibernate hibernate.cfg.xml Data Tier 14
D JPA vs Hibernate.cfg und Entitymanager Data Tier 6
H Hibernate - Mapping für Enumeration Data Tier 1
R Hibernate Criteria Abfrageproblem Data Tier 2
A Hibernate und jdbc zusammen Data Tier 4
S [Hibernate] No Persistence provider for EntityManager Data Tier 5
B Problem mit org.hibernate.LazyInitializationException Data Tier 11
G Hibernate HQL und Interface Data Tier 4
G JSF Hibernate no session or session was closed Data Tier 12
T JPA2/Hibernate: Many-to-Many-Relation wird u.a. beim löschen nicht aktualisiert Data Tier 14
S (Hibernate) Mapping einer Datenbanktabelle mit mehreren Fremdschlüssel Data Tier 7
X [Hibernate] Zusammengesetzte Entities möglich? Data Tier 7
N Hibernate Fake? Data Tier 2
S Problem beim Insert mit Hibernate Data Tier 9
V Hibernate Projection Data Tier 2
T org.hibernate.impl.SessionFactoryImpl Memory Leak Data Tier 10
G Hibernate Composite key Data Tier 11
X [Hibernate] Connection Pool - MinSize ? Data Tier 2
R Hibernate Criteria OR Data Tier 2
T hibernate/jpa abgefragte Listen immer mit Null-Werten gefüllt Data Tier 8
X [Hibernate] Anderen Connection Pool - Vorschläge? Data Tier 3
ARadauer Hibernate DDL Loggen Data Tier 6
G Hibernate abfrage Collection Data Tier 3
X [Hibernate] ReverseEngineering - Eigene Strategy verwenden? Data Tier 3
R Hibernate Criteria .group größer als Data Tier 5
R Hibernate daten laden Data Tier 7
H [Hibernate]1:1 Beziehung Data Tier 8
H [Hibernate]No CurrentSessionContext configured! Data Tier 6
X [Hibernate] Lässt sich die Dauer eines SELECTs loggen? Data Tier 4
R Hibernate n:n Relationtabelle mit Date Data Tier 3
H [Hibernate] Unknown Entity Data Tier 3
H [Hibernate] Configuration Data Tier 3
C [Hibernate] Generierung von hbm.xml to Java Data Tier 4
lumo Eclipse & JPA & Hibernate & Derby Data Tier 5
J Zufallsauswahl aus ResultList bei JPA(Hibernate) / Performance Data Tier 3
M Hibernate: Datum 0001-01-01 erzeugt null-Datum Data Tier 4
G Datenbankzugriff mit Hibernate Data Tier 7
Y Hibernate - Angabe des Schemas Data Tier 6
LadyMilka (Hibernate) in Criteria implizierter Join durch Subquery's Data Tier 8
M Hibernate Mehr als 1 Object speichern? Data Tier 18
M Unerklärliche Hibernate Exception Data Tier 20
LadyMilka (Hibernate) subquery in FROM-Clause Data Tier 9
haemi Viele DTOs in hibernate IdentityMap Data Tier 3
LadyMilka (hibernate) UNION dem Dialekt hinzufügen Data Tier 3
M Hibernate + Oracle 10g XE Data Tier 3
lumo Hibernate - entity class not found Data Tier 5
P SQL PRoblem Hibernate? Data Tier 8
J Vererbung mit JPA / Hibernate - pro/contra Data Tier 3
T JBoss/Hibernate: Abfrage dauert lang + hohe CPU? Data Tier 19
7 Hibernate-Abfrage (SubSelect im FROM) Data Tier 2
G Hibernate: many-to-one - Verwaiste Datensätze löschen Data Tier 2

Ähnliche Java Themen


Oben