Using store procedures with SQLJ - please help!

I have two questions:
1.I wrote simple test appllication that uses SQLJ to run store
procedures from SQL package. It compiles and work fine from
JDeveloper 3 if I use java version JDK1.2.2_JDeveloper.
It compiles OK in regular JDK1.2.2 but raise the following
exception when running:
profile
com.itrade.trserver.truser.dbqueries.ItrHistorian_SJProfile0 not
found: java.io.InvalidClassException: [Ljava.lang.Object;;
Serializable is incompatible with Externalizable
Does it mean that I have to use JDeveloper JDK?
2.When I give other then default package for *.sqlj file the
*.sqlj file is added to project but I cannot see it in specified
package (the *.sqlj file is created in the its directory).
After I compile the project the I can see *.java file in the
specified package, but compiler gives errors about redefined
symbols. If I remove *.sqlj file from the project it compiles OK.
What I am doing wrong?
Yakov Becker
null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Thank you for the response.
I don't create jar file. I run it from JDeveloper environment.
What do you mean by "I made sure to also copy over the
: the .ser file"? What purpose of the *.ser file in this case?
Yakov
JDeveloper Team (guest) wrote:
: I have come across this error before..
: I'm assuming that your jar file is in the classpath as
: specified in the Jserv configuration?
: When I had the error, I made sure to also copy over the
: the .ser file.
: In my case, I happened to have both my class files and
: the .ser file outside of a jar file and it worked..
: Hope this helps!
: Yakov Becker (guest) wrote:
: : I have two questions:
: : 1.I wrote simple test appllication that uses SQLJ to run
store
: : procedures from SQL package. It compiles and work fine from
: : JDeveloper 3 if I use java version JDK1.2.2_JDeveloper.
: : It compiles OK in regular JDK1.2.2 but raise the following
: : exception when running:
: : profile
: : com.itrade.trserver.truser.dbqueries.ItrHistorian_SJProfile0
: not
: : found: java.io.InvalidClassException: [Ljava.lang.Object;;
: : Serializable is incompatible with Externalizable
: : Does it mean that I have to use JDeveloper JDK?
: : 2.When I give other then default package for *.sqlj file the
: : *.sqlj file is added to project but I cannot see it in
: specified
: : package (the *.sqlj file is created in the its directory).
: : After I compile the project the I can see *.java file in the
: : specified package, but compiler gives errors about redefined
: : symbols. If I remove *.sqlj file from the project it
compiles
: OK.
: : What I am doing wrong?
: : Yakov Becker
null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Using Store Procedures with BC4J - Help

    I need some help, could you explain me how to call some store procedures on an Entity Object with a source code.
    I really apreciate your help.
    null

    You can override the doDML method.
    Then I get the connection using the getDBTransaction() method.
    After that you can include your code in order to invoke the stored procedure.
    Example:
    public void doDML(int operation, TransactionEvent e) {
    CallableStatement stmt = null;
    if (operation == DML_INSERT)
    // Prepare JDBC CallableStatement with the Stored Procedure Call
    String plStr = "XXXXXX";
    stmt = getDBTransaction().createCallableStatement(plStr , 1);
    Other way:
    Create a method in the view objet and make it a client method.
    You can get the appmodule and the DBTransaction in this method.
    In both cases you are using the same connection.

  • My wife got a Iphone in Bangladesh. she do not know the password for apple ID, there is no way to collect it, as the email id for that iphone is not her. how she can use application store and itunes? please help me

    My wife got a Iphone in Bangladesh. she do not know the password for apple ID, there is no way to collect it, as the email id for that iphone is not her. how she can use application store and itunes? please help me

    If it is second hand, try putting it in recovery mode, and restoring it with itunes on a mac or pc.
    Recovery mode tutoral:http://www.youtube.com/watch?v=dkVr5CxFiFM

  • Hey there! well i from india and i m facing problem connecting my debit card to the itune store ,as the very option is not there, can someone guide me how to get it connected , i have a mastercard debit card with me .please help me

    hey there! well i from india and i m facing problem connecting my debit card to the itune store ,as the very option is not there, can someone guide me how to get it connected , i have a mastercard debit card with me .please help me

    if you are signed in to iTunes with your AppleID, click on the AppleID > view account > payment information > enter in your information

  • How to call a Store Procedure with IN PARAMETER

    Hi, im new using Oracle 10G with Oracle SQL Developer, my cuestion is how to call a Store Procedure with IN PARAMETER, I tried the following without results
    SELECT * FROM procedure_name(parameter);
    PROCEDURE procedure_name(parameter);
    EXEC procedure_name(parameter);
    CALL procedure_name(parameter);
    Please help me....

    Hi,
    As Beijing said,
    EXEC procedure_name(parameter);
    CALL procedure_name(parameter);work for me.
    So does
    BEGIN
        procedure_name(parameter);
    END;Can you be more specific about what you're doing? That is, are you testing it in SQL Developer? Where are you entering the commands? Where are you looking for output? Do you get error messages? Does anything else (like "SELECT SYSDATE FROM dual;") work?

  • Need to update multiple records using store procedure

    Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
    for example my source is
    emp_name sal
    abhi 2000
    arti 1500
    priya 1700
    i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
    i have tried following code
    create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select sal into p_sal from emp;
    if sal<2000 then
    update emp set sal= sal+200;
    end i;f
    end;
    and i have called the procedure using following codes
    set serveroutput on
    declare
    p_sal emp.sal%type;
    v_cursor sys_refcursor;
    begin
    upt_sal(p_sal,v_cursor);
    fetch v_cursor into p_sal;
    dbms_output.put_line(p_sal);
    end;
    the program is executing but i should get o/p like this after updating
    1700
    1900
    but i am getting first row only
    2000
    and record is not upsating...please help me with this
    thanks

    Hi Alberto,
    thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
    and i have similar kind of requirement where i need to deal with procedure which returns more than one row
    my source is
    empno ename salary
    111,abhi,300
    112,arti,200
    111,naveen,600
    here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
    here i have written store procedure like this
    create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select ename,salary into p_ename,p_salary from emp where empno=p_empno;
    end;
    and i have called this by using
    declare
    p_salary emp.salary%type;
    p_ename emp.ename%type
    v_cursor sys_refcursor;
    begin
    show_emp_det(111,p_ename,p_salary,v_cursor);
    fetch v_cursor into p_ename,p_salary;
    dbms_output.put_line(p_ename);
    dbms_output.put_line(p_salary);
    end;
    here i should get
    abhi,300
    naveen,600
    but i am getting first row only
    abhi,300
    but i want to fetch both rows...pls help me to find the solution

  • How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000

    Post Author: ltkin
    CA Forum: WebIntelligence Reporting
    Hi,
    How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ?
    Regards,

    Hi ltkin,
    Unfortunately, it is not possible in Xir2 to create Webi reports from stored procedures.
    Webi reports can only be created from Universe. So in Business Objects XIR3 we can create a special universe that enables Web Intelligence user's to access stored procedures residing in the database. This is the only way that Web Intelligence user's can access stored procedures.
    Please let me know if the above information helps.
    Regards,
    Pavan

  • Which is better to use Store Procedure or Views in Crystal Reports ?

    Hi,
    which one is more better to use Store Procedure or Views in Crystal Reports ?
    Thanks.

    It depeneds on the requirement. Well, but from performance point of view as u know that stored procedures are already compiled on DB side, they would be more efficient. Views are handled differently. Here CR has nothing to do with it.
    But if the stored procedure u r using is having 2 Select statements, CR will only display the results from the first select statement. In that case you need to use Views as one can use more than one views in the report and join them.
    Using a Generic view which is created by the DBA for a larger audience will result in performance issues meaning if a View "V" has 25 fields and View is based on 5 tables  and ur report is using only 5 fields which are coming only from 2 tables inside the view,in this case u will end up in joining 3 more tables unnecessarily.
    Hope this helps!

  • How to pass xml data as objects into Database using store procedures

    Hi All,
         I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
    My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
    Input Data
    <ROWSET>
       <ROW>
         <EMP_ID>7000</EMP_ID>
          <EMP_TYPE>TYPE1</EMP_TYPE>
         <EMP_DET>DEP</EMP_DET>
      <ROW>
      <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE2</EMP_TYPE>
        <EMP_DET>DEP2</EMP_DET>
    <ROW>
    <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE3</EMP_TYPE>
        <EMP_DET>DEP3</EMP_DET>
    <ROW>
    <ROWSET>
    So each row values has to inserted into resp fields in the table.
    Regards
    Mani

    Do you have a similar structure in your stored procedure ?
    In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values.

  • Problem connecting after using Itunes 5.0. Please help!

    I updated to Itunes 5.0 a couple of days ago. I didn't have any problems installing it and was running fine. Then when I had purchased some music when it was imported to my Ipod, a couple of the songs were freezing. I was trying to figure out whether it was the song on my Ipod or if it was the purchased song. While I was doing that my program froze and told me it no longer recognized my Ipod and come up with the error message that says Itunes is not responding, End Now.
    After I did that, it seemed as though my Ipod had been deleted, and I thought all hope was lost. Now after looking in the files, it shows my Ipod Control folder has just been hidden. I have gone in and shown the files so they are no longer hidden. I also noticed it had the 4 letter song names in there too now. When I open Itunes again, it just hides them again and continues to say its unable to recognize my Ipod and that I need to update my Ipod software, which I have tried and still doesn't work.
    What should I do now? I was thinking about uninstalling Itunes 5.0 and going back to my old version, but I have seen that other people have been having problems with that.
    My main concern is that I don't want to lose my music because I don't have it backed up because my computer doesn't have the space to hold all of my songs and I don't have any external drives or anything to store them on.
    Please help!

    I have had a very similar problem
    -Currently using: Windows XP Home edition with most recent updates
    -2.39Ghz processor, Itunes 5
    -IPOD 20GB I only have used up 3.9GB
    Very similar problem
    My IPOD has recently had a weird problem after installing Itunes 5. When I first connect the ipod to the computer everything seems to be working fine, because the ipod displays the "please do not disconnect" message, and ITUNES come up on the screen and lets me play music from my ipod only for a brief few minuets. The computer then stops playing the song it was currently playing and I tunes freezes. After that point the only way to unfreeze Itunes is to press select/menu on the ipod. When the ipod restarts and I plug the ipod back into my computer it won't bring I tunes up again, and I am unable to access the ipod drive. A screen comes up after 10 minuets saying I have to reformat my ipod because it can not be read. I have already done so about 10 times and I still have the same problem.
    My ipod doesn't freeze when I'm just listening to it with my earphones or on my stereo, but it laggs more thean usual when changeing songs or menus (I have only used up 3.9GB). I have also tried using my ipod on other computers and I get the same problem. Please Help!

  • I can't install Lion because Macintosh HD can not use it as a startvolume. please help!

    I can't install Lion because Macintosh HD can not use it as a startvolume. please help!
    greetings from Austria ;D

    http://www.apple.com/support/lion/installrecovery/
    And this link for How to create Lion Recovery Drive just went MIA / "404"
    http://support.apple.com/kb/HT4713
    http://support.apple.com/kb/HT4718
    You can also use the OS X Lion installer from the Mac App Store to create an external bootable drive, complete with a Recovery HD partition. See this article for more details. This approach will, at least, create a bootable drive with Recovery HD which you can carry with you in case you need to use Internet Restore or make use of the other utilities Recovery HD provides.
    http://support.apple.com/kb/HT4649

  • Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Hi, since installing mountain lion on my macbook, it wont download pdf files from internet sites, the same problem does not exist on my mac mini, i am using firefox on both macs, please help!

    Back up all data.
    Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Using stored procedures with a timestamp parameter with Delphi  and ADO

    Dear Oracle experts,
    I have a problem concerning using a stored procedure with Delphi.
    I try to use a stored procedure which hast two input parameters ( a integer and a timestamp).
    The timestamp parameter is my problem since I would like to use the "to_timestamp"
    Oracle-function to create the timestamp parameter to be inserted into my procedure.
    If I insert the to_timestamp statement as a adodatetime I have to perform the conversion to the oracle timestamp in my application.
    If I want to use the to_timestamp statement I have to use the ftstring datatype but in that case I get an error because I use a string as input for my procedure were it awaits a timestamp.
    So the problem seems to be that the function call "to_timestamp" is not interpreted if it is transferred through my ADO component.
    Do you know how to use a procedure with Delphi (ADO) with a function as input parameter ?
    Best regards,
    Daniel Wetzler
    P.S. :
    This is the Delphi code to use my Procedure.
    FactsTempDS:=TADODataset.Create(nil);
    Sproc1 := TAdoStoredProc.Create(nil);
    Sproc1.Connection := TDBConnection(strlistConnectionstrings.objects[iConnectionIndex]).Connection;
    Sproc1.ProcedureName := 'ECSPACKAGE.PROCFINDINITIALSWITCHSTATE';
    Sproc1.Parameters.CreateParameter ('SwitchID',ftInteger,pdinput,0,0);
    //Sproc1.Parameters.CreateParameter ('StartTime',ftdatetime,pdinput,50,0);
    Sproc1.Parameters.CreateParameter ('StartTime',ftString,pdinput,50,0);
    Sproc1.Parameters.Findparam('SwitchID').value:=SwitchID;
    Sproc1.Parameters.FindParam('StartTime').Value:= 'to_timestamp(''2005/12/30 19:36:21'', ''YYYY/MM/DD HH:MI:SS'')';
    Sproc1.CursorType := ctKeyset;
    Sproc1.ExecuteOptions:=[];
    Sproc1.Open;
    Sproc1.Connection := nil;
    FactsTempDS.Recordset:= sproc1.Recordset;
    if FactsTempDS.RecordCount=0
    then raise Exception.Create('No line switch variable found for switch '+IntToStr(SwitchID)+' before starttime. Check BDE dump filter.')

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • When iPhone is connected to PC, it shows in itunes but Autoplay does not open for me to copy photos. I tried the Control Panel, changing Autoplay settings but no use. I use a Windows Vista. Please help! All my little ones' pictures are on my iPhone 3GS

    When iPhone is connected to PC, it shows in itunes but Autoplay does not open for me to copy photos. I tried the Control Panel, changing Autoplay settings but no use. I use a Windows Vista. Please help! All my little ones' pictures are on my iPhone 3GS.
    I tried hard reset on my iPhone. I tried restarting laptop and iPhone. I tried a different laptop. I tried removing driver and reinstalling from Device Manager but did not find a driver other than "Apple Mobile Device USB Driver" under "Universal Serial Bus controllers" which I heard shouldn't be uninstalled.
    Anything I haven't tried?
    HELP!

    A bit confused by your statement
    bcboarder wrote:
    . I do not understand why the music is clearly on the Ipod but wont reconize it anywhere.
    Are you seeing your music listed in the iPod screen, or in Win explorer as in your earlier post?
    I can see all the songs in my Edrive>al's Ipod> Ipod Control> Music folder.
    A corrupted iPod database, will report zero music used, and have your music size reported as others, so you wont see the music in the iPod screen. Sorry, I thought there was some hope for you with iPodAccess, in recovery of the corrupted iPod database with your ratings.
    You can try to borrow and  use the Mac Disk Utility ->First Aid ->Repair.
    Of course, if your iPod Hardisk is in a bad state, from the Disk Diagnostic report, then all my suggestion are futile.

  • I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    MUYconfundido wrote:
    Pancenter,
    Thanks for the response, but I do not have a midi interface. I am using a midi to usb connector cable, thus bypassing the need for a Midi interface.
    The Mac reads the USB cable as a midi device, but not the keyboard that I am trying to use as a controller. I have tried it with my korg sp 300 and with my Nord Electro 2.
    Thoughts?
    Thanks,
    Tristan
    Tristan...
    This is what you have, correct?
    http://www.alesis.com/usbmidicable
    This from Alesis..
    "The AudioLink Series USB cable receives and outputs MIDI signal thanks to its internal interface. The USB-MIDI Cable connects plug-and-play to your Mac or PC for an all-in-one USB-MIDI solution."
    Notice, -internal interface-. What you have is a simple USB MIDI Interface. Most MIDI interfaces are USB.
    My point is (was), MIDI OUT of the Korg goes to the connector marked MIDI IN on the Alesis, those new to MIDI often get this wrong.
    pancenter-

Maybe you are looking for