Resolving type names during compilation

Hi,
I have a question about how the default (or any other) java compiler resolves type names when compiling several files. How does the compiler efficiently organise itself so that it can resolve type names that it has not yet parsed?
take a trivial example:
//file a.java
class a{b myB;}
//file b.java
class b{}
if it compiles file a.java first then it must search for class b in some way to check that it exists. how?
If you are wondering why I ask this, it is becuase I am using antlr(www.antlr.org) to reverse engineer java into UML.
tia + cheers,
Alex

see
http://forum.java.sun.com/thread.jsp?forum=7&thread=31728
Thanks for the feedback, but it does not answer my question of how the insides of the java compiler works. I assume that it can compile and the classpath is set up correctly...
Try a less trivial example: you compile a large open source project like netbeans. When the compiler arrives at a declaration involving a type that it has not come across. how does it know that it is a valid type? I am talking about how the compiler is implemented. This is a question about compiler design.
does the compiler first work out class dependencies and compile in a certain order?
or does it make a symbol table of all type first, then check that when compiling?
maybe this forum is more about how to compile rather than how compilers work?

Similar Messages

  • Problem resolving Type names in CreateDescriptor

    I have two users: SCHEMAOWNER and USER1
    SCHEMAOWNER creates a type with
    CREATE TYPE MYTABTYP AS TABLE OF VARCHAR2(50);
    CREATE PUBLIC SYNONYM MYTABTYP FOR MYTABTYP;
    GRANT EXECUTE ON MYTABTYP TO PUBLIC;
    USER1 attempts to run the following Java snippet:
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "MYTABTYP", connection );
    and receives the message that USER1.MYTABTYP cannont be resolved.
    USER1 does not have any table types.
    Even if I change the code to read:
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "SCHEMAOWNER.MYTABTYP", connection );
    I get the message that USER1.MYTABTYP cannont be resolved.
    null

    We had the same problem. We had also attempted to make use of definer rights permissions, but using JDBC has been restictive in this area. Also in the area
    of defining anchored variables and params (%TYPE).
    Our workaround was to execute java app as owner of the schema.
    Please let me know if anyone has a real solution.

  • Install: can't resolve service name during db cache install

    Has anyone else had this problem? Any resolution or advice?

    Silly question.  You are doing that with root permissions, right?  (Sorry I have to ask)
    Have you fsck'd those partitions?  (I have not used Reiserfs since my Gentoo days, does one use fsck, or something else?)
    Any chance the kernel modules for those file systems are not loaded?

  • OracleConnection.createARRAY: Unable to resolve type

    Hi All,
    for some good reasons (don't ask ...) I need to implement a solution where a directory listing, on the DB server machine, can be gotten via an sql query.
    I have to say I am not very experienced with Java in Oracle, please forgive the newbie mistakes.
    Environment: 11gR2 on Win7, SQLDeveloper as front-end.
    In order to do this, I created a simple Java class, DB types and PL/SQL wrappers as follows:
    CREATE OR REPLACE TYPE T_FS_ENTRY AS OBJECT (
      is_dir CHAR( 1 )
    , entry_name VARCHAR2( 4000 )
    , entry_size NUMBER
    , last_modified NUMBER );
    CREATE OR REPLACE TYPE T_FS_ENTRY_TAB IS TABLE OF T_FS_ENTRY;
    I then created the Java class
    CREATE OR REPLACE AND COMPILE java source named FSEntryReturn
    as
      import java.sql.*;
      import java.util.*;
      import java.io.File;
      import oracle.jdbc.*;
      import oracle.sql.*;
      public class FSEntryReturn implements ORADataFactory, ORAData {
        private CHAR is_dir;
        private CHAR entry_name;
        private NUMBER entry_size;
        private NUMBER last_modified;
        public FSEntryReturn( OracleConnection conn
                            , String is_dir
                            , String entry_name
                            , long entry_size
                            , long last_modified )
        throws SQLException
            this.is_dir = new CHAR( is_dir, oracle.sql.CharacterSet.make( conn.getStructAttrCsId() ) );
            this.entry_name = new CHAR( entry_name, oracle.sql.CharacterSet.make( conn.getStructAttrCsId() ) );
            this.entry_size = new NUMBER( entry_size );
            this.last_modified = new NUMBER( last_modified );
        public FSEntryReturn( CHAR is_dir
                            , CHAR entry_name
                            , NUMBER entry_size
                            , NUMBER last_modified )
        throws SQLException
            this.is_dir = is_dir;
            this.entry_name = entry_name;
            this.entry_size = entry_size;
            this.last_modified = last_modified;
        public FSEntryReturn( Object[] attributes )
        throws SQLException {
          this( (CHAR)attributes[0]
              , (CHAR)attributes[1]
              , (NUMBER)attributes[2]
              , (NUMBER)attributes[3] );
        public FSEntryReturn( Datum d ) throws SQLException {
          this( ( (STRUCT)d).getOracleAttributes() );
        public ORAData create( Datum d, int sqlType ) throws SQLException {
          if(d == null) return null;
           else return new FSEntryReturn( d );
        public STRUCT toSTRUCT( Connection conn ) throws SQLException  {
          StructDescriptor sd = StructDescriptor.createDescriptor( "T_FS_ENTRY", conn );
          Object[] attributes = { is_dir, entry_name, entry_size, last_modified };
          return new STRUCT( sd, conn, attributes );
        public Datum toDatum( Connection conn ) throws SQLException {
          return toSTRUCT( conn );
        public static List<FSEntryReturn> getDirListImpl( OracleConnection conn, final String dirPath )
        throws SQLException
          List<FSEntryReturn> ret = new ArrayList<FSEntryReturn>();
          File dir = new File( dirPath );
          if( dir.isDirectory() ) {
            for( String fileName : dir.list() ) {
              File f = new File( dir, fileName );
              FSEntryReturn fsr = new FSEntryReturn( conn
                                                   , (f.isDirectory() ? "1" : null)
                                                   , fileName
                                                   , f.length()
                                                   , f.lastModified() );
              ret.add( fsr );
                } else
            throw new RuntimeException( "Path " + dirPath + " is not a directory" );
          return ret;
        public static ARRAY getDirList( final String dirPath )
        throws SQLException, ClassNotFoundException
          // initialize the connection
          OracleConnection conn = null;
          conn = (OracleConnection) ( new oracle.jdbc.OracleDriver() ).defaultConnection();
          FSEntryReturn[] retArray = getDirListImpl( conn, dirPath ).toArray( new FSEntryReturn[0] );
          // Map the java class to the Oracle type
          Map map = conn.getTypeMap();
          map.put("T_FS_ENTRY", Class.forName( "FSEntryReturn" ) );
          // ArrayDescriptor retArrayDesc = ArrayDescriptor.createDescriptor( "FPL_XSD.T_FS_ENTRY", conn );
          // create an Oracle collection on client side to use as parameter
          // ARRAY oracleCollection = new ARRAY( retArrayDesc, conn, retArray );
          ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
          return oracleCollection;
    Finally the wrapper:
    create or replace PACKAGE QAO_SUPPORT
    AS
      FUNCTION get_dir_list( p_dir IN VARCHAR2 )
      RETURN t_fs_entry_tab;
    END QAO_SUPPORT;
    create or replace PACKAGE BODY QAO_SUPPORT
    AS
      FUNCTION get_dir_list( p_dir IN VARCHAR2 )
      RETURN t_fs_entry_tab
      AS LANGUAGE JAVA
      NAME 'FSEntryReturn.getDirList( java.lang.String ) return oracle.sql.ARRAY';
    END QAO_SUPPORT;
    At last I granted privileges on a directory:
    BEGIN dbms_java.grant_permission( 'FPL_XSD', 'SYS:java.io.FilePermission', 'C:\-', 'read,write,execute' ); END;
    COMMIT;
    When I test this as FPL_XSD user, the same schema where the type, package and source are defined:
    select * from table( QAO_SUPPORT.get_dir_list( 'C:\\TEMP' ) );
    I get the following error (sorry for the dutch stuff, basically, "uncaught java exception: error in creation of descriptor:..."):
    ORA-29532: Java-aanroep is afgesloten door niet-onderschepte Java-uitzondering: java.sql.SQLException: Maken van descriptor is mislukt.: Unable to resolve type: "FPL_XSD.T_FS_ENTRY".
    ORA-06512: in "FPL_XSD.QAO_SUPPORT", regel 30
    Even if it is not exactly stated the error happens at the line:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
    Note that when logged in as FPL_XSD, desc T_FS_ENTRY returns the type description.
    I searched everywhere and consulted the documentation. I think it should work. I am out of ideas, but I have a suspect the problem might be with the connection configuration, maybe?
    Any help or hint is greatly appreciated.
    Kindly,
    Andrea

    Hi All,
    I insisted trying and I found out what the problem was. In:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY", retArray );
    The first argument is an Oracle type name, I wrongly used the RECORD (OBJECT) type name - T_FS_ENTRY -, not the name of the nested table T_FS_ENTRY_TAB.
    So the code should look like:
    ARRAY oracleCollection = conn.createARRAY( "T_FS_ENTRY_TAB", retArray );
    Which works.
    //Andrea

  • ValidationException: Duplicate type name

    I am trying to deploy an ejb web service to oc4j 10.1.3.1.1 from JDeveloper 10.1.3.2. During deployment I get this exception thrown:
    07/04/19 09:53:03 oracle.j2ee.ws.common.tools.api.ValidationException: gov.mi.mdch.mcirhl7.data.Select - Duplicate type name "gov.mi.mdch.mcirhl7.data.Select" for Java type "{http://service.ejb.mcirhl7.mdch.mi.gov/}Select" found. To remove this error do not specify a single typeNamespace for all value types or specify a mapping file. This error could also be caused when an erroneous type has been used more than once.
    07/04/19 09:53:03      at oracle.j2ee.ws.common.processor.modeler.rmi.RmiModeler.buildModel(RmiModeler.java:247)
    07/04/19 09:53:03      at oracle.j2ee.ws.common.processor.config.ModelInfo.buildModel(ModelInfo.java:173)
    07/04/19 09:53:03      at oracle.j2ee.ws.common.processor.Processor.runModeler(Processor.java:72)
    07/04/19 09:53:03      at oracle.j2ee.ws.common.metadata.annotation.DeploymentGenerator$DeploymentCompileTool.run(DeploymentGenerator.java:200)
    07/04/19 09:53:03      at oracle.j2ee.ws.common.metadata.annotation.DeploymentGenerator.generateDeploymentArtifacts(DeploymentGenerator.java:131)
    07/04/19 09:53:03      at oracle.j2ee.ws.common.metadata.annotation.EJBWebServiceAnnotationParser.parseAnnotatedBean(EJBWebServiceAnnotationParser.java:165)
    07/04/19 09:53:03      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    07/04/19 09:53:03      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/04/19 09:53:03      at java.lang.reflect.Method.invoke(Method.java:585)
    07/04/19 09:53:03      at oracle.j2ee.ws.server.deployment.oc4j.WebServiceAnnotationListener.parseAnnotatedClass(WebServiceAnnotationListener.java:85)
    07/04/19 09:53:03      at com.evermind.server.ejb.AnnotationParser.notifyAnnotationListeners(AnnotationParser.java:201)
    07/04/19 09:53:03      at com.evermind.server.ejb.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
    07/04/19 09:53:03      at com.evermind.server.ejb.EJBPackageDeployment.parseMetaData(EJBPackageDeployment.java:939)
    07/04/19 09:53:03      at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:832)
    07/04/19 09:53:03      at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:217)
    07/04/19 09:53:03      at com.evermind.server.Application.setConfig(Application.java:439)
    07/04/19 09:53:03      at com.evermind.server.Application.setConfig(Application.java:340)
    07/04/19 09:53:03      at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1853)
    07/04/19 09:53:03      at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
    07/04/19 09:53:03      at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
    07/04/19 09:53:03      at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    07/04/19 09:53:03      at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    07/04/19 09:53:03      at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    07/04/19 09:53:03      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/04/19 09:53:03      at java.lang.Thread.run(Thread.java:595)
    My interface looks like this:
    package gov.mi.mdch.mcirhl7.ejb.service;
    @WebService
    public interface CodeDataServiceWebService extends Remote {
    List<ServiceType> queryServiceTypeFindAll()
    throws RemoteException;
    List<Version> queryVersionFindAll()
    throws RemoteException;
    This interface is implemented with a simple stateless session bean (where I do not have any web service specific annotations, mainly because JDeveloper did insert any there when it auto-generated the web service interface). Both Version and ServiceType are EJB 3.0 entity beans which extend gov.mi.mdch.mcirhl7.data.Select. If I change ServiceType so that it does not extend Select, then it deploys fine. Same if I just comment out queryServiceTypeFindAll() altogether. However, when I successfully deploy the web service, the generated WSDL and mapping file make no mention of the Select class, so I don't see why there's a problem with that class when more than one of my List types extends it.
    I've been searching for a solution to this problem for most of the week to no avail. Any thoughts? Thanks.
    Joel
    Subject was edited by: user570454

    Joel,
    You may have some encounter some backward incompatibility between the code generated for 10.1.3.2, when you run the application in the embedded container and when you deploy on a remote instance using 10.1.3.1.
    It may be worth trying to re-assemble the application using JDev 10.1.3.1 or use the command line (or ant integration) of WSA to build the application that you target at the 10.1.3.1 instance using the same version of the tooling.
    Chapter 18 of the user guide provide details about ant commands.
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28974/wsassemble.htm#CHDDBCCA
    You may also want to report this using the metalink/support channel, so that the potential bugs behind this can be addressed for you.
    -Eric

  • PLS-00330: invalid use of type name or subtype name

    I am relatively new to Sql and am in the process of learning, so please bear with me. I am trying to create a trigger for the Invoices table that displays the vendor_name, invoice_number, and payment_total after the payment_total has been increased. I have discovered that I must use a compound trigger due to a mutating-table error and ended up with this:
    CREATE OR REPLACE TRIGGER invoices_after_update_payment
    FOR UPDATE OF payment_total
    ON invoices
    COMPOUND TRIGGER
      TYPE invoice_numbers_table      IS TABLE OF VARCHAR2(50);
      TYPE payment_totals_table       IS TABLE OF NUMBER;
      TYPE vendor_names_table         IS TABLE OF VARCHAR2(50);
      TYPE summary_payments_table     IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
      TYPE summary_names_table        IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
      invoice_numbers                 invoice_numbers_table;
      payment_totals                  payment_totals_table;
      vendor_names                    vendor_names_table;
      payment_summarys                summary_payments_table;
      name_summarys                   summary_names_table;
      AFTER STATEMENT IS
        invoice_number VARCHAR2(50);
        payment_total NUMBER;
        vendor_name VARCHAR2(50);
      BEGIN
        SELECT i.invoice_number, i.payment_total, v.vendor_name
        BULK COLLECT INTO invoice_numbers, payment_totals, vendor_names
        FROM invoices i JOIN vendors v
          ON i.vendor_id = v.vendor_id
        GROUP BY i.invoice_number;
        FOR i IN 1..invoice_numbers.COUNT() LOOP
          invoice_number := invoice_numbers(i);
          payment_total := payment_totals(i);
          vendor_name := vendor_names(i);
          summary_payments_table(invoice_number) := payment_total;
          summary_names_table(invoice_number) := vendor_name;
        END LOOP;
      END AFTER STATEMENT;
      AFTER EACH ROW IS
        temp_payment_total NUMBER;
        vendor_name VARCHAR2(50);
      BEGIN
        temp_payment_total := payment_summarys(:new.invoice_number);
        vendor_name := name_summarys(:new.invoice_number);
        IF (:new.payment_total > temp_payment_total) THEN
          DBMS_OUTPUT.PUT_LINE('Vendor Name: ' || vendor_name || ', Invoice Number: ' || :new.invoice_number || ', Payment Total: ' || :new.payment_total);
        END IF;
      END AFTER EACH ROW;
    END;
    /The code that I am using to update the table is:
    UPDATE invoices
    SET payment_total = 508
    WHERE invoice_number = 'QP58872'At this point, I am getting an error report saying:
    29/7           PLS-00330: invalid use of type name or subtype name
    29/7           PL/SQL: Statement ignored
    30/7           PLS-00330: invalid use of type name or subtype name
    30/7           PL/SQL: Statement ignoredWhat does the error code entail? I have looked it up but can't seem to pin it. Any help would be greatly appreciated and I am open to any suggestions for improving my current code.
    I am using Oracle Database 11g Express Edition on Windows 7. I am not sure if it is relevant, but I am also using Sql Developer. If you need any further information, I will do my best to provide what I can.
    Thanks!
    Edited by: 927811 on Apr 15, 2012 11:54 PM
    Edited by: 927811 on Apr 15, 2012 11:56 PM

    I took your advice and removed the exception handling. There is no point in it being there. I also checked the timing points and you are correct. So, I changed my AFTER STATEMENT to BEFORE STATEMENT, which I had been thinking about doing anyways. It just seemed logical to me. That brings me to where I am now. I ran my update again and got back this error, It is the same as the one before, but for a different line (?)
    Error starting at line 1 in command:
    UPDATE invoices
    SET payment_total = 510
    WHERE invoice_number = 'QP58872'
    Error report:
    SQL Error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    ORA-06512: at "AP.INVOICES_AFTER_UPDATE_PAYMENT", line 30
    ORA-04088: error during execution of trigger 'AP.INVOICES_AFTER_UPDATE_PAYMENT'
    06502. 00000 -  "PL/SQL: numeric or value error%s"
    *Cause:   
    *Action:Also, to make sure you are clear as to what my code now looks like:
    SET SERVEROUTPUT ON;
    CREATE OR REPLACE TRIGGER invoices_after_update_payment
    FOR UPDATE OF payment_total
    ON invoices
    COMPOUND TRIGGER
      TYPE invoice_numbers_table      IS TABLE OF VARCHAR2(50);
      TYPE payment_totals_table       IS TABLE OF NUMBER;
      TYPE vendor_names_table         IS TABLE OF VARCHAR2(50);
      TYPE summary_payments_table     IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
      TYPE summary_names_table        IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
      invoice_numbers                 invoice_numbers_table;
      payment_totals                  payment_totals_table;
      vendor_names                    vendor_names_table;
      payment_summarys                summary_payments_table;
      name_summarys                   summary_names_table;
      BEFORE STATEMENT IS
        invoice_number VARCHAR2(50);
        payment_total NUMBER;
        vendor_name VARCHAR2(50);
      BEGIN
        SELECT i.invoice_number, i.payment_total, v.vendor_name
        BULK COLLECT INTO invoice_numbers, payment_totals, vendor_names
        FROM invoices i JOIN vendors v
          ON i.vendor_id = v.vendor_id
        GROUP BY i.invoice_number, i.payment_total, v.vendor_name;
        FOR i IN 1..invoice_numbers.COUNT() LOOP
          invoice_number := invoice_numbers(i);
          payment_total := payment_totals(i);
          vendor_name := vendor_names(i);
          payment_summarys(invoice_number) := payment_total;
          name_summarys(invoice_number) := vendor_name;
        END LOOP;
      END BEFORE STATEMENT;
      AFTER EACH ROW IS
        temp_payment_total NUMBER;
        vendor_name VARCHAR2(50);
      BEGIN
        temp_payment_total := payment_summarys(:new.invoice_number);
        vendor_name := name_summarys(:new.invoice_number);
        IF (:new.payment_total > temp_payment_total) THEN
          DBMS_OUTPUT.PUT_LINE('Vendor Name: ' || vendor_name || ', Invoice Number: ' || :new.invoice_number || ', Payment Total: ' || :new.payment_total);
        END IF;
      END AFTER EACH ROW;
    END;
    /Thanks for the help!

  • "couldn't resolve host name" error message

    I have a new Z30 with the latest OS update installed and can’t connect to several Wi-Fi locations because of error message ‘couldn’t resolve host name’.  Is there a fix to this as it seems to be an issue with BB and no other type of devices?

    Assuming you're connecting via wifi, this would suggest your wifi connection is failing somewhere along the way.
    Occasionally, my PB's wifi icon shows green and looks like it's working, but if I turn the PB wifi off and back on, it usually fixes the problem. You could also try rebooting the PB if resetting the wifi doesnt work. 
    If these things don't correct the problem, then check your wifi router (reboot it if necessary) and maybe check your internet connection with another device, ie home computer or whatever to make sure you're not having service issues.

  • Type conflict during dynamic method call.

    While executing the following program I get the error "Type conflict during dynamic method call.":
    DATA: container_r  TYPE REF TO object,
          grid_r       TYPE REF TO object,
          itab_saplane TYPE TABLE OF saplane.
    * IMPORTANT NOTE: class names must be in UPPER CASE
    DATA: str_cnt TYPE seoclsname VALUE 'CL_GUI_CUSTOM_CONTAINER',
          str_gui TYPE seoclsname VALUE 'CL_GUI_ALV_GRID',
          meth_name TYPE STRING VALUE 'SET_TABLE_FOR_FIRST_DISPLAY'.
    TYPE-POOLS abap.
    DATA: ptab    TYPE abap_parmbind_tab,
          wa_ptab LIKE LINE OF ptab,
          ref     TYPE REF TO data.
    CREATE OBJECT container_r TYPE (str_cnt)
      EXPORTING container_name = 'CUSTOM_CONTROL1'. " Name of the custom control area (UC!)
    * Construct parameter itab
    GET REFERENCE OF container_r INTO ref.
    wa_ptab-name  = 'I_PARENT'.  " Must be upper-case
    wa_ptab-value = ref.
    INSERT wa_ptab INTO TABLE ptab.
    *   EXPORTING i_parent = container_r.
    CREATE OBJECT grid_r TYPE (str_gui)
      PARAMETER-TABLE ptab.
    SELECT * FROM saplane INTO CORRESPONDING FIELDS OF TABLE itab_saplane.
    * Cannot call set_table_for_first_display directly...
    CALL METHOD grid_r->(meth_name)
      EXPORTING I_STRUCTURE_NAME = 'SAPLANE'  " Type of the rows in the internal table  (UC!)
      CHANGING  IT_OUTTAB = itab_saplane.     " The internal table itself
    CALL SCREEN 100.
    Any help would be appreciated!

    Hi ...
    Apologies ... for confusion ... actually both are required ...
    the type 'E' as well as CL_GUI_CONTAINER.
    The below code worked for me ...
    check out how I cast it to the parent class type ...
      DATA : lv_container   TYPE seoclsname VALUE 'CL_GUI_CUSTOM_CONTAINER',
             lv_control     TYPE seoclsname VALUE 'CL_GUI_ALV_GRID',
             lv_method      TYPE string VALUE 'SET_TABLE_FOR_FIRST_DISPLAY',
             lt_par_tab     TYPE abap_parmbind_tab,
             ls_param       LIKE LINE OF lt_par_tab,
             lref_cont      TYPE REF TO cl_gui_container,
             lv_data        TYPE REF TO data.
    CREATE OBJECT lref_container
          TYPE
            (lv_container)
          EXPORTING
            container_name = 'ALV_AREA'.
        ls_param-name = 'I_PARENT'.
        ls_param-kind = 'E'.
        lref_cont ?= lref_container.
        GET REFERENCE OF lref_cont INTO lv_data.
        ls_param-value = lv_data.
        INSERT ls_param INTO TABLE lt_par_tab.
    **  Now create ALV Control.
        CREATE OBJECT lref_alv_ctrl
          TYPE
            (lv_control)
          PARAMETER-TABLE
            lt_par_tab.
    **  Set table for 1st display
        DATA : lv.
        lv = lref_alv_ctrl->mc_fc_print.
        CALL METHOD lref_alv_ctrl->(lv_method)
          EXPORTING
            i_structure_name = 'T001'
          CHANGING
            it_outtab        = lt_company.
    Cheers
    Edited by: Varun Verma on Aug 12, 2008 4:19 PM

  • ORA-12154: TNS:Could not resolve service name. (WIS 10901).

    HI Gurus, we have the following scenario...
    Weu2019ve installed Busines Objects EDGE 3.1 SP3.
    The server of this installation is MS Windows Server 2003 Enterprise Edition SP2, Intel ® Xeon Enterprise TM CPU 2.80 GHz 6.5 RAM.
    In the Server we have SAP R/3 Installed over a DB Oracle 9i Enterprise Edition Release 9.2.8.0.
    We installed all BO bundle with successful and we can use the Designer Tool for create universe. In the creation of the universe, we created a connection to the database of the SAP R/3 System and the test runs well, we save and export the universe to CMS. Then, we used that universe in the WebI tool of the suite installed in the server, and it runs well (we call the universe, selected fields of the table, and after run the query, it gives us registers of the DB).
    After all this, we open the InfoView and used the WebI and execute the same universe and the same steps. And when we execute the query the following error occurs .
    A database error occured. The database error text is: ORA-12154: TNS:Could not resolve service name. (WIS 10901)
    The connection to DB is through Designer and we use ODBC Oracle to create the Universe with the Client type and we used super user system, validated previously OK.
    Any suggestion for this error?.
    Thanks.
    Betto.
    Edited by: Alberto Magaña Chávez on Jul 9, 2011 7:44 PM

    Make sure there are no syntax errors in the TNSNAMES.ORA file, look for unmatched parentheses. Also check the SQLNET.ORA file.
    Is the environment is clustered, if so then make sure you have the ODBC connection in all the servers.

  • MacBooks can't resolve printer name when sending job to windows 2008 R2 print server.

    So I am work at company in a windows server 2008 r2 and we have a windows 2008 r2 printer server. Our macbook pros are not on the domain so every time we print to the server we have to type in our credentials.
    MacBooks can't resolve printer name when sending job to windows 2008 R2 print server while on wifi but works when hard wired. Any thoughts? The error message I receive is "invalid printer name". I've tried adding the printer through the advanced tab in the print and scan tab of system preferences. I add it buy smb://servername/printername.
    When I tried to print on the wifi at my office I get "invalid printer name" in the print job status que.
    We can just do direct printing but I would like to know if anyone has had this issue before and if you could point me in the right direction. Thanks!

    I assume you aare using exchange when configuring the email notifications? What I would do is just use a normal IMAP & SMTP account such as Outlook.com or if you use a POP connector for exchange, one of those accounts' SMTP settings.
    For example, I have a POP connector installed and my emails are hosted at 1and1. What I would do here is put my 1and1 SMTP settings in and use these, instead of using Exchange.
    Let me know if this is possible.
    Ed

  • Fail to construct descriptor: Unable to resolve type

    I'm receiving an error when creating a oracle.sql.STRUCT or ARRAY. the error is java.sql.SQLException: Fail to construct descriptor: Unable to resolve type "X.NAME".
    He is the java code.
    // Create the StructDescriptor from the connection
    StructDescriptor prStructDesc =
    StructDescriptor.createDescriptor("X.NAME", conn);
    // construct the object array containing the attribute values for the
    // X.NAME object to be inserted
    Object[] xObjArray =
    "val1",
    "val2",
    // Construct the Struct from the StructDescriptor and xObjStruct
    oracle.sql.STRUCT xStruct = new STRUCT(prStructDesc,
    conn, xObjArray);
    cs = conn.prepareCall("{ call X.PROC(?,?,?)}");
    cs.setObject(1, xStruct);
    When I run the code within JDeveloper it runs without any errors. When I deploy to 9iAS release 2 and try to run it there, I receive the error. Thanks for any help.

    Think I found a solution,.. or at least stopped getting the error. I'm using oracle's OracleCallableStatement instead of the java.sql.CallableStatement. I'm also using a different app server. same version 9.0.2.0.0 I'd recommend applying the patches to anyone using this version. I've ran into some errors that have been patched. It's a long process though..
    cheers.

  • URGENT ::  ORA-12154: TNS:could not resolve service name

    Hi All,
    I am connecting to the db using oracle thin driver in java. I am invoking a SOAP call and after getting the response, i am inserting the response(gen. a pdf file) into my DB. I am using a static connection. I have to insert 130 pdf's in DB. After processing 120 pdf's, the following error has occurred,
    ERROR DBUtil - ORA-12154: TNS:could not resolve service name
    java.lang.NullPointerException
         at com.elsevier.cds.ew.DBUtil.insertPDF(Compiled Code)
         at com.elsevier.cds.ew.GenerateSoapRequest.generateSOAPCall(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.processPDFFiles1(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.init1(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.<init>(EOffprintLoad.java:138)
         at com.elsevier.cds.ew.EOffprintLoad.main(EOffprintLoad.java:987)
    ERROR GenerateSoapRequest -
    ERROR DBUtil - ORA-12154: TNS:could not resolve service name.
    The checked the oracle listener status. It was UP.
    Can anyone help me in this issue.
    Thanks,
    Rag

    Hello,
    Make sure that the service which you have specified in jdbc for making connection with oracle, exists in TNSNAMES.ORA file. You will find this file at different locations in 8i and above. So, better search for it. And add you service name in it. Example services is given in this file itself. So, take help from them.

  • Unable to resolve scan name to an ip address

    Hi All,
    I am installing 11gR2 on RHEL-4.
    My installing is getting on scan ip part.
    Its giving me an error that unable to resolve scan name to an ip address.
    I have put the scan ip entry in /ect/hosts file instead configuring using DNS.
    My /etc/hosts
    vi /ect/hosts
    127.0.0.1 localhost.localdomain localhost
    #public
    192.168.2.201 rac1.oracle.com rac1
    192.168.2.202 rac2.oracle.com rac2
    #private
    10.10.1.1 rac1-priv.oracle.com rac1-priv
    10.10.1.2 rac2-priv.oracle.com rac2-priv
    #virtual
    192.168.2.211 rac1-vip.oracle.com rac1-vip
    192.168.2.212 rac2-vip.oracle.com rac2-vip
    192.168.2.301 rac-scan.oracle.com rac-scan
    The same entry is for second node
    The installation should run anyways i am putting scan ip entry in /etc/hosts file
    Could you please let me know where i am going worng?
    Your assistance is much appreciated in this regards.
    Thanks and Regards,

    Hi
    Thanks for the help.
    I have installed 11gr2 on centos 4.5.
    During installation i configured 3 disk and selected normal redundancy.
    Please find the output of ocrcheck and asm disk.
    [grid@rac1 bin]$ ./ocrcheck
    Status of Oracle Cluster Registry is as follows :
    Version : 3
    Total space (kbytes) : 262120
    Used space (kbytes) : 2220
    Available space (kbytes) : 259900
    ID : 1931872859
    Device/File Name : +ocr_vote
    Device/File integrity check succeeded
    Device/File not configured
    Device/File not configured
    Device/File not configured
    Device/File not configured
    Cluster registry integrity check succeeded
    Logical corruption check bypassed due to non-privileged user
    [grid@rac1 bin]$ /etc/init.d/oracleasm listdisks
    OCRVOTE1
    OCRVOTE2
    OCRVOTE3
    I should able to see 3 disks for ocrcheck, While installing i selected normal redundancy and selected all the 3 disks.
    Could you please explain this.
    your assistance is much appreciated .
    Thanks and Regards,

  • Deploy cannot resolve service name

    Hi
    I have a very simple warehouse project in OWB 9.2. I have defined an ODBC source on SQL Server and wish to deploy to a target table defined in an Oracle target module. A mapping, locations, connectors, database links etc are defined and valid.
    Up to the "Pre deployment generation results" view, all operations are shown as success. However, on selecting "Deploy" from this window, the deploy status is "Failed" with error "ORA-12514: TNS:could not resolve service name".
    I have checked the TNSNAMES.ORA file and all service names used are defined. Using "tnsping", I can connect to the oracle database, however the connection to the SQL Server database using "myhsodbc" fails. I can successfully connect to the SQL Server database using the database link defined when creating the source module or from SQL*Plus.
    Any suggestions as to which service name is unresolved?
    Thanks
    Bob

    Hi Mark
    I have added tnsnames file to server and client, oracle_home and owb_home with no change in result. The following info is little lengthy, but I hope it may give a clue to resolve my situation.
    The deployment manager identifies 3 objects for deployment - a mapping (SAP_CI_HIERARCHY), a table (SAP_CI_HIERARCHY) and a connector (ORAONSQL_SQLONPCRH).
    The generated connector script follows:
    CREATE DATABASE LINK "{{SQLONPCRH.Service}}"@ORAONSQL_SQLONPCRH
    CONNECT TO "{{SQLONPCRH.ConnectAs}}"
    IDENTIFIED BY "{{SQLONPCRH.Password}}"
    USING '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
    (HOST={{SQLONPCRH.Host}})(PORT={{SQLONPCRH.Port}})))
    (CONNECT_DATA=(SERVICE_NAME={{SQLONPCRH.Service}}))
    (HS=OK)
    The mapping script contains the following connection string in a select statement:
    FROM "dbo"."SAP_CI_HIERARCHY"@"MYHSODBC.FIRM.UNI.EDU"@"ORAONSQL_SQLONPCRH" "SAP_CI_HIERARCHY_ORA10323"
    The SQL Server source is defined by the following connection information:
    Database Link: PCRH_LINK.FIRM.UNI.EDU
    Connect String: myhsodbc.firm.uni.edu
    Gateway Type: Oracle Generic Connectivity - HSODBC
    Schema: dbo
    Location: SQLONPCRH
    The Oracle target is defined as follows:
    Database Link: ORAONSQL_LINK.FIRM.UNI.EDU
    Connect String: oraonsql.firm.uni.edu
    Schema: firmolap
    Location: ORAONSQL
    TNSNAMES.ORA file contains entry for oraonsql & myhsodbc:
    ORAONSQL.FIRM.UNI.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sqlserver)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = oraonsql.firm.uni.edu)
    MYHSODBC.FIRM.UNI.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sqlserver)(PORT = 1521))
    (CONNECT_DATA =
    (SID = myhsodbc)
    (HS = OK)
    From SQL*PLUS,
    SELECT *
    FROM "dbo"."SAP_CI_HIERARCHY"@"PCRH_LINK.FIRM.UNI.EDU"; returns data, whereas the SELECT statement from the generated script returns ERROR "ORA-02019: connection description for remote database not found".
    All database links are PUBLIC.
    Location registration:
    ORAONSQL
    Service name: ORAONSQL.FIRM.UNI.EDU
    Net service name: ORAONSQL
    SQLONPCRH
    Service name: myhsodbc.firm.uni.edu
    Net service name: myhsodbc
    Is there something in this that points to the problem either in connecting from Deployment Manager (or from SQL*PLUS)?
    Thanks again for any help you can offer.
    Bob

  • CAN'T Update Server name during login (since I have changed computer name)

    I had a working environment of SAP BO 8.8 installation (VM), I made a second copy for a someone who needs to change his server name so we don't collide with each other.  So he changed his server name fine and now when we try to change the name during login in SAP BO, we are completely unable to do anything, no company or database shows up and when you try typing server name it won't allow you since it is a drop down, the only availble server name is the old server name.
    We went to Service Manager, got a new license key for the hardware key, update fine as well as updating the server name there but when we try login, we are not able and no matter what we do we are not able to change the server name.  Please help, it is getting desperate (tried all things possible).
    Thanks

    In working VM copy, do a global search for the server name in all configuration files in SAP install directory.  Then compare with copied copy and try to change appropriate names in all files.
    Changing server name is a complex process, it has many references in many configuration files that you may have to touch.
    This will be an uphill battle. Goodluck.
    Lots of other things you can do, ping by hotname, check hostfile in case vm is also using it, there are two types of vm installs network or self contained (something like that) - so hostname may be getting masked by vm network environment, definitely SAP has few configuration files where the Server name, db name, license server name, port etc are present, even check for firewall settings etc.

Maybe you are looking for

  • Converting binary data into pdf and placing into application server

    Hi Friends, I am able to get PO details in binary format and then using GUI_DOWNLOAD  with file type with 'bin' and file name with 'sample.pdf' extension , got  PO in pdf  format. But i need to get with pdf extension in application server without usi

  • DMEE tab-delimited file required

    Dear Experts with trx DMEE you define file formats to be used as payment medium on screen 'format attributes' you indicate if fields have a fixed length or are delimited with a character what to do when you want to have a tab-delimited file? Regards

  • Database column comments in Discoverer report

    Hello, I am trying to display database column comments in Discoverer reports. Is there any easy way to display these comments, other than copy and paste? I am referring about comments from user_col_comments view... SELECT column_name, comments FROM u

  • Error while doing SL to SL

    Dear All, I am new to WM. I am trying the transation. In that i am trying to Transfer posting Storage location To Storage Location Mvt 311 But system is giving error meassage Storage bin WM2 922 TR-ZONE does not exist (check your entry) What i have t

  • I can't load pictures from my card reader into my computer--sometmes

    I have version 2 of iPhoto. In the past, everytime I put a card in my reader, the pictures would appear on my screen. This time, nothing happens. I have over 200 pictures in my photo library, but when I put in a different card, which contains a diffe