petr.gola
May 12th, 2006, 01:46 AM
Hi,
I have chosen hessian remoting for my project. I have this interface on the server side (HessianServiceExporter):
...
public abstract StockItem saveNewStockItem(StockItem item);
public abstract StockItem findStockItemById(int id);
public abstract List getStockItemList(String filter);
...
on my client (HessianProxyFactoryBean) a want to connect to my business layer and use this interface:
public static void main(String[] args) {
XmlBeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(args[0]));
IStockItemService service = (IStockItemService) beanFactory.getBean("myservice");
// (1)
service.findStockItemById(1);
// (2)
service.saveNewStockItem(new StockItem("Ahoj",29));
// (3)
List list = service.getStockItemList(null);
}
...but here are some strange behaving.
(1) throws java.lang.ClassNotFoundException: int ... i haven't any idea why...
(2) works correctly... I verified that there is a new record in the database table.
(3) throws java.lang.reflect.InvocationTargetException ...
Have anyone any idea what I'm doing wrong?
Thx. in advance.
I have chosen hessian remoting for my project. I have this interface on the server side (HessianServiceExporter):
...
public abstract StockItem saveNewStockItem(StockItem item);
public abstract StockItem findStockItemById(int id);
public abstract List getStockItemList(String filter);
...
on my client (HessianProxyFactoryBean) a want to connect to my business layer and use this interface:
public static void main(String[] args) {
XmlBeanFactory beanFactory = new XmlBeanFactory(new FileSystemResource(args[0]));
IStockItemService service = (IStockItemService) beanFactory.getBean("myservice");
// (1)
service.findStockItemById(1);
// (2)
service.saveNewStockItem(new StockItem("Ahoj",29));
// (3)
List list = service.getStockItemList(null);
}
...but here are some strange behaving.
(1) throws java.lang.ClassNotFoundException: int ... i haven't any idea why...
(2) works correctly... I verified that there is a new record in the database table.
(3) throws java.lang.reflect.InvocationTargetException ...
Have anyone any idea what I'm doing wrong?
Thx. in advance.