Problem with executeQuery()

Hello all,
I've the following code in my JSP. I use Apache Tomcat 6.0 along with MySQL. Problem is i'm unable to execute the following query. The page goes to a wait that is the apache takes almost 99% of the CPU time and there by continues with displayin wither error or the page. I wonder that same code works for another table name "mcq" whose table description is same as that of table "physics_mcq". Plz help me out...... The code is....
rst=stmt.executeQuery("select max(no) from physics_mcq");
rst.next();
nt max=rst.getInt("max(no)");
With regards,
Kiran

Hey Noorul
Even the followin code doesnt work. But as i said before it works for other table name....
rst=stmt.executeQuery("select * from physics_mcq");
while(rst.next())
          int t_qno=rst.getInt("no");
          String t_ans=rst.getString("ans");
          q_map[t_qno]=t_qno;
          ans_list[t_qno]=t_ans;
     }

Similar Messages

  • Migration 9.0.3.3 - 9.0.4.0 : Problem with executeQuery()

    I have a problem with the viewObject.executeQuery() method.
    I have a viewObject "Response" with following SQL :
    SELECT response.target_id,
    response.survey_user_id,
    response.question_id,
    response.question_option_pos,
    response.response responsetxt
    FROM response
    WHERE response.target_id = :1
    AND response.survey_user_id = :2
    AND response.question_id = :3
    The I have following class :
    package ch.xxx.survey.webclient;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.domain.Number;
    import oracle.jbo.Row;
    import oracle.jbo.client.Configuration;
    import java.sql.SQLException;
    import ch.xxx.survey.model.services.common.*;
    import ch.xxx.survey.model.viewobjects.*;
    public class DataManipulation {
    ApplicationModule applicationModule;
    public DataManipulation(ApplicationModule am) {
    applicationModule = am;
    public void insertUpdateResponse(Number targetId, Number surveyUserId, Number questionId, Number questionOptionPos, String response) {
    Number localQuestionOptionPos = questionOptionPos;
    String localResponse = response;
    //Search the question renderer
    ViewObject voQuestion = applicationModule.findViewObject("Question");
    voQuestion.setWhereClauseParam(0, questionId);
    voQuestion.executeQuery();
    String qRenderer = voQuestion.first().getAttribute("QuestionRendererId").toString();
    ViewObject voResponse = applicationModule.findViewObject("Response");
    //Search if the response already exists
    System.out.println("SEARCH : " + targetId + "/" + surveyUserId + "/" + questionId);
    voResponse.setWhereClauseParam(0, targetId);
    voResponse.setWhereClauseParam(1, surveyUserId);
    voResponse.setWhereClauseParam(2, questionId);
    voResponse.executeQuery();
    if (voResponse.getRowCount() == 1) {
    System.out.println("UPDATE TABLE");
    ClientResponseRowImpl row = (ClientResponseRowImpl) voResponse.next();
    System.out.print(row.getTargetId().toString());
    System.out.print(" / " + row.getSurveyUserId().toString());
    System.out.print(" / " + row.getQuestionId().toString());
    System.out.println(" / " + row.getQuestionOptionPos().toString());
    row.setQuestionOptionPos(localQuestionOptionPos);
    row.setResponseTxt(localResponse);
    row.getResponse().validateQuestion();
    } else {
    System.out.println("INSERT TABLE");
    ClientResponseRowImpl row = (ClientResponseRowImpl) voResponse.createRow();
    System.out.print("targetID=" + targetId);
    row.setTargetId(targetId);
    System.out.print(" / surveyUserId=" + surveyUserId);
    row.setSurveyUserId(surveyUserId);
    System.out.print(" / questionId=" + questionId);
    row.setQuestionId(questionId);
    System.out.print(" / questionOptionPos=" + localQuestionOptionPos);
    if (localQuestionOptionPos != null)
    row.setQuestionOptionPos(localQuestionOptionPos);
    System.out.println(" / response=" + localResponse);
    row.setResponseTxt(localResponse);
    voResponse.insertRow(row);
    row.getResponse().validateQuestion();
    public static void main(String[] args)
    ApplicationModule am = Configuration.createRootApplicationModule("ch.xxx.survey.model.services.WebClientModule", "WebClientModuleLocal");
    DataManipulation aDataManipulation = new DataManipulation(am);
    try {
    aDataManipulation.insertUpdateResponse(new Number("1"),
    new Number("1135"),
    new Number("144"),
    new Number("0"),
    "Yves");
    aDataManipulation.insertUpdateResponse(new Number("0"),
    new Number("1"),
    new Number("2"),
    new Number("3"),
    "xx");
    } catch (SQLException e) {
    e.printStackTrace();
    I run the main() method on JDeveloper 9.0.3.3 and all is perfect. The two "insertUpdateResponse" make an Insert.
    I run the same code on JDeveloper 9.0.4.0 and the result is wrong. The first "insertUpdateResponse" make an Insert and the second make an Update !!!
    The seconde executeQuery() find always one record (the first inserted record).
    The output is
    SEARCH : 1/1135/144
    INSERT TABLE
    targetID=1 / surveyUserId=1135 / questionId=144 / questionOptionPos=0 / response=Yves
    SEARCH :0/1/2
    UPDATE TABLE
    1 / 1135 / 144 / 0
    Any Idees ?
    Thanks Yves

    I'd suggest logging a TAR with Metalink so support can triage your testcase and try to get to the bottom of what's causing it. We're not aware of any upward compatibility issues at this time, other than the change in default behavior of the jbo.viewlink.consistent property from FALSE that it was in 9.0.3.3 to DEFAULT that it is in 9.0.4.
    The DEFAULT mode in 9.0.4.0 has viewlink consistency default to TRUE for views with a single non-reference entity usages, and FALSE for view objects with two or more non-reference entity usages.
    But if setting this setting back to false had no impact on your testcase, it must be something else that needs diagnosing.

  • Problem with executeQuery statement

    Hi all,
    I have one connectivity program, in which in the code shown below,
    ResultSet rs = stmt.executeQuery(" ");within double quotes I gave a sql query, which is very big, so I gave it in multiline but it is not accepting. its showing error...please help me in this...
    Thanks in advance

    Like this I gave,
    public static void certificationDetails()               //User Defined Method for creating a table, by getting details  from  database
                        System.out.println("inside main");
                        Connection connection = null;
                        try
                             // Load the JDBC driver
                             String driverName = "org.gjt.mm.mysql.Driver";               // MySQL MM JDBC driver
                             Class.forName(driverName);
                             System.out.println("driver loaded");
                             // Create a connection to the database
                             String serverName = "localhost";
                             String mydatabase = "dltrg";
                             String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
                             String username = "root";
                             String password = "";
                             connection = DriverManager.getConnection(url, username, password);
                             System.out.println("Connection Successful");
                             Statement     stmt = connection.createStatement();
                             ResultSet rs = stmt.executeQuery("SELECT  TEMP1.EMPLOYEE_NAME     EMPLOYEE_NAME1,"+
                      "TEMP1.LINE                    LINE1,"+
                      "TEMP1.COURSE_NAME     COURSE_NAME1,"+
                      "TEMP1.T_DATE               TEMP_DATE,"+
                      "TEMP1.SCORE               THEORY_SCORE,"+
                      "TEMP1.RESULT               THEORY_RESULT,"+
                      "TEMP1.FLAG               THEORY_FLAG,"+
                      "TEMP1.TH_DATE               THEORY_DATE,"+
                      "PRACTICAL.SCORE          PRACTICAL_SCORE,"+
                      "PRACTICAL.RESULT          PRACTICAL_RESULT,"+
                      "PRACTICAL.FLAG          PRACTICAL_FLAG,"+
                      "PRACTICAL.P_DATE          PRACTICAL_DATE"+
    "FROM" +
                 "( SELECT TEMP.EMPLOYEE_NAME, TEMP.LINE, TEMP.COURSE_NAME, TEMP.DATE T_DATE, TEMP.C_ID, TEMP.E_ID,THEORY.SCORE, THEORY.RESULT, THEORY.FLAG, THEORY.DATE TH_DATE "+
                    "FROM"+
                                "( SELECT T.EMPLOYEE_NAME,"+
                                                   "T.LINE,"+
                                                   "T.COURSE_NAME,"+
                                                   "T.DATE,"+
                                                   "T.C_ID,"+
                                                   "T.E_ID"+
                                   "FROM TEMPORARY_MASTER T"+
                                ")  TEMP"+
                                "LEFT OUTER JOIN"+
                                "( SELECT T1.SCORE,"+
                                                   "T1.RESULT,"+
                                                   "T1.DATE,"+
                                                   "T1.FLAG,"+
                                                   "T1.C_ID,"+
                                                   "T1.E_ID,"+
                                                   "T1.LINE"+
                                  "FROM THEORY_MASTER T1"+
                                  "WHERE FLAG = 'Test'"+
                               ") THEORY"+
                               "ON ( TEMP.C_ID = THEORY.C_ID AND TEMP.E_ID = THEORY.E_ID AND TEMP.LINE = THEORY.LINE )"+
                 ") TEMP1"+
                 "LEFT OUTER JOIN"+
                 "( SELECT T2.E_ID,"+
                                    "T2.C_ID,"+
                                    "T2.LINE,"+
                                    "T2.DATE P_DATE,"+
                                    "T2.SCORE,"+
                                    "T2.RESULT,"+
                                    "T2.FLAG"+
                   "FROM PRACTICAL_MASTER T2"+
                   "WHERE FLAG = 'Test'"+
                ") PRACTICAL"+
                "ON ( TEMP1.C_ID = PRACTICAL.C_ID AND TEMP1.E_ID = PRACTICAL.E_ID AND TEMP1.LINE = PRACTICAL.LINE )");it is showing SQL exception like......
    java.sql.SQLException: Syntax error or access violation message from server:
    "You have an error in your SQL syntax;
    check the manual that corresponds to your My SQL server version for the right syntax to use near
    '( SELECT TEMP.EMPLOYEE_NAME, TEMP.LINE, TEMP.COURSE_NAME, TEMP.DATE T_DATE, TEMP' at line 1"

  • Problem with Java EE 5 and derby

    have a problem with the database connectivity in the examples of Java EE 5, I have the NETBEANS 5.5 with Sun Java System Application Server Platform Edition 9, and with the derby database.
    I just try to run my application, but there is not connectivity with the database. I review all the configurations and step to follow to run the examples, and does not even work.
    The server.log, show this:
    [#|2006-11-12T17:12:20.781+0000|WARNING|sun-appserver-pe9.0|oracle.toplink.essentials.file:/C:/as9rrtutorial/jsstutorials/examples/web/bookstore2/build/web/WEB-INF/lib/bookstore.jar-book|_ThreadID=14;_ThreadName=httpWorkerThread-8080-0;_RequestID=4c2405ce-8492-4786-bff4-ef1332cfccd4;|
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, ONSALE, CALENDAR_YEAR, PRICE, TITLE, INVENTORY, DESCRIPTION, FIRSTNAME, SURNAME FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
    bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:303)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:551)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:437)
    at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:465)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:213)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:199)
    at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:620)
    at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2152)
    at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2127)
    at oracle.toplink.essentials.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:350)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:709)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:677)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:731)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2218)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:298)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:274)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.find(EntityManagerImpl.java:130)
    at com.sun.bookstore2.database.BookDBAO.getBook(BookDBAO.java:73)
    at com.sun.bookstore2.database.BookDB.getBook(BookDB.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:273)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
    at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:982)
    at org.apache.jsp.books.bookstore_jsp._jspService(bookstore_jsp.java:191)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:850)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:697)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:532)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:465)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:353)
    at com.sun.bookstore2.dispatcher.Dispatcher.doGet(Dispatcher.java:106)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.
    at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
    at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
    at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
    at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
    at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
    at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
    at com.sun.gjc.spi.ConnectionHolder.prepareStatement(ConnectionHolder.java:413)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1147)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:597)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:470)
    ... 69 more
    |#]
    And the table exist in the database.
    Some body can help me?
    Thanks.

    You probably made the same mistake as I did and added the tables manually to the "sample" database instead of the "sun-appserv-samples" database.
    marc

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem with ResultSet in a loop

    hi,
    i have a probleme with ResultSet when, my code is bellow
    ResultSet rs = stmt.executeQuery(sql);
    sql="SELECT NAME FROM prestationtemp";
    rs = stmt.executeQuery(sql);
    String sqlDel="";
    while (rs.next())
    sqlDel="Delete from prestation where NAME="+rs.getString("NAME");
    stmt.executeQuery(sqlDel);
    the problem is that the loop iterate just once like if there is just one record, and if I remove stmt.executeQuery(sqlDel); from the loop it iterate normaly.
    thanks in advance.

    you will need to use 2 Statments e.g.
    Statement stmt1 = connection.createStatement();
    Statement stmt2 = connection.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    sql="SELECT NAME FROM prestationtemp";
    rs = stmt1.executeQuery(sql);
    String sqlDel="";
    while (rs.next())
    sqlDel="Delete from prestation where NAME="+rs.getString("NAME");
    stmt2.executeQuery(sqlDel);
    } When you reuse a Statement, any resultsets previously created are automatically closed.
    Looking at your code, it seems that you only need 1 SQL call:
    Delete from prestation where NAME in (SELECT NAME FROM prestationtemp)
    Much more efficient!

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • Problems with Java and Business Objects

    <p>Hello everybody,<br /><br />I&#39;m new in BusinessObjects/Crystal Report. Now, I have some problems with Business Objects for Java (Business Objects XI Release 2 Developer).</p><p> </p><p>1)  I create a report in the report designer. This report has a parameterfield. Before I run this report within a jsp web application I want fill the parameterfield with some values from the database. I found the following code snippet for this problem in your forum. But it don&#39;t works right, because it occurs a simple input field instead of a combo box with my database values. Where is my mistake? I need the combo box! (In debug mode I saw that the parameterfield was filled with my data!)</p><p><%@page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,com.crystaldecisions.sdk.occa.report.application.ReportClientDocument,<br />com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,<br />com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,<br />java.io.IOException,<br />java.sql.Connection,<br />java.sql.DriverManager,<br />java.sql.ResultSet,<br />java.sql.SQLException,<br />java.sql.Statement,<br />java.util.Locale,<br />com.crystaldecisions.sdk.occa.report.application.DataDefController,<br />com.crystaldecisions.sdk.occa.report.data.FieldDisplayNameType,<br />com.crystaldecisions.sdk.occa.report.data.ParameterField,<br />com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue,<br />com.crystaldecisions.sdk.occa.report.data.Values,<br />com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%><%<br /><br />    try {<br /><br />        String reportName = "avoParameterfeld.rpt";<br />        ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);<br /><br />        if (clientDoc == null) {<br />            // Report can be opened from the relative location specified in the CRConfig.xml, or the report location<br />            // tag can be removed to open the reports as Java resources or using an absolute path<br />            // (absolute path not recommended for Web applications).<br /><br />            clientDoc = new ReportClientDocument();<br />            clientDoc.setReportAppServer("inproc:jrc");<br />            // Open report<br />            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);<br /><br />             // Connection Info for fetching the resultSet<br />            String connectStr = "jdbc:oracle:thin:@it1srv19:1521:itoracle";<br />            String driverName = "oracle.jdbc.driver.OracleDriver";<br />            String userName = "user";        <br />            String password = "password";    <br /><br />            // TODO: Ensure this query is valid in your database. An exception will be thrown otherwise.<br />            String query = "SELECT DISTINCT AVONR FROM MBDEADM.AVO ORDER BY AVONR";<br />            ResultSet paramData = null;<br />           <br />            //we will now pass the resultset to the parameter to use as Default Values<br />            String parameterName = "AVONR2";<br />            int colIndex = 1; //this is the column in the ResultSet to use as the values<br />           <br />//            Load JDBC driver for the database that will be queried   <br />            Class.forName(driverName);<br /><br />            Connection connection = DriverManager.getConnection(connectStr, userName, password);<br />            Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE , ResultSet.CONCUR_READ_ONLY);<br />           <br />            paramData = statement.executeQuery(query);<br />           <br />            DataDefController dataDefController = clientDoc.getDataDefController();<br />           <br />            ParameterField origParamField = (ParameterField)dataDefController.getDataDefinition().getParameterFields().findField(parameterName, FieldDisplayNameType.fieldName, Locale.getDefault());<br />            ParameterField newParamField = (ParameterField)origParamField.clone(true);<br />           <br />            Values newVals = (Values)newParamField.getDefaultValues().clone(true);<br />            newVals.clear(); <br />            paramData.first();<br />            while(!paramData.isLast()){<br />                ParameterFieldDiscreteValue value = new ParameterFieldDiscreteValue();<br />                value.setValue(paramData.getObject(colIndex));<br />                newVals.add(value);<br />                paramData.next();<br />            }<br />            <br />            dataDefController.getParameterFieldController().modify(origParamField, newParamField);<br />            // Store the report document in session<br />            session.setAttribute(reportName, clientDoc);<br /><br />        }<br /><br />            // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET **************** <br />            {<br />                // Create the CrystalReportViewer object<br />                CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();<br /><br />                //    set the reportsource property of the viewer<br />                IReportSource reportSource = clientDoc.getReportSource();               <br />                crystalReportPageViewer.setReportSource(reportSource);<br /><br />                // set viewer attributes<br />                crystalReportPageViewer.setOwnPage(true);<br />                crystalReportPageViewer.setOwnForm(true);<br /><br />                // Apply the viewer preference attributes<br /><br />                // Process the report<br />                crystalReportPageViewer.processHttpRequest(request, response, application, null);<br /><br />            }<br />            // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************       <br /><br />    } catch (ReportSDKExceptionBase e) {<br />        out.println(e);<br />    }<br />   <br />%><br /><br /><br /><br />2) In a other report I tried to update the data source used by the report at runtime. I used the method &#39;setDataSource(ResultSet rs, String oldTableAlias, String newTableAlias)&#39; of the &#39;DatabaseController&#39;. I got a message like this: &#39;At present in Java reporting Component does not implement&#39;. I use JRC and the docs (http://support.businessobjects.com/global/interactive/xi/om/JRC/default.html) show me this method. Is it not possible to change the data at runtime in JRC? (I tried it with the methods &#39;setDataSource(IXMLDataSet rs, String oldTableAlias, String newTableAlias)&#39;, &#39;setDataSource(Object newds)&#39;, &#39;setDataSource(IDataSet ds, String oldTableAlias, String newTableAlias)&#39;, too. But the result was the same!)<br /><br /><br /><br />3) I tried to use Business Objects in JSF framework (Ver MyFaces 1.1.3) with the same samples above. But in JSF nothing work! I got the following exception. What is my problem? Can you get me a tutorial for jsf/BusinessObjects?<br /><br />08:21:43,165 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception<br />javax.faces.FacesException: com.businessobjects.reports.sdk.JRCCommunicationAdapter<br />    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:435)<br />    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)<br />    at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)<br />    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)<br />    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at de.itinformatik.mes.web.filter.SynchronizingFilter.doFilter(SynchronizingFilter.java:42)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at de.itinformatik.mes.web.ajax.aa.AAFilter.doFilter(AAFilter.java:54)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br />    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br />    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)<br />    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)<br />    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)<br />    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<br />    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br />    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br />    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br />    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)<br />    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)<br />    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<br />    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)<br />    at java.lang.Thread.run(Thread.java:595)<br />Caused by: java.lang.ClassCastException: com.businessobjects.reports.sdk.JRCCommunicationAdapter<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocumentState.saveContents(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocumentState.save(Unknown Source)<br />    at com.crystaldecisions.xml.serialization.XMLObjectSerializer.save(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.writeExternal(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.writeExternal(Unknown Source)<br />    at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.writeExternal(Unknown Source)<br />    at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.Hashtable.writeObject(Hashtable.java:813)<br />    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.ArrayList.writeObject(ArrayList.java:569)<br />    at sun.reflect.GeneratedMethodAccessor669.invoke(Unknown Source)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at java.util.ArrayList.writeObject(ArrayList.java:569)<br />    at sun.reflect.GeneratedMethodAccessor669.invoke(Unknown Source)<br />    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />    at java.lang.reflect.Method.invoke(Method.java:585)<br />    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)<br />    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)<br />    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)<br />    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)<br />    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)<br />    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.serializeView(JspStateManagerImpl.java:590)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)<br />    at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:332)<br />    at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)<br />    at org.apache.jsp.testCR_jsp._jspx_meth_f_view_0(org.apache.jsp.testCR_jsp:149)<br />    at org.apache.jsp.testCR_jsp._jspService(org.apache.jsp.testCR_jsp:83)<br />    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)<br />    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)<br />    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)<br />    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)<br />    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br />    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)<br />    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)<br />    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)<br />    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)<br />    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)<br />    ... 32 more<br /><br /><br />Thanks for your assistance <br /><br />Tosch</p>

    Which Business Objects are you referring to.
    MS .NET has a thing called Business Objects but they only work in .NET.

  • Problem with Watched Folder endpoint

    Hi,
    We have a problem with a watched folder endpoint. The watched folder is set in a directory in a linux server. The directory then is mapped to a windows directory where files arrive from time to time. Everything works fine until the watched folder service stops for no particular reason. After that we need to restart the service from the admin UI console.
    I found in another post something related to the MySql database losing connection with livecycle after some inactivity, but I'm not sure if this is our case or even how to solve the problem.
    Here's what we found in the log
    2010-11-11 17:10:31,890 INFO  [com.adobe.idp.dsc.provider.service.file.write.impl.FileResultHandlerImpl] FileResultHandlerImpl ----- preserved- source ----/data/livecycle/lc_wrk/edi/stage/Wx130df02e731a9c7b14738905/C0158_208.dat--- to ---/data/livecycle/lc_wrk/edi/preserve/ /C0158_208.dat
    2010-11-11 20:39:46,366 INFO  [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Handling 1 trigger(s) that missed their scheduled fire-time.
    2010-11-11 20:40:22,056 ERROR [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Error retrieving job, setting trigger state to ERROR.
    org.quartz.JobPersistenceException: Couldn't retrieve job: Prepared statement needs to be re-prepared [See nested exception: java.sql.SQLException: Prepared statement needs to be re-prepared]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1338)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$37.execute(JobStoreSupport.java:2757)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.ja va:3662)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2751)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:313)
    Caused by: java.sql.SQLException: Prepared statement needs to be re-prepared
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
    at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatem ent.java:90)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStat ement.java:255)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobListeners(StdJDBCDelegate.java:843)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1319)
    ... 5 more
    2010-11-11 20:40:22,061 ERROR [org.quartz.core.ErrorLogger] An error occured while firing trigger 'WatchedFolder.WatchedFolder:1107'
    org.quartz.JobPersistenceException: Couldn't retrieve job: Prepared statement needs to be re-prepared [See nested exception: java.sql.SQLException: Prepared statement needs to be re-prepared]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1338)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2789)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$37.execute(JobStoreSupport.java:2757)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.ja va:3662)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2751)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:313)
    Caused by: java.sql.SQLException: Prepared statement needs to be re-prepared
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
    at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatem ent.java:90)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStat ement.java:255)
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobListeners(StdJDBCDelegate.java:843)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1319)
    ... 5 more
    2010-11-11 20:56:46,550 INFO  [com.adobe.idp.scheduler.jobstore.DSCJobStoreTX] Handling 1 trigger(s) that missed their scheduled fire-time.
    thanks

    Originally Posted by bjbradleyUSC
    Is there a problem with running the ZCM client and the Endpoint client on the same machine?? I am having problems getting both of them to install on a single machine.
    If I install the ZCM Client, it will pull down the policies and work correctly. Then I try to install Endpoint and it will not finish up it's checkin procedure and it will not get the policies set in place for it.
    Otherwise, I'll start with Endpoint on a fresh machine install it and it works great pulling down the policies. But the ZCM doesn't seem to pull down the policies correctly?
    Just wondering if this was known problem or is there something I am not doing correctly...
    Thanks
    BJ Bradley
    This is issue that you are seeing is just for the client, correct? The ZESM server and ZCM server are on separate machines, correct?

  • Performance problem with ojdbc14.jar

    Hi,
    We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.
    We have Oracle 9.2.0.5 Database Server and I have downloaded the ojdbc14.jar from Oracle site for the same. Tried executing the java code from windows 2000, Sun Solaris and Opteron machines and having the same problem.
    Does any one know a solution to this problem? I also tried ojdbc14.jar meant for Oracle 10g, that did not help.
    Please help.
    Thanks
    Yuva

    My code is doing some thing which might be working well with classes12.zip and which does not work well with ojdbc14.jar? Any general suggestions to make the code better, especially for batch updates.
    But for selecting a row from the table, I am using index columns in the where cluase. In the code using PreparedStatement, setting all the reuired fields. Here is the code. We have a huge index with 14 fields!!. All the parameters are for where clause.
    if(longCallPStmt == null) {
    longCallPStmt = conn.prepareStatement(longCallQuery);
    log(Level.FINE, "CdrAggLoader: Loading tcdragg entry for "
    +GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH"));
    longCallPStmt.clearParameters();
    longCallPStmt.setInt(1, cdrAgg.iintrunkgroupid);
    longCallPStmt.setInt(2, cdrAgg.iouttrunkgroupid);
    longCallPStmt.setInt(3, cdrAgg.iintrunkgroupnumber);
    longCallPStmt.setInt(4, cdrAgg.iouttrunkgroupnumber);
    longCallPStmt.setInt(5, cdrAgg.istateregionid);
    longCallPStmt.setTimestamp(6, cdrAgg.time_hour);
    longCallPStmt.setInt(7, cdrAgg.icalltreatmentcode);
    longCallPStmt.setInt(8, cdrAgg.icompletioncode);
    longCallPStmt.setInt(9, cdrAgg.bcallcompleted);
    longCallPStmt.setInt(10, cdrAgg.itodid);
    longCallPStmt.setInt(11, cdrAgg.iasktodid);
    longCallPStmt.setInt(12, cdrAgg.ibidtodid);
    longCallPStmt.setInt(13, cdrAgg.iaskzoneid);
    longCallPStmt.setInt(14, cdrAgg.ibidzoneid);
    rs = longCallPStmt.executeQuery();
    if(rs.next()) {
    cdr_agg = new CdrAgg(
    rs.getInt(1),
    rs.getInt(2),
    rs.getInt(3),
    rs.getInt(4),
    rs.getInt(5),
    rs.getTimestamp(6),
    rs.getInt(7),
    rs.getInt(8),
    rs.getInt(9),
    rs.getInt(10),
    rs.getInt(11),
    rs.getInt(12),
    rs.getInt(13),
    rs.getInt(14),
    rs.getInt(15),
    rs.getInt(16)
    }//if
    end_time = System.currentTimeMillis();
    log(Level.INFO, "CdrAggLoader: Loaded "+((cdr_agg==null)?0:1) + " "
    + GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH")
    +" tcdragg entry in "+(end_time - start_time)+" msecs");
    } finally {
    GeneralUtility.closeResultSet(rs);
    GeneralUtility.closeStatement(pstmt);
    Why that code works well for classes12.zip (comes back in around 10 msec) and not for ojdbc14.jar (comes back in 6-7 minutes)?
    Please advise.

  • Beginner Has Problem With Loading JDBC Driver Using MySQL

    Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
    1. I have installed MySQL (C:\mysql), created a databse (soup), and created a littel table (VIDEOS). I am able to see the table in the console:
    sql> select * from videos
    2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
    3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
    4. MySQL server is running
    C:\> C:\mysql\bin\mysqld-nt --standalone
    5. open another DOS window and use the database
    mysql>USE SOUP
    6. succesfully compiled a Java program (javac Test.java):
    import java.sql.* ;
    public class Test
    public static void main( String[] args )
    try
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    try
    Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/soup" );
    try
    Statement statement = con.createStatement();
    ResultSet rs = statement.executeQuery("SELECT TITLE FROM VIDEOS");
    while ( rs.next() )
    System.out.println( rs.getString( "TITLE" ) );
    rs.close();
    statement.close();
    catch ( SQLException e )
    System.out.println( "JDBC error: " + e );
    finally
    con.close();
    catch( SQLException e )
    System.out.println( "could not get JDBC connection: " + e );
    catch( Exception e )
    System.out.println( "could not load JDBC driver: " + e );
    7. when I run the Java program (java Test), I got
    the message:
    could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    What am I missing?

    Hi,
    I missed to specify test in my last post.
    Try running your program by explicitly setting the classspath when
    running your program . java -classpath c:\mysql-connector-java-3.1.0-alpha-bin.jar test
    Make sure your jar file contains org.gjt.mm.mysql.Driver class

  • Problem with GenericCatalogDAO  JDBC Resultset using parameters not working

    Hello
    I have a problem with Petstore GenericCatalogDAO. java. The problem is the behaviour of the resultset object when retrieving data from the database.Below are two synareos one that
    works (when) hard coded and one that does not work when parameter values passed into the the result set.
    1. The code the WORKS.
    statement = connection.prepareStatement("select a.productid , name, descn from product a, product_details b
    where a.productid = b.productid and locale= 'en_US' and a.catid = 'FISH' order by name"
    ,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    resultSet = statement.executeQuery();
    resultSet.absolute(1);
    String s = resultSet.getString(1);
    The code that gives me a 'exhausted resultset' error which I think means no results
    String[] parameterValues = new String[] { locale.toString(), categoryID };(For example parameters are 'en_US' and 'FISH')
    statement = connection.prepareStatement("select a.productid , name, descn from product a, product_details b
    where a.productid = b.productid and locale=? and a.catid =? order by name"
    ,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    for (int i = 0; i < parameterValues.length; i++) {
    statement.setString(i + 1, parameterValues[i]);
    resultSet = statement.executeQuery();
    resultSet.absolute(1);
    String s = resultSet.getString(1);
    There is obviously a problem using these named parametevalues with these preparedstatement resultset, Does anybody know anything about this and a fix for it????
    Cheers. Roger

    Which version of PetStore are you using?
    -Larry

  • Problem with type 4 driver using oracle 10g

    HI,
    I am unable to establish a type 4 connection with oracle 10g.
    Specs:
    Driver used: OracleDriver that comes with the ojdbc14.jar along with oracle 10g
    JDK used: Tried using both j2sdk1.4.2 and using JDK 5.0
    JRE: Again, JRE that was shipped with j2sdk 1.4.2 and JRE 5.0
    OS: Windows XP sp2
    I am able to compile the following piece of code, so there is no classpath problem, etc.
    When I try to run the program, the exception thrown is "No Suitable Driver"
    There is no problem with the TNSListener, etc...even if all Oracle related services in 'services.msc' are Started/Stopped, the error remains.
    I am, however, able to establish the connection using type1 driver.
    Please Help!
    import java.sql.*;
    import java.io.*;
    class TestConn
         Connection connection;
         Statement statement;
         ResultSet resultset;
         public void testConn() throws SQLException, ClassNotFoundException
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleStatement());
              //DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
              connection = DriverManager.getConnection("oracle:jdbc:thin:@127.0.0.1:1521", "scott", "tiger");
              //connection = DriverManager.getConnection("jdbc:odbc:dsn1", "scott", "tiger");
              System.out.println("Connection Established");
              statement = connection.createStatement();
              resultset = statement.executeQuery("select ename from emp");
              while(resultset.next())
                   System.out.println(resultset.getString(1));
    class Test
         public static void main(String args[]) throws SQLException, ClassNotFoundException
              TestConn obj = new TestConn();
              obj.testConn();
    };

    The JDBC URL should include the database SID. For example, if the database SID is Orcl
    connection = DriverManager.getConnection("oracle:jdbc:thin:@127.0.0.1:1521:Orcl", "scott", "tiger");

  • Mysql problem with german special characters

    hi,
    I wrote a software and it worked quite good, but after I installed it on a new machine with j2se 1.4 I've problems with the german special characters.
    this code works good on the old machine (jdk 1.3.1) and prints the wanted characters like �,�,�.
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    java.sql.Connection conn;
    conn = DriverManager.getConnection("jdbc:mysql://localhost/testdb?user=testuser&password=xxxx");
    Statement s = conn.createStatement();
    ResultSet r = s.executeQuery("select something from testtb where id='1'");
    r.first();
    System.out.println( r.getString(1) );
    but on the new machine (j2se 1.4) I only receive the character ?.
    I updated my org.gjt.mm.mysql to the current MySQL Connector/J 3.0.9 and added
    conn = DriverManager.getConnection("jdbc:mysql://localhost/testdb?user=testuser&password=xxxx&useUnicode=true&characterEncoding=ISO-8859-1");
    but I've got still the same problem.
    Thanks in advance
    Markus

    with "wanted characters like �,�,�"
    I meant: like &#x00E4;,&#x00FC;,&#x00F6;

  • Problems with EURO currency character

    Hi,
    I'm trying to insert the EURO currency character (€) in a CHAR field from a Java client but after the insert in the field I find a ? turned upside down.
    I'm using
    - Oracle DB server 11.2.0.1.0 running with character set US7ASCII (same problem with a different Oracle server with WE8ISO8859P1 encoding) on a Linux Red Hat server
    - Java client with JDBC driver 11.2.0.1.0 (ojdbc5.jar) with JDK 5 running on Windows XP: the encoding of the JVM is CP1252.
    I've googled a lot but found only solutions like "... change the encoding of the DB ...": I can't change the DB encoding.
    Any idea?
    Thanks.
    Here's is a test case:
    ************ begin test case ************
    Statement stmt = null;
    PreparedStatement pst = null;
    Connection conn = null;
    ResultSet rs = null;
    try {
         Class.forName("oracle.jdbc.driver.OracleDriver");
         conn = DriverManager.getConnection("jdbc:oracle:thin:@SERVER:1521:SID", "USER", "PASSWORD");
         stmt = conn.createStatement();
         stmt.execute("CREATE TABLE JJOVA(A CHAR(5) NOT NULL)");
         stmt.close();
         pst = conn.prepareStatement("INSERT INTO JJOVA(A) VALUES(?)");
         pst.setString(1, "€");
         pst.execute();
         stmt = conn.createStatement();
         rs = stmt.executeQuery("select A from JJOVA");
         while (rs.next()) {
              String tmp = rs.getString(1);
              System.out.println(tmp);
         rs.close();
         pst.close();
         stmt = conn.createStatement();
         stmt.execute("DROP TABLE JJOVA");
    } catch(Exception e) {
         e.printStackTrace();
    } finally {
         try {
              if (rs != null) {
                   rs.close();
              if (pst != null) {
                   pst.close();
              if (stmt != null) {
                   stmt.close();
              if (conn != null) {
                   conn.close();
         } catch(Exception dontcare) {}
    ************ end test case ************
    Regards,
    Andrea

    Thank you Oradba for the explanation of the COBOL program behavior: we're going to change the DB character set (export/import seems not required, we've found an Oracle Note 257722.1 "Changing WE8ISO8859P1 to WE8ISO8859P15"). I'll mark your answer as the (most) correct.
    Oviwan, NLS_NCHAR_CHARACTERSET is AL16UTF16: I tried with an NCHAR field but I can't even store correctly accented vowels.
    Thank you very much everyone,
    Andrea

Maybe you are looking for