You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jacek Obarymski (JIRA)" <ji...@apache.org> on 2013/08/13 00:01:48 UTC

[jira] [Updated] (CXF-5184) javax.ws.rs.NotFoundException while using LoadDistributorFeature after failover of 1st node or with single node configured

     [ https://issues.apache.org/jira/browse/CXF-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacek Obarymski updated CXF-5184:
---------------------------------

    Description: 
I've configured JAX-RS proxy to work with LoadDistributorFeature. 
If failover occurs on the first node or a single node si configured then I'm getting javax.ws.rs.NotFoundException as a result of a second call on the proxy. 
All works fine with FailoverFeature or without any clustering features enabled.

{code:tile=proxy inteface}
@Path("/library")
public interface Library {
	@GET
	@Path("/books")
	Books getAllBooks();
	
}
{code}

{code:title=client}
		LoadDistributorFeature feature = new LoadDistributorFeature();
		SequentialStrategy strategy = new SequentialStrategy();
		strategy.setAlternateAddresses(asList("http://localhost:8080", "http://localhost:8181", "http://localhost:8282"));
		feature.setStrategy(strategy);
		

		JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
		List<Feature> features = new ArrayList<Feature>();
		features.add(feature);
		bean.setFeatures(features);
		bean.setAddress("http://localhost:8080");
		bean.setResourceClass(Library.class);
		Library library = bean.create(Library.class);
		
		library.getAllAuthors();
		

		library.getAllAuthors; //I'm getting the exception here

{code}

  was:
I've configured JAX-RS proxy to work with LoadDistributorFeature. 
If I configure more than one method on a proxy then I'm getting javax.ws.rs.NotFoundException while calling the second method. 
All works fine with FailoverFeature or without any clustering features enabled.

{code:tile=proxy inteface}
@Path("/library")
public interface Library {
	@GET
	@Path("/books")
	Books getAllBooks();
	
	@GET
	@Path("/authors")
	Authors getAllAuthors();

}
{code}

{code:title=client}
		LoadDistributorFeature feature = new LoadDistributorFeature();
		SequentialStrategy strategy = new SequentialStrategy();
		strategy.setAlternateAddresses(asList("http://localhost:8080", "http://localhost:8181", "http://localhost:8282"));
		feature.setStrategy(strategy);
		

		JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
		List<Feature> features = new ArrayList<Feature>();
		features.add(feature);
		bean.setFeatures(features);
		bean.setAddress("http://localhost:8080");
		bean.setResourceClass(Library.class);
		Library library = bean.create(Library.class);
		
		Authors allAuthors = library.getAllAuthors();
		

		Books allBooks = library.getAllBooks(); //I'm getting exception here

{code}

        Summary: javax.ws.rs.NotFoundException while using LoadDistributorFeature after failover of 1st node or with single node configured  (was: javax.ws.rs.NotFoundException while using LoadDistributorFeature with more than one JAX-RS resource)
    
> javax.ws.rs.NotFoundException while using LoadDistributorFeature after failover of 1st node or with single node configured
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-5184
>                 URL: https://issues.apache.org/jira/browse/CXF-5184
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.6
>         Environment: jdk7
>            Reporter: Jacek Obarymski
>
> I've configured JAX-RS proxy to work with LoadDistributorFeature. 
> If failover occurs on the first node or a single node si configured then I'm getting javax.ws.rs.NotFoundException as a result of a second call on the proxy. 
> All works fine with FailoverFeature or without any clustering features enabled.
> {code:tile=proxy inteface}
> @Path("/library")
> public interface Library {
> 	@GET
> 	@Path("/books")
> 	Books getAllBooks();
> 	
> }
> {code}
> {code:title=client}
> 		LoadDistributorFeature feature = new LoadDistributorFeature();
> 		SequentialStrategy strategy = new SequentialStrategy();
> 		strategy.setAlternateAddresses(asList("http://localhost:8080", "http://localhost:8181", "http://localhost:8282"));
> 		feature.setStrategy(strategy);
> 		
> 		JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
> 		List<Feature> features = new ArrayList<Feature>();
> 		features.add(feature);
> 		bean.setFeatures(features);
> 		bean.setAddress("http://localhost:8080");
> 		bean.setResourceClass(Library.class);
> 		Library library = bean.create(Library.class);
> 		
> 		library.getAllAuthors();
> 		
> 		library.getAllAuthors; //I'm getting the exception here
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira