-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: ORA-12571: TNS:packet writer failure
PostPosted: Tue Mar 28, 2006 3:20 pm 
Newbie

Joined: Tue Mar 28, 2006 2:52 pm
Posts: 5
Location: SJRP - SP - Brasil
I am using a database Oracle 9i with ASP.NET 2.0 and occurs this error
ORA-12571: TNS:packet writer failure

web.config
Code:
<nhibernate>
    <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
    <add key="hibernate.dialect" value="NHibernate.Dialect.Oracle9Dialect"/>
    <add key="hibernate.connection.driver_class" value="NHibernate.Driver.OracleClientDriver"/>   
    <add key="hibernate.connection.connection_string" value="Data Source=xxx; User Id=xxx; Password=xxx" />
    <add key="hibernate.show_sql" value="true"/>
</nhibernate>


example of my code:
Code:
public Entidade getEntidade(){
    Entidade entidade = (Entidade)session.Load(typeof(Entidade), "0000486");
            return entidade;
}


[OracleException (0x80131938): ORA-12571: TNS:falha do gravador do pacote
]
System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +204
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) +1020
System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) +25
System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) +138
System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +97
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +175
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +243
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +65
NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) +129
NHibernate.Loader.EntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject) +15
NHibernate.Persister.EntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) +209

[ADOException: could not load: [Apolo.Framework.Model.Entidade#0000486]]
NHibernate.Persister.EntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) +279
NHibernate.Impl.SessionImpl.DoLoad(Type theClass, Object id, Object optionalObject, LockMode lockMode, Boolean checkDeleted) +576
NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Boolean checkDeleted, Boolean allowProxyCreation) +119
NHibernate.Impl.SessionImpl.Load(Type clazz, Object id) +38
Apolo.Framework.Model.Entidade.getEntidade() in C:\Inetpub\wwwroot\TableModule\Framework\Apolo.Framework\Domain\Entidade.cs:49
_Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\TableModule\Web\Default.aspx.cs:17
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

The same code works for Sql Server...


Top
 Profile  
 
 Post subject: Re: ORA-12571: TNS:packet writer failure
PostPosted: Tue Mar 28, 2006 3:45 pm 
Regular
Regular

Joined: Fri Jan 27, 2006 2:32 pm
Posts: 102
Location: California, USA
mamude wrote:
I am using a database Oracle 9i with ASP.NET 2.0 and occurs this error
ORA-12571: TNS:packet writer failure


Does it happen at the exact same spot every time? Or is it more random?

I had an issue with this error message. It would happen at the same part of my program every single time. Other parts of the program worked fine. I could read data and everything. But this one specific part, evertime, packet writer failure.

But, the kicker is, on another PC, that specific part would work fine. So it turned out to be a PC issue.

Just my experience, for what it's worth.
--Brian


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 4:32 pm 
Newbie

Joined: Tue Mar 28, 2006 2:52 pm
Posts: 5
Location: SJRP - SP - Brasil
Stranger because a method without parameter works

Like this
Code:
public IList listCidades(){
            IList cidades = session.CreateCriteria(typeof(Cidade))
                .SetMaxResults(30).List();
            return cidades;
        }


works fine!!!

But with parameter
Code:
public Entidade getEntidade(string entCod){
            Entidade entidade = (Entidade)session.Load(typeof(Entidade), entCod);
            return entidade;
        }


occours ORA-12571: TNS:packet writer failure


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.