users@jersey.java.net

[Jersey] Re: Jersey client in applet looking for resources that don't exist on server

From: Martin Wilson <martinw_at_bright-interactive.com>
Date: Sat, 19 Mar 2011 11:31:57 -0000

FYI, I fixed these invalid request errors as follows:

- missing resources in META-INF: created empty files at these locations

- missing package-info.class: created an empty package-info.java for the
package containing our model classes

- ParseException: added mail.jar to the applet's classpath.

 

Regards,

Martin

 

From: Martin Wilson [mailto:martinw_at_bright-interactive.com]
Sent: 18 March 2011 20:55
To: 'users_at_jersey.java.net'
Subject: Jersey client in applet looking for resources that don't exist on
server

 

Hi,

 

I am using Jersey client in an applet to make calls to a Tomcat webapp, in
which we use Jersey server. Everything works well functionally, except I am
seeing the following invalid requests in the server's error logs:

2011/03/18 17:38:38:049 GMT [ERROR] RequestProcessor - Invalid path was
requested /META-INF/services/javax.ws.rs.ext.RuntimeDelegate

2011/03/18 17:38:38:345 GMT [ERROR] RequestProcessor - Invalid path was
requested /javax/mail/internet/ParseException.class

2011/03/18 17:38:38:657 GMT [ERROR] RequestProcessor - Invalid path was
requested /META-INF/services/javax.xml.datatype.DatatypeFactory

2011/03/18 17:38:38:953 GMT [ERROR] RequestProcessor - Invalid path was
requested /com/bright/assetbank/restapi/representations/package-info.class

2011/03/18 17:38:39:078 GMT [ERROR] RequestProcessor - Invalid path was
requested /META-INF/services/javax.xml.parsers.SAXParserFactory

 

We are using Jersey 1.2 (as ideally we want it to work on JSE5) although I
have tried with Jersey 1.5 (and SE6) and I see the same messages.

 

Presumably, the requests to the META-INF urls are made by the relevant
newInstance statics of DatatypeFactory, RuntimeDelegate and
SAXParserFactory, which end up using the default implementations. Is there a
way to force the default implementations to be used straightaway, i.e. to
avoid the above calls being made? Alternatively, can I create the above
resources to stop the 'invalid path' errors (and if so, what should these
files contain)? Likewise with package-info.class and ParseException.class.

Or am I simply missing a jar file in the applet tag?

 

Any help would be much appreciated!

 

Thanks,

Martin

 

___________

 

Martin Wilson
 <mailto:martinw_at_bright-interactive.com> martinw_at_bright-interactive.com

 

Asset Bank: take control of your digital assets
http://www.assetbank.co.uk
+44 (0)1273 669 490

 

Registered in England No. 3865036. VAT Reg. No. 786 6073 86 Registered
Office: 12-13 Ship Street, Brighton, East Sussex, BN1 1AD