System.ArgumentException: .

Hibernate JIRA | erabii | 7 months ago
  1. 0

    This is more of a question but could be ultimately a bug... So here is the story, trying to save a Geometry (as I understand Geography is not yet supported) into a MSSQL db. Here is the relevant mapping, which seems to create the table as expected: {code} import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import com.vividsolutions.jts.geom.Point; @Entity @Table(name = "distance_holder") public class DistanceHolder { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "name") private String name; @Column(columnDefinition = "Geometry") private Point position; {code} But then how do I insert via jpa (spring-data-jpa in case it matters) to such a table: {code} DistanceHolder holder1 = new DistanceHolder(); holder1.setName("Some-Street"); GeometryFactory factory = new GeometryFactory(new PrecisionModel(), 4326); Coordinate coord1 = new Coordinate(46.977105, 28.874498); // that's my house coords Point someStreet = factory.createPoint(coord1); someStreet.setSRID(4326); holder1.setPoint(someStreet); {code} The exception thrown is : {code} com.microsoft.sqlserver.jdbc.SQLServerException: A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.ArgumentException: 24100: The spatial reference identifier (SRID) is not valid. SRIDs must be between 0 and 999999. System.ArgumentException: . at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) {code}

    Hibernate JIRA | 7 months ago | erabii
    System.ArgumentException: .
  2. 0

    This is more of a question but could be ultimately a bug... So here is the story, trying to save a Geometry (as I understand Geography is not yet supported) into a MSSQL db. Here is the relevant mapping, which seems to create the table as expected: {code} import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import com.vividsolutions.jts.geom.Point; @Entity @Table(name = "distance_holder") public class DistanceHolder { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "name") private String name; @Column(columnDefinition = "Geometry") private Point position; {code} But then how do I insert via jpa (spring-data-jpa in case it matters) to such a table: {code} DistanceHolder holder1 = new DistanceHolder(); holder1.setName("Some-Street"); GeometryFactory factory = new GeometryFactory(new PrecisionModel(), 4326); Coordinate coord1 = new Coordinate(46.977105, 28.874498); // that's my house coords Point someStreet = factory.createPoint(coord1); someStreet.setSRID(4326); holder1.setPoint(someStreet); {code} The exception thrown is : {code} com.microsoft.sqlserver.jdbc.SQLServerException: A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.ArgumentException: 24100: The spatial reference identifier (SRID) is not valid. SRIDs must be between 0 and 999999. System.ArgumentException: . at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217) {code}

    Hibernate JIRA | 7 months ago | erabii
    System.ArgumentException: .
  3. 0

    VS crashes when getting completions

    GitHub | 4 months ago | vladima
    System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteArray[T,U](ImmutableArray`1 array, Action`1 writeValue) at Microsoft.CodeAnalysis.SymbolKey.NamedTypeSymbolKey.Create(INamedTypeSymbol symbol, SymbolKeyWriter visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.VisitNamedType(INamedTypeSymbol namedTypeSymbol) at Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol.Accept[TResult](SymbolVisitor`1 visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.MethodSymbolKey.Create(IMethodSymbol symbol, SymbolKeyWriter visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.VisitMethod(IMethodSymbol methodSymbol) at Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol.Accept[TResult](SymbolVisitor`1 visitor) at Microsoft.CodeAnalysis.SymbolKey.SymbolKeyWriter.WriteSymbolKey(ISymbol symbol, Boolean first) at Microsoft.CodeAnalysis.SymbolKey.ToString(ISymbol symbol, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.<>c.<EncodeSymbols>b__2_0(ISymbol s) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.String.Join(String separator, IEnumerable`1 values) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.EncodeSymbols(IReadOnlyList`1 symbols) at Microsoft.CodeAnalysis.Completion.Providers.SymbolCompletionItem.Create(String displayText, IReadOnlyList`1 symbols, Int32 contextPosition, String sortText, String insertionText, Nullable`1 glyph, String filterText, Nullable`1 matchPriority, SupportedPlatformData supportedPlatforms, ImmutableDictionary`2 properties, ImmutableArray`1 tags, CompletionItemRules rules) at Microsoft.CodeAnalysis.Completion.Providers.AbstractRecommendationServiceBasedCompletionProvider.CreateItem(String displayText, String insertionText, List`1 symbols, SyntaxContext context, Boolean preselect, SupportedPlatformData supportedPlatformData) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.CreateItem(String displayText, String insertionText, List`1 symbols, SyntaxContext context, Dictionary`2 invalidProjectMap, List`1 totalProjects, Boolean preselect) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<>c__DisplayClass6_0.<CreateItems>b__3(IGrouping`2 g) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.CreateItems(IEnumerable`1 symbols, SyntaxContext context, Dictionary`2 invalidProjectMap, List`1 totalProjects, Boolean preselect) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<GetItemsWorkerAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Completion.Providers.AbstractSymbolCompletionProvider.<ProvideCompletionsAsync>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetContextAsync>d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.CodeAnalysis.Completion.CompletionServiceWithProviders.<GetCompletionsAsync>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<GetCompletionListAsync>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Session.ModelComputer.<DoInBackgroundAsync>d__13.MoveNext()<--- Stack: at System.Environment.FailFast(System.String, System.Exception)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    String cannot have zero length.

    YouTrack | 10 years ago
    System.ArgumentException: String cannot have zero length. at System.Reflection.AssemblyName..ctor(String assemblyName) at JetBrains.ReSharper.Util.AssemblyIdentity.ParseAssemblyName(String assemblyFullName) in c:\Agent\work\Server\ReSharper2.5\src\Util\src\AssemblyIdentity.cs:line 158 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.CreateVSRReference(AssemblyReference reference) in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 487 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.<>c__DisplayClass6.<get_References>b__5(AssemblyReference assemblyReference) in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 429 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.ProcessAssemblyReferences(AssemblyReferenceProcessor processor) in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 415 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.get_References() in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 427 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.UpdateAssemblyReferences() in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 205 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.<OnAssemblyReferenceRemoved>b__3() in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 362 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokePendingActions() in c:\Agent\work\Server\ReSharper2.5\src\Shell\src\UIApplicationShell.cs:line 700 --- End of inner exception stack trace --- at JetBrains.ReSharper.Util.Logger.LogExceptionEx(Exception, String, Boolean) in c:\Agent\work\Server\ReSharper2.5\src\Util\src\Logger.cs:line 350 column 9 at JetBrains.ReSharper.Util.Logger.LogException(Exception) in c:\Agent\work\Server\ReSharper2.5\src\Util\src\Logger.cs:line 362 column 5 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokePendingActions() in c:\Agent\work\Server\ReSharper2.5\src\Shell\src\UIApplicationShell.cs:line 708 column 15 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokeReentrantSafe(Action) in c:\Agent\work\Server\ReSharper2.5\src\Shell\src\UIApplicationShell.cs:line 678 column 5 at JetBrains.ReSharper.VS.ProjectModel.WebProjectReferenceManager.OnAssemblyReferenceRemoved(AssemblyReference) in c:\Agent\work\Server\ReSharper2.5\src\VS\src\ProjectModel\WebProjectReferenceManager.cs:line 377 column 5
  6. 0

    Version string portion was too short or too long.

    YouTrack | 10 years ago
    System.ArgumentException: Version string portion was too short or too long. at System.Version..ctor(String version) at JetBrains.VSAddin.ProjectModel.ProjectReferenceManager.GetAssemblyName(Reference pReference) in c:\BuildAgent\work\Server\ReSharper-Main\src\VSAddin\src\ProjectModel\ProjectReferenceManager.cs:line 139 at JetBrains.VSAddin.ProjectModel.ProjectReferenceManager.CreateVSRReference(Reference reference) in c:\BuildAgent\work\Server\ReSharper-Main\src\VSAddin\src\ProjectModel\ProjectReferenceManager.cs:line 247 at JetBrains.VSAddin.ProjectModel.ProjectReferenceManager.<>c__DisplayClass8.<OnReferenceAdded>b__7() in c:\BuildAgent\work\Server\ReSharper-Main\src\VSAddin\src\ProjectModel\ProjectReferenceManager.cs:line 293 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokePendingActions() in c:\BuildAgent\work\Server\ReSharper-Main\src\Shell\src\UIApplicationShell.cs:line 700 --- End of inner exception stack trace --- at JetBrains.ReSharper.Util.Logger.LogExceptionEx(Exception, String, Boolean) in c:\BuildAgent\work\Server\ReSharper-Main\src\Util\src\Logger.cs:line 350 column 9 at JetBrains.ReSharper.Util.Logger.LogException(Exception) in c:\BuildAgent\work\Server\ReSharper-Main\src\Util\src\Logger.cs:line 362 column 5 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokePendingActions() in c:\BuildAgent\work\Server\ReSharper-Main\src\Shell\src\UIApplicationShell.cs:line 708 column 15 at JetBrains.ReSharper.Shell.UIApplicationShell.InvokeReentrantSafe(Action) in c:\BuildAgent\work\Server\ReSharper-Main\src\Shell\src\UIApplicationShell.cs:line 678 column 5 at JetBrains.VSAddin.ProjectModel.ProjectReferenceManager.OnReferenceAdded(Reference) in c:\BuildAgent\work\Server\ReSharper-Main\src\VSAddin\src\ProjectModel\ProjectReferenceManager.cs:line 291 column 7 at Microsoft.VisualStudio.Package.Automation.OAReferences.OnReferenceAdded(Object, HierarchyNodeEventArgs) at Microsoft.VisualStudio.Package.HierarchyNode.OnItemAdded(HierarchyNode, HierarchyNode)

    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. System.ArgumentException

      .

      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError()
    2. com.microsoft.sqlserver
      SQLServerException.makeFromDatabaseError
      1. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
      1 frame