From: <php...@li...> - 2011-09-19 21:13:58
|
Hi again. After some more head banging and googling it showed up as being a bug in Eclipse when exporting your project as a runnable jar. Using the fat jar plugin from http://fjep.sourceforge.net/ in Eclipse - and the service runs as a charm! So cool. Hope it might help someone else out Cheers /Mikael 2011-09-19 17:47, php...@li... skrev: > Hi! > I've been using the old native bridge for some time - but I had to > upgrade to the new API on a recent server upgrade and then ran in to > some problems... > I Have a very simple RMI service with one remote interface. I used to > interface it using the old native API, with the following code: > > $remote = new java("se.something.SomeServerRemote"); > $lookup = new java_class("java.rmi.Naming"); > $remote = $lookup->lookup("rmi://www.something.net/SomeServer"); > > And then I could interface and send data on the defined remote interface > and methods like: > // just method call, not passing any object > $result = $remote->sendEcho(); > > // instantiate object to be sent to RMI-server > $someObject = new java("org.jpos.ISOMsg", 3); > > // call RMI with data > $response = $remote->sendTransaction($somObject); > > This used to work just great! > > > I've now compiled the bridge into a very simple standalone server that > receives the bridge API-calls and then just interfaces the RMI server. > > This works fine when I'm not passing any objects to the remote service > (i.e. using the $remote->sendEcho() ) but I get a java exception when I > try to pass any object/data: > PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke > failed: [[o:SomeServer_Stub]]->sendTransaction((o:ISOMsg)[o:ISOMsg]). > Cause: java.rmi.ServerException: RemoteException occurred in server > thread; nested exception is: \n\tjava.rmi.UnmarshalException: error > unmarshalling arguments; nested exception is: > \n\tjava.net.MalformedURLException: unknown protocol: rsrc VM: > 1.6.0_20@http://java.sun.com/" > > I'm sorry if this is a newbie question, but I don't realize what I'm > doin wrong here. Any help would be so great. > > Cheers > > /Mikael > > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs& more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users -- ?: Mikael Geijer T: +46 (0) 70 745 5239 W: http://www.nufort.net |