Hello,

Thanks for this information. This is the exact syntax that I think we
are using for the PostgreSQL Dialect and still receive this error.

Also regarding someones previous reply: hibernate.colorlibrary is the
name of the database.tablename. What if the owner is the same name as
the database or the owner is inferred to be public, or their is no
owner (in some database systems)?

Thanks
-Blake

On Jan 25, 6:45 am, Gunnar Liljas <[email protected]> wrote:
> The syntax is
>
> database.schema.table
>
> not
>
> database.owner.table
>
> so the fact that the owner is "hibernate" doesn't matter.
>
> /G
>
> 2011/1/24 Blake Niemyjski <[email protected]>
>
>
>
>
>
>
>
> > Hello,
>
> > I was getting a very similar error to this thread:
> >https://forum.hibernate.org/viewtopic.php?f=25&t=999953
>
> > NHibernate.ADOException was unhandled
> >  Message=could not execute query
> > [ SELECT this_.id as id0_0_, this_.name as name0_0_ FROM
> > hibernate.colorlibrary this_ limit :p0 ]
> > [SQL: SELECT this_.id as id0_0_, this_.name as name0_0_ FROM
> > hibernate.colorlibrary this_ limit :p0]
> >  Source=NHibernate
> >  SqlString=SELECT this_.id as id0_0_, this_.name as name0_0_ FROM
> > hibernate.colorlibrary this_ limit :p0
> >  StackTrace:
> >       at NHibernate.Loader.Loader.DoList(ISessionImplementor session,
> > QueryParameters queryParameters)
> >       at
> > NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor
> > session, QueryParameters queryParameters)
> >       at NHibernate.Loader.Loader.List(ISessionImplementor session,
> > QueryParameters queryParameters, ISet`1 querySpaces, IType[]
> > resultTypes)
> >       at
> > NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor
> > session)
> >       at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria,
> > IList results)
> >       at NHibernate.Impl.CriteriaImpl.List(IList results)
> >       at NHibernate.Impl.CriteriaImpl.List[T]()
> >       at Intersystem.Base.ManagerBase`2.GetByCriteria(Int32
> > maxResults, ICriterion[] criterionList) in c:\users\test\documents
> > \visual studio 2010\Projects\temp\Base\ManagerBase.cs:line 96
> >       at Intersystem.Base.ManagerBase`2.GetAll() in c:\users\test
> > \documents\visual studio 2010\Projects\temp\Base\ManagerBase.cs:line
> > 78
> >       at Demo.Program.Main(String[] args) in c:\users\test\documents
> > \visual studio 2010\Projects\temp\Program.cs:line 17
> >       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
> > String[] args)
> >       at System.AppDomain.ExecuteAssembly(String assemblyFile,
> > Evidence assemblySecurity, String[] args)
> >       at
> > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> >       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> > state)
> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state, Boolean
> > ignoreSyncCtx)
> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state)
> >       at System.Threading.ThreadHelper.ThreadStart()
> >  InnerException: Npgsql.NpgsqlException
> >       Message=ERROR: 3F000: schema "hibernate" does not exist
> >       Source=Npgsql
> >       ErrorCode=-2147467259
> >       BaseMessage=schema "hibernate" does not exist
> >       Code=3F000
> >       Detail=""
> >       ErrorSql=SELECT this_.id as id0_0_, this_.name as name0_0_ FROM
> > hibernate.colorlibrary this_ limit ((100)::int4)
> >       File=.\src\backend\catalog\namespace.c
> >       Hint=""
> >       Line=2307
> >       Position=56
> >       Routine=LookupExplicitNamespace
> >       Severity=ERROR
> >       Where=""
> >       StackTrace:
> >            at
> > Npgsql.NpgsqlState.<ProcessBackendResponses_Ver_3>d__a.MoveNext()
> >            at Npgsql.ForwardsOnlyDataReader.GetNextResponseObject()
> >            at Npgsql.ForwardsOnlyDataReader.GetNextRowDescription()
> >            at Npgsql.ForwardsOnlyDataReader.NextResult()
> >            at Npgsql.ForwardsOnlyDataReader..ctor(IEnumerable`1
> > dataEnumeration, CommandBehavior behavior, NpgsqlCommand command,
> > NotificationThreadBlock threadBlock, Boolean synchOnReadError)
> >            at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)
> >            at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior cb)
> >            at
> > Npgsql.NpgsqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
> >            at
> > System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
> >            at
> > NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
> >            at NHibernate.Loader.Loader.GetResultSet(IDbCommand st,
> > Boolean autoDiscoverTypes, Boolean callable, RowSelection selection,
> > ISessionImplementor session)
> >            at NHibernate.Loader.Loader.DoQuery(ISessionImplementor
> > session, QueryParameters queryParameters, Boolean returnProxies)
> >            at
>
> > NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImp 
> > lementor
> > session, QueryParameters queryParameters, Boolean returnProxies)
> >            at NHibernate.Loader.Loader.DoList(ISessionImplementor
> > session, QueryParameters queryParameters)
> >       InnerException:
>
> > I have tracked this error down to the hbm mapping file. The table
> > attribute was being set to table="hibernate.colorlibrary"
> > lazy="true">. After changing this to table="colorlibrary" lazy="true">
> > the error went away. Does anyone have any ideas on why this error
> > occurred. When I look in pgAdmin I see that the owner is indeed
> > hibernate and the table name is colorlibrary.
>
> > This is what my app.config looks like:
>
> > <?xml version="1.0" encoding="utf-8" ?>
> > <configuration>
> >  <configSections>
> >    <section name="hibernate-configuration"
> > type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
> >  </configSections>
> >  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
> >    <session-factory>
> >      <property
> > name="connection.provider">NHibernate.Connection.DriverConnectionProvider</
> > property>
> >      <property
>
> > name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFa 
> > ctory,
> > NHibernate.ByteCode.Castle</property>
> >      <property name="dialect">NHibernate.Dialect.PostgreSQL82Dialect</
> > property>
> >      <property
> > name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</
> > property>
> >      <property
>
> > name="connection.connection_string">Server=127.0.0.1;Port=5432;Database=hib 
> > ernate;User
> > Id=postgres;Password=xxxx; Preload Reader=true;</property>
> >      <property name="show_sql">true</property>
> >      <mapping assembly="Intersystem"/>
> >    </session-factory>
> >  </hibernate-configuration>
> > </configuration>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<nhusers%[email protected] 
> > >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to