1 Reply Latest reply on Jan 19, 2006 5:18 AM by Laszlo Graf

    Authentication violation

    Laszlo Graf Newbie

      Hi all,

      My scenario looks like this:
      WinXP(SP2), JDK 1.5.0_04, jboss-4.0.3SP1, ASA 9.0.0.1108

      The db connection is defined in sybase-ds.xml as follows:


      <local-tx-datasource>
      <jndi-name>ASA9DS</jndi-name>
      <connection-url>jdbc:sybase:Tds:xxx.xxx.xxx.xxx:2638/db01</connection-url>
      <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
      <user-name>dba</user-name>
      sql
      <exception-sorter-class-name>
      org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
      </exception-sorter-class-name>

      <type-mapping>Sybase</type-mapping>

      </local-tx-datasource>


      My BMP session bean updates a row in ASA using this code:

      public int updateXXX(String id) throws RemoteException{
      DataSource ds = null;
      Connection dbconn = null;
      int rv = 0;
      try {
      InitialContext ic = new InitialContext();
      ds = (DataSource)ic.lookup(JNDINames.DB);
      dbconn = ds.getConnection();
      PreparedStatement stmt = null;
      ResultSet result = null;
      String queryStr = "update ....";
      stmt = dbconn.prepareStatement(queryStr);
      rv = stmt.executeUpdate();
      result = null;
      stmt = null;
      dbconn.close();
      }catch(Exception e){
      cat.error("SQL error during update: ", e);
      }finally {
      try {
      dbconn.close();
      } catch(SQLException e2) {
      cat.error("SQL error in final section: ", e2);
      }
      }
      return(rv);
      }

      The problem is that the first update attempt works fine but from that
      moment any subsequent attempts fail. Why?

      Please help me, it is urgent.
      Thank you,

      Laszlo.

        • 1. Authentication violation
          Laszlo Graf Newbie

          I forget the trace:

          com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -98: Authentication violation
          at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2538)
          at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922)
          at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
          at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
          at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
          at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1611)
          at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1594)
          at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)
          at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
          at com.axis.raba.component.szemely.ejb.SzemelyEJB.updateSzemely(Unknown Source)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
          at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
          at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)

          at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
          at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
          at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)
          at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154
          )
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
          at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
          at org.jboss.ejb.Container.invoke(Container.java:873)
          at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
          at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
          at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
          at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
          at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
          at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
          at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
          at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
          at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
          at $Proxy150.updateSzemely(Unknown Source)
          at org.apache.jsp.szemely.szemely_005fupdate_jsp._jspService(org.apache.jsp.szemely.szemely_005fupdate_jsp:98)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
          at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
          at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
          at java.lang.Thread.run(Thread.java:595)