Performanceproblem with WL6.1 JDBC and Oracle

Hi!
I have a big performance-problem using wl6.1, jdbc and oracle.
My Server is sending a Vector with NodeBeans via JDBC to a OracleDB. The answer
comes immediately with the timeout.
Why is the EJB waiting for the timeout?
Is it a problem of configuration?
Thanks
Thomas

Hi Sree,
here I send You the class with the main problem. The call queryDataSet.refresh();
is the timeconsuming part.
We are using WL6.1sp2, Oracle 8.1.7 with classes12. In our environment we can
not use connectionpools.
It comes back with a timeout AND the data. Calling it again immediately it takes
2/3 of the time the timeout is set.
Do You have a fine solution?
Thanks
Thomas
package ppif.db;
import java.rmi.*;
import ppif.bo.*;
import java.util.*;
import com.borland.dx.dataset.*;
import com.borland.dx.sql.dataset.*;
import java.math.*;
public class connector {
     private ppif.mapping.NodeDescriptions nodeDescriptions;
     public connector(ppif.mapping.NodeDescriptions nodeDescriptions) {
          this.nodeDescriptions = nodeDescriptions;
     public connector() {
          this.nodeDescriptions = nodeDescriptions;
     public Vector fetchNodes(ppif.bo.Node filterNode) throws RemoteException {
          String childClassName = null;
          Vector nodeVector = new Vector();
          Node node = null;
          if (nodeDescriptions == null) throw new RemoteException("nodeDescriptions ==
null");
          // childClassName zu gegebenen filterNode ermitteln
          if (filterNode.getClassName().equals("DefaultRoot")) childClassName = "ST";
          if (filterNode.getClassName().equals("PrismaProjectsRoot")) childClassName =
"PrismaProjects";
          if (childClassName == null) throw new RemoteException("Zum übergebenen filterNode
wurde kein chlidClassName gefunden.");
          if (nodeDescriptions.getNodeDescription(childClassName) == null) throw new RemoteException("Für
die ChildClass "+childClassName+" ist kein Mapping definiert.");
          // Vector mit Child-Knoten erzeugen durch DB-Zugriff
          ppif.mapping.NodeDescription nodeDescription = nodeDescriptions.getNodeDescription(childClassName);
Database database = new Database();
ParameterRow parameterRow = null;
Column column = null;
QueryDataSet queryDataSet = new QueryDataSet();
// DB-Connect generieren
database.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor(nodeDescription.dbUrl,
nodeDescription.dbUser, nodeDescription.dbPassword, false, "oracle.jdbc.driver.OracleDriver"));
int queryCount = 0;
// Schleife über alle queries der childKlasse, gemäss Mapping
for (Iterator it = nodeDescription.mappingQueries.iterator(); it.hasNext();
               ppif.mapping.MappingQuery mappingQuery = (ppif.mapping.MappingQuery)it.next();
               String queryString = mappingQuery.getQueryString();
               parameterRow = mappingQuery.getParameterRow();
               // ParameterRow mit Input-Werten füllen
               for (int i=0; i<parameterRow.getColumnCount(); i++) {
                    String columnName = parameterRow.getColumn(i).getColumnName();
                    String filterAttributeName = columnName;
                    Object filterAttributeValue = filterNode.getAttribute(filterAttributeName).getVal1();
                    switch (parameterRow.getColumn(i).getDataType()) {
                         case com.borland.dx.dataset.Variant.BIGDECIMAL:
                              BigDecimal val = (BigDecimal)filterAttributeValue;
                              parameterRow.setBigDecimal(i, val);
                              break;
                         case com.borland.dx.dataset.Variant.STRING:
                              parameterRow.setString(i, (String)filterAttributeValue);
                              break;
                         default:
                              throw new RemoteException("Unbekannter Datentyp");
               // Query generieren
               queryDataSet.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database,
queryString, parameterRow, false, Load.ALL));
               // DB-Verbindung öffnen
               queryDataSet.open();
               // Rolle setzen
               if (nodeDescription.dbRole != null) {
                    java.sql.Statement setRole;
                    String roleName = nodeDescription.dbRole;
                    String rolePwd = nodeDescription.dbRolePassword;
                    try {
                         java.sql.Connection jdbcConnection = database.getJdbcConnection();
                         setRole = jdbcConnection.createStatement();
                         setRole.execute("SET ROLE " + roleName + " IDENTIFIED BY " + rolePwd);
                    } catch (java.sql.SQLException exception) {
                         throw new RemoteException(exception.getMessage());
                    } catch (Exception exception) {
                         throw new RemoteException(exception.getMessage());
               // Query ausführen
               queryDataSet.refresh();
               // Datensätze in Node-Objekte umwandeln
               int columnCount = queryDataSet.getColumnCount();
               String columnArray[];
               columnArray = queryDataSet.getColumnNames(columnCount);
               for(queryDataSet.first(); queryDataSet.inBounds(); queryDataSet.next()) {
                    Node rNode = nodeDescriptions.createNodeInstance(childClassName);
                    // Abfrageergebnissen in eine Attributliste übertragen
                    for (int i=0; i<columnCount; i++) {
                    nodeVector.add(rNode);
               queryCount++;
          return nodeVector;
     public ppif.mapping.NodeDescriptions getNodeDescriptions() {
          return nodeDescriptions;
     public void setNodeDescriptions(ppif.mapping.NodeDescriptions nodeDescriptions)
          this.nodeDescriptions = nodeDescriptions;
"Sree Bodapati" <[email protected]> wrote:
hi Thomas,
please post more detail on what your code is doing. if possible a code
snippet/error messages/thread dump
sree
"Thomas Eberhard" <[email protected]> wrote in message
news:[email protected]...
Hi!
I have a big performance-problem using wl6.1, jdbc and oracle.
My Server is sending a Vector with NodeBeans via JDBC to a OracleDB.
The
answer
comes immediately with the timeout.
Why is the EJB waiting for the timeout?
Is it a problem of configuration?
Thanks
Thomas

Similar Messages

  • Does report2.5 works with srw.run_report and Oracle Apps11.0.3

    Hi,
    I have reports2.5 and using srw,run_report I want to call another report. NOw I have registered this in oracle apps 11.0.3 . Now through oracle apps if I run the main report it has to call the child report (calling via srw.run_report) and the output should be put in the Unix server directory /tmp/
    Please help Ratheesh.
    Iam not sure whether report2.5 works fine with srw.run_report and oracle apps11.0.3

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

  • Oracle.sql.ARRAY incompatible with weblogic.jdbc.vendor.oracle.OracleArray

    Hi,
    I am facing following issue in my one environment. but in other environment same class path is working fine. I have compared all jar and classpath for both weblogic server.
    I am using weblogic 11g.
    27 Mar 2013 15:21:09,507 ERROR XXXServlet:293 - oracle.sql.ARRAY incompatible with weblogic.jdbc.vendor.oracle.OracleArray
    java.lang.ClassCastException: oracle.sql.ARRAY incompatible with weblogic.jdbc.vendor.oracle.OracleArray
    at com.emc.nems.wsd.ui.beans.reports.mpapi.FacilityBeanType.nullSafeGet(FacilityBeanType.java:126)
    at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
    at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2114)
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
    at org.hibernate.loader.Loader.getRow(Loader.java:1230)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
    at org.hibernate.loader.Loader.doQuery(Loader.java:724)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    at org.hibernate.loader.Loader.doList(Loader.java:2232)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
    at org.hibernate.loader.Loader.list(Loader.java:2124)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1723)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)
    at com.emc.nems.oms.dao.hibernate.util.OMSHibBaseDAO.executeNamedQueryWithoutTransaction(Unknown Source)
    at com.emc.nems.wsd.dao.hibernate.reports.mpapi.MpapiReportHibDAO.findMCR020(Unknown Source)
    at com.emc.nems.wsd.ui.handler.reports.ReportsHandler.getMPAPIData(Unknown Source)
    at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.executeReport(XXXServlet.java:1009)
    at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.generateAuditFile(XXXServlet.java:318)
    at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.execute(XXXServlet.java:273)
    at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.doGet(XXXServlet.java:207)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3731)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3695)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2285)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2184)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1459)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Regards,
    Abhishek

    Creating my Oracle connection works fine ... code as follows:
    <i>Context ctxt = getInitialContext();
    DataSource dataSource = (DataSource) ctxt.lookup(poolName);
    Connection conn = dataSource.getConnection();
    OracleConnection oracleConn = (OracleConnection)((WLConnection)conn).getVendorConnection();</i>
    I also have reviewed documentation:
    http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html. In section 'Using OracleStruct Extension Methods' it highlights that
    <i>java.sql.Struct struct =(weblogic.jdbc.vendor.oracle.OracleStruct)(rs.getObject(2));</i>
    None of the documentation actually mentions <b>oracle.sql.STRUCT</b>. For Weblogic to truely provide support for Oracle it needs an easy way of converting to this data type. At present I cannot interact with Oracle APIs until I can create an oracle.sql.STRUCT.

  • Using the Auth pear package with php 4 and oracle

    Hi all.
    I was wondering if anybody out there has had any success (or else) using the Auth Pear package with php 4 and Oracle.
    I'm trying to do just that but can't get it to work.
    I've found lots of examples on the web for mysql but none for oracle...
    Feedback on your experiences with this would be most appreciated.
    Thanks in advance.
    Rob

    Hi cj.
    Thanks for your advice. I came across those documents but discarded them as they didn't deal with the Auth pear package I was intending on using. I didn't want to look at other alternatives as the focus of my project was primarily on migrating existing data from a mysql setup to an oracle setup. And quickly.
    I hadn't found any documentation out there on using Auth with Oracle. All examples available on the web were mysql specific.
    I eventually got round to gutting the code from the package and finding the fix to my problem.
    Just for info, Auth expects by default an auth table containing two fields username and password. That's lowercase table and field names.
    If the table name or field names to be used differ from these then they must be explicitly defined when calling Auth. Doing so resolved my problem.
    My mysql db had all lowercase naming, while my oracle db has all uppercase naming throughout.
    It is important to note that the Auth package uses the table and field names quoted, thus referring to the table and fields in a case sensitive way.
    So for an uppercase table and fields setup the call has to be :
    $options = array(
        'dsn' => "$dsn_for_my_oracledb",
        'table' => 'AUTH',
        'usernamecol' => 'USERNAME',
        'passwordcol' => 'PASSWORD',
        'db_fields' => '*',
    $a = new Auth("DB", $options , "loginFunction");I hope this helps anybody trying to use this package with oracle. It worked great for me.
    Pear Auth package documentation:
    http://www.pear.php.net/manual/en/package.authentication.auth.intro.php
    Regards,
    Robert

  • Oracle10gRAC installation with ASM, SGeRAC and Oracle Clusterware on Ita64

    Hello!
    Does anyone have an installation guide for the configuration: Oracle10gRAC with ASM, SGeRAC and Oracle Clusterware on Itanium?
    Thanks in advance, Mara

    859875 wrote:
    Thanks Fiedi. Thanks a lot for your response.
    Last month I did RAC installation where I need format raw devices using below commands :
    clean all
    create part ext
    create part log
    Is it not required for standalone DB installation with ASM ?
    Basically preparing disk for ASM on RAC or non RAC is the same
    >
    >
    I am able to create 4 logical raw devices (175GB) each. 2 for Data and 2 for DB flash. However I am not able to clean those raw devices with "clean all" command.
    Can you help me ?
    what error did you get?. Try delete the logical partition and recreate it

  • Any kind of integration experience with Weblogic JMS and Oracle AQ?

    Hi,
    In my company I work with java developers who believe in some kind of "holly" database independence I don't understand and as a result my life as a database developer is hell on earth.. Yesterday we again started to discuss, this time where to log, they believe database is slow and prefer logging to filesystem, after some hours finally I could convince them for some operational and reporting needs to use the database and will do this in an asyncronous way whiich they won't get slow. After all I believe the reason for a database is data, this is the place where data lives, and with the correct desing and implementation logging to database would perform better.
    I love Oracle features, and know that we paid a lot for this software, so today I started investigating this promised solution. And quickly I found AQ and JMS topics in the documentation :)
    After this introduction here is my problem; my company use BEA Weblogic as application server and the java guys want AQ to automatically (but of course with some delay) take their JMS log requests into database tables. Does any one have similar application experience, or any kind of integration experience with Weblogic JMS and Oracle AQ?
    Any comments, references, documentation, sample code, url will be most welcomed :)
    Thank you very much!
    Tonguc
    [email protected]
    References I found upto now;
    Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14291/toc.htm
    (Packages; javax.jms & oracle.jms)
    Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
    Part IV
    Using Oracle JMS and Oracle Streams AQPart V describes how to use Oracle JMS and Oracle Streams Advanced Queuing (AQ).
    Chapter 11, "Introducing Oracle JMS"
    Chapter 12, "Oracle JMS Basic Operations"
    Chapter 13, "Oracle JMS Point-to-Point"
    Chapter 14, "Oracle JMS Publish/Subscribe"
    Chapter 15, "Oracle JMS Shared Interfaces"
    Chapter 16, "Oracle JMS Types Examples"
    A Sample Code from Otn
    http://www.oracle.com/technology/sample_code/tech/java/web_services/jmsws/NewsQueueEJB.java.html

    I wouldn't go as far to say Oracle AQ is out-dated today. However, it is indeed a proprietary technology that did not found much main-stream adoption in the earlier years after its introduction. The advent of JMS made it somewhat more useful (or should I say intriguing, because more people are trying to tie it together with other J2EE technologies), but the Oracle's JMS wrapper classes in aqapi.jar were not feature complete for a long while, so using it outside Oracle's application server was painful, if not impossible. I do agree that the info at the dev2dev's JMS newsgroup or in this forum is highly fragmented, as neither Oracle nor BEA provides an official solution to integrate AQ with WebLogic, so people like us have to learn the technology through experimentation and in a piecemeal fashion.
    3 years ago I was literally "playing around" - we had a polling mechanism set up to use triggers to write Oracle data changes into an event table, and had a Java-based daemon to scan that table and publish events as JMS messages to the WebLogic JMS server. This continues to work reliably till today, but I was looking for a solution that has few parts - I wanted to hook up my WebLogic MDB directly to AQ as a foreign JMS provider. Although I was able to get it to work (including XA), there were a few hoops I had to jump through, such as decompiling the Oracle AQjms classes to make them bind to the WebLogic JNDI tree.
    One year after that Diptanshu Parui took what I did a giant step further - he extended the Oracle AQjms classes to allow them to be bound to the WebLogic JNDI tree naturally, and he figured out how to use WebLogic JMS messging bridge to re-send single-threaded AQ JMS messages to clustered JMS queues, which allow concurrent message assumption by multiple instances of MDB's. My impression is that he is using that setup in a production environment.
    I am sure you are aware of it but I would like to make it clear - in order to use AQ as a foreign JMS provider to WebLogic-hosted MDB's, you don't need to update your database to Oracle 10g - Oracle 8i is good enough (although I recommend at least 9i Release 2). It is not the database engine, but rather the aqapi.jar JMS wrapper on top of AQ that matters. I do recommend that you use aqapi.jar from Oracle Application Server 10.0.3 or up for better XA support, among other things. Again, you don't have to replace WebLogic with Oracle AS - you only need a single jar file from it and put it in your WebLogic's classpath. However, I don't know what this means from a licensing point of view if you ever go to production - do you have to pay the full price of OracleAS or OC4J just to use the aqapi.jar?
    In the coming days I will test the latest aqapi.jar to see how much progress Oracle has made in terms of making their J2EE products more spec-compliant :-).
    Hope the above gives you a different perspective.
    Eric

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

  • Problem with Java 5 and Oracle 10g JDBC driver

    Hi All,
    Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
    Thanks,

    sounds like a database problem...
    Are you using a driver version that's supported for your database engine?
    What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
    Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
    It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
    So it's either your database, your driver, your network (dropping packets???), or your application.
    The upgrade may just have exposed something that was already there.

  • Scripted JDBC and Oracle Stored Procedure with in/out Array

    The com.waveset.util.pooledconnection used by Scripted JDBC Adapter extends java.sql.connection.
    I need to pass an Varchar2 Array to the Stored Procedure. I tried using the oracle.sql.ARRAY and oracle.sql.ArrayDescriptor to pass the values, but get a casting exception,as the polledconnection implements only the java.sql.connection and not oracle.sql.connection.
    What are my options of using java.sql.Array with a PL/SQL procedure that takes a varchar2 array as in out parameter?
    Thanks
    Venki

    i ran my procedure which is very similar syndra posted
    create or replace procedure foo(p_dt in date, cv out sys_refcursor) as
    begin
    open cv for
    select e.*
    from table_xyz e
    where start_dt = p_dt;
    end;
    /Here is how is executed
    DECLARE
      P_DT DATE;
      CV SYS_REFCURSOR;
    BEGIN
      P_DT := '10-oct-2005';
      -- CV := NULL;  Modify the code to initialize this parameter
      scott.foo ( P_DT, CV );
      COMMIT;
    END;           
    -- i get PL/SQL procedure successfully complted , But i dont see the result set Or output
    - How do i see the output when i m using refcursor ?? i tried using print , but nothing didnt work
    - Any idea ??
    Thank you!!
    Edited by: user642297 on Jun 24, 2010 1:35 PM

  • Windows 2003 server, Incompatible with Developer 6i and Oracle db 9i???

    Hi,
    Is there some reason for migrating from Developer 6i and Oracle db 9i to 10g when operating system is migrated from Windows 2000 to Windows 2003 server???
    Any document? whitepaper?? thanks

    I am with Mediware Information Systems and we have an opening for a Senior Oracle 6i DBA if you know of anyone who has 5 yrs. of Oracle 6i DBA experience. If so, they can send their resume to [email protected] with the subject line 06-029.
    Thanks!

  • Error with Connection to Oracle with Wallet , JDBC, and UNIX

    Hello - our application has been getting this error periodically while connecting to an oracle database using OCI JDBC drivers.
    caused by: java.sql.SQLException: ORA-28759: failure to open file
    at oracle.jdbc.driver.DatabaseError.throwsSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:681)
    at oracle.jdbc.driver.T2CConennection.logon(T2CConnection.java :362)
    at oracle.jdbc.driver.PhysicalConnection.<init>
    at oracle.jdbc.driver.T2CConnection.<init>
    at oracle.jdbc.driver.T2CDriverExtension.getConnection
    at oracle.jdbc.driver.OracleDriver.connect
    at java.sql.DriverManager.getConnection
    at java.sql.DriverManager.getConnection
    Once we get this error we keep getting it and are unable to get a connection until we restart it. the file it has the issue with is the cwallet.sso, which I figured out by turning on tracing. The file is there and it gets the connection originally - but for some reason periodically we lose access to that file. But when we get the error the file is there and when we restart the process it's perfectly fine.
    The only way we have been able to replicate this error is by create a sameple JAVA app which just keeps opening connections to the database with the wallet without closing the connections. Everytime we hit the 50th connection that error appears and it's unable to get another connection. If we close the connections everytime it's alright.
    It's not a limit on the amount of connections to oracle because we have no limit set. The best explaination we can find is that unix has some sort of limit on how many concurrent accesses to that file can be done within one process. We have been unable to figure out that limit. We tried playing around with the file descriptor limits to see if it gets more or less then 50, but no luck.
    If anyone has any other suggestions it would be greatly appreciated - we are stuck right now.
    Thanks!

    No suggestions?

  • Cann't access oracle 9i with thin jdbc and applet

    Hi..
    I write thin jdbc applet and application programs..
    application programs works well..
    but applet cann't connect...
    error messages below..
    access denied (java.util.PropertyPermission oracle.jserver.version read)
    web server and dbms server are on same machine...
    applet programs is in the demo applet program of oracle's installation folders...
    I hope your comment...
    thanks..

    Hi Hyun,
    This is basically just a guess -- since you didn't provide a lot of information (in my opinion) -- but I assume that "oracle.jserver.version" is some "System" property.
    Due to the security restrictions placed on an applet (and which aren't imposed on an application), an applet cannot access all of the "System" properties -- only some of them (like "java.version", for example). So that's why (I think) your application works, but your applet doesn't.
    There are several workarounds for overcoming an applet's security restrictions -- the most popular (as far as I know) is to "sign" your applet. There are many Internet resources available that explain how to "sign" an applet -- a simple Internet search will be more than enough to get you going (if that's at all relevant to your situation).
    Hope this has helped you.
    Good Luck,
    Avi.

  • Best practice for dealing with Recordsets, JDBC and JSP?

    I've spent the last three years developing web apps using JSP, Struts and Kodo JDO for persistence. All of the content for the apps was created as Java objects using model classes and saved to an Oracle db. Thus, data retrieved from the db was as instances of the model classes and then put into Struts form beans, etc.
    I changed jobs last month and am now having to use Servlets with JDBC to retrieve records from db tables and returning it into Recordsets. Oh, and I can't use Struts in my JSPs either. I'm beginning to think that I had it easy at my previous job but maybe that's just because I was used to it.
    So here are my problems/questions:
    I have two tables with a one to many relationship that I need to retrieve data from, show in a jsp and be able to update eventually.
    So here's what I am doing:
    a) In a servlet, I use a SQL statement to join the tables and retrieve the results into a Recordset.
    b) I created a class with a bunch of String attributes to copy the Recordset data into, one Recordset row per each instance of the bean and then close the Recordset
    c) I then add the beans to an ArrayList and save the ArrayList into the session.
    d) Then, in the JSP, I retrieve the ArrayList from the session and iterate over each bean instance, printing the data out to the jsp. There are some logic statements to determine when not to print redundant data caused by the one to many join.
    e) I have not written the code to update the data yet but was planning on having separate jsps for updating the (one) table and the (many) table.
    Would most of you do something similar? Would you use one SQL statement to retrieve all of the data for display and use logic to avoid printing the redundant part of the data? Or would you have used separate SQL queries, one for each table? Would you have saved the results into something other than an instance of a bean class that represents one record in the RecordSet? Would you have had a bean class with attributes other than Strings - like had a collection attribute to hold the results from the "many" table? The way that I am doing everything just seems so cumbersome and difficult compared to using Struts and JDO before.
    Your help/opinion will be greatly appreciated!

    Would you use one SQL statement to retrieve all of the data for display Yes.
    and use logic to avoid printing the redundant part of the dataNo.
    I believe in minimising the number of queries. If it is a simple one-many join on a db table, then one query is better than one + n queries.
    However I prefer to store the objects in a bean class with attributes other than strings - ie one object, with a collection attribute to hold the related "many" records.
    Does the fact you are not using Struts mean that you have to use scriptlet code? (shudder)
    Or are you using JSTL, or other custom tags?
    How about tools like Ant? Junit testing?
    The way that I am doing everything just seems so cumbersome and difficult
    compared to using Struts and JDO before.Anything different takes adjusting to. Sounds like you know what you're doing for the most part. I agree, in terms of best practices what you have described so far sounds like a step backwards from what you were previously doing.
    However I wouldn't go complaining about it too loudly, too quickly. If you're new on the block theres nothing like making a pain of yourself, and complaining how backwards the work they have done is to put your new workmates' backs up
    Look on it as a challenge. Maybe discuss it quietly with a team leader, to see if they understand how much easier/better/less error prone such approaches can be?
    Struts, cumbersome as it can be, definitely has the advantage of pushing you to follow good MVC practice.
    Good luck,
    evnafets

  • Need help with Thin JDBC connecting Oracle to SQL server.

    I am fairly new to JAVA. We have ORACLE 8.1.7 running on Solaris 8. I have a need to
    periodically extract data from ORACLE DB and transfer it to SQL Server. I am limited to
    moving data from the ORACLE/UNIX environment to SQL Server side.
    From what I have read, Server-side Thin driver should work.
    1) Are there any issues in trying to achieve this with ORACLE running on the UNIX platform?
    2) Will the Server-side Thin driver talk to both the DBs ?
    3) Is it possible to provide some sample code ?
    Thanks in advance,
    Solomon

    Quattro,
    I had complete success in reading from Oracle and writing to SQL Server. First of all let me thank you for all your help. I do have one last request. Its more on optimization than any thing else.
    I was trying to optimize my code by grouping both the connections in one place and to keep my reads and inserts together so that I don't commit at the end of each insert etc. I don't seem to have the scope rules under control yet. Could you suggest how to improve this:
    import java.sql.*;
    public class Test_Combined2 {
    public static void main(String args[]) throws SQLException {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Connect to the database
    // You must put a database name after the @ sign in the connection URL.
    // You can use either the fully specified SQL*net syntax or a short cut
    // syntax as <host>:<port>:<sid>. The example uses the short cut syntax.
    Connection con2 = DriverManager.getConnection ("jdbc:oracle:thin:@Test:1521:PSDEVElOP",
    "SOLOMON","SOL1");
    // Create a Statement
    Statement stmt2 = con2.createStatement ();
    String url = "jdbc:microsoft:sqlserver://INTRADEV:1433;DatabaseName=Measure";
    Connection con;
    String query = "select dataYear, dataMonth, yieldRate from tblYield " ;
    Statement stmt;
    try {
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.print(e.getMessage());
    // Select the ENAME column from the EMP table
    ResultSet rset = stmt2.executeQuery ("select year_start, monthofyear, percent_comp " +
    " from ps_usm_ytd_yield ");
    // Iterate through the result and print the employee names
    while (rset.next ()) {
    System.out.println (rset.getFloat (3));
    int ps_dataYear = rset.getInt(1);
    int ps_dataMonth = rset.getInt(2);
    float ps_yieldRate = rset.getFloat(3);
    try{
    con = DriverManager.getConnection (url, "tmpuser","tmppush");
    stmt = con.createStatement();
    PreparedStatement insertTblYield;
    String insertString = "insert into tblYield " +
    " values(?, ?, ?)";
    //con.setAutoCommit(false);
    insertTblYield = con.prepareStatement(insertString);
    insertTblYield.setInt(1, ps_dataYear);
    insertTblYield.setInt(2, ps_dataMonth);
    insertTblYield.setFloat(3, ps_yieldRate);
    insertTblYield.executeUpdate();
    con.commit();
    //con.setAutoCommit(false);
    /*ResultSet rs = stmt.executeQuery(query);
    System.out.println("dataYear, dataMonth, yieldRate");
    while (rs.next()) {
    int dataYear = rs.getInt(1);
    int dataMonth = rs.getInt(2);
    float yieldRate = rs.getFloat(3);
    System.out.println(" " + dataYear + ", " + dataMonth + ", " + yieldRate);
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.print("SQLException: ");
    System.err.println(ex.getMessage());
    } //while
    stmt2.close();
    con2.close();

  • Question about JDBC and Oracle 10g AL32UTF8

    Hey all,
    Currently I have a Java program that uses lib: ojdbc14.zip. It works fine for our Oracle 10g database, but when we converted our character set to AL32UTF8, our program seems to have stopped working properly. For instance, I grab a count(*), to see how many rows an ID has in a table. Then I take that list and display and count(*) that are greater than 0. Well, my first getString works properly to generate the select count(*) statements for all the tables in the database. But then when I execute those select count(*) I can grab out the number greater than 0. That's column 1. Then the owner name is displayed in column 2. and the table name is displayed in column 3. When I do a getString(2) we only get the first letter (sometimes) of the owner of the table. Same with the table name.
    For instance, before AL32UTF8
    getString(2): SCOTT
    getString(3): PEOPLE
    After
    getString(2): S
    getString(3): P
    Now to open my connection I use:
    static Connection conn;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(connection_string, username, password);
    And to create query I use:
    Statement query_1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    Any help will be greatly appreciated. Thanks
    Sincerely,
    Mel

    orkun wrote:
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
    Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

Maybe you are looking for

  • How to send data from a web dypro application using workflow

    Hi All, I am working on a web dynpro application where the user will enter the header and item details for a FI document to be posted. Once the user enters the data the workflow should initiate and should also send the data across to the approver to

  • OAS 4.0.8 Netscape Applet Error

    Installation: Oracle 8i OAS 4.0.8 Netscape 4.73 Suse Linux 6.4 Patches for Netscape (plugger, nsfix, ....) I try to start the oasmgr using Netscape. When i start the oas manager or the oas utilities, i got the next page on the left side grey and an e

  • Using acrobat 9

    Using acrobat 9 I typically save a real estate PDF form to my desktop. From the desktop I fill the blanks such as client name and address. this function has stopped working. What can i do to fix it?

  • Getting screen field values during runtime

    Hi everyone, In debugger for dynamically getting the screen field values we will be using  (SAPLMGMW)CALP-ENDPA this format to get the value of the field CALP-ENDPA. But this will give only for fields.My question is that how to get the screen field l

  • Pre8 jerky playback in preview window AVCHD files

    I am working on a project in Pre8 that uses AVCHD files from a Canon HD camcorder (*.mts files).  I can add files to the timeline, but editing is very difficult because the playback is very jerky in the preview window. I suspect it may be my machine,