Comments on: Unit Test JAX-RS using Java 6 and JUnit 4 http://www.tmro.net/2009/03/unit-test-jax-rs-using-java-6-and-junit-4/ Mobilise your business Sat, 14 Jan 2012 06:55:20 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: Nick http://www.tmro.net/2009/03/unit-test-jax-rs-using-java-6-and-junit-4/comment-page-1/#comment-76 Nick Tue, 05 May 2009 21:05:00 +0000 http://www.blog.tmro.net/?p=93#comment-76 Thanks Bruno! That's helpful. Thanks Bruno! That’s helpful.

]]>
By: Bruno Vernay http://www.tmro.net/2009/03/unit-test-jax-rs-using-java-6-and-junit-4/comment-page-1/#comment-75 Bruno Vernay Tue, 05 May 2009 16:50:00 +0000 http://www.blog.tmro.net/?p=93#comment-75 Hi,<br />Your post was very helpful !<br /><br />If you just want to get resources, you can use url.openStream() (see http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html)<br /><br />There are some problems if you try to run it with Eclipse:<br />- You might see compile errors saying Access restriction: The type ... is not accessible due to restriction on required library ... <br />The problem here is that the HTTP server used in that project is part of the Sun JRE6 but not part of standardized Java. <br />Eclipse therefore blocks access to it. <br />This can be fixed by going to the Window->Preferences window, selecting Java->Compiler->Errors/Warnings, <br />selecting Deprecated and Restricted API and then changing the setting for Forbidden Reference and Discouraged Reference to Warning instead of Error. <br /><br />- Running it with the embedded maven gives an error: INFO: Scanning for root resource and provider classes in the paths:<br /> /usr/local/eclipse-3.4.2/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-classworlds-1.2-alpha-12.jar<br />May 5, 2009 6:41:42 PM com.sun.jersey.server.impl.application.WebApplicationImpl processRootResources<br />SEVERE: The ResourceConfig instance does not contain any root resource classes.<br />The solution is to configure an external Maven install.<br /><br />- Running it with JUnit in Eclipse works (doesn't) uses Maven.<br /><br />Bruno Hi,
Your post was very helpful !

If you just want to get resources, you can use url.openStream() (see http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html)

There are some problems if you try to run it with Eclipse:
- You might see compile errors saying Access restriction: The type … is not accessible due to restriction on required library …
The problem here is that the HTTP server used in that project is part of the Sun JRE6 but not part of standardized Java.
Eclipse therefore blocks access to it.
This can be fixed by going to the Window->Preferences window, selecting Java->Compiler->Errors/Warnings,
selecting Deprecated and Restricted API and then changing the setting for Forbidden Reference and Discouraged Reference to Warning instead of Error.

- Running it with the embedded maven gives an error: INFO: Scanning for root resource and provider classes in the paths:
/usr/local/eclipse-3.4.2/plugins/org.maven.ide.components.maven_embedder_2.1.0.20080530-2300/jars/plexus-classworlds-1.2-alpha-12.jar
May 5, 2009 6:41:42 PM com.sun.jersey.server.impl.application.WebApplicationImpl processRootResources
SEVERE: The ResourceConfig instance does not contain any root resource classes.
The solution is to configure an external Maven install.

- Running it with JUnit in Eclipse works (doesn't) uses Maven.

Bruno

]]>
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213| how to buy herbal soma online no prescription buying premarin buying risperdal on line chloroquine without prescription generic buying desyrel buy generic doxycycline benicar order online canada generic buying zyprexa buying bystolic pharmacy without prescription order fluoxetine pills viagra soft without prescription order cheap alesse purchasing hydrochlorothiazide pharmacy without prescription flagyl no prescription how to buy strattera online no prescription buy no prescription fluoxetineAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online Buy Accutane No Prescription