java.lang.IllegalArgumentException: Remote URL cannot be null!

Sonatype JIRA | Richard Davis | 9 months ago
  1. 0

    When I follow [the documentation|https://repository.sonatype.org/nexus-restlet1x-plugin/default/docs/path__repositories.html] for using the REST API to add repository, I get an error hinting that I am not providing enough information: *Request* (of type repositoryResourceResponse): {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><remoteStorage><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Response*: {code} <nexus-error><errors><error><id>*</id><msg>No enum const class org.sonatype.nexus.proxy.maven.RepositoryPolicy.null</msg></error></errors></nexus-error> {code} *Log:* {code} 2016-03-17 08:42:57,515-0400 DEBUG [qtp836514715-4785] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://host1/service/local/repositories) {code} Through trial an error, I have been able to work past the deserialization errors by adding elements from other complex types complex types (such as {{writePolicy}}, {{indexable}}, {{repoPolicy}}, {{remoteStorage}}, etc); however, I have two errors that appear to be mutually exclusive concerning the existance of {{/repository/data/remoteStorage/url}}. *Error 1 - Request*: {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><browseable>true</browseable><writePolicy>READ_ONLY</writePolicy><indexable>true</indexable><repoPolicy>MIXED</repoPolicy><remoteStorage><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Error 1 - Response*: _500 Internal Server Error_ *Error 1 - Log*: {code} 2016-03-17 08:49:25,514-0400 DEBUG [qtp836514715-4792] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://nexus.swift.com/service/local/repositories) 2016-03-17 08:49:25,573-0400 ERROR [qtp836514715-4792] admin org.sonatype.nexus.rest.NexusRestletResource - java.lang.IllegalArgumentException: Remote URL cannot be null! java.lang.IllegalArgumentException: Remote URL cannot be null! at org.sonatype.nexus.proxy.storage.remote.DefaultRemoteProviderHintFactory.getDefaultRoleHint(DefaultRemoteProviderHintFactory.java:60) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.getRepositoryAppModel(RepositoryListPlexusResource.java:251) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.post(RepositoryListPlexusResource.java:134) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:262) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.handlePost(Resource.java:537) [nexus-restlet1x-plugin-2.11.4-01/:na] {code} *Error 2 - Request:* {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><browseable>true</browseable><writePolicy>READ_ONLY</writePolicy><indexable>true</indexable><repoPolicy>MIXED</repoPolicy><remoteStorage><url>http://host2/nexus/content/repositories/releases/</url><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Error 2 - Response:* _400 Bad Request_ *Error 2 - Log:* {code} 2016-03-17 08:53:48,966-0400 DEBUG [qtp836514715-4797] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://nexus.swift.com/service/local/repositories) 2016-03-17 08:53:49,016-0400 WARN [qtp836514715-4797] admin org.sonatype.nexus.rest.NexusRestletResource - Invalid XML, unable to parse using XStream class org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage.url ---- Debugging information ---- field : url class : org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage required-type : org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage converter-type : com.thoughtworks.xstream.XStream$WhitelistReflectionConverter path : /repository/data/remoteStorage/url line number : 1 class[1] : org.sonatype.nexus.rest.model.RepositoryBaseResource converter-type[1] : org.sonatype.nexus.rest.repositories.RepositoryBaseResourceConverter class[2] : org.sonatype.nexus.rest.model.RepositoryResourceResponse converter-type[2] : org.sonatype.nexus.rest.repositories.RepositoryResourceResponseConverter version : 1.4.6-SONATYPE-03 ------------------------------- at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.handleUnknownField(AbstractReflectionConverter.java:495) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:351) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1537) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1521) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1451) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1439) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at org.sonatype.plexus.rest.representation.XStreamRepresentation.getPayload(XStreamRepresentation.java:66) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.deserialize(RestletResource.java:174) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:257) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.11.4-01/:na] {code} With a little googling, I was able to find [a copy|http://grepcode.com/file/repo1.maven.org/maven2/org.sonatype.nexus/nexus-rest-api/2.2.1/org/sonatype/nexus/rest/repositories/RepositoryListPlexusResource.java#RepositoryListPlexusResource.post%28org.sonatype.nexus.rest.repositories.Context%2Corg.sonatype.nexus.rest.repositories.Request%2Corg.sonatype.nexus.rest.repositories.Response%2Cjava.lang.Object%29] of the source code where I noticed a concerning comment on line 139. I suspect that the combination of deserializing into {{RepositoryResourceResponse}} and the subsequent conversion to {{CRepository}} are causing my problem. If this is so, is there a work around? If not, can you please provide a working example of how to create a proxy repository using the API?

    Sonatype JIRA | 9 months ago | Richard Davis
    java.lang.IllegalArgumentException: Remote URL cannot be null!
  2. 0

    When I follow [the documentation|https://repository.sonatype.org/nexus-restlet1x-plugin/default/docs/path__repositories.html] for using the REST API to add repository, I get an error hinting that I am not providing enough information: *Request* (of type repositoryResourceResponse): {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><remoteStorage><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Response*: {code} <nexus-error><errors><error><id>*</id><msg>No enum const class org.sonatype.nexus.proxy.maven.RepositoryPolicy.null</msg></error></errors></nexus-error> {code} *Log:* {code} 2016-03-17 08:42:57,515-0400 DEBUG [qtp836514715-4785] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://host1/service/local/repositories) {code} Through trial an error, I have been able to work past the deserialization errors by adding elements from other complex types complex types (such as {{writePolicy}}, {{indexable}}, {{repoPolicy}}, {{remoteStorage}}, etc); however, I have two errors that appear to be mutually exclusive concerning the existance of {{/repository/data/remoteStorage/url}}. *Error 1 - Request*: {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><browseable>true</browseable><writePolicy>READ_ONLY</writePolicy><indexable>true</indexable><repoPolicy>MIXED</repoPolicy><remoteStorage><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Error 1 - Response*: _500 Internal Server Error_ *Error 1 - Log*: {code} 2016-03-17 08:49:25,514-0400 DEBUG [qtp836514715-4792] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://nexus.swift.com/service/local/repositories) 2016-03-17 08:49:25,573-0400 ERROR [qtp836514715-4792] admin org.sonatype.nexus.rest.NexusRestletResource - java.lang.IllegalArgumentException: Remote URL cannot be null! java.lang.IllegalArgumentException: Remote URL cannot be null! at org.sonatype.nexus.proxy.storage.remote.DefaultRemoteProviderHintFactory.getDefaultRoleHint(DefaultRemoteProviderHintFactory.java:60) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.getRepositoryAppModel(RepositoryListPlexusResource.java:251) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.post(RepositoryListPlexusResource.java:134) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:262) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.handlePost(Resource.java:537) [nexus-restlet1x-plugin-2.11.4-01/:na] {code} *Error 2 - Request:* {code} <?xml version="1.0" encoding="UTF-8"?><repository><data><name>Releases_proxy</name><repoType>proxy</repoType><providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole><exposed>true</exposed><id>releases_proxy</id><provider>maven2</provider><contentResourceURI>http://host2/nexus/content/repositories/releases/</contentResourceURI><format>maven2</format><browseable>true</browseable><writePolicy>READ_ONLY</writePolicy><indexable>true</indexable><repoPolicy>MIXED</repoPolicy><remoteStorage><url>http://host2/nexus/content/repositories/releases/</url><authentication><username>userhash</username><password>passwordhash</password></authentication></remoteStorage></data></repository> {code} *Error 2 - Response:* _400 Bad Request_ *Error 2 - Log:* {code} 2016-03-17 08:53:48,966-0400 DEBUG [qtp836514715-4797] admin org.sonatype.nexus.restlet1x.internal.RestletServlet - Processing: POST /service/local/repositories (https://nexus.swift.com/service/local/repositories) 2016-03-17 08:53:49,016-0400 WARN [qtp836514715-4797] admin org.sonatype.nexus.rest.NexusRestletResource - Invalid XML, unable to parse using XStream class org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$UnknownFieldException: No such field org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage.url ---- Debugging information ---- field : url class : org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage required-type : org.sonatype.nexus.rest.model.RepositoryResourceRemoteStorage converter-type : com.thoughtworks.xstream.XStream$WhitelistReflectionConverter path : /repository/data/remoteStorage/url line number : 1 class[1] : org.sonatype.nexus.rest.model.RepositoryBaseResource converter-type[1] : org.sonatype.nexus.rest.repositories.RepositoryBaseResourceConverter class[2] : org.sonatype.nexus.rest.model.RepositoryResourceResponse converter-type[2] : org.sonatype.nexus.rest.repositories.RepositoryResourceResponseConverter version : 1.4.6-SONATYPE-03 ------------------------------- at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.handleUnknownField(AbstractReflectionConverter.java:495) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:351) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:474) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:406) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:257) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1537) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1521) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1451) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1439) ~[xstream-1.4.6-SONATYPE-03.jar:1.4.6-SONATYPE-03] at org.sonatype.plexus.rest.representation.XStreamRepresentation.getPayload(XStreamRepresentation.java:66) ~[nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.deserialize(RestletResource.java:174) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:257) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) [nexus-restlet1x-plugin-2.11.4-01/:na] at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.11.4-01/:na] {code} With a little googling, I was able to find [a copy|http://grepcode.com/file/repo1.maven.org/maven2/org.sonatype.nexus/nexus-rest-api/2.2.1/org/sonatype/nexus/rest/repositories/RepositoryListPlexusResource.java#RepositoryListPlexusResource.post%28org.sonatype.nexus.rest.repositories.Context%2Corg.sonatype.nexus.rest.repositories.Request%2Corg.sonatype.nexus.rest.repositories.Response%2Cjava.lang.Object%29] of the source code where I noticed a concerning comment on line 139. I suspect that the combination of deserializing into {{RepositoryResourceResponse}} and the subsequent conversion to {{CRepository}} are causing my problem. If this is so, is there a work around? If not, can you please provide a working example of how to create a proxy repository using the API?

    Sonatype JIRA | 9 months ago | Richard Davis
    java.lang.IllegalArgumentException: Remote URL cannot be null!
  3. 0

    GitHub comment 3#261843411

    GitHub | 3 weeks ago | RoboMWM
    org.bukkit.command.CommandException: Unhandled exception executing 'portal texture' in net.tangentmc.nmsUtils.utils.CommandBuilder$ReflectCommand(portal)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 3#261843564

    GitHub | 3 weeks ago | sanjay900
    org.bukkit.command.CommandException: Unhandled exception executing 'portal texture' in net.tangentmc.nmsUtils.utils.CommandBuilder$ReflectCommand(portal)
  6. 0

    java.lang.IllegalArgumentException: Url cannot be empty | OCPsoft

    ocpsoft.org | 11 months ago
    java.lang.IllegalArgumentException: Url cannot be empty

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Remote URL cannot be null!

      at org.sonatype.nexus.proxy.storage.remote.DefaultRemoteProviderHintFactory.getDefaultRoleHint()
    2. ${project.groupId}:${project.artifactId}
      DefaultRemoteProviderHintFactory.getDefaultRoleHint
      1. org.sonatype.nexus.proxy.storage.remote.DefaultRemoteProviderHintFactory.getDefaultRoleHint(DefaultRemoteProviderHintFactory.java:60)[nexus-core-2.11.4-01.jar:2.11.4-01]
      1 frame
    3. Nexus Core
      RepositoryListPlexusResource.post
      1. org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.getRepositoryAppModel(RepositoryListPlexusResource.java:251)[nexus-restlet1x-plugin-2.11.4-01/:na]
      2. org.sonatype.nexus.rest.repositories.RepositoryListPlexusResource.post(RepositoryListPlexusResource.java:134)[nexus-restlet1x-plugin-2.11.4-01/:na]
      2 frames
    4. ${project.groupId}:${project.artifactId}
      RestletResource.acceptRepresentation
      1. org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:262)[nexus-restlet1x-plugin-2.11.4-01/:na]
      1 frame
    5. Nexus Core
      NexusRestletResource.acceptRepresentation
      1. org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70)[nexus-restlet1x-plugin-2.11.4-01/:na]
      1 frame
    6. org.restlet.resource
      Resource.handlePost
      1. org.restlet.resource.Resource.post(Resource.java:688)[nexus-restlet1x-plugin-2.11.4-01/:na]
      2. org.restlet.resource.Resource.handlePost(Resource.java:537)[nexus-restlet1x-plugin-2.11.4-01/:na]
      2 frames