Details
Description
After an export/import operation is performed to repair a Nexus Repository Manager 3 database, (c.f. NEXUS-12064), NXRM can generate NuGet feeds with a non-standard date format, causing client exceptions and 500 responses from Nexus while retrieving those packages.
Date format before:
<d:Published m:type="Edm.DateTime">2017-04-02T13:37:50.910Z</d:Published>
Date format now (triggering error):
<d:Published m:type="Edm.DateTime">1480511591411</d:Published>
Example Log message:
2018-07-05 10:43:35,395-0400 WARN [qtp876488736-178763] nexusadmin org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/nuget-group/Enterprise.Encryption/4.5.8423.7 java.lang.IllegalArgumentException: Invalid format: "1489000369333" is malformed at "9333" at org.joda.time.format.DateTimeParserBucket.doParseMillis(DateTimeParserBucket.java:187) at org.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:826) at com.sonatype.nexus.repository.nuget.odata.ODataUtils.datetime(ODataUtils.java:89) at com.sonatype.nexus.repository.nuget.odata.ODataUtils.toDate(ODataUtils.java:93) at com.sonatype.nexus.repository.nuget.internal.NugetLocalGalleryFacetSupport.setDerivedAttributes(NugetLocalGalleryFacetSupport.java:726) at com.sonatype.nexus.repository.nuget.internal.NugetLocalGalleryFacetSupport.updateAssetMetadata(NugetLocalGalleryFacetSupport.java:501) at com.sonatype.nexus.repository.nuget.internal.NugetLocalGalleryFacetSupport.putMetadata(NugetLocalGalleryFacetSupport.java:306) at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56) at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54) at com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyFacet.lambda$0(NugetProxyFacet.java:70) at com.sonatype.nexus.repository.nuget.odata.FeedSplicer.ended(FeedSplicer.java:109) at com.sonatype.nexus.repository.nuget.odata.XmlSplicer.consume(XmlSplicer.java:81) at com.sonatype.nexus.repository.nuget.odata.FeedSplicer.consumePage(FeedSplicer.java:58) at com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher.parseFeed(NugetFeedFetcher.java:103) at com.sonatype.nexus.repository.nuget.internal.NugetFeedFetcher.cachePackageFeed(NugetFeedFetcher.java:86) at com.sonatype.nexus.repository.nuget.internal.proxy.NugetProxyFacet.fetch(NugetProxyFacet.java:66)
Cause
We believe this is caused by an export / import of the database. The date-times in question are stored in a part of the database that is schema-less and therefore loses the information that a timestamp was actually a date object.
Mitigation
The linked ticket also suggests that this only affects older versions of the client and is fixed in Visual Studio 2015 and later (see https://issues.sonatype.org/browse/NEXUS-12064?focusedCommentId=412345&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-412345). If you are using an older version of Visual Studio and are affected by this bug then we suggest upgrading NXRM to the fix version listed in this ticket or upgrading to 3.12.1 and applying the patch attached to this ticket for that specific version.
Attachments
Issue Links
- relates
-
NEXUS-12064 JPQLGenerator.toJpqlLiteral NullPointerException for NuGet /Packages() resource as submitted by OctopusDeploy
-
- Closed
-