You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Eric Carrière (JIRA)" <ji...@apache.org> on 2019/03/05 15:40:00 UTC

[jira] [Comment Edited] (NETBEANS-2183) CDNJS access no longer works

    [ https://issues.apache.org/jira/browse/NETBEANS-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16784576#comment-16784576 ] 

Eric Carrière edited comment on NETBEANS-2183 at 3/5/19 3:39 PM:
-----------------------------------------------------------------

It's the exact same code between 8.2 and 10.

Two places need to be corrected in Netbeans 10 

Lines 159-167 :
{code:java}
/**
* URL pattern for library files.
* {0} library name
* {1} version name
* {2} file name
*/
private static final String LIBRARY_FILE_URL_PATTERN = System.getProperty(
"netbeans.cdnjs.downloadurl", // NOI18N
"http://cdnjs.cloudflare.com/ajax/libs/{0}/{1}/{2}"); // NOI18N
{code}
And Lines 202-205
{code:java}
/** URL of the search web service. */
static final String SEARCH_URL_PREFIX =
System.getProperty("netbeans.cdnjs.searchurl", // NOI18N
"http://api.cdnjs.com/libraries?fields=description,homepage,assets&search="); // NOI18N
{code}


was (Author: sicarriere):
It's the exact same code between 8.2 and 10.

Two places need to be corrected in Netbeans 10 :(

Lines 159-167 :
{code:java}
/**
* URL pattern for library files.
* {0} library name
* {1} version name
* {2} file name
*/
private static final String LIBRARY_FILE_URL_PATTERN = System.getProperty(
"netbeans.cdnjs.downloadurl", // NOI18N
"http://cdnjs.cloudflare.com/ajax/libs/{0}/{1}/{2}"); // NOI18N
{code}
And Lines 202-205
{code:java}
/** URL of the search web service. */
static final String SEARCH_URL_PREFIX =
System.getProperty("netbeans.cdnjs.searchurl", // NOI18N
"http://api.cdnjs.com/libraries?fields=description,homepage,assets&search="); // NOI18N
{code}

> CDNJS access no longer works
> ----------------------------
>
>                 Key: NETBEANS-2183
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2183
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 10.0
>         Environment: Windows 10 Professional 64 bit
> OpenJDK 11.0.2
> NetBeans 10.0 - latest updates
>            Reporter: Mark Eggers
>            Priority: Major
>         Attachments: cdnjs-search.png, cdnjs-update.png, messages.log
>
>
> # Right-mouse button on a project and select properties
>  # Select CDNJS under Javascript libraries
>  # The list of libraries comes up
>  # Expect either a green checkbox or the latest version in the far right column
>  # Question marks are there instead
> Also, when searching for a new library via CDNJS, a "Search Failed :(" message is displayed.
> The trace in the logs:
> INFO [org.netbeans.modules.javascript.cdnjs.LibraryProvider$SearchTask]
> Unexpected token END OF FILE at position 0.
>  at org.json.simple.parser.JSONParser.parse(JSONParser.java:257)
>  at org.json.simple.parser.JSONParser.parse(JSONParser.java:81)
>  at org.json.simple.parser.JSONParser.parse(JSONParser.java:75)
> [catch] at org.netbeans.modules.javascript.cdnjs.LibraryProvider$SearchTask.parse(LibraryProvider.java:303)
>  at org.netbeans.modules.javascript.cdnjs.LibraryProvider$SearchTask.run(LibraryProvider.java:260)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>  at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>  at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> INFO [null]: Last record repeated 9 more times.
> Note that this also fails on an old NetBeans 8.2 installation running on JDK 8. I suspect that the remote request is failing.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists