Generating PL/SQL with invoker's rights?

When will this functionality be available in Designer? We are currently running Designer 10g (9.0.4.3.14) and this functionality is not supported yet.
We would very much like to be able to generate packages with "AUTHID CURRENT_USER" from the server model.
There is a forum in which the following is stated: " The BUG 884671 - PROCEDURE/FUNCTION NEEDS INVOKER RIGHTS (AUTHID)
is not yet fixed. Please follow the bug from Metalink."
Bug 884671 does not exist or is not viewable by ordinary MetaLink users like me.
Regards Thomas Kirchhoff

Thomas,
We have no plans to add this functionality to Designer. Please read the latest Tools Statement of Direction on the Designer pages on OTN (http://otn.oracle.com/products/designer/index.html) There is also a Designer maintenance release cycle document which details our plans for Designer and a related FAQ.
Regards
Sue Harper
Designer Product Management

Similar Messages

  • Generate ANSI SQL with Oracle IKM

    Is it possible for ODI to generate ANSI SQL with the Oracle IKM?
    I have used ANSI joins in a filter in an interface, now when I run the interface I get the error: ORA-25156: old style outer join (+) cannot be used with ANSI joins.
    I would prefer to use ANSI joins in my filters instead of the old style (+) syntax. Is this possible?

    Sure,
    Go to topology, edit your Oracle technology , on SQL tab change it over to ordered joins - clause location - From , you can specify the keywords left join, right join, full outer join etc to get rid of your '(+)'

  • Invoker's Rights in Designer 9i

    I'm trying to generate a stored procedure i Designer 9i with invoker's rights, but I can't find any option for that. How can I do that without having to fix the script generated from Designer?

    Kjell,
    Sadly, I don't think we support that syntax in Designer. I can't find a workaround except by editing the generated code. This could possibly be automated (e.g. using perl) if you can provide some distinguishing feature in the package name (maybe ends in _IR, for example) or generate to different files.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can you run a command with elevated rights on a remote server with invoke-command ?

    I am trying to run a script on a remote server with invoke-command.  The script is starting and is running fine, but the problem is that it should be running with elevated rights on the remote server.  On the server where I start the invoke-command, my account has the necessary rights.
    The server were I launch the invoke-command is a W2K8 R2.  The remote box is a W2K3 with powershell v2.0 installed.
    When I launch the script on the remote-box from the command line, I don't get the access denied's.
    Is there a way to do this ?
    Thanks in advance

    The script that I want to run is to install the windows updates.  I get an access denied on the download of the updates.
    When I execute the script on an W2K8 box, (not remotely) and I run it with non-elevated rights, I get the same error.
    The script is running fine when it is launched on W2K3 box locally with a domain account that has local admin rights, or on a W2K8 R2 server with a domain account that has local admin rights, but with elevated rights.
    Thanks in advance for your help.
    #=== start script ====
    param($installOption="TESTINSTALL",$rebootOption="NOREBOOT")
    Function Show-Help
    Write-Host ""
    Write-Host "SCRIPT: $scriptName <installOption> <RebootOption>"
    Write-Host ""
    Write-Host "DESCRIPTION: Installatie van WSUS updates op de lokale server"
    Write-Host ""
    Write-Host "PARAMETERS"
    Write-Host " -installOption <[INSTALL|TESTINSTALL]>"
    Write-Host " -rebootOption <[REBOOT|NOREBOOT|REBOOT_IF_UPDATED]>"
    Write-Host ""
    Write-Host "EXAMPLE:"
    Write-Host "$ScriptName -installOption INSTALL -rebootOption REBOOT_IF_UPDATED"
    Write-Host "$ScriptNAme INSTALL NOREBOOT"
    Write-Host ""
    Write-Host "Indien beide parameter weggelaten worden zijn de defaultwaarden :"
    Write-Host " installOption=TESTINSTALL "
    Write-Host " RebootOption=NOREBOOT"
    Write-Host ""
    Exit
    #Include alle globale variablen
    $CEIF_WIN_PATH = (get-content env:CEIF_WIN_PATH)
    $includeFile=$CEIF_WIN_PATH + "\Scripts\include_win.ps1"
    . $includeFile
    #initialiseer error count
    $errcnt=0
    $scriptName=$MyInvocation.MyCommand.Name
    #argumenten controleren
    $arrInstallOption= "TESTINSTALL", "INSTALL" # Mandatory variable with predefined values
    If (!($arrInstallOption –contains $installOption)){ Show-Help }
    $arrRebootOption = "REBOOT", "NOREBOOT","REBOOT_IF_UPDATED" # Mandatory variable with predefined values
    If (!($arrRebootOption –contains $rebootOption)){ Show-Help }
    #Logfile opbouwen
    $logfile = get-logfileName($MyInvocation.MyCommand.Name)
    Log-scriptStart $MyInvocation.MyCommand.Name $logfile
    function Get-WIAStatusValue($value)
    switch -exact ($value)
    0 {"NotStarted"}
    1 {"InProgress"}
    2 {"Succeeded"}
    3 {"SucceededWithErrors"}
    4 {"Failed"}
    5 {"Aborted"}
    function boot-server()
    if ($installOption -eq "TESTINSTALL")
    logger "TESTINSTALL : - Reboot local Server" $logfile
    else
    logger " - Reboot local Server" $logfile
    $thisServer = gwmi win32_operatingsystem
    $thisServer.psbase.Scope.Options.EnablePrivileges = $true
    $thisServer.Reboot()
    $logmsg="Install option = " + $installOption + ", RebootOption = $rebootOption"
    logger "$logmsg" $logfile
    logger "" $logfile
    logger " - Creating WU COM object" $logfile
    $UpdateSession = New-Object -ComObject Microsoft.Update.Session
    $UpdateSearcher = $UpdateSession.CreateUpdateSearcher()
    logger " - Searching for Updates" $logfile
    $SearchResult = $UpdateSearcher.Search("IsAssigned=1 and IsHidden=0 and IsInstalled=0")
    logger " - Found [$($SearchResult.Updates.count)] Updates to Download and install" $logfile
    $Updates=$($SearchResult.Updates.count)
    logger "" $logfile
    foreach($Update in $SearchResult.Updates)
    if ($Update.EulaAccepted -eq 0)
    $Update.AcceptEula()
    # Add Update to Collection
    $UpdatesCollection = New-Object -ComObject Microsoft.Update.UpdateColl
    $UpdatesCollection.Add($Update) | out-null
    if ($installOption -eq "TESTINSTALL")
    else
    # Download
    logger " + Downloading Update $($Update.Title)" $logfile
    $UpdatesDownloader = $UpdateSession.CreateUpdateDownloader()
    $UpdatesDownloader.Updates = $UpdatesCollection
    $DownloadResult = $UpdatesDownloader.Download()
    $Message = " - Download {0}" -f (Get-WIAStatusValue $DownloadResult.ResultCode)
    if ($DownloadResult.ResultCode -eq 4 )
    { $errcnt = 1 }
    logger $message $logfile
    # Install
    logger " - Installing Update" $logfile
    $UpdatesInstaller = $UpdateSession.CreateUpdateInstaller()
    $UpdatesInstaller.Updates = $UpdatesCollection
    $InstallResult = $UpdatesInstaller.Install()
    $Message = " - Install {0}" -f (Get-WIAStatusValue $InstallResult.ResultCode)
    if ($InstallResult.ResultCode -eq 4 )
    { $errcnt = 1 }
    logger $message $logfile
    logger "" $logfile
    #Indien er een fout gebeurde tijdens download/installatie -> stuur mail naar windowsteam
    if ( $errcnt -gt 0 )
    logger " - Fout tijdens de uitvoering van script -> send mail" $logfile
    $mailSubject=$MyInvocation.MyCommand.Name
    $msg = new-object Net.Mail.MailMessage
    $att = new-object Net.Mail.Attachment($logfile)
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = $mailFrom
    $msg.To.Add($mailTo)
    $msg.Subject = $mailSubject
    $msg.Body = “Meer details in attachement”
    $msg.Attachments.Add($att)
    $smtp.Send($msg)
    #Moet de server herstart worden ?
    if ($rebootOption -eq "REBOOT_IF_UPDATED" )
    if ($Updates -gt 0)
    #Reboot the server when updates are installed
    boot-server
    elseif ($rebootOption -eq "REBOOT")
    #reboot the server always
    boot-server
    else
    #Do not reboot the server
    logger "Do not reboot the server" $logfile
    Log-scriptEnd $MyInvocation.MyCommand.Name $logfile
    exit 0

  • Installing SQL server with local Admin rights

    Dear DB experts
    I have a concern about installing SQL server 2000 on win 2003 with out local admin rights
    I have delegated local admin rights to a Domain user.  that user can install and configure SQL with out any issues or its is a must to install SQL using local administrator account   pls advise.
    Regards
    Rabbani
    RaSa

    Hi Syed_R,
    SQL Server 2000 was out of support in SQL Server Forums since April,2013. You can install SQL Server 2005 or later version and more experts will assist you.
    As other post, the user that runs the SQL Server installer must have Admin rights on the server when installing. For local installations, you must run Setup as an administrator. If you install SQL Server from a remote share, you must use a domain account
    that has read and execute permissions on the remote share.
    In addition, in preparation for setting up Microsoft SQL Server on this system, you add the Setup account to the local administrators group, also the Setup account need to have certain user rights for avoiding SQL Server installation fails. Such as Local
    Policy Object Display Name, Backup files and directories and so on.
    For more information, you can review the following article.
    http://support.microsoft.com/kb/2000257
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Package with invoker or definer rights

    Hi,
    would you give me the syntax for creating package with invoker or definer rights??
    Thanks in adavance.
    Regards
    Ravikumar.A

    i am looking for syntax.Document has it. From the doc.
    CREATE [OR REPLACE] PACKAGE package_name
       [AUTHID {CURRENT_USER | DEFINER}]
       {IS | AS}
       [PRAGMA SERIALLY_REUSABLE;]
       [collection_type_definition ...]
       [record_type_definition ...]
       [subtype_definition ...]
       [collection_declaration ...]
       [constant_declaration ...]
       [exception_declaration ...]
       [object_declaration ...]
       [record_declaration ...]
       [variable_declaration ...]
       [cursor_spec ...]
       [function_spec ...]
       [procedure_spec ...]
       [call_spec ...]
       [PRAGMA RESTRICT_REFERENCES(assertions) ...]
    END [package_name];
    [CREATE [OR REPLACE] PACKAGE BODY package_name {IS | AS}
       [PRAGMA SERIALLY_REUSABLE;]
       [collection_type_definition ...]
       [record_type_definition ...]
       [subtype_definition ...]
       [collection_declaration ...]
       [constant_declaration ...]
       [exception_declaration ...]
       [object_declaration ...]
       [record_declaration ...]
       [variable_declaration ...]
       [cursor_body ...]
       [function_spec ...]
       [procedure_spec ...]
       [call_spec ...]
    [BEGIN
       sequence_of_statements]
    END [package_name];]

  • Howto generate correct SQL for Connector/J?

    I am trying to switch to MySQL and generated new SQL, deployed, and
    generated a new client (all using the deploytool).
    Now I am getting the exception below (SQL Syntax error) when
    running the client. How come?
    What I'm using:
    J2EE 1.4
    MySQL 4.0.12
    Connector/J 3.0.7
    The application was working with Cloudscape.
    Help is much appreciated.
    Caught an exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: createRace: nested exception is: 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 MySQL server version for the right syntax to use near '"RaceBeanTable" WHERE "raceId" = '1'' at line 1"
    at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:61)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
    at com.mnm.run.ejb.race._RaceController_Stub.createRace(Unknown Source)
    at com.mnm.run.client.RunningClient.insertRaceInfo(Unknown Source)
    at com.mnm.run.client.RunningClient.main(Unknown Source)
    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:324)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:315)
    at com.sun.enterprise.appclient.Main.main(Main.java:215)
    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:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:280)
    Caused by: java.rmi.RemoteException: createRace: nested exception is: 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 MySQL server version for the right syntax to use near '"RaceBeanTable" WHERE "raceId" = '1'' at line 1"
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:360)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:557)
    at com.mnm.run.ejb.race.RaceControllerBean_EJBObjectImpl.createRace(RaceControllerBean_EJBObjectImpl.java:181)
    at com.mnm.run.ejb.race._RaceControllerBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.se.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:517)
    at com.sun.corba.se.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:207)
    at com.sun.corba.se.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:109)
    at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:252)
    at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
    at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)

    Manually removing the qoutes(") from the SQL statements
    that have been generated by deploytool from the deployment
    descriptor file seems to get around the SQL syntax error,
    but now the tables are not generated as requested:
    <create-table-deploy>true</create-table-deploy>
    Any help is much appreciated.
    Andreas
    Caught an exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: createRace: nested exception is: java.sql.SQLException: General error, message from server: "Table 'tcladb.racebeantable' doesn't exist"
    ...

  • INVOKER'S RIGHT ( ORACLE 8I NEW FEATURE )

    제품 : PL/SQL
    작성날짜 : 2000-05-31
    INVOKER'S RIGHT ( ORACLE 8I NEW FEATURE )
    ==============================================
         AUTHID와 SQL_NAME_RESOLVE에 대해 CURRENT_USER, DEFINER를 지정
         8.1 현재 버젼에서는 AUTHID = CURRENT_USER 일때는 SQL_NAME_RESOLVE =
    CURRENT_USER, AUTHID = DEFINERE 일때는 SQL_NAME_RESOLVE = DEFINER만
    가능
         - AUTHID , SQL_NAME_RESOLVE = DEFINER
              scott 이라는 user에 다음과 같은 stored procedure를 정의했을때
              foo 라는 user에서는 scott.emp 나 scott.empcount 에 대한
              select priviledge, insert priveledge가 없어도 name_count에
              대한 execute priveledge를 가지고 있으면 실행 가능하다.
              그 이유는 name_count를 invoke 시킨 user가 foo라고 할 지라도
              내부적으로는 scott의 priveledge를 가지고 name_count라는
              procedure가 실행 되기 때문이다.
              create or replace procedure name_count
              authid definer as
              n number;
              begin
              select count(*) into n from scott.emp;
              insert into empcount values(n);
              end;
         - AUTHID , SQL_NAME_RESOLVE = CURRENT_USER     
              scott이라는 user에서 다음과 같은 stored procedure를 정의했을
    때 foo 라는 user에서 name_count에 대한 execute priveledge를
              가지고 있다고 할 지라도 scott.emp 에 대한 select priveledge를
              가지고 있지 못하면 name_count를 실행 할 수 없다. 또한
              empcount table은 scott.empcount가 아니라, foo.empcount 테이블
    을 뜻하는데, 그 이유는 authid 와 sql_name_resolve가
    current_user로 지정이 되어 있기 때문이다.
              foo 라는 user에 scott.emp 테이블에 대한 select priviledge를
              grant 해 주고, empcount 테이블을 만든후 실행 시키면
              scott.emp의 row 갯수를 foo.empcount 테이블에 insert 시키게
              된다.
              create or replace procedure name_count
              authid current_user as
              n number;
              begin
              select count(*) into n from scott.emp;
              insert into empcount values(n);
              end;

    Seems that you are right ... iSQLPlus is not referenced in the Oracle8i documentation and was probably not available until Oracle9i
    However, it is certainly possible to install only the iSQLPlus capability of 9i (and probably10g) and configure the tnsnames.ora for the iSQLPlus installation to communicate with an 8i database.
    This is partially discussed here http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch3.htm#1005835
    Works ... as long as the use is willing to accept the lesser capability of Oracle8i ...

  • Problems generating PL/SQL objects Des6i !

    Hi,
    For your info
    I had problems when I try to generate PL/SQL procedures of a free format.
    The generator process hangs when reading the server model.
    I discovered that when I remove the declaration section in the PL/SQL block and put it in the private declaration block it works fine.
    The help of the PL/SQL block property doesnt mentioning any thing about not putting the declarations in the PL/SQL block.
    Is this a known problem or have I this problem only maybe caused by a different installation. (Designer 6i rel3 /Oracle 8.1.7/NT4 )
    null

    Vadim,
    In version 2.1 RC1 (2.1.0.63.41) I still have problems with the PL/SQL editor.
    Will these be solved in the final version?
    I was searching bug no. 8967961 in My Oracle Support, but was not able to find it. Where can I find this bug?
    Problems in RC1:
    *1. User defined extensions are not shown in PL/SQL editor.*
    This problem is introduced in 2.1 EA1 and still exists in RC1.
    *2. Pop-up describe for a pl/sql object shows only the user defined tab pages*
    Select the name of a PL/SQL object in the editor, right click and choose "Popup describe". The default tab pages are not shown, only the tab pages added by User Defined Extensions.
    *3. "Go to ...." option does not go to specific line number*
    Use Report Data Dictionary Reports > PLSQL > Search Source Code. In the results, right click on an object and choose the "Go to .... " option. The editor doesn't go to the correct line. The pseudo column sdev_link_line has no effect.

  • How can i create a new user with only read rights ?

    How can i create a new user with only read rights ?

    You are asking about a Database User I hope.
    You can look into the Oracle 8i Documentation and find various privillages listed.
    In particular, you may find:
    Chapter 27 Privileges, Roles, and Security Policies
    an intresting chapter.
    You may want to do this with the various tools included with 8i - including the
    Oracle DBA Studio - expand the Security node and you can create USERS and ROLES.
    Or use SQL*Plus. To create a
    user / password named John / Smith, you would login to SQL*Plus as System/manager (or other) and type in:
    Create user John identified by Smith;
    Grant CONNECT to John;
    Grant SELECT ANY TABLE to John;
    commit;
    There is much more you can do
    depending on your needs.
    Please read the documentation.
    -John
    null

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

  • OBIEE: Incorrect SQL - with count function uses ORDER BY instead GROUP BY

    I made a basic report that is a client count; I want to know how many clients the company have.
    But, when I run this report, OBIEE generates a ORDER BY sentence, instead a GROUP BY. Remember that I'm using count function, that is a agregation.
    The SQL generated was:
    select 'N0' as c1,
    count(*) as c2
    from
    (select distinct T1416.CLIENT_INTER_KEY as c1
    from
    (select *
    from prd.D_SERVICE where SOURCE_SYS in ('ARBOR','PPB') and DW_SERV_ST_ID in (100000003,100000009)) T1836,
    (select *
    from prd.D_CLIENT) T1416,
    (select *
    from prd.D_CUSTOMER_ACCOUNT where SOURCE_SYS In ('ARBOR','PPB')) T1515
    where ( T1416.DW_CLIENT_ID = T1515.DW_CLIENT_ID and T1515.DW_CUST_ACCT_ID = T1836.DW_CUST_ACCT_ID and T1836.MSISDN = '917330340' )
    ) D1
    order by c1
    The error that I receive is:
    "Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: -1005018 message: [Sybase][ODBC Driver][Adaptive Server Anywhere]Illegal ORDER BY item Order Item: 'N0',
    -- (opt_OrderBy.cxx 429) .
    [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement."
    If I substitute ORDER BY with GROUP BY and test it in Sybase, Ithe query runs without any problem.
    select 'N0' as c1,
    count(*) as c2
    from
    (select distinct T1416.CLIENT_INTER_KEY as c1
    from
    (select *
    from prd.D_SERVICE where SOURCE_SYS in ('ARBOR','PPB') and DW_SERV_ST_ID in (100000003,100000009)) T1836,
    (select *
    from prd.D_CLIENT) T1416,
    (select *
    from prd.D_CUSTOMER_ACCOUNT where SOURCE_SYS In ('ARBOR','PPB')) T1515
    where ( T1416.DW_CLIENT_ID = T1515.DW_CLIENT_ID and T1515.DW_CUST_ACCT_ID = T1836.DW_CUST_ACCT_ID and T1836.MSISDN = '917330340' )
    ) D1
    group by c1
    Do you know why OBIEE generates this SQL??? Why uses, with a aggregation function, a ORDER BY and not a GROUP BY? How can I resolve this problem???
    Regards,
    Susana Figueiredo

    Verify your repository design and make sure that you have defined count aggregate on fact column. You would also need to define the content level of each dimension in fact table.

  • Trying to generate a pdf with jasper reports

    Fellas,
    i hav trying to generate a pdf with jasper reports, but i cant. I create a file .jasper with iReports. This is my code:
    emite.java
    package utilitarios;
    //import net.sf.jasperreports
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.view.JasperViewer;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import java.util.HashMap;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class emitebl {
    private static Connection getConnection( ) throws ClassNotFoundException, SQLException{
    String driver = "org.postgresql.Driver";
    String url = "jdbc:postgresql://localhost/sist";
    String user = "usuario";
    String password = "";
    Class.forName(driver);
    Connection con = DriverManager.getConnection( url, user, password );
    return con;
    public void geraRelatorio( ) throws JRException, Exception{
    Connection con = getConnection( );
    Statement stm = con.createStatement( );
    String query = "SELECT * FROM emissaobl WHERE id=4";
    ResultSet rs = stm.executeQuery(query);
    JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
    Map parameters = new HashMap();
    JasperFillManager.fillReportToFile("emitebl.jasper",parameters,jrRS);
    JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
    JasperViewer.viewReport("emissao_bl.pdf",false);
    } emissao.jsp:
    <%@ page import="utilitarios.*" %>
    <%
    new emitebl().geraRelatorio();
    %>Following the error message exception:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: emitebl.jasper
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
         org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    root cause
    net.sf.jasperreports.engine.JRException: emitebl.jasper
         net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:73)
         net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:270)
         utilitarios.emitebl.geraRelatorio(emitebl.java:37)
         org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:54)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)where i hav to put the .jasper file?

    Hi,
    If you have placed your .jrxml file say in C:\reports, and when you use compileReportToFile(jrxmlFileName), then the jasper file will be created in the same directory C:\report with the same file name with .jasper extension. If you want a pdf report then specify the same location and file name with '.pdf' extension as destination .
    Hope this helps

  • Trying to generate a pdf with jasper

    Fellas,
    i hav trying to generate a pdf with jasper reports, but i cant. I create a file .jasper with iReports. This is my code:
    emite.java
    package utilitarios;
    //import net.sf.jasperreports
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.view.JasperViewer;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import java.util.HashMap;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class emitebl {
    private static Connection getConnection( ) throws ClassNotFoundException, SQLException{
    String driver = "org.postgresql.Driver";
    String url = "jdbc:postgresql://localhost/sist";
    String user = "usuario";
    String password = "";
    Class.forName(driver);
    Connection con = DriverManager.getConnection( url, user, password );
    return con;
    public void geraRelatorio( ) throws JRException, Exception{
    Connection con = getConnection( );
    Statement stm = con.createStatement( );
    String query = "SELECT * FROM emissaobl WHERE id=4";
    ResultSet rs = stm.executeQuery(query);
    JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
    Map parameters = new HashMap();
    JasperFillManager.fillReportToFile("emitebl.jasper",parameters,jrRS);
    JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
    JasperViewer.viewReport("emissao_bl.pdf",false);
    }emissao.jsp:
    <%@ page import="utilitarios.*" %>
    <%
    new emitebl().geraRelatorio();
    %>Following the error message exception:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: emitebl.jasper
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:76)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    root cause
    net.sf.jasperreports.engine.JRException: emitebl.jasper
    net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:73)
    net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:270)
    utilitarios.emitebl.geraRelatorio(emitebl.java:37)
    org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:54)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)where i hav to put the .jasper file?

    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    import java.sql.*;
    import java.io.File;
    import java.util.Date;
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.view.JasperViewer;
    class dbAccessi
              public static void main (String args []) throws SQLException
                        try{
                             //DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
                                       Class.forName ("oracle.jdbc.driver.OracleDriver");
                             Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.236.8.49:1521:heb","hebuser","hebpass");
         // @machineName:port:SID, userid, password
                                       int i=0,j=0;
                             Statement stmt = conn.createStatement();
                             ResultSet rs = stmt.executeQuery("select age,name from java1");
                                       while (rs.next())
                                  System.out.println (rs.getString(1));
                                  System.out.println (rs.getString(2));
                                  JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
                                            Map parameters = new HashMap();
                                            JasperFillManager.fillReportToFile("newone.jasper",parameters,jrRS);
                                            JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
                                            JasperViewer.viewReport("emissao_bl.pdf",false);
                                       rs.close();
                                       stmt.close();
                   conn.close();
                             catch(Exception e)
                                  e.printStackTrace();
    for the above given code, I got error message when i run the code as a standalone in cmd prompt and the jasper file specified(may be error occured in .jasper file) could please send the req jasper file to load it.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo
    gging/LogFactory
    at net.sf.jasperreports.engine.fill.JRFillDataset.<clinit>(JRFillDataset
    .java:72)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.jav
    a:443)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi
    ller.java:92)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi
    ller.java:74)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:
    113)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa
    nager.java:428)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(Jasper
    FillManager.java:319)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(Jasper
    FillManager.java:275)
    at dbAccessi.main(dbAccessi.java:30)
    thanks in advance

  • Generate a SQL "IN" clause using ALDSP

    Problem Summary
    ALDSP: Generate a SQL "IN" clause
    Problem Description
    I would like to know if there is a possibility of generating an SQL "IN" clause using ALDSP.
    I would need the XQuery construct to create an SQLsomething like-
    select * from emp where dept_no in ('101', '201', '301');
    The values for dept_no would be passed at runtime.
    (Or)
    Will be I able to create a physical data service using the SQL - select * from emp where dept_no in ?
    If yes, how do I map the parameter to "?"
    Thanks.

    Mike,
    Thanks for the response. The section that you are taking about is to push joins to DB. Joining tables is not the problem that I am facing.
    I will rephrase the problem.
    I would like to know if there is a possibility of creating a ALDSP physical data service (.ds file) with the SQL as select * from employee where emp_id in ?
    and I should be able to pass multiple employee ids to the "?" parameter. select * from emp where emp_id in ('101', '201', '301');
    There is no fixed number of ids that a user can pass.
    Thanks.

Maybe you are looking for

  • Update from MAC OS X V 10.5.8 up to Lion

    Dear All, I have a MacBook Pro with OS X Version 10.5.8. Should update to Lion OS?  I am afraid to do the upgrade because I have Final Cut Pro 6 and Pro Tools. Does any one know if I make the upgrade can I still using the same programs? And also I ha

  • Its almost 2012 and no OS X 10.7 in-browser support

    Hello all, According to the Advisory "Adobe Safari 5.1 and Adobe Reader/Acrobat Advisory", a better solution to this whole Safari 5.1 fiasco is to be expected by the end of this year but nothing seems to be in the horizon yet. Its been almost 6 month

  • Service PO Closure

    Hi all, How to close (Recieve) the Service PO ? (I have created the Line type as Value Basis - Rate & Purchase basis - Temp labor) Thanks in advance Sathish

  • The "From: field on outgoing mail has dissappeared.

    and I can't find anywhere to add From. It simply vanished, whereas I'd always had a From, with pulldown menu that allowed me to choose which name/email address I wanted to send from. thanks, eek

  • Update Price List by DTW ODBC Connection

    Hi Experts, I wondered if there was a way to update a Price List in SAP by DTW ODBC connection please?  I have two databases with exactly the same Price Lists, apart from I need to update one price list in one of the databases with the inforamtion as