Search found 8 matches

by asj
Wed 28 Mar 2012 12:31
Forum: dotConnect for PostgreSQL
Topic: Error when inserting large binary files using EF4
Replies: 17
Views: 5219

Shalex wrote:Thank you for your report. We have reproduced System.OutOfMemoryException when inserting 200+ MB file into a bytea column using EF v4. We will investigate the issue and post here about the results.
Hello Shalex,

Any news of when a fix will be released?

Best regards,
Anders
by asj
Tue 07 Feb 2012 14:49
Forum: dotConnect for PostgreSQL
Topic: "Connection Must Be Opened Error" When Already open
Replies: 21
Views: 20237

Thank you.
by asj
Mon 06 Feb 2012 11:16
Forum: dotConnect for PostgreSQL
Topic: Error when inserting large binary files using EF4
Replies: 17
Views: 5219

Error when inserting large binary files using EF4

Hello Devart,

I am experiencing problems when inserting binary files into a postgres bytea column using Entity Framework 4 and dotConnect. When inserting a file i get either a System.InvalidOperationException("Connection must be opened.") (150 MB file) or a System.OutOfMemoryException (200+ MB file).

I have a test project available demonstrating the behavior. Do you have a place where i may upload it?


Full tracebacks for the Exceptions are as follows:
System.InvalidOperationException
Message: "Connection must be opened."

StackTrace:
at Devart.Common.Utils.CheckConnectionOpen(IDbConnection connection)
at Devart.Data.PostgreSql.PgSqlConnection.Rollback()
at Devart.Data.PostgreSql.PgSqlTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.EntityClient.EntityTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Objects.ObjectContext.SaveChanges()
at LargeFileTest.Program.Main(String[] args) in C:\test\LargeFileTest\LargeFileTest\Program.cs:line 25


System.OutOfMemoryException:
Message: "Exception of type 'System.OutOfMemoryException' was thrown."

at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Devart.Data.PostgreSql.o.a(Byte[] A_0, Int32 A_1, Int32 A_2, Int32 A_3)
at Devart.Data.PostgreSql.o.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.PostgreSql.o.a(Char A_0)
at Devart.Data.PostgreSql.s.b(Char A_0)
at Devart.Data.PostgreSql.s.c(String A_0)
at Devart.Data.PostgreSql.s.g(af A_0)
at Devart.Data.PostgreSql.s.e(af A_0)
at Devart.Data.PostgreSql.af.ah()
at Devart.Data.PostgreSql.PgSqlCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at Devart.Data.PostgreSql.PgSqlConnection.Rollback()
at Devart.Data.PostgreSql.PgSqlTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.EntityClient.EntityTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Objects.ObjectContext.SaveChanges()
at LargeFileTest.Program.Main(String[] args) in C:\test\LargeFileTest\LargeFileTest\Program.cs:line 25

Best regards,
Anders
by asj
Wed 01 Feb 2012 09:19
Forum: dotConnect for PostgreSQL
Topic: "Connection Must Be Opened Error" When Already open
Replies: 21
Views: 20237

Could large amounts of data be the cause?

Hi all,

Apologies for posting in an old topic, but I am receiving a similar error on 5.50.228.0 and may be able to provide some additional info.

Did the reasons mentioned by shalex work for you?
Specifically i have issues inserting a binary file (209 MB) into postgres with the Devart dotConnect EF4 provider. While it certainly could be argued binary files (especially of that size) should not be stored in the DB, it is out of my hands in this case.
I also have a case where inserting ~70.000 records into a table using just the classic DataAdapter yields the same "Connection must be opened" error. One of these columns contain a lot of data as well.

Is there some kind of limit to how much data may be transferred (per transaction/table/row/column) at once using dotConnect or even in PostgreSQL?
Is there perhaps a configuration value which may be increased?

My EF4 stacktrace looks like this. It always works with small files and the connection is certainly open before calling SaveChanges().
System.InvalidOperationException: Connection must be opened.
at Devart.Common.Utils.CheckConnectionOpen(IDbConnection connection)
at Devart.Data.PostgreSql.PgSqlConnection.Rollback()
at Devart.Data.PostgreSql.PgSqlTransaction.Dispose(Boolean disposing)
at System.Data.EntityClient.EntityTransaction.Dispose(Boolean disposing)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)

Best regards,
Anders
by asj
Tue 20 Sep 2011 11:45
Forum: dotConnect for PostgreSQL
Topic: error 0169: All SSDL artifacts must target the same provider
Replies: 6
Views: 7305

I am unable to locate the Assemblies windows as per your instructions. I assume this is related to me running visual studio Express?
I have tried to add the reference as you describe, but it makes no difference.

/Anders
by asj
Sun 18 Sep 2011 10:17
Forum: dotConnect for PostgreSQL
Topic: error 0169: All SSDL artifacts must target the same provider
Replies: 6
Views: 7305

Hello Shalex,

Thank you for your suggestion, unfortunately it does not seem to make a difference. I am starting to believe that the problem is not related to my model, as the error only occurs when Devart.Data.PostgreSql.Entity is available in the bin directory of my webapp. There is no problem when it is loaded from the GAC.

A workaround could be to run the dotConnect installer on the target machine, but Devart.Data.PostgreSql.Entity is not included with the minimal install that is the only install allowed at production server as per your license. "Support for ADO.NET Entity Framework" needs to be included as well.

Cheers,
Anders
by asj
Fri 16 Sep 2011 10:07
Forum: dotConnect for PostgreSQL
Topic: error 0169: All SSDL artifacts must target the same provider
Replies: 6
Views: 7305

I just upgraded to the newest version of dotConnect for Postgres (v. 5.50).
The Exception text is a lot more verbose now, but i think it all relates to the same issue.
Note that I only get the error on my developer machine when i set Copy Local = True for reference "Devart.Data.PostgreSql.Entity". When False, it works just fine both from my WebApp and a Windows Form app have a reference to Data.dll.
Schema specified is not valid. Errors:
error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinitionVersion3.ssdl(2,81) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken 'PostgreSQL' is different from 'PostgreSql' that was encountered earlier.
error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(2,81) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken 'PostgreSQL' is different from 'PostgreSql' that was encountered earlier.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(3,7) : error 0019: The EntityContainer name must be unique. An EntityContainer with the name 'Schema' is already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(546,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.Table' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(556,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.TableColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(582,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.View' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(594,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(620,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.Function' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(645,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.Procedure' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(655,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.Parameter' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(679,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.Constraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(691,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.CheckConstraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(699,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ConstraintColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(708,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ForeignKeyConstraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(717,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ForeignKey' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(728,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewConstraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(743,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.TableTableConstraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(756,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ConstraintConstraintColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(769,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ConstraintForeignKey' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(782,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.FromForeignKeyColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(795,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ToForeignKeyColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(808,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.TableTableColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(821,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewViewColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(834,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.FunctionFunctionParameter' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(847,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ProcedureProcedureParameter' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(860,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewViewConstraint' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(873,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewConstraintConstraintColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(886,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ViewConstraintForeignKey' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(899,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.FromForeignKeyViewColumn' was already defined.
Devart.Data.PostgreSql.Entity.ProviderManifest.StoreSchemaDefinition.ssdl(912,8) : error 0019: Each type name in a schema must be unique. Type name 'dotConnect for PostgreSQL.ToForeignKeyViewColumn' was already defined.
by asj
Fri 16 Sep 2011 08:34
Forum: dotConnect for PostgreSQL
Topic: error 0169: All SSDL artifacts must target the same provider
Replies: 6
Views: 7305

error 0169: All SSDL artifacts must target the same provider

Hi guys

I am receiving the error mentioned in topic. The full details are:
Schema specified is not valid. Errors:
error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered.
Devart.Data.PostgreSql.Entity.StoreSchemaDefinition.ssdl(2,81) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken 'PostgreSQL' is different from 'PostgreSql' that was encountered earlier.
My Entity Framework Model is located in a seperate Assembly (Data.dll) and it is used from my asp.net MVC application.
My WebApp has a reference to Data.dll. It worked fine until I decided to set Copy Local to true on the reference to Devart.Data.PostgreSql.Entity in the WebApp. For some reason, the dll is behaving differently when located in the bin folder than when it is located in the GAC. I do need the dll to be copied into the bin folder as I want to deploy to a production server without installing dotConnect on it.

Do anybody have a clue to what i am doing wrong here?

Kind regards,
Anders.