Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] URISyntaxException during registraion with service provider catalog

Hi Samuel,

 

thanks for  your answer.

When I  remove the @OslcCreationFactory, it works. It still works for the asset creator, but if I want to add an artifact to an asset, I need an artifact creator and therefore I need the specific ID of the asset.

I don’t know how to register the artifact creator to the ServiceProvider catalog.

 

http://open-services.net/wiki/asset-management/OSLC-Asset-Management-2.0-Specification/#Creation-Factories

 

Maybe it is not necessary to register the creation factory for artifacts only for assets?!

 

Kind regards,

Otto Brechelmacher

 

Von: lyo-dev-bounces@xxxxxxxxxxx [mailto:lyo-dev-bounces@xxxxxxxxxxx] Im Auftrag von Samuel Padgett
Gesendet: Mittwoch, 10. Juli 2013 14:40
An: Lyo project developer discussions
Cc: lyo-dev@xxxxxxxxxxx
Betreff: [lyo-dev] URISyntaxException during registraion with service provider catalog

 

Hi, Otto. When you annotate a method with @OslcCreationFactory, it will try to add that URL to the service provider document. I'm not sure it makes sense to have path parameters here since it should be a concrete URI in the service provider definition. Can you simply remove the @OslcCreationFactory annotation? I believe everything will still work. When I look at the ServiceProvider example in the spec, I don't see a CreationFactory for entries like this. 

Hope this helps,
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx



-----lyo-dev-bounces@xxxxxxxxxxx wrote: -----

To: "lyo-dev@xxxxxxxxxxx" <lyo-dev@xxxxxxxxxxx>
From: Brechelmacher Otto
Sent by: lyo-dev-bounces@xxxxxxxxxxx
Date: 07/10/2013 06:58AM
Subject: [lyo-dev] URISyntaxException during registraion with service provider catalog

Hello!

 

I am working on integrating an asset manager (using OSLC4J). Everything works fine, except OSLC registration.

When I try to register my artifact creation factory using @OslcCreationFactory at

@POST

@Path("{AssetId}/" + Constants.RESOURCE_PATH_ARTIFACTS)

public Response createHtmlArtifact (@Context final  HttpServletRequest  httpServletRequest,

                                   @Context final  HttpServletResponse httpServletRespons,

                                   @PathParam("AssetId") final String AssetId)

 

an error occurs:

java.net.URISyntaxException: Illegal character in path at index 55: http://localhost:8080/AitAssetManager/services//assets/{AssetId}/artifacts

 

Full console output:

Jul 10, 2013 11:57:24 AM servlet.ServletListener$RegistrationTask run

SEVERE: Unable to register with service provider catalog

java.net.URISyntaxException: Illegal character in path at index 55: http://localhost:8080/AitAssetManager/services//assets/{AssetId}/artifacts

       at java.net.URI$Parser.fail(URI.java:2829)

       at java.net.URI$Parser.checkChars(URI.java:3002)

       at java.net.URI$Parser.parseHierarchical(URI.java:3086)

       at java.net.URI$Parser.parse(URI.java:3034)

       at java.net.URI.<init>(URI.java:595)

       at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.createCreationFactory(ServiceProviderFactory.java:172)

       at org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory.handleResourceClass(ServiceProviderFactory.java:129)

       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 servlet.ServiceProviderFactory.createServiceProvider(ServiceProviderFactory.java:35)

       at servlet.ServletListener$RegistrationTask.run(ServletListener.java:146)

       at java.util.TimerThread.mainLoop(Timer.java:555)

       at java.util.TimerThread.run(Timer.java:505)

 

The registration of other services(asset creator/selector) works, because there is no “{…}“ in the URI.

But for artifacts it is necessary to have the parameter for the asset in the URI (http://open-services.net/wiki/asset-management/OSLC-Asset-Management-2.0-Samples/ - “Publish a URI artifact”).

 

How can I solve this problem?

 

I already posted this problem to the asset management mailing list and they redirect me to the lyo mailing list..

 

They send me an link to a similar problem

http://dev.eclipse.org/mhonarc/lists/lyo-dev/msg00305.html

but there is no solution for my problem.

 

When I use my software I can create, list,… assets and artifacts and the replacement of AssetId works. Only the registration failed.

 

 

Regards

 

OTTO BRECHELMACHER
Junior Engineer

Safety & Security Department

Safe and Autonomous Systems

AIT Austrian Institute of Technology GmbH
Donau-City-Strasse 1  |  1220 Vienna  |  Austria
M +43 664 8251393  |  F +43 50550-4150
otto.brechelmacher@xxxxxxxxx  |  http://www.ait.ac.at

 

FN: 115980 i HG Wien | UID: ATU14703506

www.ait.ac.at/Email-Disclaimer

 

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


Back to the top