Problem with setRollbackOnly in MDB

Hello,
          I get the following error when context.setRollbackOnly is called after an
          exception in a MDB......
          the DD is as follows, which is the same as mentioned in the Programming JMS
          documentation......
          <assembly-descriptor>
          <container-transaction>
          <method>
          <ejb-name>exampleMessageDriven1</ejb-name>
          <method-name>onMessage()</method-name>
          </method>
          <trans-attribute>Required</trans-attribute>
          </container-transaction>
          </assembly-descriptor>
          regards,
          Farhat
          weblogic.transaction.internal.AppSetRollbackOnlyException
          at
          weblogic.transaction.internal.TransactionImpl.setRollbackOnly(Transac
          tionImpl.java:403)
          at
          weblogic.ejb20.internal.BaseEJBContext.setRollbackOnly(BaseEJBContext
          .java:246)
          at
          weblogic.ejb20.internal.MessageDrivenEJBContextImpl.setRollbackOnly(M
          essageDrivenEJBContextImpl.java:52)
          at
          examples.ejb20.message.MessageTraderBean.onMessage(MessageTraderBean.
          java:153)
          at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:92)
          at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1858)
          at weblogic.jms.client.JMSSession.execute(JMSSession.java:1817)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          --------------- nested within: ------------------
          weblogic.transaction.RollbackException: Unknown reason - with nested
          exception:
          [weblogic.transaction.internal.AppSetRollbackOnlyException]
          at
          weblogic.transaction.internal.TransactionImpl.throwRollbackException(
          TransactionImpl.java:1248)
          at
          weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
          sactionImpl.java:208)
          at
          weblogic.transaction.internal.TransactionManagerImpl.commit(Transacti
          onManagerImpl.java:208)
          at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:106)
          at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:1858)
          at weblogic.jms.client.JMSSession.execute(JMSSession.java:1817)
          at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
          

This is standard JMS behavior. Some providers like Bea Weblogic 6.1 allow you to re-direct messages to an error or suspense queue. However, you can always do the same in your code without much difficulty. Simply set a retry counter and compare the number of rollbacks against the retry counter (cache the msg id to be sure you are counting the same message). If your retry counter exceed the no. of rollbacks, simply re-direct the message to a suspense queue. Once the file system is solved, simply re-direct the message back to the original queue. You can have a jsp that does a QueueBrowse on the suspense queue or simply a scheduled process that pulls messages off the suspense queue and forwards it to the original queue.
Adarsh

Similar Messages

  • URGENT:Problems with OJMS

    Hi, I have a problem with OJMS and MDBs. The problem is that I receive messages correctly, but messages are not dequeued from database. I have followed MDB's developer guide from oracle, the only difference is that I'm using stardard JMS interface instead of OJMS extensions. Can anybody help me? Please is urgent.
    Thanks in advance...

    Hi, I have a problem with OJMS and MDBs. The problem
    is that I receive messages correctly, but messages
    are not dequeued from database. I have followed MDB's
    developer guide from oracle, the only difference is
    that I'm using stardard JMS interface instead of OJMS
    extensions. Can anybody help me? Please is urgent.
    Are you specifying your MDB as CMT (transaction attribute or "Required" in ejb-jar.xml)? This will force the MDB container to wrap the receive call inside a transaction
    Thanks in advance...

  • Weird problem with mdb

    Hi,
              I am having a weird problem with my message driven bean. I developed a MDB to handle some calculations and database operations which takes about two minutes. If I send one message and the MDB is doing ok. But when I send second message to the same queue and the first message is still be processing, the instance of MDB which processing the first message was interrupted by second MDB instance. The value of variables in first instance was changed by second MDB instance. Then I got lots of SQLExceptions because of this.
              Looks like two MDB instances were sharing the same memory! I am not sure what I did is wrong. If I send second message after the first is finished, I got no problem.
              BTW, I use XAConnectionFactory and AUTO_ACKNOWLEDGE. I have 10 beans in the session pool. I am using Queue, not Topic.
              Thanks,
              Richard Zhang

    An MDB is, essentially, a Stateless Session Bean. If you are keeping state
              in instance variables, you are going to have problems with concurrency. Make
              the variables local to the onMessage() routine.
              Bill
              "Richard Zhang" <[email protected]> wrote in message
              news:24872664.1103837737402.JavaMail.root@jserv5...
              > Hi,
              >
              > I am having a weird problem with my message driven bean. I developed a MDB
              to handle some calculations and database operations which takes about two
              minutes. If I send one message and the MDB is doing ok. But when I send
              second message to the same queue and the first message is still be
              processing, the instance of MDB which processing the first message was
              interrupted by second MDB instance. The value of variables in first instance
              was changed by second MDB instance. Then I got lots of SQLExceptions because
              of this.
              > Looks like two MDB instances were sharing the same memory! I am not sure
              what I did is wrong. If I send second message after the first is finished, I
              got no problem.
              >
              > BTW, I use XAConnectionFactory and AUTO_ACKNOWLEDGE. I have 10 beans in
              the session pool. I am using Queue, not Topic.
              >
              > Thanks,
              >
              > Richard Zhang
              

  • Problems with an MDB and OJMS

    I have a problem with MDBs and OJMS/AQ. onMessage() method fires well when a message is enqueued, but it is never dequeued. Messages are well received by MDB, but they remain on AQ table without dequeue. Can anybody help me? Thanks

    This is bug: Contaner managed transactions do not work with MDBs in OC4J 9.0.3. Either switch to BMT, or use the 10.0.3 preview on OTN.
    The bug is fixed in the 9.0.4 production version which is expected "real soon now".
    HTH
    -Doug

  • Problem with JMS migration when using Ctrl+C to stop the managed server in cluster

              Hi,
              I am having a clustered weblogic application running on Weblogic 7.0 SP5. My application
              uses JMS as a asynchrous communication. We have MDB which listens to these JMS
              messages.
              If something is being processed on Managed Server 1 and while the request is in
              process, i am stopping the the MAnaged SErver 1 using Ctrl+C.
              After this, i go to admin console and migrate teh JTA and JMS. After this, i am
              expecting other running Managed Server should restart the incomplete transaction.
              But this is not happening. The Managed Serve2 doesn't process the requst.
              But when i restart teh MAnaged SErver 1 again, it takes up the same request and
              processes it.
              Is this a known problem with Weblogic that it doesn't support Ctlr+C case?
              Please note that the same thing is working fine when i stop the server using Admin
              console(Normal shutdown OR forced shutdown).
              Any comments in this regards are apprecciated.
              Thanks,
              Naresh
              

              Hi,
              I am having a clustered weblogic application running on Weblogic 7.0 SP5. My application
              uses JMS as a asynchrous communication. We have MDB which listens to these JMS
              messages.
              If something is being processed on Managed Server 1 and while the request is in
              process, i am stopping the the MAnaged SErver 1 using Ctrl+C.
              After this, i go to admin console and migrate teh JTA and JMS. After this, i am
              expecting other running Managed Server should restart the incomplete transaction.
              But this is not happening. The Managed Serve2 doesn't process the requst.
              But when i restart teh MAnaged SErver 1 again, it takes up the same request and
              processes it.
              Is this a known problem with Weblogic that it doesn't support Ctlr+C case?
              Please note that the same thing is working fine when i stop the server using Admin
              console(Normal shutdown OR forced shutdown).
              Any comments in this regards are apprecciated.
              Thanks,
              Naresh
              

  • Problem with EJB and JMS - Failed to obtain/create connection

    hello ejb and jms programmers,
    My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
    Given:
    - I purposedly turn off the pointbase database because im testing my error handling.
    - Im using SJSAS 8 as my application server.
    - My message Driven Bean of topic type.
    - Im using CMP for my entity bean
    Here is the scenario of whats happening - step by step:
    1. A separate application publishes a message to JMS queue server
    2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
    3. But my db is turned off or down
    4. My MDB sends a successful processing reply to the JMS queue server
    5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
    6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
    So my questions are:
    1. how do i handle insert database error?
    2. how can i stop my MDB from processing the same message?
    3. any better suggestions?
    Thank you in advance :)
    leigh
    *** more complete stack trace ***
    [#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
    javax.transaction.xa.XAException
         at com.pointbase.xa.xaException.getXAException(Unknown Source)
         at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
         at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
    [#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
    javax.transaction.SystemException
         at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
         at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
    [#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
    [#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
    [#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
    FailedObjectArray: [[email protected]5ac]
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)

    Hi annie,
    Wherever you are handling database transactions,
    you'd not be able to create a Connection if database
    is closed (I think you mentioned turning off the
    database) then at this condition, you should
    certainly throw a System level exception and stop all
    processing with some meaningful flow to indicate a
    failure (like display message on UI). Even
    network problems are handled by exceptions... so I
    don't see a reason why you didn't wrap it in the
    first place.
    Anyway, try handling specific exceptions rather than
    the general Exception... this will give you a better
    idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
    2. how can i stop my MDB from processing the same
    message?Guaranteed delivery is not supposed to stop
    processing. It will continue to process the message
    after certain intervals till the message is
    delivered. You shouldn't deliver it at all, if you
    are able to detect that the database is off
    The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
    My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
    thank you in advance.
    leigh

  • Problem with JMS in a Cluster

    In summary I am having a problem with my application when it is running on the server that does not contain the JMS.
              Setup:
              2 machines:- Server 1 with the Admin Server and a Managed Server with JMS and a Distributed Queue. Second machine (Server 2) with a managed server. The two managed servers are in a Cluster.
              The connection factory has xa enabled.
              The queue is a distributed queue, with one member queue - on server 1.
              Scenario 1 (works):
              Deploy my application on Server 1 only
              Scenario 2 (works):
              Deploy my application on Server 1 and Server 2
              When the application puts messages on the JMS queue, the messages are processed round robin by the MDB on both Server 1 and Server 2 - as expected.
              Scenario 3 - Does not work
              Deploy my application on Server 2 only
              The application successfully sends a message to the queue - I can see it in queue through the console.
              However the MDB never processes the message. On the queue, I can see 0 consumers.
              Essentially the MDB appears to deploy correctly from the server log but never appears as a consumer on the queue.
              I know the above information is very brief, however I can provide more configuration details and detailed logging if required.

    On a further look through the logs, I have found the following Warning message which may point to the reason why my MDB is not receiving messages from JMS:
              <25-Apr-2005 17:26:01 o'clock IST> <Warning> <EJB> <BEA-010220> <The jms destination 'AsyncMessageQueue' is a distributed destination and it has no physical destination(s) on the current weblogic server. As per distributed destination co-location rules, no pool was creted for the MDB 'AsyncMessage(Application: m3-j2ee_Weblogic21apr_2, EJBComponent: ejb_framework.jar)' on this weblogic server. Hence the MDB 'AsyncMessage(Application: m3-j2ee_Weblogic21apr_2, EJBComponent: ejb_framework.jar)' cannot receive any messages on this server.>
              I have created a Destination on the JMS Server ("Replicate JNDI Name In Cluster" is set), and I have created a Distributed Destination, which has as its member the Destination associated with the JMS Server.
              If the JMS is not on the same server as the deployed application, how do I get the MDB to connect to the physical destination?
              Do I always need a Physical Destination on the the same server as my deployed application? If so, how do I create a Physical Destination on the server that does not have the JMS?
              Any help appreciated.

  • Problem with program hanging randomly on certain commands from win 7 pro client to SB Server

    Having a problem with program hanging randomly on certain commands from Win-7 Pro Client to SB Server Both 64-Bit
    Five other slower XP-Pro 32 Bit systems though they are older and slower systems do not seem to hang as readily if at all.
    It has been very frustrating as the Client-System, SB-Server and Program should work w/o any hitches, but this seems to work fine @ times and then hang randomly.
    Would appreciate any and all suggestions in assisting.... JimBAgde-MSS  

    You can try this, as I have had similar problems with another MS Access .MDB file and slow access before. This fixed my problem for me. On the slow computer, make sure the program is set to see the .mdb file via UNC path, not a mapped drive letter. ex.
    USE:  \\yourserver\shared\dental\file.mdb
    DO NOT: S:\\shared\dental\file.mdb
    hope this helps

  • Problem with NW04s SR2 installation with MS SQL Server 2000 SP4

    I’m struggling with the NW04s installation with MS SQL Server 2000.
    The installation stops at the step “Create/modify database schema SAPJ2EDB”.
    The following error/info from log file,
    INFO       2007-06-06 12:02:33 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doConfiguration of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|NW_MSS_SRVCFG|ind|ind|ind|ind|6|0.
    INFO       2007-06-06 12:02:35 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doTempdb of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:02:36 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doSwitch of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:02:36 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doTempDBAnalyze of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:02:37 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doTempDBBeforeRestart of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:02:38 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doRestartServer of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:02:58 [ianxbservi.cpp:697]
               CIaNtServices::stop(const map<iastring,iastring>&)
    The service 'MSSQLSERVER' stopped successfully on host 'GBCZ672C'.
    INFO       2007-06-06 12:03:10 [ianxbservi.cpp:632]
               CIaNtServices::start(const map<iastring,iastring>&)
    The service 'MSSQLSERVER' started successfully on host 'GBCZ672C'.
    INFO       2007-06-06 12:03:21 [ianxbservi.cpp:632]
               CIaNtServices::start(const map<iastring,iastring>&)
    The service 'SQLSERVERAGENT' started successfully on host 'GBCZ672C'.
    INFO       2007-06-06 12:03:21 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doTempDBAfterRestart of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:03:22 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step doChangeTempSetNewSize of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssDowntimeConfig|ind|ind|ind|ind|7|0.
    INFO       2007-06-06 12:03:39 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step CheckParameters of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0.
    INFO       2007-06-06 12:03:39 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step CreateDirectories of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0.
    INFO       2007-06-06 12:03:40 [iaxxgenimp.cpp:632]
               showDialog()
    Execute step CreateDatabase of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0.
    ERROR      2007-06-06 12:03:40 [iaxxgenimp.cpp:731]
               showDialog()
    FCO-00011  The step CreateDatabase with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0|CreateDatabase was executed with status ERROR .
    ERROR      2007-06-06 12:03:40
               lib=iamodmssql module=CIaNtMssDmo
    MDB-05053  Errors when executing sql command: <p nr="0"/> If this message is displayed as a warning - it can be ignored. If this is an error - call your SAP support.
    INFO       2007-06-06 12:04:04 [iaxxgenimp.cpp:774]
               showDialog()
    An error occured and the user decided to retry the current step: "|NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0|CreateDatabase".
    ERROR      2007-06-06 12:04:05 [iaxxgenimp.cpp:731]
               showDialog()
    FCO-00011  The step CreateDatabase with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_MSS_DB|ind|ind|ind|ind|2|0|MssSchemaCreate|ind|ind|ind|ind|9|0|CreateDatabase was executed with status ERROR .
    Please let me know if you can help or if there is any other way around.
    Many Thanks in advance.
    Ritin Jain

    Hi All,
    I was not able to solve the problem with MS SQL 2000, but I was able to resolve the issue with MS SQL 2005.
    You have to chhose the following settings while instalation,
    Service Account - Select one of the following options:
    1) Use the built-in System account for each service and choose Local system or Network Service.
    2) Use a domain user account, and enter the user name and password.
    Under Start services at the end of setup make sure that SQL Server and SQL Server Agent are selected.
    Authentication Mode      
    1) Select Mixed Mode (Windows Authentication and SQL Server Authentication).
    This mode is required for a Java or ABAP+Java system.
    If you choose this mode, you have to set the password for the sa login.
    Note: The password for the sa login must comply with the Windows password policy.
    Collation Settings      
    1) Select SQL collations (used for compatibility with previous versions of SQL Server).
    2) From the drop-down list select Binary order based on code point comparison, for use with the 850 (Multilingual) Character Set.
    I hope this helps!

  • Problems with "Select Distinct" Statement

    Hi... I've a little problem with my SQL Statement...
    I've a Table in a DataBase with Solds of the Month... the fields are: vta_fecha, vta_prod, vta_total, vta_mesa.
    I've to Select only the distincts fields of vta_prod... selected by vta_fecha and vta_mesa...
    My code is like this:         try{
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conec = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/POOL/Data/BaseDat.MDB");
                state = conec.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);try{
                rec = state.executeQuery("Select DISTINCT vta_prod, vta_fecha, vta_mesa from Ventas where vta_fecha = #" + Fecha_q + "# And vta_mesa = 0");           
                rec.first();
                int x = 0;
                while (rec.isAfterLast()==false){
                    x++;
                    rec.next();
                rec.first();
                if (x > 0){
                    Productos = new String[x];
                    Total_Vta = new int[x];
                    Cant_Prod = new int[x];
                    x = 0;
                    while (rec.isAfterLast() == false){
                        Productos[x] = rec.getString("vta_prod");
                        rec.next();
                        x++;
                else{
                    Productos = new String[0];
                    Total_Vta = new int[0];
                    Cant_Prod = new int[0];
            }catch(Exception e){JOptionPane.showMessageDialog(null,e.getMessage());}Now, in the Table I have only 3 diferents vta_prod, but this Statement returns 9 Rows... and I don't know why...
    Please help me...
    Regards...

    I don�t have a complete picture because I don�t know what values you are passing in the select and I don�t know your column types but this is what I think is happening from what you have shared.
    You may have misunderstood what the DISTINCT keyword does.
    The DISTINCT keyword applies to the full set of columns in the select (not just the first column). So in your case it would be equivalent to:
    SELECT vta_prod, vta_fecha, vta_mesa
    FROM Ventas
    WHERE ...
    GROUP BY by vta_prod, vta_fecha, vta_mesa
    So, it doesn't matter that you only have 3 distinct vta_prod values if you have multiple values being returned in the other columns. The vta_mesa column can only a return a single value as �0�. That leaves the vta_fecha column which is probably a date/time column and is probably the column that is returning the three other distinct values (one date with three distinct times).
    (3 vta_prod) x (3 vta_fecha) x (1 vta_mesa) or 3x3x1 = 9 rows
    So find a way to strip the time from vta_fecha in your select statement and your SQL should return the results you expect. I�m not an Access expect but I think I remember you can use something like the �Convert� or �DatePart� functions to make that happen (check your documentation to be sure)..
    A couple of asides;
    1) You should use a PreparedStatement and rarely if ever use Statement.
    2) You should start Java variable names with lower case.

  • Problem with one database

    Hi, I'm having currently one problem with Siemens ACS Tool. We've one got diagram, which tells information about chillers, temperatures, pressure and etc. The message when I try to open some diagram is:
    The Microsoft Jet database engine stopped the process because you and another user are attempting to change the same data at the same time. Driver's SQSetConnectStrAttr failed
    Connectionstring:
    Driver={Microsoft Access Driver (*mdb)};Dbq=C:\Documents and Settings\All Users\Documents\Siemens\ACS790\Plants\HOTEL ****\HOTEL ****.plx;Uuid=;Pwd=;
    I can't contact the support, they're too busy these days and I'm trying to get help from somewhere.

    Starting with the total lack of version numbers you have posted far too little information for anyone to help you.
    For example: Insert data using what tool?
    And there are dozens of other important facts you have not stated.

  • Distributed transactions with container-managed MDBs

              I have built a framework that employs a high rate of code reuse while abstracting
              the complexities of inter-application communication. This allows application
              developers to focus on solving their business needs and not worry about "the plumbing"
              between the applications.
              At this point, the framework is using container-managed MDBs for Topic destinations.
              MDBs were chosen because of their concurrent nature for processing JMS messages.
              Now that I have this framework up and running, I am trying to add distributed
              transaction support and am having trouble understanding what I need to do. Here
              is how the framework works:
              The MDB will recieve a message, unmarshall it into a business object, and then
              route that object to the appropriate business class where it is then processed
              accordingly. In most cases, the processing of this message object will require
              database interaction. If any error should occur while processing the message,
              all XAResources within the transaction should rollback and ultimately, the JMS
              message will be redelivered later.
              Here is what I'm trying to find out:
              1. When control is passed to an application and it gets a DB connection, will
              that DB resource be dynamically enlisted with the transaction?
              2. Must the DB connection come from the WLS DB pool to be enlisted with the transaction?
              I ask this because the current standard at this company is to use a home-grown
              DB connection pool for getting DB connections. This is due to the fact that not
              all applications here run in a WLS environment and they wanted a standard way
              of retrieving a DB connection across applications. They also sited problems with
              WLS 4.5.1 connection pool.
              3. The documentation states that only one database may be involved in a transaction.
              If a connection to another database is required, but not needed in the current
              transaction, will WLS ignore enlisting the 2nd DB resource, or throw an exception?
              4. Where can I find <B>detailed</B> information about this subject? Everything
              that I have read so far has barely scratched the surface for this specific topic.
              Thanks,
              Bob.
              

              Hi Bob,
              If you are using WLS's XA connection pool, then the XAResource associated with
              the XA connections are enlisted with the transaction transparently for you. Enlistments
              actually occur not at getConnection, but on demand when the JDBC objects are actually
              used.
              If you are not using WLS connection pools, then you would need to enlist the XAResource
              associated with the XA connections yourself. You can obtain the transaction associated
              with the current thread by calling weblogic.transaction.TxHelper.getTransaction(),
              and then call enlistResource on the transaction.
              Weblogic has provisions that allow one (and only one) non-XA connection pool to
              participate in a distributed transaction. In this case, you will get a SQLException
              when you try to obtain a connection from a second connection pool in the same
              distributed transaction. However, if you are using real XA connection pools,
              there is no limitation and any number of XA connection pools can participate in
              the same distributed transaction.
              We will try to incorporate more info in our online docs in the future.
              -- Priscilla Fung, BEA Systems, Inc.
              "Bob Peroutka" <[email protected]> wrote:
              >
              >I have built a framework that employs a high rate of code reuse while
              >abstracting
              >the complexities of inter-application communication. This allows application
              >developers to focus on solving their business needs and not worry about
              >"the plumbing"
              >between the applications.
              >
              >At this point, the framework is using container-managed MDBs for Topic
              >destinations.
              > MDBs were chosen because of their concurrent nature for processing JMS
              >messages.
              >
              >Now that I have this framework up and running, I am trying to add distributed
              >transaction support and am having trouble understanding what I need to
              >do. Here
              >is how the framework works:
              >
              >The MDB will recieve a message, unmarshall it into a business object,
              >and then
              >route that object to the appropriate business class where it is then
              >processed
              >accordingly. In most cases, the processing of this message object will
              >require
              >database interaction. If any error should occur while processing the
              >message,
              >all XAResources within the transaction should rollback and ultimately,
              >the JMS
              >message will be redelivered later.
              >
              >Here is what I'm trying to find out:
              >
              >1. When control is passed to an application and it gets a DB connection,
              >will
              >that DB resource be dynamically enlisted with the transaction?
              >
              >2. Must the DB connection come from the WLS DB pool to be enlisted with
              >the transaction?
              >
              >I ask this because the current standard at this company is to use a home-grown
              >DB connection pool for getting DB connections. This is due to the fact
              >that not
              >all applications here run in a WLS environment and they wanted a standard
              >way
              >of retrieving a DB connection across applications. They also sited problems
              >with
              >WLS 4.5.1 connection pool.
              >
              >3. The documentation states that only one database may be involved in
              >a transaction.
              > If a connection to another database is required, but not needed in the
              >current
              >transaction, will WLS ignore enlisting the 2nd DB resource, or throw
              >an exception?
              >
              >4. Where can I find <B>detailed</B> information about this subject?
              > Everything
              >that I have read so far has barely scratched the surface for this specific
              >topic.
              >
              >Thanks,
              >
              >Bob.
              

  • Database connectivity toolkit problem with WINDOWS VISTA and Microsoft jet 4.0 provider

    Hi again,
    I'm experiencing a problem with Database connectivity toolkit and Microsoft Jet 4.0 provider (MS ACCESS mdb database).
    I was able to get my application to work properly on my PC: WINDOWS XP PROFESSIONAL, VERSION 2002, SERVICE PACK 3 and Msjet40.dll ver. 4.0.9511.0 (Windows XP SP3 and Security Bullettin MS08-028).
    The same connectivity toolkit seems to have problems (although I didn't get any error dialog) on a laptop with WINDOWS VISTA ULTIMATE, SERVICE PACK 2 and Msjet40.dll ver. 4.0.9755.0.
    Does anyone have an idea whether it is a sort of compatibility issue or a different thing?
    Would it be possible to include my DLLs into the installer in such a way LabVIEW application calls those DLLs instead of the ones it finds on the host PC?
    Thanks a lot. Any suggestion or advice very welcome and appreciated.

    I ran into this with Windows7 64 but, could not get the jet 4.0 to work.  Endnd up dumping access and used sql server express, its free, and all my code worked fine, just used a different UDL to connect.  I wasted lots of time trying to find a way of getting the jet4.0 to work with 64bit windows.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Problems with Application panel

    Has anyone ran into problems with the Applications panel? I
    using the Application panel to insert Bindings and Server
    Behaviors. I can't get it to work. It says that I have a connection
    and I'm able to see the tables and diplay recordsets. But I'm
    unable to display multiple recordsets and insert data into a
    database. I'm reading Dreamweaver 8 with ASP, Cold Fusion, and PHP:
    Training from the Source. I've done what the book has told me. Any
    ideas on what the problem could be?
    The only thing different that I did from the book is how I
    connect to a database. I have this on the top of each asp page.
    <%@LANGUAGE="VBSCRIPT"%>
    <%
    Set MM_conn_newland_STRING = CreateObject("ADODB.Connection")
    MM_conn_newland_STRING.ConnectionString =
    "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=D:\website\newland\database\newland_tours.mdb;"
    MM_conn_newland_STRING.Open
    %>
    The book uses a DSN and it has a seperate page for a
    connection:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/conn_newland.asp"
    -->

    Just want to assure, u said that u want to insert date from the form. Do u mean that u want to insert the date into mysql database. But it came out with the error. Am I right?

  • Problem with linked server...error 7302

    I have a very perplexing problem with a linked server.
    We are running SQL Server 2008 on Windows Server 2003. We have two instances, PROD and TEST. Both instances have a linked server to a DB2 environment using the IBMDADB2 driver. Both linked servers are identical. Up until a few days ago, both linked servers worked fine. Suddenly, I started to receive the following error when trying to access the linked server on TEST:
    Msg 7302, Level 16, State 1, Procedure sp_testlinkedserver, Line 1
    Cannot create an instance of OLE DB provider "IBMDADB2.DB2COPY1" for linked server "cm_nw".
    I have tried *everything* save restart the server (which is going to come tonight), reregistering the .dll and querying through openrowset (openquery and testing the connection in SSMS both fail). This includes:
    1) Recreating the linked server
    2) Going into DCOM and modifying the msdainitialize and checking the permissions.
    I am logging into the server using Windows Authentication, but this has worked and nothing has changed on that instance at all. I'm in the Administrators group anyway, as is the SQL Server service account, and that group has permissions on MSDAINITIALIZE. There is nothing in the SQL Server or Windows logs to indicate why the linked server cannot be called.
    Note the linked server is set up to use a security context (user name and password) and both linked servers are identical in this aspect. If I recreate the linked server without a password and uncheck "Allow Inprocess" in the provider I get:
    The OLE DB provider "IBMDADB2.DB2COPY1" for linked server "CM_NW" reported an error. Authentication failed.
    Cannot initialize the data source object of OLE DB provider "IBMDADB2.DB2COPY1" for linked server "CM_NW".
    OLE DB provider "IBMDADB2.DB2COPY1" for linked server "CM_NW" returned message " SQL30082N  Security processing failed with reason "3" ("PASSWORD MISSING").  SQLSTATE=08001
    ". (Microsoft SQL Server, Error: 7399)
    I don't know if that is coming from the SQL Server end or the DB2 end.

    I was able to resolve this issue by editing the registry. I imported a registry file called "IBM DB2 ODBC Driver - DB2 X64" from one of my known working servers that has a linked DB2 server installed. So what I'm thinking is happening is that SQL
    Server is somehow editing the registry causing it to break. 
    If you can go through the ODBC administrator and test your connection successfully, than you will know that the problem is not DB2 Connect but it's actually SQL Server. 
    For anyone that is still having this issue I would look in the registry for any DB2 X64 drivers to see if you have any. If not you can always create the following registry file and call it "IBM DB2 ODBC Driver - DB2 X64.reg" .
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers]
    "SQL Server"="Installed"
    "Microsoft ODBC for Oracle"="Installed"
    "Microsoft Access Driver (*.mdb)"="Installed"
    "Microsoft Access-Treiber (*.mdb)"="Installed"
    "Driver do Microsoft Access (*.mdb)"="Installed"
    "Microsoft dBase Driver (*.dbf)"="Installed"
    "Microsoft dBase-Treiber (*.dbf)"="Installed"
    "Driver do Microsoft dBase (*.dbf)"="Installed"
    "Microsoft Excel Driver (*.xls)"="Installed"
    "Microsoft Excel-Treiber (*.xls)"="Installed"
    "Driver do Microsoft Excel(*.xls)"="Installed"
    "Microsoft Paradox Driver (*.db )"="Installed"
    "Microsoft Paradox-Treiber (*.db )"="Installed"
    "Driver do Microsoft Paradox (*.db )"="Installed"
    "Microsoft Text Driver (*.txt; *.csv)"="Installed"
    "Microsoft Text-Treiber (*.txt; *.csv)"="Installed"
    "Driver da Microsoft para arquivos texto (*.txt; *.csv)"="Installed"
    "Microsoft Visual FoxPro Driver"="Installed"
    "Microsoft FoxPro VFP Driver (*.dbf)"="Installed"
    "Microsoft dBase VFP Driver (*.dbf)"="Installed"
    "Microsoft Visual FoxPro-Treiber"="Installed"
    "Driver para o Microsoft Visual FoxPro"="Installed"
    "SQL Server Native Client 10.0"="Installed"
    "IBM DB2 ODBC DRIVER - DB2x64"="Installed"
    "Microsoft Access Driver (*.mdb, *.accdb)"="Installed"
    "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)"="Installed"
    "Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)"="Installed"
    "Microsoft Access Paradox Driver (*.db)"="Installed"
    "Microsoft Access Text Driver (*.txt, *.csv)"="Installed"
    "IBM INFORMIX ODBC DRIVER"="Installed"
    "ServiceNow ODBC Driver 32-bit"="Installed"
    "IBM DB2 ODBC DRIVER - DB2COPY1"="Installed"
    "IBM DB2 ODBC DRIVER"="Installed"
    Once you've created this file go ahead and create a backup(if desired) of the registry and execute the reg file and restart SQL Server to see if this resolves your issue. If this does resolve your issue I would recommend taking a backup of your registry
    in case it breaks again. Keep in mind, other applications may experience issues that have been changed if you revert back to the backup.
    Hope this helps!

Maybe you are looking for

  • Error while detrmining Internal Document Number for Excise Invoice.

    Hello mate, I am trying to create excise invoice for for factory sale. while saving the document I am getting an error" Error while detrmining Internal Document Number for Excise Invoice. Message: Maintain Number Range for J_1IINTNUM". I have already

  • Please help!!! 10.5.8 won't fully install!

    I'm trying to update to 10.5.8 (ancient...i know) but it keeps getting stuck at "configuring installation" i've tried to install it about a dozen times and even let it install for ~24hours...I cant update/use any apps that require quicktime until i c

  • Yay Finally got an update for Voda N80 RM-92

    I'm not sure how long the update has been around but just did it tonight. I kind of gave up checking as it was pointless. Let's see if this version works eh! Is that an N95 in your pocket or are you just pleased to see me?!? Life's too important to t

  • IWeb Movies

    I have a movie which is 176 megs. When I insert it into a movie page and upload it, it will not play. It seems to be downloading, but even after the download it does not play. If I create a small section of that movie and upload it will play. There i

  • Hidden RAW files in Photos

    After upgrading macs I have been forced into Photos from iPhoto I shoot in both RAW and JPG but prefer to work on the RAW files so often just delete the JPG's When I import into Photos from my SD card I can only view and edit the JPG files though the