From: Danny M. <dan...@gm...> - 2005-05-30 13:43:46
|
Hi, Am Montag, den 30.05.2005, 15:08 +0200 schrieb Stefano Fornari: > Well, If I well understand you were looking for where Sync4jDevice was > marshalled, and that is where to look at... Oh, so arrays are marshalled automatically? Didn't know that :) But you may be right in that it has trouble marshalling one item rather than the array... If only the error message werent so notoriously underspecified :)=20 You dont happen to know how to get tomcat to give some more information when it fails? I've been dry-reading most of the related sync4j source and xml files now, and I'm "pretty sure" that sync4j is innocent, it's just that particular webservice export thing that is failing (note that everything else works fine, like adding devices, or adding/searching users, and so on) btw if the file says 'languageSpecificType=3D"java:sync4j.framework.server.Sync4jDevice"', does that mean it will scan WEB-INF/classes for that class file ? or will it scan the .jar files in WEB-INF/lib ? or both ?=20 (I'm asking because I have only sync4j/transport/http/server in classes, nothing much else - the remainder is within file WEB-INF/lib/sync4j-*.jar) >=20 > Ste >=20 cheers, Danny > On 5/30/05, Danny Milosavljevic <dan...@gm...> wrote: > > Hi Stefano, > >=20 > > Am Montag, den 30.05.2005, 12:28 +0200 schrieb Stefano Fornari: > > > Hi Danny, > > > yes, we use Apache Axis and therefore a webservices interface between > > > the Admin and the server. The axis configuration file contains such > > > mappengs, maybe the problem is there. If you installed under tomcat, > > > such file is: webapps/sync4j/WEB-INF/server-config.wsdd > >=20 > > I see ... Indeed I installed under tomcat5, and by looking into > > server-config.wsdd, I see mostly service parameter declarations, but > > nothing specifically about Sync4jDevice[], AdminManager or > > DevicePersistentStore. > >=20 > > (well ok, there is a generic mapping for Sync4jDevice itself: > > <beanMapping qname=3D"sync4j:Sync4jDevice" > > xmlns:sync4j=3D"urn:BeanService" > > languageSpecificType=3D"java:sync4j.framework.server.Sync4jDevice"/> > > ) > >=20 > > I attached the file on this mail, maybe I am overlooking something... > >=20 > > > > > > HTH > > > Stefano > >=20 > > cheers, > > Danny > >=20 > > > > > > On 5/30/05, Danny Milosavljevic <dan...@gm...> wrote: > > > > Hi, > > > > > > > > I'm playing around with cvs sync4j a bit, and with yesterday's vers= ion I > > > > get this when using the Sync4j admin, going to "Devices" (in the tr= ee) > > > > and clicking "Search": > > > > > > > > 30 Mai 2005 10:38 [ERROR] Unexpected error: (500)Internal Server Er= ror > > > > > > > > since that didnt help much, I sprayed the source with log.info in o= rder > > > > to determine what's going on: > > > > > > > > s4j-admin/src/java/sync4j/syncadmin/main/BusinessDelegate.java > > > > > > > > /** Calls getDevices method of the ejb */ > > > > public Sync4jDevice[] getDevices(Clause clause) > > > > throws AdminException { > > > > Sync4jDevice[] res =3D null; > > > > Log.info("BusinessDelegate.getDevices"); > > > > Object[] objs =3D null; > > > > try { > > > > Log.info("preparing parameter objs"); > > > > objs =3D new Object[] { BeanFactory.marshal(clause) }; > > > > Log.info("invoke getDevices (WS)"); > > > > res =3D (Sync4jDevice[])ws.invoke("getDevices", objs); > > > > Log.info("delivering result"); > > > > return res; > > > > } catch (Exception e) { > > > > throw new AdminException(e.getMessage(), e); > > > > } > > > > } > > > > > > > > I also modified the server to make getDevices more verbose: > > > > > > > > s4j-server/src/java/sync4j/server/admin/AdminManager.java > > > > > > > > public Sync4jDevice[] getDevices(Clause clauses) > > > > throws ServerException, AdminException { > > > > Sync4jDevice[] devices =3D null; > > > > int i; > > > > log.info("AdminManager.getDevices"); > > > > > > > > try { > > > > > > > > devices =3D (Sync4jDevice[])ps.read(new Sync4jDevice(), > > > > clauses); > > > > log.info("getDevices worked!"); > > > > > > > > for(i =3D 0; i < devices.length; i++) { > > > > log.info("device: " + devices[i].getDeviceId() + " = (" + > > > > devices[i].getDescription() + ")"); > > > > } > > > > log.info("----"); > > > > > > > > } catch (PersistentStoreException e) { > > > > String msg =3D "Error reading devices: " + e.getMessage= (); > > > > if (log.isLoggable(Level.SEVERE)) { > > > > log.severe(msg); > > > > } > > > > > > > > log.throwing(getClass().getName(), "getDevices", e); > > > > > > > > throw new ServerException(msg, e); > > > > } > > > > return devices; > > > > } > > > > > > > > I also modified the admin search code to use a primitive clause as = in > > > > getClause...ID ("ID", EQ, "75343"), which has the following result: > > > > - if that clause causes the result device list to be empty, it will= work > > > > - if that clause will cause the result device list to contain somet= hing, > > > > then I get: > > > > > > > > (note the "Found x device(s)", that is: countDevices, always works = fine, > > > > both if it finds something and if it doesnt) > > > > > > > > I get in the admin: > > > > > > > > 30 Mai 2005 10:38 [INFO] searching devices > > > > 30 Mai 2005 10:38 [INFO] Found 1 device > > > > 30 Mai 2005 10:38 [INFO] DevicesController: search devices with cla= use > > > > 30 Mai 2005 10:38 [INFO] BusinessDelegate.getDevices > > > > 30 Mai 2005 10:38 [INFO] preparing parameter objs > > > > 30 Mai 2005 10:38 [INFO] invoke getDevices (WS) > > > > 30 Mai 2005 10:38 [ERROR] Error searching device: > > > > 30 Mai 2005 10:38 [ERROR] Unexpected error: (500)Internal Server Er= ror > > > > > > > > and in the server log: > > > > > > > > [May 30, 2005 2:45:36 AM] INFO: New administrative session for admi= n > > > > [May 30, 2005 2:45:40 AM] INFO: AdminManager.getDevices > > > > [May 30, 2005 2:45:40 AM] INFO: getDevices worked! > > > > [May 30, 2005 2:45:40 AM] INFO: device: 351965-00-863729-9 (bernd c= ell) > > > > [May 30, 2005 2:45:40 AM] INFO: ---- > > > > [May 30, 2005 10:38:26 AM] INFO: New administrative session for adm= in > > > > [May 30, 2005 10:38:31 AM] INFO: AdminManager.getDevices > > > > [May 30, 2005 10:38:31 AM] INFO: getDevices worked! > > > > [May 30, 2005 10:38:31 AM] INFO: device: 351965-00-863729-9 (bernd = cell) > > > > [May 30, 2005 10:38:31 AM] INFO: ---- > > > > > > > > > > > > Now what I wonder is if there is some other place that I can check = for > > > > if it is "allowed" to return/marshal(?) Sync4jDevice[] over the wir= e. > > > > > > > > I am pretty good in programming, but rusty in java programming, so > > > > excuse me if I am missing something obvious. > > > > > > > > cheers, > > > > Danny > > > > -- > > > > www.keyserver.net key id A334AEA6 > > > > > > > > > > > > > > > > BodyID:65171976.2.n.logpart (stored separately) > > > > > > > > > > > > > > > > -- > > www.keyserver.net key id A334AEA6 > >=20 > >=20 > >=20 > > BodyID:65289049.4.n.logpart (stored separately) > >=20 > >=20 > >=20 >=20 >=20 --=20 www.keyserver.net key id A334AEA6 |