Gradle'ı terminalden "sudo apt-get install gradle" komutuyla kurduktan sonra test için "gradle -v" komutunu çalıştırdım ve aşağıdaki hatayı aldım.
JAVA_HOME değişkeni sistemimde sembolik olarak tanımlanmış bir link, ve gradle bu sembolik linkle çalışırken sorun çıkartıyor sanırım. Düzeltmek için gradle'ı çalıştıran scripte bulunan JAVA_HOME=/usr/lib/jvm/default-java değişkenini
JAVA_HOME=/usr/lib/jvm/java-7-oracle olarak değiştirdim.
Artık düzgün çalışıyor.
25 Ekim 2013 Cuma
17 Ekim 2013 Perşembe
Exception in thread "main" org.hibernate.HibernateException: No Session found for current thread hatası
Spring ve Hibernate i kullandığımda spring beanlerin konfigürasyonunu yaptığım dosyada eklemeyi unuttuğum "transactionManager" bean'i ve "<tx:annotation-driven/>" tagı sonucunda aldığım hata.
Sonuç olarak "transactionManager" bean'ini
bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory">
</bean>
ve "<tx:annotation-driven/>" tagını
<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"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
<context:component-scan base-package="com.springapp.mvc"/>
<tx:annotation-driven/>
.
.
.
ekledikten sonra hata almadan programımı çalıştırdım.
Sonuç olarak "transactionManager" bean'ini
bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory">
</bean>
ve "<tx:annotation-driven/>" tagını
<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"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
<context:component-scan base-package="com.springapp.mvc"/>
<tx:annotation-driven/>
.
.
.
ekledikten sonra hata almadan programımı çalıştırdım.
10 Ekim 2013 Perşembe
The matching wildcard is strict, but no declaration can be found for element 'aop:aspectj-autoproxy' Hatası
Çözüm için spring bean'leri konfigüre ettiğiniz dosyaya gerekli namespace i ve scheme location'larını belirtmeniz gerekir.
Spring-config.xml
Kaydol:
Kayıtlar (Atom)