Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] URISyntaxException Error

Thanks Mike, I defined it in this way. 

    @GET
    @Path("{resourceId}")
    @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON})
    public UMLModel getResource(@Context final HttpServletResponse httpServletResponse,
                                @PathParam("resourceId") final String resourceId)
    {
    return super.getResource(httpServletResponse, resourceId);
    }



regards,
David



On Tue, Mar 19, 2013 at 8:14 PM, Michael Fiedler <fiedler.mf@xxxxxxxxx> wrote:
The problem is the {resourceId} bit.  It looks like JAX-RS/Wink is not replacing something in your path - normally you'd expect to see a resource identifier there (e.g. umlModel/25).    I'd take a look at your JAX-RS service method declaration.  

Make sure your are declaring resourceId as a @PathParam in the method like this:

@GET

    @Path("{stockQuoteId}")

    @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML, OslcMediaType.APPLICATION_JSON})

    public StockQuote getStockQuote(@PathParam("stockQuoteId") final String stockQuoteId)


 Can you share it with us?

Regards,
Mike


On Tue, Mar 19, 2013 at 12:57 PM, weiqing zhang <weiqing.phd@xxxxxxxxx> wrote:
Hi all,

I am am beginner that try to use OSLC4J to develop a UML oslc server. I use the reference projects OSLC4JStockQuote and OSLC4JQualityManagement and follow the same project structure.

When I launch my OSLC4JUMLManagement project(just like the reference project OSLC4JQualityManagement ), I encountered an error as followings, I spent the whole day and cannot fix it, anyone know what is it about?

Mar 19, 2013 5:35:34 PM org.eclipse.lyo.oslc4j.client.ServiceProviderRegistryURIs <clinit>
WARNING: System property 'org.eclipse.lyo.oslc4j.client.registryuri' not set.  Using calculated value 'http://193.157.245.5:8080/OSLC4JRegistry/catalog/singleton'
Mar 19, 2013 5:35:34 PM org.eclipse.lyo.oslc4j.client.ServiceProviderRegistryURIs <clinit>
WARNING: System property 'org.eclipse.lyo.oslc4j.client.uiuri' not set.  Using calculated value 'http://193.157.245.5:8080/OSLC4JUI'
Mar 19, 2013 5:35:34 PM org.eclipse.lyo.oslc4j.umlmanagement.servlet.ServletListener$RegistrationTask run
SEVERE: Unable to register with service provider catalog
java.net.URISyntaxException: Illegal character in path at index 58: http://193.157.245.5:8080/OSLC4JUMLManagement//umlModel/{resourceId}
at java.net.URI$Parser.fail(URI.java:2810)
at java.net.URI$Parser.checkChars(URI.java:2983)
at java.net.URI$Parser.parseHierarchical(URI.java:3067)
at java.net.URI$Parser.parse(URI.java:3015)
at java.net.URI.<init>(URI.java:577)
at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.createQueryCapability(ServiceProviderFactory.java:214)
at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.handleResourceClass(ServiceProviderFactory.java:101)
at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.initServiceProvider(ServiceProviderFactory.java:82)
at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.createServiceProvider(ServiceProviderFactory.java:53)
at org.eclipse.lyo.oslc4j.umlmanagement.servlet.ServiceProviderFactory.createServiceProvider(ServiceProviderFactory.java:34)
at org.eclipse.lyo.oslc4j.umlmanagement.servlet.ServletListener$RegistrationTask.run(ServletListener.java:129)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

before umlModel there is "//" but not "/". I am not sure whether is it because of this? or the problem may be caused by other issues? 


Any help or comments would be appreciated!


regards,
David

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/lyo-dev



_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/lyo-dev



Back to the top