Problem while querying from jsp

I have a query like this ...
Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='09/19/2004';
I want to execute the same query using java for which i say
String QQQ="Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='?/?/?'"
PreparedStatement stmt = conn.prepareStatement(QQQ);
stmt.setString(1,"09");
stmt.setString(2,"27");
stmt.setString(3,"2004");
But I am not getting the results. Is there anything wrong with the Qusetion marks(?) in the query ?
I get the results if i directly enter the value for the question mark.
Please help.
Thanks.

You would either need to explicitly concatenate the bind variables, i.e.
String QQQ="Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')=? || '/' || ? || '/' || ?"or you would need to have a single bind variable and pass the whole string
String QQQ="Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')=?"
stmt.setString(1, "09/27/2004" );Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Problem while querying from java

    I have a query like this ...
    Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='09/19/2004';
    I want to execute the same query using java for which i say
    String QQQ="Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='?/?/?'"
    PreparedStatement stmt = conn.prepareStatement(QQQ);
    stmt.setString(1,"09");
    stmt.setString(2,"27");
    stmt.setString(3,"2004");
    But I am not getting the results. Is there anything wrong with the Qusetion marks(?) in the query ?
    I get the results if i directly enter the value for the question mark.
    Please help.
    Thanks.

    Date date = get a Date object somehow, perhaps from SimpleDateFormat.parse()
    String query = "Select name,description,start_date from Events where start_date = ?";
    PreparedStatement ps = con.prepareStatement(query);
    ps.setDate(1, date);
    ps.executeQuery();

  • Translation problem , While conversion from English to Poland

    Hello Gurus
    Pl suggest  Translation problem , While conversion from English to Poland  getting message
    "Code page not found for Poland "
    Code page 1401 exits in system
    SAP version 4.6C
    Best regards
    Krish

    Dear Vamsi,
    Please check the below lonk may be it heps.
    Translation to different languages. How??????
    Regards
    Pranay

  • Problem while issueing from batch

    Dear Gurus
    Suppose I have got a finished product x for this I have maintained a bom of suppose a, b,c all three roh.Out of these 3 I have say c batch managed. Through mb1c suppose  I recieved roh c in different batches and kept them in the store.Now after creating production order in the order bom I am mentioning batch for the material c i.e I am telling from which batch it should issue.While issueing from mb1a to the order if I issue full quantity of c then the sytem is doing it without any problem from that batch that I mentioned in production order.If suppose I issue partial quantity of c then also it is taking but if I again try to issue the rest of the partial quantity the system is giving the error message 'issue quantity is greater than the reservation quantity'.For other roh which are not maintained in batch the system is allowing  to issue as many number of times as required up to the reservation quantity.
    Please tell me the reason why it is behaving like this
    Regards
    Sandip Sarkar

    Hi,
    As per the scenario given by you, you are not using the Automatic Batch determination Process for system to check the stock of BOM item material and assign the btach in Production order.
    You are assigning manually the btach number in the production order component overview against the component. As you are not issuing the material in a single storke system is giving this message.
    As suggested by Brahmankar you can either set the message as "Warning"  OR  "Balnk (No Information)"  in Tcode : OMCQ and then try issuing the material against the production order in partial qualtities.
    Hope this will help you.
    Regards
    Rdahka mk

  • Problems while retrieving from content repository

    Hi,
    I am facing problems while retrieving documents stored the content repository. I have some pdf files as well as text documents stored in the content repository. I need to get retrieve the contents of the text files. My problem lies with how to retrieve the data from the files.
    I have used SCMS_URL_GENERATE, followed by the FM ''HTTP_GET''.  Though I  do get the File id , my problem is how to proceed from this point. Should i wriite an RFC ?
    Thanks and Regards,
    Anie

    Hi,
    I checked the code one again - SCMS_URL_GENERATE is used to send url to the user (to open file in web browser).
    SCMS_HTTP_GET code looks like this:
    CONCATENATE <ls>-vbeln space <ls>-optarcnr
      INTO lv_vbeln_obj
      RESPECTING BLANKS.
    SELECT SINGLE *
      FROM toa01
      WHERE sap_object EQ 'VBRK'
        AND archiv_id EQ co_arch
        AND ar_object EQ 'SDOINVOICE'
        AND object_id EQ lv_vbeln_obj.
    CALL FUNCTION 'SCMS_HTTP_GET'
      EXPORTING
        crep_id   = co_arch
        doc_id    = toa01-arc_doc_id
        comp_id   = 'data'
        length    = 0
        no_cache  = no_cache
      IMPORTING
        length    = comp-size
        mimetype  = comp-type
      TABLES
        data      = comp-bin
      EXCEPTIONS
        not_found = 1
        OTHERS    = 2.
      IF sy-subrc IS NOT INITIAL.
        PERFORM log_create USING <ls>-vbeln.
      ENDIF.
    IF comp-bin IS NOT INITIAL.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = comp-size
          filename     = dstpc
          filetype     = 'BIN'
        TABLES
          data_tab     = comp-bin
        EXCEPTIONS
          OTHERS       = 1.
      IF sy-subrc IS NOT INITIAL.
        PERFORM log_create USING <ls>-vbeln.
      ELSE.
        MESSAGE s000(38) WITH 'Success'.
      ENDIF.
    ENDIF.
    Regards,
    Przemysław

  • Problem while migrating from JSF1.1 to JSF1.2

    I'm facing the following issues while migrating from WAS 6.1 to WAS7.0
    For this I have upgraded Jsf 1.1 to 1.2 and webmodule to 2.5, and following errors I'm having...
    1. Description     The method getExceptionMessageString(String) is undefined for the type Util
    2. Description The method getMyForm(UIComponent) in the type CommandLinkRenderer is not applicable for the arguments (FacesContext, UICommand)     
    3. Description     The method getName() is undefined for the type HtmlBasicRenderer.Param     LinkRendererWithName.java
    4. Description     The method getParamList(UIComponent) in the type HtmlBasicRenderer is not applicable for the arguments (FacesContext, UICommand)
    5. Description     The method getValue() is undefined for the type HtmlBasicRenderer.Param     LinkRendererWithName.java
    Any alternative methods to those above methods in JSF1.2?
    or am I need to upgrade any of the jaf dependencies?
    Any suggestions are appreciated.
    Thanks

    i_oss wrote:
    But you should consider implementing your Renderers only using the API and not extending the com.sun.faces.* implementation classes, or you might end up changing your code again on your next jsf updates.Hm, good thinking. I didn't think about the split between the API and the implementation.
    OT question on that subject: is it really good design to have that split? JSF, JAXB, JAX-WS, even CDI has an API and an implementation part to it. But do we really need that? In the case of JSF, you have Mojarra and Myfaces (and some other obscure JSF implementation I believe). But why would you use Myfaces over Mojarra since they both solve the same problem and are both actively developed? Why do we have to deal with API/implementation conflict hell that you can often find when using JAXB, especially in a Mavenized environment? We have Weld as the implementation for CDI. What would move anyone to make a 'competing' implementation of it?
    For something like JPA I can at least understand it; the persistence providers were already there before JPA saw the light of day. There was no need for Sun to create a competing implementation, so they provided the API in stead. But in all other cases... I just don't get it.

  • Urgent : problem while migrating from forms 6i to 9i

    We are trying to upgrade forms 6i to forms 9i.
    One of our forms is using the host command to call a shell script . This command worked successfully in the form when it was
    in character mode in forms 6i. But we are facing problems while deploying it on web using forms9i.
    Would appreciate an early response.
    Regards ,
    Pooja

    Hi Pooja,
    1. Please check out the script by running it manually in the App Server Machine.
    2. If you are using any environment variables in the shell script, that are not defined in the shell script itself, then try defining in the shell script itself. Because, the environment variable that you are using might not be availble for the script while running using host.
    HTH,
    Regards,
    Arun

  • Problem while migrating from Sybase to Oracle using Quick Migrate

    Hi,
    For SQL Developer version 2.1, while migrating from sybase to oracle, Using Quick migrate, during data move step, for the rows having ''(Blank) values in TEXT data type in SYBASE, which is convertd to CLOB in Oracle, the migration for that table terminates at that row.
    However, NULL values in Sybase TEXT data type are successfully inserted in Oracle CLOB.
    How can we overcome this?

    reproduced and see exception in console, bug logged.
    Edited by: Jade Zhong on Feb 1, 2010 6:10 PM

  • Problem on Query from deployed application WEBLOGIC 11g

    HI all, i got an application developed on Jdeveloper 11g when i run in the Integrated weblogic server it runs perfect querying all the data.
    but my problem is when i deployed on Web Logic Server 11gR1 it doesn't query anything of my Oracle 10G database what's wrong????
    The deployment is correct and i can access my aplication on the browser, my webservices are java based but i don't think thats a mistake
    below is the log presented on the screen Start Admin Server:
    Error capaMedia.jsp HTTP transport error: java.net.ConnectException: Tried all:
    '1' addresses, but could not connect over HTTP to server: 'localhost', port: '71
    01'com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.ne
    t.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to
    server: 'localhost', port: '7101'
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:138)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTr
    ansportPipe.java:187)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest
    (HttpTransportPipe.java:124)
    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(Deferre
    dTransportPipe.java:121)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
    at com.sun.xml.ws.client.Stub.process(Stub.java:272)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:115)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    at $Proxy88.cargarSelectEspecifico(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(Client
    InstanceInvocationHandler.java:84)
    at $Proxy89.cargarSelectEspecifico(Unknown Source)
    at jsp_servlet.__capamedia.capaMedia(__capamedia.java:77)
    at jsp_servlet.__capamedia._jspService(__capamedia.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.net.ConnectException: Tried all: '1' addresses, but could not co
    nnect over HTTP to server: 'localhost', port: '7101'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:333)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:425)
    at weblogic.net.http.HttpClient.New(HttpClient.java:252)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:18
    9)
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:136)
    ... 37 more
    com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.C
    onnectException: Tried all: '1' addresses, but could not connect over HTTP to se
    rver: 'localhost', port: '7101'
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:138)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTr
    ansportPipe.java:187)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest
    (HttpTransportPipe.java:124)
    at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(Deferre
    dTransportPipe.java:121)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
    at com.sun.xml.ws.client.Stub.process(Stub.java:272)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:115)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
    java:95)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
    at $Proxy87.cargarSelectEspecifico(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(Client
    InstanceInvocationHandler.java:84)
    at $Proxy89.cargarSelectEspecifico(Unknown Source)
    at jsp_servlet.__capamedia.capaMedia(__capamedia.java:77)
    at jsp_servlet.__capamedia._jspService(__capamedia.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
    StubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3717)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.net.ConnectException: Tried all: '1' addresses, but could not co
    nnect over HTTP to server: 'localhost', port: '7101'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:333)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:425)
    at weblogic.net.http.HttpClient.New(HttpClient.java:252)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:18
    9)
    at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(Ht
    tpClientTransport.java:136)
    ... 37 more
    thanks your help any light will be apreciated
    Thanks for your time!!!
    Edited by: user3095203 on 24-mar-2011 12:50

    capaMedia.jsp
    HTTP transport error: java.net.ConnectException: Tried all:
    '1' addresses, but could not connect over HTTP to server: *'localhost', port: '7101*
    I believe when you are deploying the application through the Jdev on the Integrated Server , the server is running on the same machine with the address and port as : localhost and 7101.
    However when you are using the same application to deploy on Web Logic Server 11gR1 which is not integrated server, then you much check what is the hostname and port of the Server from the config.xml file and make change in the capaMedia.jsp accordingly.
    thanks,
    Sandeep

  • Problem while cloning From RAC to Non RAC

    Hi
    Can any body help me to solve this problem occured while cloning my RAC database of EBS 12.06 to Non RAC
    APPS Password : Log file located at /dump/rmsbkp/db/tech_st/10.2.0/appsutil/log/RMS_devmdb1/ApplyDBTier_03240738.log
    - 50% completed Determining Source system database type ("single" or "rac").
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    error in opening zip file
    ERROR while running Apply...
    Wed Mar 24 10:42:07 2010
    ERROR: Failed to execute /dump/rmsbkp/rac/oracle/product/10.2.0/rac/appsutil/clone/bin/adclone.pl
    Please check logfile.
    oradev@devmdb1/dump/rmsbkp/rac/oracle/product/10.2.0/rac/appsutil/clone/bin$>
    I Passed the following parameters :
    Provide the values required for creation of the new Database Context file.
    Target System Hostname (virtual or normal) [devmdb1] :
    Target Instance is RAC (y/n) [y] : n
    Target System Database SID : RMS
    Target System Base Directory : /dump/rmsbkp/rac/oracle/product/10.2.0/rac
    Target System utl_file_dir Directory List : /usr/tmp
    Number of DATA_TOP's on the Target System [2] : 1
    Target System DATA_TOP Directory 1 : /dump/rmsbkp/db/apps_st/data/RMS/datafile
    Target System RDBMS ORACLE_HOME Directory [dump/rmsbkp/rac/oracle/product/10.2.0/rac/db/tech_st/10.2.0] : /dump/rmsbkp/db/tech_st/10.2.0
    Do you want to preserve the Display [rmsmdb1:0.0] (y/n) ? : n
    Target System Display [devmdb1:0.0] :
    Do you want the the target system to have the same port values as the source system (y/n) [y] ? : y
    RC-50220: Warning: Database Port: 1525 is not free. Unable to preserve the port settings from source system.
    Target System Port Pool [0-99] : 7
    and here are the errors from logfile:
    /dump/rmsbkp/db/tech_st/10.2.0/appsutil/scripts/RMS_devmdb1/addlnctl.sh start RMS
    You are running addlnctl.sh version 120.1
    Logfile: /dump/rmsbkp/db/tech_st/10.2.0/appsutil/log/RMS_devmdb1/addlnctl.txt
    Starting listener process RMS ...
    Listener RMS has already been started.
    addlnctl.sh: exiting with status 0
    .end std out.
    .end err out.
    checking DB Connection...
    DEBUG: checkDBConnection in()
    ADX Database Utility
    getConnection() -->
    sDbHost : devmdb1
    sDbDomain : mof.gov.kw
    sDbPort : 1528
    sDbSid : RMS
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@devmdb1.mof.gov.kw:1528:RMS
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devmdb1.mof.gov.kw)(PORT=1528))(CONNECT_DATA=(SERVICE_NAME=RMS)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devmdb1.mof.gov.kw)(PORT=1528))(CONNECT_DATA=(SERVICE_NAME=RMS.mof.gov.kw)))
    Exception occurred: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    DEBUG: checkDBConnection out()
    Thanks for your help
    Mohamed

    Hi I passed the correct parameters and i reached the following:
    / 50% completed Determining Source system database type ("single" or "rac").
    | 50% completed RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    ERROR while running Apply...
    Wed Mar 24 12:53:05 2010
    ERROR: Failed to execute /dump/rmsbkp/RMS/rac/oracle/product/10.2.0/rac/appsutil/clone/bin/adclone.pl
    Please check logfile.
    In the logfile:
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : devmdb1
    sDbDomain : mof.gov.kw
    sDbPort : 1525
    sDbSid : RMS
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@devmdb1.mof.gov.kw:1525:RMS
    Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    HPUX-ia64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devmdb1.mof.gov.kw)(PORT=1525))(CONNECT_DATA=(SERVICE_NAME=RMS)))
    Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    HPUX-ia64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devmdb1.mof.gov.kw)(PORT=1525))(CONNECT_DATA=(SERVICE_NAME=RMS.mof.gov.kw)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    The Connection descriptor used by the client was:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=devmdb1.mof.gov.kw)(PORT=1525))(CONNECT_DATA=(SERVICE_NAME=RMS.mof.gov.kw)))
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    RC-00118: Error occurred during creation of database
    Raised by oracle.apps.ad.clone.ApplyDatabase
    Thanks
    Mohamed

  • Problem while querying MS Acess DB through JAVA

    Hi,
    I am using a query as follows:
    strQuery = "select * from A where UID=?";
    //have set the parameter
    resultSet = ps.executeQuery();
    sysout(resultSet);//printing resultSet Object
    if(null != resultSet)
    //have created object of class UsrDetails
    UsrDetails u =new UsrDetails();
    while(resultSet.next())
    sysout(resultSet);//printing resultSet Object again
    //set the values for UsrDetails.
    I hve given uid which is not present in the table A. Now the first sysout is getting printed(not null) but the control is not going into while i.e second sysout is not getting printed.
    I don't know why this is happening. I guess I shld get null if the rcrd is not present in the DB.

    chasan wrote:
    ResultSet is not null if the number of rows returned is zero.
    Try replacing if(null != resultSet) with if(resultSet.next())
    Wrong. The correct idiom is:
    while (resultSet.next())
        // process the results in here.
    }>
    Then if it enters the if block invoke resultSet.previous() so that the first record is not lost.Nonsense. The first record isn't lost. This is poor advice from start to finish.
    %

  • "Default " problem while migrating from mysql to oracle.

    I'm migrating from mysql3.23 to oracle9i via the OMWB tool.While migrating i'm getting an error message "Failed to create default for the table <table>:ora00907 missing right parenthesis".This error is due to the difference in the syntax used for the keyword "default" in mysql and oracle.In mysql we have to give after the Not Null option whereas in oracle we have to give before Not Null.
    The problem is i'm migrating via the OWMB tool.Is is possible to handle this error with the help of tool itself.
    Thanks
    Jai.M

    Jai, I'm having Frank have a look at this for you to see if we can replicate it ans help solve this issue for you. are there any issues logged on the mysql site regarding saving blobs as file?
    thanks
    Barry

  • Database query from jsp

    hi! All
    i am making the following query to the MySQL database from a jsp page but I get error. please help.
    i am asking user to type in first few letters of person's first name and i use that string to find the match.
    String getName = request.getParameter("search_name"); // gets the few letters entered by user
    // fname is a field in the Employee table
    rs = statement.excuteQuery("Select fname, lname, from Employee where fname.indexOf('" + getName + "') != -1");
    Thanks in advance

    It looks like you have Java code in your select statement.
    I don't know what database your using but you want something
    like this.
    <%
    String getName = request.getParameter("search_name");
    /* I use ingress for my rdms and in ingress you use the keywork 'like'
       to match against character data. The '%' character is the wild card. So, this
       query looks for fname's that have any number of characters followed
       by the value stored in the java string getName, followed by any
       number of characters. */
    rs = statement.excuteQuery("Select fname, lname, from Employee where fname like '%" + getName + "%'");
    %>-S-

  • Communication Channel Problem while reading from database

    Hi,
    I have a JDBC to IDoc scenario.
    The database here is AS400 and i need to read data from AS400 tables and send it to SAP IDocs.
    The communication channel picks up the data from AS400 based on the query and builds the IDocs.
    Suddenly the channel stops working and it doesnt pick up the data from AS400. When we change the name of the Communication Channel, it again starts picking up the data but again for some period.
    It sounds really strange as this is happening only with AS400 database and not it works perfectly when connecting to an SQL Server database.
    Please help me out in resolving this issue.
    Regards
    Kiran.

    Hi Kiran
    Can you check the Notes 717376 ,990892 and try to implement.
    Some tips:
    This error is caused by some optimization in the IBM VM for AS400 which can be disabled through the JIT compiler settings. The following VM setting -Dos400.run.mode=jitc must be set, according to note 717376. Any other value for this setting, as e.g. jitc_de can cause the described problem
    Also, please share the trace, so that, it would help to identify the problem.
    Also try to change the property in Vis Admin
    "cluster-data" -> "Global server configuration" -> "managers" -> "ApplicationThreadManager" -> "MaxThreadCount" ( like 400)
    Regards
    Chilla

  • CLIENT_OLE2 date formatting problem while reading from Excel

    I have installed webutil package and tested that everything works by running webutil_demo as well as WU_TEST_106 form. Then I had implemented reading from Excel sp. sheet using Oracle note 813535.1 (This note has OLE2 code sample on how to read an Excel file). Everything fine till now. The problem started when I have a date fiield to read from Excel. The field where the value is going to has format mask of 'DD-MM-RRRR'. When the date is displayed in the form, it shows '01-AUG-0009' instead of '01-AUG-2009'. I tried changing the date format to different formats in Excel but no go. I found one blog which stated that treat the date as number and use e.g. "cell_date_value:=to_date('01/01/1900','DD/MM/YYYY')+client_OLE2.get_num_property(cel,,'Value')+2" but it too did not change the display. Then I tried debugging and stepping through the code..the only thing I noticed that OLE2 function displayed the date with 2 digit year as 09 and when the code completed execution, the date went back to '01-AUG-0009'. Casting with 4 digit year at every step in the code is not helping to change final date display correctly. Any idea?!!!

    Hi,
    While reading the date column from excel, try using
         m_col_val := OLE2.get_char_property(Workcell,'Text');
    Instead of
         m_col_val := OLE2.get_char_property(Workcell,'Value');
    I think you problem will be solved...
    hello...i meant client_OLE2
    Regards
    Dora
    Edited by: Dora on Sep 16, 2009 11:05 AM

Maybe you are looking for

  • Happy Birthday from Apple! Heres your gift.... A dead macbook hard drive!

    Well i woke up this morning, the morning of my 31st birthday. As usual on a saturday i booted up my macbook and checked out the latest news etc etc etc. The laptop was running normally. An hour or so later after the macbook had been sat in one place

  • How to create process chains for Master Data?

    I need information on " how we can create process Chains for Master Data"

  • Cisco asa security context active/active failover

    Hi,                   I have two Cisco ASA 5515-X appliance running OS version 8.6. I want to configure these two appliance in multiple context mode mode. Each ASA appliance will have two security context named "ctx1" & "ctx2". I have to configure fa

  • Error when gathering a distribution

    We are currently running ZFS 3.0.2 and are having an error when trying to distribute a large package with many (over 3000) files. The error is: Gather (name and path of application) stopped with an unknown error. The TED.log file has the same informa

  • TDMS Error -2503 at Open TDMS

    Hi everyone, I'm facing a wierd error since yesterday. I'm recording data on a PXI using the Embedded Data Logger Custom Device (VeriStand), before yesterday, I was able to retrieve the TDMS File (.tdms file only, not the .tdms_index file) and open t