Geçen gün karşılaştığım "ClasscastException"'ın asıl kaynağının "org.springframework.remoting.rmi.JndiRmiClientInterceptor" sınıfındaki
stub = PortableRemoteObject.narrow(stub, getServiceInterface());
satırı olduğunu gördüm. Benim konfigurasyonumda ejb'nin service sınıfı cast edilecek şekilde ayarlı olduğu için ClassCastException alıyormuşum.
<property name="serviceInterface" value="com.kemal.ejb.CustomerProductQuery"/>
Çünkü ejb lookup sırasında home sınıfını dönüyormuş. Konfigurasyonu aşağıdaki şekilde değiştirince sorun çözülmüş oldu.
<property name="serviceInterface" value="com.kemal.ejb.CustomerProductQueryHome">
Sonuçta weblogic spring entegrasyonu konusu halledilmiş oldu, fakat bu seferde servislerin içinde
CustomerProductQuery customerProductQuery = customerProductQueryHome.create();
şeklinde kullanmak gerekiyor. Bunun engellemenin bir yolu var mı bilmiyorum.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment