LLBLGen3: FATAL: 28000: no PostgreSQL user name specified in startup packet

Posts   
 
    
miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 05-Jun-2010 14:52:40   

Hi,

I'm trying to migrate my project to a LLBLGen 3.0 version. Another problem which I'am trying to resolve is exception: FATAL: 28000: no PostgreSQL user name specified in startup packet.

What could be wrong with that?

Regards, MiloszeS

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39894
Joined: 17-Aug-2003
# Posted on: 05-Jun-2010 21:51:45   

please be more specific, when does it occur, stack trace, etc. etc.

Frans Bouma | Lead developer LLBLGen Pro
miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 06-Jun-2010 12:23:28   
 FATAL: 28000: no PostgreSQL user name specified in startup packet
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Npgsql.NpgsqlException: FATAL: 28000: no PostgreSQL user name specified in startup packet

Source Error:

Line 140:           , IPrefetchPath2 prefetchPath, ISortExpression sortExpr, int pageNumber, int pageSize)
Line 141:       {
Line 142:           adapter.FetchEntityCollection(collectionToFill, predicateBucket, 0, sortExpr, prefetchPath, pageNumber, pageSize);
Line 143:       }
Line 144:


Source File: FacadeBase.cs  Line: 142

Stack Trace:

[NpgsqlException (0x80004005): FATAL: 28000: no PostgreSQL user name specified in startup packet]
   Npgsql.<ProcessBackendResponses_Ver_3>d__a.MoveNext() +1062
   Npgsql.NpgsqlState.IterateThroughAllResponses(IEnumerable`1 ienum) +142
   Npgsql.NpgsqlState.ProcessBackendResponses(NpgsqlConnector context) +49
   Npgsql.NpgsqlConnectedState.Startup(NpgsqlConnector context) +275
   Npgsql.NpgsqlConnector.Open() +299
   Npgsql.NpgsqlConnectorPool.GetPooledConnector(NpgsqlConnection Connection) +671
   Npgsql.NpgsqlConnectorPool.RequestPooledConnectorInternal(NpgsqlConnection Connection) +111
   Npgsql.NpgsqlConnectorPool.RequestPooledConnector(NpgsqlConnection Connection) +123
   Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection) +61
   Npgsql.NpgsqlConnection.Open() +327
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.OpenConnection() +410
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PrepareQueryExecution(IQuery queryToExecute, Boolean forceConnectionSet) +174
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IEntityFields2 fieldsUsedForQuery) +300
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) +1325
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) +176
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Int32 pageNumber, Int32 pageSize) +73

The mentioned project was migrated from 2.6 version. I have a connection string in a .config file (from the 2.6 version) and I've configured a dbproviderfactory:

<system.data>
    <DbProviderFactories>
      <!-- PostgreSql -->
      <add name="PostgreSql Client Data Provider" invariant="Npgsql"
        description=".Net Framework Data Provider for PostgreSql"
        type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.7.0, Culture=neutral" />
    </DbProviderFactories>
  </system.data>
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39894
Joined: 17-Aug-2003
# Posted on: 06-Jun-2010 12:56:57   

Please double check the connection string. Also try to see if the designer can connect to the same postgresql database by doing a refresh (at least start the refresh wizard's first step where you can test the connection).

Frans Bouma | Lead developer LLBLGen Pro
miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 06-Jun-2010 14:09:08   

I've found a problem. During the project migration, the connection string key has changed (in the project) from

Main.ConnectionString to Main.ConnectionString.PostgreSql (Npgsql)

It was quite difficult to find, because I've didn't changed the connection string in the .config file and the l/p, etc. settings was also ok.

Thanks for a help. MiloszeS

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39894
Joined: 17-Aug-2003
# Posted on: 07-Jun-2010 09:24:36   

I checked the 'migrating your code' section and it doesn't mention this properly. We'll look into adding a proper remark about this to the documentation. Sorry for this inconvenience.

Frans Bouma | Lead developer LLBLGen Pro
miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 07-Jun-2010 11:01:19   

Otis wrote:

I checked the 'migrating your code' section and it doesn't mention this properly. We'll look into adding a proper remark about this to the documentation. Sorry for this inconvenience.

Maybe you can consider to add an information about changes with a runtime dlls. I still have both (2.6, 3.0) version installed on my computer. The thing is that I've changed a reference from a SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL 2.6 to 3.0 and forget to change other dll's. The application has compiled correctly but it crushes in the runtime. The exception messages were telling that the SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL cannot be found in version 2.6. After some time I've figureout that I forgot to change a version for some other library, but it also took a some time, because I didn't knew which one and in which project.

Maybe you may add a short info regarding which dll references should be changed during the project migration?

Kind Regards, MiloszeS

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39894
Joined: 17-Aug-2003
# Posted on: 07-Jun-2010 11:39:28   

miloszes wrote:

Otis wrote:

I checked the 'migrating your code' section and it doesn't mention this properly. We'll look into adding a proper remark about this to the documentation. Sorry for this inconvenience.

Maybe you can consider to add an information about changes with a runtime dlls. I still have both (2.6, 3.0) version installed on my computer. The thing is that I've changed a reference from a SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL 2.6 to 3.0 and forget to change other dll's. The application has compiled correctly but it crushes in the runtime. The exception messages were telling that the SD.LLBLGen.Pro.ORMSupportClasses.NET20.DLL cannot be found in version 2.6. After some time I've figureout that I forgot to change a version for some other library, but it also took a some time, because I didn't knew which one and in which project.

Maybe you may add a short info regarding which dll references should be changed during the project migration?

Kind Regards, MiloszeS

In v3's docs there's a section about migrating your code and also about compiling your code (which is updated), have you seen those? the migrating your code section doesn't have proper remarks about connection string key name changes and I'll also add a remark about the changed runtimes. This is logical of course, but one might overlook it.

Frans Bouma | Lead developer LLBLGen Pro