WL 6.1 sp3 and ResultSet.next()

Has anyone else had a problem with this call ?
I'm running this on Win2000 and Oracle 8.1.6.
ResultSet.next() seems to return true even after the cursor has passed the last row in the set. This was not an issue with WL6.1 sp1.

I got the same problem. But finally I found that this is the problem with WL 6.1. This is resolved in sp3.
So please verify the exact version of weblogic you are using.
Note : Start weblogic from some sample domain before executing the following.
java -classpath <wl_install_dir>/wlserver6.1/lib/weblogic.jar weblogic.Admin -url T3://<host>:<port> VERSION
You should get similar to....
WebLogic Server 6.1 SP3 06/19/2002 22:25:39 #190835
WebLogic XML Module 6.1 SP3 06/19/2002 22:39:10 #190835

Similar Messages

  • ResultSet.next() and resultset.islast() problem

    I have query which returns 10 records. I run the using preparedStatement. When i use the while(resultSet.next()), the loop runs untill 10 records and after that when it come to the while check it hangs.
    Sample code
    pstmt= conn.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    rs = pstmt.executeQuery();
    while (rsAccessNoEq.next()) {...
    Then i added the code in the while loop
    if(rs.isLast()){
    return;
    For the first iteration itself the theisLast() is true and it terminates from the loop.
    Please help me

    public class ISP {
         private GFA gestorFic = null;
         private GCA gestorCad = null;
         private GBDAgestor = null;
         private String path = null;
         ServiceProcessVO javaIntra = null;
         ServiceProcessVO javaIntra1 = null;
         ServiceProcessVO javaIntra2 = null;
         ServiceProcessVO javaIntra3 = null;
         ArrayList dataList = null;
         List dataFile = null;
         ArrayList dataList1 = null;
         ArrayList dataList2 = null;
         ArrayList dataList3 = null;          
         public final void iP() throws SQLException,
         MCEA {
         ResultSet rsIntraHq = null;
              Connection connIntraHq = null;
              PreparedStatement pstmtIntraHq = null;
              ResultSet rsIntraFlow = null;
              Connection connIntraFlow = null;
              PreparedStatement pstmtIntraFlow = null;
              ResultSet rsEqNoAccess = null;
              Connection connEqNoAccess = null;
              PreparedStatement pstmtEqNoAccess = null;
              ResultSet rsAccessNoEq = null;
              Connection connAccessNoEq = null;
              PreparedStatement pstmtAccessNoEq = null;
              ResultSet rsFlowHqAccess = null;
              Connection connFlowHqAccess = null;
              PreparedStatement pstmtFlowHqAccess = null;
              dataList = new ArrayList();          
              dataFile = new ArrayList();
              System.out.println("At the begining :"+now() );
              dataFile = gestorFic.leerArchivo(path, file);
              System.out.println("After first step :"+now() );
              int size1 = dataFile.size();
              try {
                   connAccessNoEq = gestor.getConnection();
                   javaIntra = new ServiceProcessVO();
                   pstmtAccessNoEq = connAccessNoEq
                   .prepareStatement(ConsultasAssets.INTRA_ACCESS_NOEQ);
                             //ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                   pstmtAccessNoEq.setString(1, oti);
                   pstmtAccessNoEq.setString(2, oti);
                   pstmtAccessNoEq.setString(3, oti);
                   rsAccessNoEq = pstmtAccessNoEq.executeQuery();
                   //int k = rsAccessNoEq.TYPE_SCROLL_SENSITIVE;
                   int i = 0;
                   //rsAccessNoEq.last();
                   while (rsAccessNoEq.next()) {
                        i++; System.out.println("Begin of loop:"+i);
                        javaIntra = populatedata(rsAccessNoEq, true);
                        dataList.add(javaIntra);
                        // Flow Hq Access
                        try {
                             connFlowHqAccess = gestor.getConnection();
                             javaIntra1 = new ServiceProcessVO();
                             pstmtFlowHqAccess = connFlowHqAccess
                             .prepareStatement(ConsultasAssets.HQ_ACCESS);
                             pstmtFlowHqAccess.setString(1, javaIntra
                                       .getCTASOCIACION().trim());
                             pstmtFlowHqAccess.setString(2, rsAccessNoEq.getString(1)
                                       .trim());
                             pstmtFlowHqAccess.setString(3, rsAccessNoEq.getString(3)
                                       .trim());
                             pstmtFlowHqAccess.setString(4,oti);
                             pstmtFlowHqAccess.setString(5,oti);
                             pstmtFlowHqAccess.setString(6,oti);
                             rsFlowHqAccess = pstmtFlowHqAccess.executeQuery();
                             while (rsFlowHqAccess.next()) {
                                  javaIntra1 = populatedata(rsFlowHqAccess, false);
                                  dataList.add(javaIntra1);
    //                         if(rsAccessNoEq.isAfterLast()){
    //                              return;
                        } catch (SQLException se) {
                             MCLA.logFatel(ClassNameAssets
                                       .getQualifiedClassName()
                                       + ": "
                                       + ClassNameAssets.getLineNumber()
                                       + ": "
                                       + "Error Occurred in HQ_ACCESS: "
                                       + se.getMessage());
                             throw new MigracionCommonExceptionAssets(se.getMessage());
                        } finally {
                             pstmtFlowHqAccess.close();
                             if (rsFlowHqAccess != null) {
                                  rsFlowHqAccess.close();
                             //gestor.releaseConn(connFlowHqAccess);
         private SPVOpopulatedata(ResultSet rsCpProcess, boolean modify)
         throws SQLException {
              SPVOjavaIntra = new ServiceProcessVO();
              if (rsCpProcess.getString(ConstantesAssets.NU) != null
                        && !rsCpProcess.getString(ConstantesAssets.NU)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setNU(rsCpProcess.getString(
                             ConstantesAssets.NU).trim());
              if (rsCpProcess.getString(ConstantesAssets.NU_ASO) != null
                        && !rsCpProcess.getString(ConstantesAssets.NU_ASO)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setNU_ASO(rsCpProcess.getString(
                             ConstantesAssets.NU_ASO).trim());
              // HashTable logic to increament value for CTASOCIACION Start
              if (modify == true) {
                   if (rsCpProcess.getString(ConstantesAssets.CTASOC) != null
                             && !rsCpProcess.getString(ConstantesAssets.CTASOC)
                             .equalsIgnoreCase(ConstantesAssets.BLANK)) {
                        char cha = ConstantesAssets.A;
                        if (tempMap.get(javaIntra.getNU()) != null) {
                             cha = tempMap.get(javaIntra.getNU()).toString()
                             .charAt(0);
                             cha++;
                        tempMap.put(javaIntra.getNU(), Character
                                  .toString(cha));
                        javaIntra.setCTASOCIACION(((rsCpProcess
                                  .getString(ConstantesAssets.CTASOC).trim()) + cha)
                                  .trim());
              } else {
                   javaIntra.setCTASOCIACION(rsCpProcess.getString(
                             ConstantesAssets.CTASOC).trim());
              // HashTable logic to increament value for CTASOCIACION End
              if (rsCpProcess.getString(ConstantesAssets.CCC) != null
                        && !rsCpProcess.getString(ConstantesAssets.CCC)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setCCC(rsCpProcess.getString(
                             ConstantesAssets.CCC).trim());
              if (rsCpProcess.getString(ConstantesAssets.FIV1) != null
                        && !rsCpProcess.getString(ConstantesAssets.FIV1)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setFIV(rsCpProcess.getString(
                             ConstantesAssets.FIV1).trim());
              if (rsCpProcess.getString(ConstantesAssets.FFV) != null
                        && !rsCpProcess.getString(ConstantesAssets.FFV)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setFFV(rsCpProcess.getString(
                             ConstantesAssets.FFV).trim());
              if (rsCpProcess.getString(ConstantesAssets.ES) != null
                        && !rsCpProcess.getString(ConstantesAssets.ES)
                        .equalsIgnoreCase(ConstantesAssets.BLANK))
                   javaIntra.setES(rsCpProcess.getString(
                             ConstantesAssets.ES).trim());
              javaIntra.setI(ConstantesAssets.N);
              javaIntra.setN(ConstantesAssets.BLANK);
              javaIntra.setC(ConstantesAssets.BLANK);
              javaIntra.setCO(ConstantesAssets.BLANK);
              javaIntra.setFI(ConstantesAssets.BLANK);
              return javaIntra;
    Please see the code
    Siva

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • WinXP SP3 and Boot Camp 2.1 | Win BSOD ATI card not correct!

    Configuration:
    Loaded and OEM WinXP SP3 on an iMac with Boot Camp V2.0. All worked correctly.
    Immediately after Boot Camp 2.0 completed installed Boot Camp V2.1. All worked correctly.
    Problem:
    Working in Windows the OS triggered a BSOD (Blue Screen of Death) after the OS was up for approximately 10 minutes. This was a repeatable problem.
    Investigation:
    Downloaded Windows DeBug utility to analyze the crash dump files from the BSODs. For reference on how to read the Windows dmp files and how to use Windows DeBug utility see the following link.
    http://www.networkworld.com/news/2005/041105-windows-crash.html
    Determined that the fault was caused by a driver file ati2mtag.sys.
    Checked the version with the latest availble from the manufacturer ATI. It was the most recent version
    Analysis:
    In Windows right click on My Computer, go to Properties.
    Go to the Hardware tab in Properties, and then to the Device Manager, drop down the Display adapters. The model shown was a Mobility Radeon HD 2600 XT!
    This is WRONG, the video card in this iMAC is a ATI Radeon HD 2600 Pro.
    Conclusion:
    Windows and or Boot Camp loaded the incorrect video drivers for the video card.
    Solution:
    1. Download and install Dot Net 2.0 because the ATI driver installer requires this level to install required drivers. The download is available at the following link.
    http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD -AAB15C5E04F5&displaylang=en
    2. Go to ATI driver support page and download the latest Catalyst driver for 32-bit XP.
    http://game.amd.com/us-en/drivers_catalyst.aspx?p=xp/radeonx-xp
    3. After download, launch the installer, just proceed with the installer until it gets to the point where it pops up an error message saying that the installer could not find a suitable driver for your hardware.
    4. Close out the installer and right click on My Computer, go to Properties.
    5. Go to the Hardware tab in Properties, and then to the Device Manager, drop down the Display adapters, and you should see Mobility Radeon HD 2600 XT, this is incorrect.
    6. Right click on the video card and choose Update Driver, you will be now see a Hardware Update Wizard.
    7. It says Can Windows connect to Windows Update to search for software? Select No, not this time, and click Next... Now you should see What do you want wizard to do? Select Install from a list or specific location (Advanced), and click Next.... On the next page select Don't Search. I will choose the driver to install, click Next....
    8. On the lower right corner of the Wizard, Have Disk... Now click Browse and go to C: > ATI > Support > Driver, and select the inf file in there, click Open.
    9. Scroll through to locate and then select ATI Radeon HD 2600 Pro, and install that, you might get a message saying this driver isn't certified, ignore it and continue.
    10. After completion, reboot.
    My system is now running correctly, no more BSOD's!

    hmm, is it possible that the same problem of the imac is mine on the macpro with 2 ati 2600 cards?
    from where do you know that the recginized xt card is wrong and it must the pro version? cause of the 256mb to 512mb at the offical xt version?
    plz take a look at my problem thread:
    http://discussions.apple.com/thread.jspa?threadID=1686327
    thx alot

  • Message Bridge between WLS 6.1 sp3 and MQSeries 5.2

              Hi,
              I'm really struggling with getting the Message Bridge working with Weblogic 6.1
              sp3 and MQSeries 5.2. Currently I have both installed on the same Windows 2000
              machine. First I'll pose some questions that I have, then I discuss the error
              I'm getting. Here are my questions:
              1. With the jms-xa-adp.rar there is a ra.xml and a weblogic-ra.xml. Within the
              ra.xml deployment descriptor there are config-properties for ConnectionURL, InitialContextFactory,
              ConnectionFactoryJNDI, and DestinationType. If my MQSeries Queue is the source
              jms destination bridge and my weblogic queue is the target jms destination bridge,
              what values do I set for the listed config-properties? I can't seem to find any
              documentation on what these values should be. Am I missing something? Do these
              values even have to be set?
              2. When I go to install a Weblogic instance to a different physical machine what
              has to be installed in terms of MQSeries? So I'll have MQSeries on physical machineA
              and Weblogic on a different physical machineB. I want machineA to forward all
              messages placed on a MQSeries Queue to forward them to machineB where the weblogic
              Queue resides. Does machineB also have to contain an MQSeries installation?
              Or can I just grab the necessary libraries and jar files and place them on the
              Weblogic machineB so they can be included?
              3. Is it correct that if I distribute Weblogic onto one physical server and MQSeries
              onto a different physical server that I cannot use Exactly-once quality of service?
              Other notes:
              1. I have the following patches installed for Weblogic 6.1 sp3:
              CR081404_610sp3.jar
              CR081511_61sp3.jar
              2. Here is the commands I used to create my ConnectionFactory and Queue within
              MQSeries:
              def xaqcf(MQTestConnectionFactory) qmanager(QM_jeff)
              def q(MQTestQueue) qmanager(QM_jeff) queue(default)
              Okay...here is my error:
              <21-Aug-02 11:08:34 ADT AM> <Error> <MessagingBridge> <Error occurred in bridge
              "Messaging Bridge" during transferring messages (java.lang.Exception: java.lang.
              reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException:
              javax.resource.ResourceException: Error creating consumer or receiving message
              at weblogic.jms.adapter.JMSBaseConnection.throwResourceException(JMSBaseConnection.java:1086)
              at weblogic.jms.adapter.JMSBaseConnection.receiveInternal(JMSBaseConnection.java:774)
              at weblogic.jms.adapter.JMSBaseConnection.receiveCommon(JMSBaseConnection.java:656)
              at weblogic.jms.adapter.JMSBaseConnection.receive(JMSBaseConnection.java:811)
              at weblogic.jms.adapter.JMSConnectionHandle.receive(JMSConnectionHandle.java:111)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.connector.common.internal.ConnectionWrapper.invoke(ConnectionWrapper.java:60)
              at $Proxy82.receive(Unknown Source)
              at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1215)
              at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:854)
              at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.
              Has anyone see this error before? Here is part of my ra.xml file....I just put
              these entries in to see what happens:
              <config-property>
              <config-property-name>ConnectionURL</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property value>file:/C:/Develop/app_servers/WebSphere/MQSeries</config-property-value>
              </config-property>
              <config-property>
              <config-property-name>InitialContextFactory</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>com.sun.jndi.fscontext.RefFSContextFactory</config-property-value>
              </config-property>
              <config-property>
              <config-property-name>ConnectionFactoryJNDI</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>MQTestConnectionFactory</config-property-value>
              </config-property>
              <config-property>
              <config-property-name>DestinationJNDI</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>MQTestQueue</config-property-value>
              </config-property>
              <config-property>
              <config-property-name>DestinationType</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value></config-property-value>
              </config-property>
              <config-property>
              <config-property-name>AdapterType</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>XATransaction</config-property-value>
              </config-property>
              Here is a snip of my config.xml:
              <MessagingBridge AsyncEnabled="false" DurabilityEnabled="false"
              Name="Messaging Bridge" QualityOfService="Atmost-once"
              SourceDestination="Source JMS Bridge Destination"
              TargetDestination="Target JMS Bridge Destination" Targets="myserver"/>
              <JMSBridgeDestination
              AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDIXA"
              ConnectionFactoryJNDIName="MQTestConnectionFactory"
              ConnectionURL="file:/C:/Develop/app_servers/WebSphere/MQSeries"
              DestinationJNDIName="MQTestQueue" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
              Name="Source JMS Bridge Destination"/>
              <JMSBridgeDestination
              AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDIXA"
              ConnectionFactoryJNDIName="imagictv.platform.ToolkitRequestCF"
              ConnectionURL="t3://localhost:7001"
              DestinationJNDIName="imagictv.platform.ToolkitRequestQueue"
              InitialContextFactory="weblogic.jndi.WLInitialContextFactory" Name="Target
              JMS Bridge Destination"/>
              Any help would be greatly appreciated. Thank you in advance for your help.
              Sincerely,
              Jeff
              

              I tried your suggestion and it worked!! The only thing is, it
              makes the deployment of the resource adapter a little more
              complicated. Now my customers are going to have to edit their
              config.xml, instead of just dropping in the appropriate rar into
              the applications directory. But one nice side affect of placing
              the rar's in a different directory is it makes the Message
              Bridge a little more stable. I was finding it to be very
              unstable. One time I would startup my Application Server and
              everything was fine, then I would shutdown. The next time I
              started it up, I would get exceptions. I have yet to see that
              behavior with this new configuration.
              Thanks again for all of your help, it is greatly appreciated!!
              Jeff
              Dongbo Xiao <[email protected]> wrote:
              >Looks like that somehow you have the adapter deployed
              >multiple times, may not be intended. The cause is that
              >everything in the application directory will be automatically
              >deployed and all of them are added to the config.xml. During
              >the next boot, those appear in the config.xml will be deployed and
              >everything in the application directory too. As a result, the adapters
              >are deployed twice. The complain about runtime mbean not found may
              >mean the one that is overridden by the new one.
              >
              >The work around is not to put your adapters in the application
              >directory, instead, put them in a different directory and point to
              >the directory in your config.xml.
              >
              >Dongbo
              >Jeff wrote:
              >>
              >> One more thing...
              >> I noticed that the exception specified that it couldn't find
              >> mydomain:Location=myserver,Name=jms-xa-
              >> adp_Pool_1,ServerRuntime=myserver,Type=ConnectorConnectionPoolRun
              >> time MBean, but what's interesting that if I run the following
              >> java weblogic.Admin GET -type ConnectorConnectionPoolRuntime -
              >> property ActiveConnectionsCurrentCount -url
              >> http://localhost:7001 -username xxxx -password xxxx I get the
              >> following output:
              >>
              >> {MBeanName="mydomain:Location=myserver,Name=jms-xa-
              >> adp_Pool_3,ServerRuntime=myse
              >> rver,Type=ConnectorConnectionPoolRuntime"{ActiveConnectionsCurren
              >> tCount=0}}
              >> {MBeanName="mydomain:Location=myserver,Name=jms-notran-
              >> adp_Pool_2,ServerRuntime=
              >> myserver,Type=ConnectorConnectionPoolRuntime"{ActiveConnectionsCu
              >> rrentCount=0}}
              >>
              >> So from that...it looks like the MBean is there. Any ideas why it
              >is not being
              >> found?
              >>
              >> Thanks,
              >>
              >> Jeff
              >>
              >> "Jeff" <[email protected]> wrote:
              >> >
              >> >
              >> >
              >> >Thank you very much!!
              >> >
              >> >I tried your suggestions and created a general Queue Connection Factory
              >> >within
              >> >MQSeries. Then I setup my MQSeries JMS Bridge Destination to use
              >the
              >> >jms-notrans-adp.rar
              >> >resource adapter. With this configuration, I can send messages to
              >MQSeries
              >> >and
              >> >they get forwarded to Weblogic.
              >> >
              >> >But, if I create a XAQueueConnectionFactory within MQSeries I cannot
              >> >get the bridge
              >> >working at all. I realize that MQSeries has a bug with Transactions
              >> >and remote
              >> >servers, but I have MQSeries and Weblogic running on the same machine.
              >> > I thought
              >> >I could setup an XAConnectionFactory in MQSeries, set the MQSeries
              >JMS
              >> >Bridge
              >> >Destination to use the jms-xa-adp.rar and specify Exactly-once QOS
              >and
              >> >it should
              >> >work? I tried it and it didn't work. ( see attachment for weblogic.log
              >> >showing
              >> >exception ).
              >> >
              >> >Here is my config.xml:
              >> > <MessagingBridge AsyncEnabled="false" DurabilityEnabled="false"
              >> > Name="Request Messaging Bridge" QOSDegradationAllowed="true"
              >> > QualityOfService="Exactly-once"
              >> > SourceDestination="Source JMS Bridge Destination"
              >> > TargetDestination="Target JMS Bridge Destination" Targets="myserver"/>
              >> > <JMSBridgeDestination
              >> > ConnectionFactoryJNDIName="imagictv.platform.ToolkitRequestCF"
              >> > ConnectionURL="t3://localhost:7001"
              >> > DestinationJNDIName="imagictv.platform.ToolkitRequestQueue"
              >Name="Target
              >> >JMS Bridge Destination"/>
              >> > <JMSBridgeDestination
              >> > AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDIXA"
              >> > ConnectionFactoryJNDIName="MQTestConnectionFactory"
              >> > ConnectionURL="file:/C:/Develop/app_servers/WebSphere/MQSeries"
              >> > DestinationJNDIName="MQTestQueue"
              >> > InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
              >> >Name="Source
              >> >JMS Bridge Destination"/>
              >> >
              >> >Again, thank you very much for your response. It helped me a great
              >deal.
              >> > Any
              >> >thoughts on the above problem please foward them along.
              >> >
              >> >Oh...and to answer the question posed to me, yes the CR081511_61sp3.jar
              >> >file is
              >> >dated 8/13/2002
              >> >
              >> >
              >> >Sincerely,
              >> >
              >> >Jeff
              >> >
              >> >Dongbo Xiao <[email protected]> wrote:
              >> >>Please see my comments inline.
              >> >>
              >> >>
              >> >>Jeff wrote:
              >> >>>
              >> >>> Hi,
              >> >>> I'm really struggling with getting the Message Bridge working with
              >> >>Weblogic 6.1
              >> >>> sp3 and MQSeries 5.2. Currently I have both installed on the same
              >> >>Windows 2000
              >> >>> machine. First I'll pose some questions that I have, then I discuss
              >> >>the error
              >> >>> I'm getting. Here are my questions:
              >> >>>
              >> >>> 1. With the jms-xa-adp.rar there is a ra.xml and a weblogic-ra.xml.
              >> >> Within the
              >> >>> ra.xml deployment descriptor there are config-properties for ConnectionURL,
              >> >>InitialContextFactory,
              >> >>> ConnectionFactoryJNDI, and DestinationType. If my MQSeries Queue
              >> >is
              >> >>the source
              >> >>> jms destination bridge and my weblogic queue is the target jms
              >destination
              >> >>bridge,
              >> >>> what values do I set for the listed config-properties? I can't
              >seem
              >> >>to find any
              >> >>> documentation on what these values should be. Am I missing something?
              >> >> Do these
              >> >>> values even have to be set?
              >> >>>
              >> >>
              >> >>You DON'T have to do anything to the adapter deployment descriptor
              >> >>files.
              >> >>The values given there for the listed config-properties are just
              >default
              >> >>values.
              >> >>The values configured in JMSBridgeDestination instances are the values
              >> >>used to
              >> >>override the default values in the dd file.
              >> >>
              >> >>> 2. When I go to install a Weblogic instance to a different physical
              >> >>machine what
              >> >>> has to be installed in terms of MQSeries? So I'll have MQSeries
              >on
              >> >>physical machineA
              >> >>> and Weblogic on a different physical machineB. I want machineA
              >to
              >> >>forward all
              >> >>> messages placed on a MQSeries Queue to forward them to machineB
              >where
              >> >>the weblogic
              >> >>> Queue resides. Does machineB also have to contain an MQSeries
              >installation?
              >> >>> Or can I just grab the necessary libraries and jar files and place
              >> >>them on the
              >> >>> Weblogic machineB so they can be included?
              >> >>>
              >> >>
              >> >>You don't have to install MQSeries on the machine that the WebLogic
              >> >>server is running. You need the necessary libraries and jar files
              >> >>though.
              >> >>
              >> >>> 3. Is it correct that if I distribute Weblogic onto one physical
              >server
              >> >>and MQSeries
              >> >>> onto a different physical server that I cannot use Exactly-once
              >quality
              >> >>of service?
              >> >>>
              >> >>
              >> >>That is correct and it is a MQSeries transaction limitation.
              >> >>
              >> >>> Other notes:
              >> >>> 1. I have the following patches installed for Weblogic 6.1 sp3:
              >> >>> CR081404_610sp3.jar
              >> >>> CR081511_61sp3.jar
              >> >>>
              >> >>
              >> >>What version of CR081511_61sp3.jar you have? You need the one dated
              >> >on
              >> >>8/13/2002.
              >> >>
              >> >>> 2. Here is the commands I used to create my ConnectionFactory
              >and
              >> >>Queue within
              >> >>> MQSeries:
              >> >>> def xaqcf(MQTestConnectionFactory) qmanager(QM_jeff)
              >> >>> def q(MQTestQueue) qmanager(QM_jeff) queue(default)
              >> >>>
              >> >>
              >> >>The only possible error I see here is that you create a xaqcf while
              >> >your
              >> >>bridge
              >> >>is configured to have "Atmost-once" QOS. The bridge adapter will
              >create
              >> >>XASession
              >> >>if the connection factory is xa because it knows nothing about QOS
              >of
              >> >>the bridge.
              >> >>As I said, there is a limitation in MQSeries transactions, which
              >prevent
              >> >>the
              >> >>transaction to happen between remote servers. Although the bridge
              >does
              >> >>not
              >> >>start the the transaction in your case, but MQSeries xa connection
              >> >>factory may
              >> >>throw error when it detects the other side is remote. Having said
              >that,
              >> >>I am not
              >> >>completely sure this is the problem caused the bridge to fail. I
              >suggest
              >> >>you use
              >> >>a non-xa connection factory on the MQSeries side and see if the problem
              >> >>goes away.
              >> >>
              >> >>> Okay...here is my error:
              >> >>>
              >> >>> <21-Aug-02 11:08:34 ADT AM> <Error> <MessagingBridge> <Error occurred
              >> >>in bridge
              >> >>> "Messaging Bridge" during transferring messages (java.lang.Exception:
              >> >>java.lang.
              >> >>> reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException:
              >> >>> javax.resource.ResourceException: Error creating consumer or receiving
              >> >>message
              >> >>> at weblogic.jms.adapter.JMSBaseConnection.throwResourceException(JMSBaseConnection.java:1086)
              >> >>> at weblogic.jms.adapter.JMSBaseConnection.receiveInternal(JMSBaseConnection.java:774)
              >> >>> at weblogic.jms.adapter.JMSBaseConnection.receiveCommon(JMSBaseConnection.java:656)
              >> >>> at weblogic.jms.adapter.JMSBaseConnection.receive(JMSBaseConnection.java:811)
              >> >>> at weblogic.jms.adapter.JMSConnectionHandle.receive(JMSConnectionHandle.java:111)
              >> >>> at java.lang.reflect.Method.invoke(Native Method)
              >> >>> at weblogic.connector.common.internal.ConnectionWrapper.invoke(ConnectionWrapper.java:60)
              >> >>> at $Proxy82.receive(Unknown Source)
              >> >>> at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1215)
              >> >>> at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:854)
              >> >>> at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.
              >> >>>
              >> >>
              >> >>The latest patch CR081511_61sp3.jar (dated on 8/13/2002) will expose
              >> >>more error
              >> >>information.
              >> >>
              >> >>> Has anyone see this error before? Here is part of my ra.xml file....I
              >> >>just put
              >> >>> these entries in to see what happens:
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>ConnectionURL</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property value>file:/C:/Develop/app_servers/WebSphere/MQSeries</config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>InitialContextFactory</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property-value>com.sun.jndi.fscontext.RefFSContextFactory</config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>ConnectionFactoryJNDI</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property-value>MQTestConnectionFactory</config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>DestinationJNDI</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property-value>MQTestQueue</config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>DestinationType</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property-value></config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>> <config-property>
              >> >>> <config-property-name>AdapterType</config-property-name>
              >> >>> <config-property-type>java.lang.String</config-property-type>
              >> >>> <config-property-value>XATransaction</config-property-value>
              >> >>> </config-property>
              >> >>>
              >> >>
              >> >>As I said earlier, you are not supposed to change the adapter dd
              >file.
              >> >>
              >> >>
              >> >>> Here is a snip of my config.xml:
              >> >>>
              >> >>> <MessagingBridge AsyncEnabled="false" DurabilityEnabled="false"
              >> >>> Name="Messaging Bridge" QualityOfService="Atmost-once"
              >> >>> SourceDestination="Source JMS Bridge Destination"
              >> >>> TargetDestination="Target JMS Bridge Destination" Targets="myserver"/>
              >> >>> <JMSBridgeDestination
              >> >>> AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDIXA"
              >> >>> ConnectionFactoryJNDIName="MQTestConnectionFactory"
              >> >>> ConnectionURL="file:/C:/Develop/app_servers/WebSphere/MQSeries"
              >> >>> DestinationJNDIName="MQTestQueue" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
              >> >>> Name="Source JMS Bridge Destination"/>
              >> >>>
              >> >>> <JMSBridgeDestination
              >> >>> AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDIXA"
              >> >>> ConnectionFactoryJNDIName="imagictv.platform.ToolkitRequestCF"
              >> >>> ConnectionURL="t3://localhost:7001"
              >> >>> DestinationJNDIName="imagictv.platform.ToolkitRequestQueue"
              >> >>> InitialContextFactory="weblogic.jndi.WLInitialContextFactory"
              >Name="Target
              >> >>> JMS Bridge Destination"/>
              >> >>>
              >> >>
              >> >>Your configuration of the bridge and bridge destinations look fine.
              >> >
              >> >>The last thing is that you have to put MQSeries stuff in your CLASSPATH
              >> >>and PATH for starting the WebLogic server that the bridge is running
              >> >>on.
              >> >>
              >> >>You can also turn on debug for more information.
              >> >>-Dweblogic.Debug.DebugMessagingBridgeStartup=true
              >> >>-Dweblogic.Debug.DebugMessagingBridgeRuntime=true
              >> >>
              >> >>
              >> >>Thanks,
              >> >>Dongbo
              >> >
              

  • ResultSet.next() throws exception

    I am working on a BEA Weblogic application migration from 7.1 to 8.1. My application has lots of Oracle user defined package functions for providing database query. Those functions return a cursor pointing to the query results (ResultSet object in JDBC). My BEA Weblogic 8.1 java application, which invokes those Oracle functions, uses getObject() method to get query ResultSet. Follows are a java code snippet and exception thrown when using ResultSet.next() method to move cursor. Thanks.
    =================== code snippet ========================
    CallableStatement cs1 = (CallableStatement)conn.prepareCall("{? = call pkg_profile.fn_get_user_data(?) }");
    cs1.registerOutParameter(1, java.sql.Types.OTHER);
    cs1.setString (2, c_strUsername);
    cs1.execute();
    // Get the Result
    ResultSet rs1 = (ResultSet)cs1.getObject(1);
    if (rs1 == null || !rs1.next()) { <=== exception thrown due to moving cursor to the next row of query result.
    =================== code snippet =======================
    Exception -
    ERROR 24 Nov 2004 12:19:28,527 USER:supuser - CNTXT:MISUserProfile.userDataDispatcher | SQL Error while retrieving data for user. | java.sql.SQLException: java.lang.NullPointerException: CDA is null
    Start server side stack trace:
    java.lang.NullPointerException: CDA is null
    at weblogic.db.oci.OciCursor.arrayFetch(Native Method)
    at weblogic.db.oci.OciCursor.oci_arrayFetch(OciCursor.java:2338)
    at weblogic.jdbc.oci.ResultSet.next(ResultSet.java:774)
    at weblogic.jdbc.rmi.internal.ResultSetImpl.next(ResultSetImpl.java:135)
    at weblogic.jdbc.rmi.internal.ResultSetImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    End server side stack trace

    Try this one...
    Before excecuting the query setAutoCommit false and then try to execute the query.After executing query manually do commit.It should work.

  • TopLink and ResultSet: ojdbc14 vs. ojdbc6 - Closed command

    Hi all,
    I have problem with ojdbc library. We updated our ojdbc library from ojdbc14 to ojdbc6. But now, we have problem with SQLExcpetion: "java.sql.SQLException Closed statement".
    We have following code:
    Object result = session.executeQuery(query, args);
    Map map = (Map)((Vector)result).firstElement();
    // the data is in data type OracleResultSetImpl !!!
    OracleResultSet out_data = (OracleResultSet) map.get(EmtasConstant.GRID_PROCEDURE_DATA_OUT);
    OracleResultSetMetaData metadata = (OracleResultSetMetaData) out_data.getMetaData();
    If we used library "ojdbc14.jar" everything works fine, we get metadata, read data from resultSet, etc... No problem!
    But if we using "ojsbc6.jar" and call getMetadata, then throws: "java.sql.SQLException: Closed command: getMetaData" .. or "ava.sql.SQLException: Closed command: next()" or whatever we call on OracleResultSet out_data (we try OracleResultSet and ResultSet too)..
    If we used "ojdbc14.jar" and I call out_data.close(), they throws same exception => Why is the ResultSet in library ojdbc6.jar closed??????
    Any idea? I'm really stuck and I all day trying to come to solve the problem, but I resolved nothing.
    Pls help!
    Thx!
    Best regards, KLD!
    Sry for my English ;)

    Yes, I have newest version of TopLink (11.1.1. ...) and Java (1.6_09).
    Or, is any option how to convert ResultSet to any "normal" java object (like hasmap,collection, list, ...)
    I returned multiple cursor objects from stored procedure, and I resolved it as follows:
    More output cursors with StoredProcedureCall?
    but now I have problem with ResultSet and i don't want call more times the procedure call (first option)...

  • ResultSet.next() throws NullPointerException

    Hello,
    When running the following code:
    import java.sql.*;
    class DatabaseDriver {
         private int                    databaseType;
         private String               error;
         private Connection     con;
         private Statement          statement;
         private ResultSet          rs;
         static final int          MYSQL_DB_TYPE = 1;
         static final int          PGSQL_DB_TYPE = 2;
         static final int          MSSQL_DB_TYPE = 3;
         static final int          ORACLE_DB_TYPE = 4;
         public DatabaseDriver (int dbType) {
              databaseType = dbType;
              try {
                   switch (dbType) {
                        case MYSQL_DB_TYPE:
                             Class.forName("com.mysql.jdbc.Driver").newInstance();
                             break;
                        case PGSQL_DB_TYPE:
                             Class.forName("org.postgresql.Driver").newInstance();
                             break;
                        case MSSQL_DB_TYPE:
                             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
                             break;
                        case ORACLE_DB_TYPE:
                             Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                             break;
              } catch (Exception e) {
                   error = "could not load driver";
         public boolean connect (String server, String user, String password) {
              try {
                   con = DriverManager.getConnection("jdbc:mysql://" + server + "?user=" + user + "&password=" + password);
              } catch (Exception e) {
                   error = "could not connect to the database";
                   return false;
              return true;
         public boolean execQuery (String query) {
              try {
                   statement = con.createStatement();
                   if (statement.execute(query)) {
                        rs = statement.getResultSet();
                   while (rs.next()) {
                        System.out.println(rs.getString("1") + "\t" + rs.getString("2"));
                   rs.close();
                   rs = null;
                   statement.close();
                   statement = null;
              } catch (Exception e) {
                   error = e.toString();
                   e.printStackTrace();
                   return false;
              return true;
         public String getError () {
              return error;
         public boolean disconnect () {
              return true;
    class Test {
         public static void main (String[] args) {
              DatabaseDriver db = new DatabaseDriver(1);
              db.connect(args[0],args[1],args[2]);
              db.execQuery("USE " + args[3] + ";");
              db.execQuery("SELECT * FROM te;");
              System.out.println(db.getError());
    }I receive this in the printout:
    java.lang.NullPointerException
         at DatabaseDriver.execQuery(DatabaseDriver.java:61)
         at Test.main(Test.java:7)
    bla1     bla2
    bla6     bla7
    java.lang.NullPointerException
    Line 61
    while (rs.next()) {
    I have read a lot of other posts that say that the connection object is null or the recordset is empty, but it seems that neither of those are the case considering I am able to printout the two rows properly.
    Can someone please explain to me what I am doing wrong and how to fix it?
    Thanks

    You can pepper your code with System.out.println() statements to determine what value goes into the execute() statement before it runs.
    In the following, I think the first statement will probably return false. What is this sql trying to accomplish that you think it sould return true? Even if it returned true, what value do you expect in the resultSet?
    db.execQuery("USE " + args[3] + ";");
    db.execQuery("SELECT * FROM te;");
    As a side note, I strongly suggest you use connection pooling and not driverManager. here is an example of getting and returning a connection properly (all within a function)
    public String[] myFunction(){
    Connection conn=null;
    PreparedStatement pstmt1= null;
    ResultSet resultSet=null;
    ArrayList list1; //array that can grow in size
    try{
    list1=new ArrayList();
    conn= dataSource.getConnection();
    pstmt1= conn.prepareStatement();
    resultSet= pstmt1.executeUpdate();
    while(resultSet.next()){
    arrayList.add(resultSet.getString("lastName");
    return ( String[] ) arrayList.toArray( new String[arrayList.size()] );
    } catch (SqlException e){
    e.printStackTrace();
    } finally {
    if(rsultSet!=null)
    resultSet.close();
    if(pstmt1!=null)
    pstmt1.close();
    if(conn!=null)
    conn.close();
    }

  • Error message ResultSet.next not called

    I am a student learning java and am currently working on an assignement where I need to write jdbc programs that connect to an oracle database. The error message that I am getting is:
    ResultSet.next was not called.
    I do not know why I am getting this message. I wrote a simpler program to try to find the error, but I still got it again. Here's the part of the program:
    ResultSet rset = stmt.executeQuery ("SELECT billing_id_seq.NEXTVAL Next_SeqNumber "+
                             "FROM Dual");
    int sequenceNumber=rset.getInt("Next_SeqNumber");
         while(rset.next()){
    System.out.println(sequenceNumber);
    Any ideas would be helpful. Thanks very much!

    I am not really sure if it is okay to post the whole program on this message board, but here it is:
    import java.sql.*;     //Import Java's JDBC classes
    public class CalculateEnrollFinalGrades {
    public static void main(String[] args) {
    //Invoke the processEnrollRecords() method
         processEnrollRecords();
    } //end main()
    // The following method issues a SQL SELECT statement to the database that returns the section_id
    // and student_id for ALL rows from the enrollment_copy table. For each row received back in the
    // result set, a call should be made to the updateEnrollFinalGrade() method. See below for
    // information about what the that method does and what arguments it takes.
    public static void processEnrollRecords() {
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver"); // Load the Oracle JDBC driver
    catch (java.lang.ClassNotFoundException e) {
    System.out.println(e.getMessage());
    try {
    //Create the connection and statement objects
         Connection conn= DriverManager.getConnection("jdbc:oracle:oci8:@", "STUDENT","LEARN");
         Statement stmt=conn.createStatement();
    //Execute a query in the CTA database which returns section_id and student_id for all
    //rows of the enrollment_copy table
         int sectId=0;
         int studId=0;
         String sqlQuery="SELECT section_id, student_id "+
                   "FROM enrollment_copy";
         ResultSet rset= stmt.executeQuery(sqlQuery);
    //For each record returned in the ResultSet object, pass
    //the current connection object along with each section_id and student_id as
    //arguments to a method called updateEnrollFinalGrade()
         //while(rset.next()){
         sectId=rset.getInt("section_id");
         studId=rset.getInt("student_id");
         updateEnrollFinalGrade(conn, sectId, studId);
         //}//close while
    //Close all resources before the program ends
         //conn.close();      //should this be kept open???
         stmt.close();
         rset.close();
         return;
    catch (java.sql.SQLException e) { 
    System.out.println(e.getMessage());
    } // end processEnrollRecords()
    // calculate a final_grade for the specified student
    // and section, and then it updates the enrollment_copy table with the final_grade.
    private static void updateEnrollFinalGrade(Connection conn_p, int sectionId_p, int studentId_p) {
    try {
         Connection conn= DriverManager.getConnection("jdbc:oracle:oci8:@", "STUDENT","LEARN");
         Statement stmt=conn.createStatement();
         //query returns one row which is the final grade for the course for a particular student id and section.
         String sqlQuery2= "SELECT "+
         "ROUND(SUM((SUM(g.numeric_grade))/(COUNT(g.grade_type_code))*(gtw.percent_of_final_grade/100))) finGrade "+
         "FROM grade g, grade_type_weight gtw "+
         "where g.section_id=gtw.section_id AND g.grade_type_code=gtw.grade_type_code "+
         "AND g.student_id=? "+
         "AND g.section_id=? "+
         "GROUP BY gtw.percent_of_final_grade";
         PreparedStatement pstmt=conn.prepareStatement(sqlQuery2);
         pstmt.setInt(1, studentId_p);
         pstmt.setInt(2, sectionId_p);     
         ResultSet rsetGrade=pstmt.executeQuery();
         int finalGrade=rsetGrade.getInt("finGrade");
    //Once the final_grade has been calculated, use a different PreparedStatement object to
    //store it in the related enrollment_copy record. You need to use a Prepared
    //Statement
         String sqlUpdate=      "Update enrollment_copy "+
                        "SET final_grade=? "+
                        "WHERE student_id=? AND section_id=?";
         PreparedStatement pstmtUpdate=conn.prepareStatement(sqlUpdate);
         pstmtUpdate.setInt(1,finalGrade);
         pstmtUpdate.setInt(2,studentId_p);
         pstmtUpdate.setInt(3,sectionId_p);
         pstmtUpdate.executeUpdate();
         pstmt.close();
         pstmtUpdate.close();          
         stmt.close();
         rsetGrade.close();
         return;
    } // end try block
    catch (java.sql.SQLException e) { 
    System.out.println(e.getMessage());
    } //end updateEnrollFinalGrade()
    } //end CalculateEnrollFinalGrades
    Thanks very mush for your help.

  • Control the loop of resultset.next( ); (method)

    Hai, guys
    I am using the ODBC database connection to (Excel Sheet) and i wanna get the records from it. My code is scucess but there is a problem in resultset.next() method.
    The thing is it retrieving all the data including the none data fields (null null), so finally it became a never ending loop.
    pls help me to get the data rang's records
    Statement stmnt = connexl.createStatement();
    String query = "SELECT * FROM [IJTS$]";
    stmnt.execute(query);
    ResultSet rsxl = stmnt.getResultSet();
    while(rsxl.next()) {
    String excelname = rsxl.getString(1);
    String excelcate = rsxl.getString(2);
    System.out.print(rsxl.getString(1));
    System.out.println(" "+rsxl.getString(2));
    }

    if null implies it has reached the last row, maybe you could check for null and break from the loop
    for example:
    while (rsxl.next()) {
      String excelname = rsxl.getString(1);
      String excelcate = rsxl.getString(2);
      if (excelname == null && excelcate == null) {
        break;
      } else {
        System.out.println(excelname + " " + excelcate);
    }

  • The ResultSet.next() returns false....

    Hai,
    I am working on jdbc. The connection credentials all correct, and its getting connected to the sybase without any problems. But I am not able to perform any 'select' or "update" statements...There are no exception or any errors...But the ResultSet.next() returns false and executeUpdate returns 0 . .
    I think you can help me.....Thanks...

    Yes the query is sameAs already pointed out, there are ONLY two possibilities.
    1. The query is not the same
    2. The database is not the same.
    You are making assumptions about what is going on and then drawing conclusions.
    You need to understand that you assumptions are wrong. So it doesn't matter what conclusion you draw.
    In terms of why the query isn't the same there could be any number of reasons but usually it is because you are passing in data and that data isn't what you think (assume) it is. It can also be that you are constructing the SQL and that construction is different. It could be that the environment that you use to test as settings which impact SQL.

  • Lockup in ojdbc14 Resultset.next()

    After several loops through the ResultSet handler, a subsequent call to ResultSet.next() results in a lockup.
    Below is a partial stack dump.
    Thread [Thread-14] (Suspended)
         oracle.jdbc.driver.SensitiveScrollableResultSet(oracle.jdbc.driver.ScrollableResultSet).prepare_refetch_statement(int) line: 2299 [local variables unavailable]
         oracle.jdbc.driver.SensitiveScrollableResultSet(oracle.jdbc.driver.ScrollableResultSet).refreshRowsInCache(int, int, int) line: 292
         oracle.jdbc.driver.SensitiveScrollableResultSet.refreshRow() line: 174
         oracle.jdbc.driver.SensitiveScrollableResultSet.handle_refetch() line: 255
         oracle.jdbc.driver.SensitiveScrollableResultSet.next() line: 82
         oracle.jdbc.driver.UpdatableResultSet.next() line: 251
         com.solcom.labelprintroom.DatabaseAccess.ordersForUserStatus(com.solcom.centraldb.CDBUser, java.lang.String) line: 291
    prepare_refetch_statement(int) is continuously looping between lines 2299, 2304, 2305.
    Connection is to an Oracle 8i (8.1.7) database.
    No exception is thrown and no timeout occurs. it merely loops continuously between the lines described in the Oracle driver.
    Is this a known problem? Is there a workaround?
    TIA
    AndyB

    "I have two DA classes with virtually the same code, just different queries."
    "In the other DA i do exactly the same..."Are these contradictory statements?
    Does anyone know if there is a problem with the Oracle
    Drivers or has anyone encountered a similair problem?Well, I am positive that -1 is not a problem for Oracle, it can use almost all the small negative numbers without error...
    Would it be possible to post a bit of your code to demonstrate how the code is different and how the SQL is different (or the same / not sure). There are infinite ways to code SQL with -1 in it, so what is important is exactly how you did it, which driver you are using, if you are using a Statement or PreparedStatement, if you are using connection pooling, etc.

  • Crystal Report 2008 SP3 and BO XI 3.1 conflict

    Hi every body,
    We have a BOE system:
    BO XI 3.1
    Oracle db 10g
    All running successful and can create some types of WebI report.
    But we also want reports with Crystal Report.
    1> So we install Crystal Report 2008 SP3 (without knowing the conflict error between BO XI 3.1 and Crystal Report 2008 SP3 and overwrite some .dll file). After installing, we can not create WebI report any more. And a error message box display: "DBDriver failed to load: C:\Program File\Business Objects\BusinessObjects ENterprise12.0\win32_x86\dataAccess\connectionServer\dbd_oci.dll ".
    2> We uninstall Crystal Report SP3. But this is not the solution. Still error because of missing .dll files.
    3> We open BO XI 3.1 setup and repair BO XI 3.1. Even we uninstall BO XI 3.1, delete all of its components and delete in regedit key. We install BO XI 3.1 again. Now we have full .dll file, not missing them any more. But when we open universe and click on Table browser, cannot fetching any tables.
    We set rights for Oracle DB user again. But still error: cannot fetching.
    4> We searched the solution for this problem on the internet. But not worked, no answer.
    Can somebody help me bring back the BOE system state again ? pls   :"<
    T______T

    Hi Paul,
    I hope I read your question right!
    Yes, It is possible to run XIR2 and 3.1 on the same server although it's not recommended by BO. You will need to make sure they are both pointing to different CMS databases and different FRS repositories, like you already mentioned you will need to specify different ports for the CMS db and Tomcat.
    Why not uninstall Business Objects XI R2 in your BO development environment or a spare server (if you have one), and do a clean install of XI 3.1 SP3.
    Tip: If you were already having performance issues with your XI R2 environment, I would seriously consider upgrading the hardware. XI 3.1 needs a bit more RAM and CPU than XI R2
    Regards
    Rim Geurts

  • Closing Statements and ResultSets

    I just recently realized that you need to close Statements and ResultSets in order to avoid getting the "Too many cursors"-message.
    My question is:
    Do you need to close both Statements and ResultSets?
    - not that it's a problem...
    if so:
    Does it matter which one you close first?

    I usually place the stmt.close() code in my finally block, to ensure that the statement gets closed, even if a SQLException occurs during the query/update. The ResultSet does not explicitly have to be closed, ... it is automatically closed when the Statement is closed, or if a new query is run on the same statement.

  • JDBC: Closing Connection does it close statement and resultset

    In my application I am facing ORA-0100 Maximum open cursors exceeded problem. We are executing quite a few queries and stored procedures before we close the connection object. But in few places statements and resultsets are not closed. Can these be a problem? Shouldn't they be automatically closed when the connection is closed?
    We are executing this block of code in a loop.

    in few places statements and
    resultsets are not closed. Can these be a problem?Yes.

Maybe you are looking for

  • Is 10.4.7 required for 10.4.8?

    After I started to download the latest OS update, I noticed on the download page that v. 10.4.7 was listed as a requirement for the update. Since my current OS is 10.4.6 does that mean the update won't work (until I first download 10.4.7)?

  • Queue filling with outgoing spam, how do I stop it?

    My queue has lately filled up with mail intended to go out as mail from [email protected] or [email protected], and the like. I run Wordpress sites on this server and I updated all versions, fixed all folder permissions and changed all passwords. It

  • Russian Bonus Depreciation

    Hello, For the Russian bonus depreciation we have tried to follow the configuration steps according to note 944927 but the configuration entry for the last step (Customizing for Financial Accounting -> Asset Accounting -> Information System -> Countr

  • Java is gone

    I recently noticed that Java is gone from my Mac. How can I get it back? And can someone please check if Java is in the /developer/ folder? I thought I can delete the folder as I don't do softwaredevelopment on my mac and need all the diskspace for a

  • Palm Tungsten E2 and Mac 10.3.9

    I am getting a Palm Tungsten E2. What issues should I be aware of when trying to use it with iSync/OS 10.3.9? I plan on using it to keep my calendar and contacts handy, for the most part. Also, I foresee upgrading to a new computer within 6 months- w