Weblogic creates new connection xhen using dataset

Hi,
I use non JTS datasources in order to access to connectionpool. Each
time I request Weblogic, it recreates new connections. Of course quickly
the max connection number allowed is reached!
I used JTS datasources before and all worked fine!
Can someone help me understanding this?
Thx, Piot

ok Thx.
Slava Imeshev wrote:
Hi Piot,
There is a hidden bug in your code. Briefly, when you use
jts, it uses the same connection within the transaction.
So when you use non-jts DS, you always get a new connection
from the DS. Nevertheless, the your code should be adjusted to the
following approach:
1. get a connection from a DS
2. use the connection
3. close result sets
4. close [prepared] statements
5. close the connection
Obviously, your code doesn't follow these guidelines.
Regards,
Slava Imeshev
"Piot" <[email protected]> wrote in message
news:[email protected]...
weblogic.jdbc.connectionPool.pool1=\
url=jdbc:inetora:<ip>:1521:<db1>,\
driver=com.inet.ora.OraDriver,\
loginDelaySecs=1,\
initialCapacity=2,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshTestMinutes=1,\
testTable=T1,\
props=user=User;password=Password\
I use a class PollAccess managing the connection access and release:
public PoolAccess(String poolName) {
InitialContext initCtx = null;
try {
initCtx = new InitialContext();
dataSource = (javax.sql.DataSource) initCtx.lookup(poolName);
catch (NamingException ne) {
System.out.println(ne.toString());
throw new EJBException(ne);
public Connection getConnection() throws SQLException {
// return connection from the DataSource
return dataSource.getConnection();
public void releaseConnection(Statement st) throws SQLException {
try {
if (st != null) {
st.close();
catch (Exception e) {
System.out.println("Error closing Statement: " + e);
try {
if (this.getConnection() != null) {
this.getConnection().close();
catch (Exception e) {
System.out.println("Error closing Connection: " + e);
when requesting :
Statement st=DatabaseAccess.getConnection().createStatement();
ResultSet rs = st.executeQuery(query.toString().toUpperCase());
while (rs.next()) {
some stuff;
rs.close();
DatabaseAccess.releaseConnection(st);
That's all!
Slava Imeshev wrote:
Could you give us definitions of your pools
and code snippets?
Regards,
Slava Imeshev
"Piot" <[email protected]> wrote in message
news:[email protected]...
1) The pool has 10 connection. I only use one connection...
2) that's exactly what I do. After each request I call close().
What is strange is that when I use the same code with JTS it works
fine...
Slava Imeshev wrote:
Hi,
I see two variants here. First, size of your pool is too small to
serve all requests. Second, you don't release connections
borrowed from the pool. All connections which are not used
should be explicitely returned to the pool by calling close();
"Stéphane Piotrowski" <[email protected]> wrote in message
news:[email protected]...
Hi,
I use non JTS datasources in order to access to connectionpool. Each
time I request Weblogic, it recreates new connections. Of course
quickly
the max connection number allowed is reached!
I used JTS datasources before and all worked fine!
Can someone help me understanding this?
Thx, Piot

Similar Messages

  • Everytime when i connect 3g internet with my laptop using USB (Windows 7) it creats new connection trailing network1, network2, network3.........

    Everytime when i connect 3g internet with my laptop using USB (Windows 7) it creats new connection trailing network1, network2, network3.........
    It does not recognise my old connection.
    Same case with wifi connection as well.
    Also after updating new IOS-5, whenever i make USB connection it does not display my name under my computer.
    But before it use to display my name now it is coming as Apple I-phone.
    Anyone who can help on this, how to get it resolved.
    - I have update my phone with backup (OLD version of IOS) but issue still presists.
    This is the same issue somone mention on below.
    http://www.sevenforums.com/network-sharing/193123-iphone-network-location-doesnt -save-when-disconnected.html
    Kind Regards
    @ru..

    If the message that is displaying is "Network connection timed out", disable any Anti-Virus or Firewall software on the comptuer or check with the company that supports the product on how to modify it to allow iTunes to connect to the Internet.

  • CR closes when using "create new connection"

    Hi,
    Crystal Reports 2008.
    After opening a CR 10 report once, I can't create new blank reports. If I use "create new connection" to add a data source the program shuts down. No crash dump or anything.
    Helpdesk could reproduce error but couldn't solve the problem.
    To re-install my system after format costs a lot of time (and therefore money). So I want to try to solve my problem first by my self.
    Question: does freeware software exist to trace the behavior of an EXE file?
    I'd like to figure out where it goes wrong.
    Manually removing CR and reinstalling didn't help either. Nothing helps. FP 1.7 installed. Still the same problem..

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with your directly.
    Try updating the .NET Framework

  • SBO0001 error DBD:ORA12154 error while creating new connection

    Dear All,
    I have installed XIR3 on a windows 64 bit with oracle 10g R2 client.
    The CMS is up and running and I am able to connect to the infoview and view the lsit of all the migrated objects from BOXIR2.
    But, when I am trying to create a new connection for the universe or trying to execute the existing reports i am getting the following error.
    (i.e I guess BO is unable to connect to DB)
    *SBO0001 error DBD:ORA12154 error while creating new connection
    I tried various solution from BOB but still could not solve this. Please anyone suggest few tips regarding this case
    Business objects: CMS is running and able to connect to infoview and able to log on to CMC
    Database client: Able to log on to DB using sqlplus and tnsping is working.
    the details of the software are as follows
    *BO Server configuration
    OS: Windows Server 2008 R2 64 bit
    Business Objects XI R3 3.0
    Oracle client 10gR2 32 bit
    *Database server configuration
    Oracle 11g R2 64 bit
    Thanks,
    Mike

    Mike :
    I am having a similar issue with the BOE and Oracle.
    Can you please provide details of which Oracle client you ended-up using..?
    32-bit or 64-bit...?
    Oracle client version...?
    Specific client patches applied..?
    Thanks,
    Mark

  • How to create new connection in directory service manager

    Hello,
    I have upgraded OID from 10.1.4.3 to 11.1.1.6. after upgrade i used below url to connect directory service manager.
    http://hosname:7005/odsm
    trying to create new connection but not able to connect getting below error
    "Bind Failed. Host='dog1044' Details : dog1044:3060"
    using below value while creating new connection
    select OID
    Name : 11goid
    server : oidserver01
    port : 3060
    username : cn=orcladmin
    Thanks
    Karthick K

    Karthick,
    Or try to bind it from your ODSM server, eg: ldapbind -h oidserver01 -p 3060 -D "cn=orcladmin" -w xpto
    I hope this helps,
    Thiago Leoncil.

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • Creating new site collection using wsp template fails

    Hi all,
    I'm creating new site collections using a wsp solution generated by "save as template".
    For site collection creation I select "<Select template later>" then I upload the wsp solution.
    Everything worked until last month, now after CU installation (agoust 2014) I get an error:
    "List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user."
    Does anyone know how to solve it?
    Thanks 
    Maurizio

    ULS contains a lot of those errors:
    System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>, 
    StackTrace:
         in Microsoft.SharePoint.SPWeb.GetList(String strUrl)
         in Microsoft.SharePoint.SPWeb.TryGetListByUrl(String url)
         in Microsoft.SharePoint.SPFieldElement.PerformFixUpIfLookUpField(Guid fieldId, XmlNode xmlNodeOfAField, SPWeb web)
         in Microsoft.SharePoint.SPFieldElement.ElementActivated(SPFeaturePropertyCollection props, SPSqlCommand sqlcmdAppendOnly, SPWebApplication webApp, SPSite site, SPWeb webNull, Boolean fForce)
         in Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)
         in Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean
    fMarkOnly, Boolean fIgnoreMissing, SPFeatureDefinitionScope featdefScope)
         in Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedCore(SPSite site, SPWeb web, String sFeatures, Boolean fMarkOnly, Boolean fIgnoreMissing)
         in Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass7.<EnsureFeaturesActivatedAtWeb>b__6()
         in Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
         in Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtWeb(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sFeatures, Boolean fIgnoreMissing)
         in Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String&
    bstrWebTemplate, Int32& plWebTemplateId)
         in Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String&
    bstrWebTemplate, Int32& plWebTemplateId)
         in Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate,
    Int32& plWebTemplateId)
         in Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1&
    featureDependencyErrors)
         in Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors)
         in Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)

  • Bug - unable to create new connections on SQL Developer 4.0.0.13

    Upgraded to SQL Developer 4.0 and we are unable to create new connections in the Connections pane on the left hand side.
    Clciking the green plus button and right clicking Connections and 'New Connection' doesn't bring up the New Database Connection dialog box.

    Sounds like an 'install' problem.
    Can you extract the zip to a new directory and try again? You did extract v4 to a fresh directory, yes?

  • Crystal Report 2011 SP4 APPCrash on Create New Connection

    Hi Guys!
    I've experience a problem with Crystal Reports 2011 for SAP B1 9.0 PL11. CR crashes everytime I create new connection folder.
    I'm running Windows 8.1 x64.

    Hi Pieterjan,
    CR 2013 for B1 can be downloaded from Software Download Center : https://websmp106.sap-ag.de/support
    Choose SAP Business One from menu "Software Downloads" > expand from left side "SAP Business One Products" > Installations > SAP CRYSTAL REPORTS FOR B1   > CRYSTAL REPORTS 2013 FOR B1
    Just keep in mind that, to make CR preview in B1 works fine, please check if correct CR runtime (.NET 32bit or 64bit) is installed. 32bit client will install 32 bit runtime automatically and same for 64 bit.
    To make SAP Business One connection and Add ins menu works, please make sure correct version of Integration Package together with correct BOE runtime are installed. Install Integration Package will install BOE runtime automatically. ( We only need 32bit BOE runtime in CR for B1). Of course you can also install them seperately.
    We have relevant  Note 1815476 to explain this.
    Hope this clarifies some points.
    Thanks,
    Maggie An
    SAP Business One Global Support

  • How to create the connection pool using jdbc20 driver?

    Hi all,
    My configuration is WL4.5 SP5 + jdk1.2.2+WinNT+ Oracle thin driver
    8.1.6.
    It is creating the connections with weblogic.jdbc.pool.Driver, whereas i
    want the connections in the pool to be created with jdbc20 driver. This
    how my pool definition is defined.
    weblogic.jdbc.connectionPool.PoolName=\
    url=jdbc:oracle:thin:@<IP address>:<Instance>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=40,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=5,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=XXXX;password=XXXX
    The reason is I want to use BLOB's. I have a message posted in jdbc news
    group with the exception i got. But since this more of a environement
    issue i am posting it here.
    Any help is appreciated,
    Thanks
    John

    Here is the correct pool definition.
    ################JDBC20 Driver#########################
    weblogic.jdbc.connectionPool.jdbc20Pool=\
    url=jdbc20:weblogic:oracle,\
    driver=weblogic.jdbc20.oci.Driver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=1,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=SCOTT;password=tiger;server=goldengate
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.jdbc20Pool=guest
    Hope this helps,
    --Kumar
    Kuppuswamy Seshadhri wrote:
    I think you are missing the port number.
    A working example,
    Ensuring
    - TSNAMES is setup and the service is running
    - set ORACLE_HOME variable in setenv.cmd
    weblogic.jdbc.connectionPool.theOraclePool=\
    url=jdbc:oracle:thin:@IPADRESS:1521:orcl,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=10,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=XXXX;password=XXXX;
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.theOraclePool=everyone
    Kuppu
    "John Galt" <[email protected]> wrote in message
    news:[email protected]..
    Hi all,
    My configuration is WL4.5 SP5 + jdk1.2.2+WinNT+ Oracle thin driver
    8.1.6.
    It is creating the connections with weblogic.jdbc.pool.Driver, whereas i
    want the connections in the pool to be created with jdbc20 driver. This
    how my pool definition is defined.
    weblogic.jdbc.connectionPool.PoolName=\
    url=jdbc:oracle:thin:@<IP address>:<Instance>,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=1,\
    maxCapacity=40,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=5,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=XXXX;password=XXXX
    The reason is I want to use BLOB's. I have a message posted in jdbc news
    group with the exception i got. But since this more of a environement
    issue i am posting it here.
    Any help is appreciated,
    Thanks
    John

  • Switching ABAP debugger on/off without creating new connection

    Is it possible to switch the ABAP debugger on/off without creating a new connection? It seems that the only way to enable the debugger is when the connection is first opened.

    Hello,
    No, it is not possible.
    However, if you have SAP release 620 or higher, you can use a new ABAP debugging variant, so-called "external debugging", to debug RFC/HTTP(SOAP) calls even without setting debugging option in connection string.
    You can enable "external debugging" in SE37 by selecting
    Utilities->Settings->Debugging->Activate external...
    For details about "external debugging", please refer to ABAP workbench documentation.
    Regards,
    Guangwei

  • Step 20 - Create new connection for NORTHWIND user, Northwind - Migrated

    Hello,
    I am migrating the Northwind database from Access to Oracle, and I am following the directions, but when I get to step 20, create a new connection for the Northwind User, Northwind - Migrated, I cannot create the connection. After running the converted model script that was generated by the workbench -- I don't see the Northwind - Migrated database. So how can I create a connection to it?
    Also -- after I ran the script, I did not see any messages in the log showing I ran the script, but the status bar at the bottom of the tool said script finished..... I am confused.
    Thanks!
    Jeff

    Anyone have this same issue trying to migrate the Northwind database to access using migration workbench?
    Thanks so much,
    Jeff

  • Creating new Connections/Statements/ResultSets

    Hi,
    RDMS = Sybase
    JDBC = Jconnect 5.5 obtained from Sybase website
    Purpose:
    To loop through the program below with different queries and produce
    a resultset.
    Details:
    I have a program that creates a query stores it in a static setter.
    The program calls the program below. The program below:
    (1) obtains the query from a static getter
    (2) creates a connection/statement/resultset
    (3) returns to the calling program where
    (a) resultset is displayed
    (b) calls close() in the program below which closes the
    connection/statement/resultset
    Problem:
    I thought that creating a new connection/statement/resultset
    each time the program below is called would work.
    The program below returns the correct resultset for the first query
    but when called with a different query returns the first resultset that
    was generated.
    Question:
    Do I have to use different objects for the connection/statement/resultset each time the program is called
    even though the existing connection/statement/resultset is closed
    before a new connection/statement/resultset is created ?
    if yes,
    I don't how to change the object for connection/statement/resultset
    dynamically each time the program below is called.
    Any assistance provided would be greatly appreciated !!
    Thanks for your time,
    YAM-SSM
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         public class DbConnect implements Runnable {     
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password =     EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public static String query = EcmUtlLogicals.getQuery();
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;
                 public static int SybaseReturnCode; 
              void Connect() {               
                        try {                              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                           conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);     
                   catch (SQLException exc) {
                        sqlstate = exc.getSQLState();          
                        message = exc.getMessage();
                        SybaseReturnCode = exc.getErrorCode();
                   catch (InstantiationException iste) {
                   catch (ClassNotFoundException cnfe) {
                   catch (IllegalAccessException iae) {
                   if (queryThread == null) {
                        queryThread = new Thread(this, "Query");
                        queryThread.start();               
                   } // close if                 
              } // close Connect method
              public void run() {               
                  try {                             
                                     stmt = DbConnect.conn.createStatement();                 
                        rs = stmt.executeQuery(query); 
                        queryThread = null;     
                   } // close try
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                                    queryThread = null;
                            } // close catch
                            catch (java.lang.Exception ex) {
                          ex.printStackTrace ();
                   } // close catch
                   queryThreadDone = "true";
              } // close run method
              static void close() {     
                   try {
                         if ( rs != null){
                              rs.close();          
                         if ( stmt != null){
                              stmt.close();
                         if ( conn !=  null){
                              conn.close();     
                   } // close try
                   catch (SQLException error){     
              }// close close()          
    } // close DbConnect class     

    Then I'd say you should write a QueryThread object
    that extends Thread and takes an SQL statement in its
    constructor. In the run method, create a connection,
    statement, and result set to run that query, close
    them in reverse order when you're done, and provide a
    getter to give access to the results. Don't return a
    reference to the result set; put the results in a data
    structure or CachedRowSet and close out the result set
    as soon as you're done with it. ResultSets are
    database cursors, which are scarce resources.
    With this design, every thread has its own connection
    and resources. They can't conflict with each other. -
    MODHi MOD,
    I finished coding a QueryThread object exactly as you instructed
    and IT WORKS !!!!! The calling program calls QueryThread by:
    QueryThread qt = new QueryThread(query);
    qt.start();
    QueryThread code:
    package ecmutl;
         import java.awt.*;
         import java.sql.*;
         import java.util.List;
         import java.util.*;
         public class QueryThread extends Thread {
              public static Thread queryThread = null;     
              public static Font        fntF;
              public static Connection conn = null;
              public static ResultSet rs = null;
              public static Statement stmt = null;      
              public static String nodename = EcmUtlLogicals.getNodeName();
              public static String password = EcmUtlLogicals.getPassword();
              public String newline = "\n";
              public static String sqlstate;
              public static String message;
              public static String queryThreadDone = "false";
              public String query;
              public static String dbname = EcmUtlLogicals.dbname;
              public static String username = EcmUtlLogicals.username;     
              public static int SybaseReturnCode;
              public QueryThread(String query) {
                   this.query = query;                 
              public void run() {               
                   try {              
                        Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
                        conn = DriverManager.getConnection("jdbc:sybase:Tds:"+nodename+"/"+dbname,username,password);                                                                                                         
                        stmt = conn.createStatement();                 
                        rs = stmt.executeQuery(query);
                        List resultSetArray = new LinkedList();
                        resultSetArray = new ArrayList(); 
                        if (rs != null) {     
                             int i;
                             ResultSetMetaData rsmd = rs.getMetaData ();
                             int numCols = rsmd.getColumnCount ();
                             for (i=1; i<=numCols; i++) {
                                  if (i > 1) resultSetArray.add(",");
                                  resultSetArray.add(rsmd.getColumnLabel(i));
                             resultSetArray.add(newline);
                             boolean more = rs.next ();
                             while (more) {
                                  for (i=1; i<=numCols; i++) {
                                       if (i > 1) resultSetArray.add(",");
                                       resultSetArray.add(rs.getString(i)); 
                                  resultSetArray.add(newline);
                                  more = rs.next ();
                             EcmUtlLogicals.setResultSetArray(resultSetArray);
                             if (rs != null){
                                  rs.close();
                             if (stmt != null) {
                                  stmt.close();
                             if (conn != null) {
                                  conn.close();
                        queryThread = null;                                            
                   catch (SQLException sqlex) {
                        sqlstate = sqlex.getSQLState();                     
                        message = sqlex.getMessage();
                        SybaseReturnCode = sqlex.getErrorCode();
                        queryThread = null;
                   catch (java.lang.Exception ex) {
                                     ex.printStackTrace ();
                   queryThreadDone = "true";
         }I have only be using Java for three months. Sometimes one needs a teacher to go along with the APIs.
    Thanks for your patience/help/time
    YAM-SSM

  • Having trouble creating new connection in SQLDeveloper

    When I try to create a new connection in SQLDeveloper, I get the following message:
    Status : Failure -Test failed: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The username and password are the same as the ones I use to connect to sqlplus, right? I am a complete newb to sql, so I would really appreciate if someone could provide a step-by-step solution.

    C:\Users\Admin>lsnrctl
    LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 26-APR-2013 21:00
    :01
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Welcome to LSNRCTL, type "help" for information.
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
    ction
    Start Date 26-APR-2013 17:55:47
    Uptime 0 days 3 hr. 4 min. 19 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\app\Admin\product\11.2.0\dbhome_2\network\admin\lis
    tener.ora
    Listener Log File c:\app\admin\diag\tnslsnr\Admin-PC\listener\alert\log.
    xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Admin-PC)(PORT=1522)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl.gateway.2wire.net" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.gateway.2wire.net" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL> service
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "orcl.gateway.2wire.net" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0 state:ready
    LOCAL SERVER
    Service "orclXDB.gateway.2wire.net" has 1 instance(s).
    Instance "orcl", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1022 state:ready
    DISPATCHER <machine: ADMIN-PC, pid: 4496>
    (ADDRESS=(PROTOCOL=tcp)(HOST=Admin-PC)(PORT=49224))
    The command completed successfully
    LSNRCTL>

  • CRXI Shuts down when clicking on Create New Connection

    I have been working with both Crystal 8.5 and XI on my system together for a couple of years and have had no problems.  I've been working primarily in 8.5 for the last several months and only needed to view a few reports in XI (without problem).  Now I am trying to create a new connection in XI (version 11.0.0.1282) and it shuts down the Designer completely without any error message.  I can't find the old knowledgebase that used to be on the Crystal Decisions website so I thought I would post here to see if anyone has heard of this issue.
    Other mitigating factors may include VS2008 Pro installed on system in the last few months but since then I have created a new report in XI and 8.5 and run them in VB2008 with the Report Viewer as a test of a new program I want to build.  That was just before Christmas.
    I am probably going to have to reinstall but I am not sure if I have the latest version updates here.  Is the above version the latest?  And if not, where can I download the updates?
    TIA rasinc

    NTDLL!RTLDISPATCHEXCEPTION9In crw32__PID__5876__Date__01_11_2010__Time_10_50_54PM__360__Second_Chance_Exception_C0000005.dmp the assembly instruction at ntdll!RtlDispatchException9 in C:WINDOWSsystem32
    tdll.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to write to memory location 0x00030ffc on thread 0
    Module Information
    Image Name: C:WINDOWSsystem32
    tdll.dll                             Symbol Type:  PDB
    Base address: 0x7c900000                                                       Time Stamp:  Wed Aug 04 03:56:36 2004 
    Checksum: 0x000af2f7                                                              Comments:  
    COM DLL: False                                                                          Company Name:  Microsoft Corporation
    ISAPIExtension: False                                                                 File Description:  NT Layer DLL
    ISAPIFilter: False                                                                         File Version:  5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
    Managed DLL: False                                                                   Internal Name:  ntdll.dll
    VB DLL: False                                                                             Legal Copyright:  © Microsoft Corporation. All rights reserved.
    Loaded Image Name:  ntdll.dll                                                      Legal Trademarks:  
    Mapped Image Name:                                                                 Original filename:  ntdll.dll
    Module name:  ntdll                                                                     Private Build:  
    Single Threaded:  False                                                              Product Name:  Microsoft® Windows® Operating System
    Module Size:  704.00 KBytes                                                      Product Version:  5.1.2600.2180
    Symbol File Name:  c:symcache
    tdll.pdb36515FB5D04345E491F672FA2E2878C02
    tdll.pdb   Special Build:  &

Maybe you are looking for

  • Dunning email and print both at a time

    Hi all, My client need to send Dunning document as email to the customer, at the same time they want to generate printout also for the same. I have successfully send an email to customer email address. But i am unable to generate print out for the sa

  • Microsoft Date and Time Picker Control 6.0 (SP6) errors

    One of our functioning VBA projects in Outlook 2010, running under Windows 7 Professional (64-bit), unexpectedly stopped functioning a few months ago. When running the VBA macro we started receiving the compile error message: "Object library invalid

  • I just got iTunes Match and I would like to know if downloading my songs from the cloud uses cellular data?

    I just got iTunes Match and would like to know if downloading my songs from the cloud uses cellular data if I am not able to use wifi?

  • Return code from ABAP program in process chain?

    Hi, I have situation where I want to run some little part of my process chain only on mondays. So I am thinking of writing a little bit of ABAP that checks if is monday today. If it is, then return true, and if not return false. Then I want to branch

  • Menubar Sampe Issue on IE6

    Thanks for great framework, Spry Team! I noticed some issue on menu bar sample. Following sample works ok with FF, IE7 bt not for IE6. Problem is alignment of sub level list is not inherited from top level. Hope this will be fixed in next release...