Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve relative URI #24

Closed
ghost opened this issue Aug 1, 2013 · 13 comments
Closed

Unable to resolve relative URI #24

ghost opened this issue Aug 1, 2013 · 13 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Aug 1, 2013

when I try to launch ttv:

java -jar ttv-bin-1.0.0a1.jar --verbose prova.xml

I receive that error:

Timed Text Verifier (TTV) [1.0.0a1] Copyright 2013 Skynav, Inc.
[I]:Verifying {prova.xml}.
[I]:Verifying resource presence and encoding phase (1)...
[E]:{prova.xml}: Unable to resolve relative URI: {prova.xml}
[I]:Failed, with 1 error.
[I]:Failed 1 resources.

My environment is:
Windows Vista Ultimate SP2
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

Any help will be appreciated
Thanks

@skynavga
Copy link
Member

skynavga commented Aug 1, 2013

It appears that TimedTextVerifier.getCWDAsUri() is failing on Win platform, which hasn't been tested yet (by me). In the mean time, you may try using an absolute URI as a workaround, e.g.,

file:///C:/My%20Documents/prova.xml
http://localhost/~myaccount/prova.xml

etc

@skynavga
Copy link
Member

skynavga commented Aug 1, 2013

If you are able to build ttv from sources, you might try changing TimeTextVerifier:getCWDAsUri() as follows:

return new URI("file://" + new File(".").getCanonicalPath().replace(File.separatorChar, '/') + File.separatorChar);

to

return new URI("file://" + new File(".").getCanonicalPath().replace(File.separatorChar, '/') + '/');

I haven't verified this quick fix yet.

@ghost
Copy link
Author

ghost commented Aug 1, 2013

mmmhhh, this absolute URi is not clear for me.

I have my prova.xml file on C:\Temp

I tried various ways:
java -jar ttv.jar file:///C:/Temp/prova.xml
java -jar ttv.jar ///C:/Temp/prova.xml
java -jar ttv.jar http://localhost/claudio/prova.xml

but with no luck ...

what should be the exact command ?

Thanks
Claudio

From: Glenn Adams
Sent: Thursday, August 01, 2013 5:33 PM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

It appears that TimedTextVerifier.getCWDAsUri() is failing on Win platform, which hasn't been tested yet (by me). In the mean time, you may try using an absolute URI as a workaround, e.g.,

file:///C:/My%20Documents/prova.xml
http://localhost/~myaccount/prova.xml

etc


Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Aug 1, 2013

ok thanks,

in the meantime it seems to work as:
C:\Users\claudio>java -jar ttv.jar --verbose file:/C:/Users/claudio/prova3.xml

the result is:
Timed Text Verifier (TTV) [1.0.0a1] Copyright 2013 Skynav, Inc.
[I]:Verifying {file:/C:/Users/claudio/prova3.xml}.
[I]:Verifying resource presence and encoding phase (1)...
[I]:Resource encoding sniffed as UTF-8.
[I]:Resource length 1259 bytes, decoded as 1255 Java characters (char).
[I]:Verifying XML well-formedness phase (2)...
[I]:Verifying XSD validity phase (3)...
[E]:{file:/C:/Users/claudio/prova3.xml}:[5,27]:cvc-elt.1: impossibile trovare la
dichiarazione dell'elemento "DCSubtitle".
[I]:Failed, with 1 error.
[I]:Failed 1 resources.

Thanks
Claudio

From: Glenn Adams
Sent: Thursday, August 01, 2013 5:38 PM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

If you are able to build ttv from sources, you might try changing TimeTextVerifier:getCWDAsUri() as follows:

return new URI("file://" + new File(".").getCanonicalPath().replace(File.separatorChar, '/') + File.separatorChar);

to

return new URI("file://" + new File(".").getCanonicalPath().replace(File.separatorChar, '/') + '/');

I haven't verified this quick fix yet.


Reply to this email directly or view it on GitHub.

@ghost ghost assigned skynavga Aug 1, 2013
@skynavga
Copy link
Member

skynavga commented Aug 1, 2013

On Thu, Aug 1, 2013 at 10:05 AM, Claudio1060 notifications@github.comwrote:

in the meantime it seems to work as:
C:\Users\claudio>java -jar ttv.jar --verbose
file:/C:/Users/claudio/prova3.xml

Could you check to see if the following also works? I'm just curious to
help out with a fix.

file:///C:/Users/claudio/prova3.xml

BTW, on the http://localhost/ ... that was intended to be a template of a
sort for accessing the resource via a local HTTP server (if running). You
would need to place the file (prova3.xml) in a location accessible via HTTP
for that to work.

@ghost
Copy link
Author

ghost commented Aug 1, 2013

Yes, it works.

Thanks for the clarification on http://localhost ...

Claudio

From: Glenn Adams
Sent: Thursday, August 01, 2013 6:17 PM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

On Thu, Aug 1, 2013 at 10:05 AM, Claudio1060 notifications@github.comwrote:

in the meantime it seems to work as:
C:\Users\claudio>java -jar ttv.jar --verbose
file:/C:/Users/claudio/prova3.xml

Could you check to see if the following also works? I'm just curious to
help out with a fix.

file:///C:/Users/claudio/prova3.xml

BTW, on the http://localhost/ ... that was intended to be a template of a
sort for accessing the resource via a local HTTP server (if running). You
would need to place the file (prova3.xml) in a location accessible via HTTP
for that to work.

Reply to this email directly or view it on GitHub.

@ghost
Copy link
Author

ghost commented Aug 2, 2013

Hi Glenn,

may be you can explain me this error ?
D:_aa>java -jar ttv.jar file:///D:/_aa/SD_prova.ttml
Timed Text Verifier (TTV) [1.0.0a1] Copyright 2013 Skynav, Inc.
[E]:{file:///D:/_aa/SD_prova.ttml}: local part cannot be "null" when creating a QName

The file SD_prova.ttml is attached.

Thanks
Claudio

From: Glenn Adams
Sent: Thursday, August 01, 2013 6:17 PM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

On Thu, Aug 1, 2013 at 10:05 AM, Claudio1060 notifications@github.comwrote:

in the meantime it seems to work as:
C:\Users\claudio>java -jar ttv.jar --verbose
file:/C:/Users/claudio/prova3.xml

Could you check to see if the following also works? I'm just curious to
help out with a fix.

file:///C:/Users/claudio/prova3.xml

BTW, on the http://localhost/ ... that was intended to be a template of a
sort for accessing the resource via a local HTTP server (if running). You
would need to place the file (prova3.xml) in a location accessible via HTTP
for that to work.

Reply to this email directly or view it on GitHub.

@skynavga
Copy link
Member

skynavga commented Aug 2, 2013

Sounds like a separate bug. Could you email me the file you are encountering this in? I didn't see an attached file.

@ghost
Copy link
Author

ghost commented Aug 2, 2013

I've attached again, this time compressed to zip file.

From: Glenn Adams
Sent: Friday, August 02, 2013 4:08 PM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

Sounds like a separate bug. Could you email me the file you are encountering this in? I didn't see an attached file.


Reply to this email directly or view it on GitHub.

@skynavga
Copy link
Member

skynavga commented Aug 2, 2013

For some reason, your attachments aren't making it through. Please email me directly at "glenn at skynav.com". Or you can upload the attachment to gist.github.com then add a link to it in a new comment to this issue.

skynavga added a commit that referenced this issue Aug 4, 2013
@skynavga
Copy link
Member

skynavga commented Aug 4, 2013

This issue (and the problem seen with your test file SD_Prova.ttml) has been fixed in Release 1.0.0a2.

@ghost
Copy link
Author

ghost commented Aug 29, 2013

Hi Glenn,
I apologize for the delay in my reply, but I was on vacation.

This is the output:
D:_aa>java -jar ttv.jar --verbose --debug-exceptions SD_prova.ttml
Timed Text Verifier (TTV) [1.0.0a2] Copyright 2013 Skynav, Inc.
[I]:Verifying {SD_prova.ttml}.
[I]:Verifying resource presence and encoding phase (1)...
[E]:{file://D/_aa/SD_prova.ttml}: D
[D]:java.net.UnknownHostException: D
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.ftp.impl.FtpClient.doConnect(Unknown Source)
at sun.net.ftp.impl.FtpClient.tryConnect(Unknown Source)
at sun.net.ftp.impl.FtpClient.connect(Unknown Source)
at sun.net.ftp.impl.FtpClient.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Sour
ce)
at java.net.URL.openStream(Unknown Source)
at com.skynav.ttv.app.TimedTextVerifier.readResource(TimedTextVerifier.j
ava:744)
at com.skynav.ttv.app.TimedTextVerifier.verifyResource(TimedTextVerifier
.java:898)
at com.skynav.ttv.app.TimedTextVerifier.verify(TimedTextVerifier.java:12
25)
at com.skynav.ttv.app.TimedTextVerifier.verify(TimedTextVerifier.java:13
45)
at com.skynav.ttv.app.TimedTextVerifier.run(TimedTextVerifier.java:1391)
at com.skynav.ttv.app.TimedTextVerifier.main(TimedTextVerifier.java:1423
)
[I]:Failed, with 1 error.
[I]:Failed 1 resources.
Best
Claudio

From: Glenn Adams
Sent: Wednesday, August 07, 2013 7:42 PM
To: Claudio-Ampersand S.a.s.
Subject: Re: [ttv] Unable to resolve relative URI (#24)

Could you run this again with the --debug-exceptions flag and send me the full console output?

Thanks, G.

On Mon, Aug 5, 2013 at 2:06 AM, Claudio-Ampersand S.a.s. claudio.orsini@ampersoftware.it wrote:

Hi Glenn,
I tried the new version, but my result is:
D:_aa>java -jar ttv.jar --verbose SD_prova.ttml
Timed Text Verifier (TTV) [1.0.0a2] Copyright 2013 Skynav, Inc.
[I]:Verifying {SD_prova.ttml}.

[I]:Verifying resource presence and encoding phase (1)...

[E]:{file://D/_aa/SD_prova.ttml}: D

[I]:Failed, with 1 error.
[I]:Failed 1 resources.
it seems that the file path is not yet well translated, it should be file:///D:/_aa/SD_prova.ttml
Best
Claudio

From: Glenn Adams
Sent: Sunday, August 04, 2013 4:50 AM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

This issue (and the problem seen with your test file SD_Prova.ttml) has been fixed in Release 1.0.0a2.


Reply to this email directly or view it on GitHub.

@skynavga
Copy link
Member

I uploaded a new Alpha 3 release today which should clear up the problem on
Windows. I also added support for SMPTE verification models and external
schemas. See the github/ttv repo for more details.

On Thu, Aug 29, 2013 at 7:08 AM, Claudio1060 notifications@github.comwrote:

Hi Glenn,
I apologize for the delay in my reply, but I was on vacation.

This is the output:
D:_aa>java -jar ttv.jar --verbose --debug-exceptions SD_prova.ttml
Timed Text Verifier (TTV) [1.0.0a2] Copyright 2013 Skynav, Inc.
[I]:Verifying {SD_prova.ttml}.
[I]:Verifying resource presence and encoding phase (1)...
[E]:{file://D/_aa/SD_prova.ttml}: D
[D]:java.net.UnknownHostException: D
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.ftp.impl.FtpClient.doConnect(Unknown Source)
at sun.net.ftp.impl.FtpClient.tryConnect(Unknown Source)
at sun.net.ftp.impl.FtpClient.connect(Unknown Source)
at sun.net.ftp.impl.FtpClient.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown Sour
ce)
at java.net.URL.openStream(Unknown Source)
at com.skynav.ttv.app.TimedTextVerifier.readResource(TimedTextVerifier.j
ava:744)
at com.skynav.ttv.app.TimedTextVerifier.verifyResource(TimedTextVerifier
.java:898)
at com.skynav.ttv.app.TimedTextVerifier.verify(TimedTextVerifier.java:12
25)
at com.skynav.ttv.app.TimedTextVerifier.verify(TimedTextVerifier.java:13
45)
at com.skynav.ttv.app.TimedTextVerifier.run(TimedTextVerifier.java:1391)
at com.skynav.ttv.app.TimedTextVerifier.main(TimedTextVerifier.java:1423
)
[I]:Failed, with 1 error.
[I]:Failed 1 resources.
Best
Claudio

From: Glenn Adams
Sent: Wednesday, August 07, 2013 7:42 PM
To: Claudio-Ampersand S.a.s.
Subject: Re: [ttv] Unable to resolve relative URI (#24)

Could you run this again with the --debug-exceptions flag and send me the
full console output?

Thanks, G.

On Mon, Aug 5, 2013 at 2:06 AM, Claudio-Ampersand S.a.s. <
claudio.orsini@ampersoftware.it> wrote:

Hi Glenn,
I tried the new version, but my result is:
D:_aa>java -jar ttv.jar --verbose SD_prova.ttml
Timed Text Verifier (TTV) [1.0.0a2] Copyright 2013 Skynav, Inc.
[I]:Verifying {SD_prova.ttml}.

[I]:Verifying resource presence and encoding phase (1)...

[E]:{file://D/_aa/SD_prova.ttml}: D

[I]:Failed, with 1 error.
[I]:Failed 1 resources.
it seems that the file path is not yet well translated, it should be
file:///D:/_aa/SD_prova.ttml
Best
Claudio

From: Glenn Adams
Sent: Sunday, August 04, 2013 4:50 AM
To: skynav/ttv
Cc: Claudio1060
Subject: Re: [ttv] Unable to resolve relative URI (#24)

This issue (and the problem seen with your test file SD_Prova.ttml) has
been fixed in Release 1.0.0a2.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-23487506
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant