Additions required in portalapp.xml to import statements in JSPDynPage

Hi all,
What additions are required in portalapp.xml and import statements in JSPDynPage to include the equivalent of following JCO Clientservice in EP6 SP11?
com.sap.portal.runtime.application.jcoclient.jcoclient
The piece of code requiring the above is also given below.
IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService("com.sap.portal.runtime.application.jcoclient.jcoclient");
Thanking you ,
Med venlig hilsen/Best regards
Prabahar N.R

Hi Prabahar,
portalapp.xml: Add "com.sap.portal.runtime.application.jcoclient" to the SharingsReferences.
import: com.sapportals.portal.prt.service.jco.IJCOClientService
Hope it helps
Detlev

Similar Messages

  • Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format

    Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format. Siebel wants to send the data as xml to BI but not sure of the BI capabilities on giving WSDL embedded with XSD (input is a hierarchical)

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • Import statement *not* required?

    Can someone explain this to me? I was following along a
    simple AS3 example (in the design video workshop) where a "Power
    Button" has some MouseEven CLICK event handling applied to it with
    a trace statement as the resulting handled function. Really simple
    basic example. The import statement is import
    flash.events.MouseEvent.
    How come removing the import statement does not produce an
    error?
    Reference:
    import flash.events.MouseEvent;
    myButton.addEventListener(MouseEvent.CLICK, myButtonClicked);
    function myButtonClicked(event:MouseEvent):void {
    trace('do Something');
    }

    midimidi,
    > So to be clear...if the AS is on the main timeline,
    import statements
    > are not needed, and if the AS is external and imported,
    import
    > statements are needed.
    That's a general rule of thumb, but not 100% applicable.
    > Are there any other exceptions to that, or does that go
    for all AS3
    > classes?
    There are exceptions, and the easiest way to find them is to
    leave out
    your import statements and plug away ... sooner or later,
    you'll get a
    compiler error, and then you'll know. :)
    >> It did strike me *** odd though, an imported .as
    file uses the same
    >> publish settings as code on the timeline. So why
    treat them differently?
    FLA files have publish settings, but AS files don't. They're
    just text
    files. I hear what you're saying ... they end up getting
    compiled along
    with / into the some FLA anyway -- and that FLA does have
    classpaths
    listed -- but those same AS files might be compiled in Flex
    Builder 2 or
    some 3rd party compiler. It would probably make good sense to
    require the
    import statement for inline FLA code, but not everyone is a
    hardcore
    programmer, and Adobe knows it. Nothing is *hurt* by using
    import in FLAs,
    but for folks who just want to do light programming, the
    convenience of not
    having to use it is nice.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Portalapp.xml sharing reference

    I have the following import statements :
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import com.sap.portal.pcm.iview.IiView;
    import com.sapportals.portal.pcd.gl.IPcdContext;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    And my Portalapp.xml definition looks like:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.usermapping"/>
      </application-config>
      <components>
        <component name="logonTest">
          <component-config>
            <property name="ClassName" value="logonTest"/>
          </component-config>
          <component-profile/>
        </component>
        </components>
      <services/>
    </application>
    Do I need additional entries?
    Message was edited by: Mario Bajic
    Message was edited by: Mario Bajic

    now i have put
    in my portalapp.xml.
    Same Error and sure that i am soon going to throw my PC out of the Window!
              Hashtable env = new Hashtable();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
                   env.put(Context.SECURITY_PRINCIPAL,request.getUser());
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sapportals.portal.pcd.gl.PcdInitialContextFactory");
                   env.put("com.sap.portal.jndi.requested_aspect","com.sap.portal.pcd.gl.PersistencyAspect");
                   response.write("Context.INITIAL_CONTEXT_FACTORY : " + Context.INITIAL_CONTEXT_FACTORY + br);
                   response.write("IPcdContext.PCD_INITIAL_CONTEXT_FACTORY : " + IPcdContext.PCD_INITIAL_CONTEXT_FACTORY + br);
                   response.write("Context.SECURITY_PRINCIPAL : " + Context.SECURITY_PRINCIPAL + br);
                   response.write("Context.INITIAL_CONTEXT_FACTORY : " + Context.INITIAL_CONTEXT_FACTORY + br);
                   InitialContext iCtx = new InitialContext(env);
                   response.write("iCtx : " + iCtx);
                   response.write("iCtx.getNameInNamespace() : " + iCtx.getNameInNamespace() +br);
                   String id ="pcd:portal_content/de.local.m1/de.local.iV1/de.local.iVLogonTest";
                   response.write("before Lookup" +br);
                   IiView result = (IiView) iCtx.lookup(id);  <-- Here the Error is thrown!
                   Here is the Error :
                   Portal-Laufzeitfehler
                   Fehler aufgetreten bei der Verarbeitung eines Request für :
                   iView : pcd:portal_content/de.local.m1/de.local.service/de.local.s_logon/de.local.logonTest2
                   Komponentenname : logon.LogonTest
                   com/sap/portal/pcm/iview/IiView.
                   Exception id: 09:55_26/06/06_0016_36232950
                   See the details for the exception ID in the log file
                   My iView is assign to a role with the Id "s_logon".
                   All my Objects in the portal has the prefix "de.local".

  • 'Build stopped' when NWDS generate import statement in Component Controller

    Hi,
        I add method in Component Controller the code work fine if the code not require to import class. When the code need to import the class, and NWDS automatically import for them. The error occur like below while the code is complied.
    Build stopped due to an error: Compile failed; see the compiler error output for details.      [Error: com.sap.tc.buildplugin.DefaultPlugin  Thread[Worker-44,5,main]]
      I have to delete all import statements in import block like below.
    //@@begin imports
    import com.sap.demo.employee_exc__wd.wd.comp.employeecomp.wdp.IPrivateEmployeeComp;
    //@@end
    Conclusion :  The code will not be compiled if they have import statement that NWDS automatically generate.
    P.S i use NWDS7.2
    Please help me solve this issue.
    Many Thanks

    Hi John Wu,
        First of all thank for your reply.  I investigate the root cause and found that i can not import the class from another project (EJB project (Local Home or Local Object)). So i can only import JAVA lib, if i put import statement to import home interface from another EJB project, the code can not be build. What i do is
    - Add EJB project in the project build path.
    - Add EJB project in Project Reference.
    Is thay all?
    What task do i need to do more?
    There are 2 error show while compling the code.
    The 1st one :
    Compile failed; see the compiler error output for details.[EXCEPTION]
    C:\Users\Thongie\SAP_Workspace\workspace2.jdi\LocalDevelopment\t2\E362EEAA7C591A06D61B111A42AAAE70\default\logs\build.xml:236: Compile failed; see the compiler error output for details.
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
    at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
    at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:195)
    at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:167)
    at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
    at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
    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:597)
    at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
    at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
    at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
    at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
    at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:318)
    at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1432)
    at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3875)
    at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:370)
    at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:181)
    at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)
    at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:199)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
    at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:208)
    at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)
    at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:189)
    at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:306)
    at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runL(InternalDiiJob.java:208)
    at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:195)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    [Error: com.sap.tc.buildplugin.DefaultPlugin  Thread[Worker-7,5,main]]
    Thw 2nd one :
    Build stopped due to an error: Compile failed; see the compiler error output for details.      [Error: com.sap.tc.buildplugin.DefaultPlugin  Thread[Worker-7,5,main]]
    Edited by: Thongie on Jul 17, 2011 7:41 AM

  • Pls help!  How to put JSP import statement...

    Hi, I just created a simple iView JSP that imports htmlb classes and now I'd like to import my own java classes onto it.  For example, in my other projects, my JSP's have <%@ page import="project28.practice.contextClass" %> on top of the page.  I currently have a file called practice.jar 
    If I want to put this import statement into my simple iView JSP and use it, what would I have to do/configure?, do I have to transform it into a .par file?  Or can I  transport the jar file to the portal?  Any changes on NetWeaver?
    I am new to this so any detailed help or suggestions are greatly appreciated!
    Thanks again,
    Baggett

    Hi Detlev, thank you for your response!  I'd like to include more details of my situation right now:  I have 2 projects on NetWeaver:
    Project#1: Java Web application Project. (jar files, WEB-INF, WEB-INF/web.xml, JSP's...)
    Project#2: Portal Application Project. (JSPDynPage, sap plugins, PORTAL-INF/portalapp.xml, JSP)
    I'd want my JSP file in Project#2 to call some classes from the jar files of Project#1. 
    From my understanding, to do this I need to make a .par file out of Project #1 and then upload the par file to my SAP EP6.0 so that my future JSP's can import classes from it.  Am I correct?
    I am confused right now as to how to really do this.  On Netweaver, I am getting a Error when I try to do: File --> New --> Project --> Portal Application --> Create a Portal Application Project > I then enterProject Name: TestProject28, Project root folder: c:\TestProject\webapps\project1 
    --> "ERROR: Invalid project description, Reason:An error has occured while trying to create the project structure"
    If possible can you please provide detailed instructions on how to configure or build a par file out of my java web application stated above?
    Thank you so much for your time and help!
    Baggett

  • IMPORT Statement Issue (Internal Table)

    Hi All,
    I am using an IMPORT statement to get all the data from other report's internal table. Now whenever this (the other report's internal table) is changed (for field addition, etc), my report throws a dump. Hence, everytime I have to add these fields in my program as well.
    Is there any way by which I can include the whole internal table of that report in my program just like
    'INCLUDE STRUCTURE VBRK'.
    Thanks in advance

    Hi, CHeck this code related to your problem..This will helpful to you...
    I have done this program earlier..I hope it will helpful to u..
    This programa calling the other program to import the data..
    Check it out...
    *" Tables declarations.................................................
    TABLES:
      spfli.
    *" Type declarations...................................................
    Type declaration of the structure to hold data from table SPFLI     *
    TYPES:
      BEGIN OF type_s_spfli,
        carrid LIKE spfli-carrid,          " Carrier Id
        connid LIKE spfli-connid,          " Connection Number
        cityfrom LIKE spfli-cityfrom,      " City from
        cityto LIKE spfli-cityto,          " City to
        airpfrom LIKE spfli-airpfrom,      " Airport from
        airpto LIKE spfli-airpto,          " Airport to
        countryfr LIKE spfli-countryfr,    " Country from
        countryto LIKE spfli-countryto,    " Country to
      END OF type_s_spfli.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from SPFLI          *
    DATA
      fs_spfli TYPE type_s_spfli.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SPFLI       *
    DATA
      t_spfli LIKE STANDARD TABLE OF fs_spfli.
    TYPES:
      BEGIN OF types_s_itab,
        carrid LIKE sflight-carrid,        " Carrier id
        connid LIKE sflight-connid,        " Connection number
        fldate LIKE sflight-fldate,        " Flight date
      END OF types_s_itab.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from SFLIGHT        *
    DATA
      fs_itab TYPE types_s_itab.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SFLIGHT     *
    DATA
      t_itab LIKE STANDARD TABLE OF fs_itab.
    *" Type declarations...................................................
    Type declaration of the structure to hold data from table SBOOK     *
    TYPES:
    BEGIN OF type_s_sbook,
       carrid LIKE sbook-carrid,           " Carrier Id
       connid LIKE sbook-connid,           " Connection Number
       fldate LIKE sbook-fldate,           " Flight date
       bookid LIKE sbook-bookid,           " Booking number
       loccuram LIKE sbook-loccuram,       " Local currency
       loccurkey LIKE sbook-loccurkey,
       order_date LIKE sbook-order_date,   " Booking date
    END OF type_s_sbook.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from BOOK           *
    DATA
      fs_sbook TYPE type_s_sbook.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SBOOK       *
    DATA
      t_sbook LIKE STANDARD TABLE OF fs_sbook.
    DATA
      w_checkbox.                          " Checkbox
    SELECT-OPTIONS:
      s_carr FOR spfli-carrid.             " Carrier id range
                          START-OF-SELECTION EVENT                      *
    START-OF-SELECTION.
      PERFORM selectq.
                          END-OF-SELECTION EVENT                        *
    END-OF-SELECTION.
      SET PF-STATUS 'YH1314_030502'.
      PERFORM display_basic.
    AT USER-COMMAND.
      PERFORM ucomm.
    *&    Form  selectq
        This subroutine retreive data from SPFLI table
      There are no interface parameters to be passed to this subroutine.
    FORM selectq .
      SELECT carrid                        " Carrier id
             connid                        " Connection number
             cityfrom                      " City from
             cityto                        " City to
             airpfrom                      " Airport from
             airpto                        " Airport to
             countryfr                     " Country from
             countryto                     " Country to
             INTO CORRESPONDING FIELDS OF TABLE t_spfli
             FROM spfli
             WHERE carrid IN s_carr.
    ENDFORM.                               " Selectq
    *&      Form  display_basic
        This subroutine displays data from internal table
      There are no interface parameters to be passed to this subroutine.
    FORM display_basic .
      LOOP AT t_spfli INTO fs_spfli.
        WRITE:
          / w_checkbox AS CHECKBOX,
            fs_spfli-carrid,
            fs_spfli-connid,
            fs_spfli-cityfrom,
            fs_spfli-cityto,
            fs_spfli-airpfrom,
            fs_spfli-airpto,
            fs_spfli-countryfr,
            fs_spfli-countryto.
      ENDLOOP.                             " LOOP AT T-SPFLI INTO...
    ENDFORM.                               " Display_basic
    *&      Form  UCOMM
      This subroutine for at user-command event
      There are no interface parameters to be passed to this subroutine.
    FORM ucomm .
      RANGES :
        r_carr FOR spfli-carrid,
        r_conn FOR spfli-connid,
        r_carrid FOR sflight-carrid,
        r_connid FOR sflight-connid,
        r_fldate FOR sflight-fldate.
      CASE sy-ucomm.
        WHEN 'DISPLAY'.
          DATA:
            lw_lines TYPE i,
            lw_lineno TYPE i VALUE 3.
          DESCRIBE TABLE t_spfli LINES lw_lines.
          DO lw_lines TIMES.
            READ LINE lw_lineno FIELD
                 VALUE w_checkbox   INTO w_checkbox
                       fs_spfli-carrid INTO  fs_spfli-carrid
                       fs_spfli-connid INTO  fs_spfli-connid.
            IF sy-subrc = 0.
              IF w_checkbox = 'X'.
                r_carr-sign = 'I'.
                r_carr-option = 'EQ'.
                r_carr-low = fs_spfli-carrid.
                APPEND r_carr.
                r_conn-sign = 'I'.
                r_conn-option = 'EQ'.
                r_conn-low = fs_spfli-connid.
                APPEND r_conn.
              ENDIF.                       " IF W_CHECKBOX = 'X'
            ENDIF.                         " IF SY-SUBRC = 0
            ADD 1 TO lw_lineno.
          ENDDO.                           " DO LW_LINES TIMES
          SUBMIT yh1314_030502_call
            WITH s_carr IN r_carr
            WITH s_conn IN r_conn
             AND RETURN.
          IMPORT t_itab FROM MEMORY ID 'YH1314'.
          LOOP AT t_itab INTO fs_itab.
            r_carrid-sign = 'I'.
            r_carrid-option = 'EQ'.
            r_carrid-low = fs_itab-carrid.
            APPEND r_carrid.
            r_connid-sign = 'I'.
            r_connid-option = 'EQ'.
            r_connid-low = fs_itab-connid.
            APPEND r_connid.
            r_fldate-sign = 'I'.
            r_fldate-option = 'EQ'.
            r_fldate-low = fs_itab-fldate.
            APPEND r_fldate.
          ENDLOOP.                         " LOOP AT T_ITAB INTO.....
          SELECT carrid                    " Carriee Id
                 connid                    " Connection number
                 fldate                    " Flight date
                 bookid                    " Booking number
                 loccuram                  " Local Currency
                 order_date                " Booking date
             INTO CORRESPONDING FIELDS OF TABLE t_sbook
             FROM sbook
             WHERE carrid IN r_carrid AND
                   connid IN r_connid AND
                   fldate IN r_fldate.
          IF SY-SUBRC NE 0.
            MESSAGE 'NO RECORDS FOUND'(006) TYPE 'S'.
          ENDIF.                           " IF SY-SUBRC NE 0
          LOOP AT t_sbook INTO fs_sbook.
            AT FIRST.
              WRITE: /5 'Carrier Id'(001),
                     20 'Conn Id'(002),
                     35 'Flight date'(003),
                     50 'Book Id'(004),
                     65 'Local Currency'(005).
            ENDAT.                         " AT FIRST
            WRITE: /5 fs_sbook-carrid,
                   20 fs_sbook-connid,
                   35 fs_sbook-fldate,
                   50 fs_sbook-bookid,
                   65 fs_sbook-loccuram CURRENCY fs_sbook-loccurkey.
          ENDLOOP.                         " LOOP AT T_SBOOK INTO.....
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " UCOMM
    Regards
    Kiran

  • Import statement clashes

    Hi,
    If 2 import statements happen to import the same class implicitly (as opposed to naming the exact class in the import statement), then how does the compiler decide which one is used? Apparently the order of the import statements doesn't matter... already tried that.
    For example:
    //class Test.java
    import java.lang.*; /redundant, but shows that we're importing Object
    import org.omg.CORBA.Object;
    public class Test {
    public static void main(String[] args) {
    Object obj = new String();
    ... here, the compiler complains about "found: java.lang.String" and "required: org.omg.CORBA.Object". Switching the order of the import statements had no effect... same issue. How are name clashes handled with import statements?

    The conflict is not resolved -- if there is any ambiguity the compiler complains. In these cases you need to use the fully qualified class name; e.g. java.lang.Object or org.omg.CORBA.Object -- it's not allowed to use the simple name "Object" because there's no way to know which of the two is meant.

  • Import statement and directory structure

    First of all, sorry for such a long post, I believe part of it is because I am unsure of the concept of importing in Java. Secondly, Thanks to anyone who can ultimately enlighten me to the concept of import. I did ask this question before in the "erorr and error handling" forum, and the people who have helped me there did a great job. But, I believe I require a little more clarification and thus have decided to post here.
    Anyhow, my question..
    Could someone explain to me the concept of the import statement, or direct me to a webpage with sort of explanation for newbies? For some reason, I am having a hard time grasping the concept.
    As I understand it, the import statement in Java, is very similar to the namespace keyword in C. That is to say, import doesn't actually "import" any source code, the way that the #include statement does in C.
    So I suppose what my question is, say I have a java class file like below:
    //filename: sentence.java
    //located: c:\school\csc365
    package csc365;
    class sentence
    //some variables here..
    //some constructor here..
    //some methods here..
    And some sample program like the one below which implements the above..
    //filename: test.java
    //located: c:\school\csc365
    import csc365.*;
    import java.io.*;
    class test.java
    //creates some sentence object
    //uses the object's methods
    //some other things.
    As I understand it, the test.java file should not compile because the csc365 package is not in the correct directory. (assuming of course, the classpath is like c:\school\csc365;c:\school )
    But, ... where then should the sentence.java be located? In a subdirectory of c:\school called csc365 (i.e c:\school\csc365\) ?
    And thus that would mean the test.java file could be located anywhere on the hard drive?
    I suppose, I just need a little clarification on the correlation between a package's "name" (i.e package csc365; ) and its corresponding directory's name, and also how the javac compiler searches the classpath for java classes.
    ..So, theoretically if I were to set the classpath to look in every conceivable directory(provided the directory names were all unique) of the harddrive, then I could compile a test.java anywhere?
    As a note: I have been able to get the test.java file to compile, by leaving out the import statement in the test.java file, and also leaving out the package statement for the sentence class, but I assume this is because the files are defaulted to the same package?

    Hi Mary,
    No, import isn't analogous to C++ namespace - Java package is closer to the namespace mark.
    import is just a convenience for the programmer. You can go your whole Java career without ever writing an import statement if you wish. All that means is that you'll have to type out the fully-resolved class name every time you want to use a class that's in a package other than java.lang. Example:
    // NOTE: No import statements
    public class Family
       // NOTE: fully-resolved class names
       private java.util.List children = new java.util.ArrayList();
    }If you use the import statement, you can save yourself from typing:
    import java.util.ArrayList;
    import java.util.List;
    public class Family
       // NOTE: fully-resolved class names
       private List children = new ArrayList();
    }import isn't the same as class loader. It does not bring in any source code at all.
    import comes into play when you're compiling or running your code. Java will check to make sure that any "shorthand" class names you give it live in one of the packages you've imported. If it can't find a matching fully-resolved class name, it'll give you a message like "Symbol not found" or something like that.
    I arrange Java source in a directory structure that matches the package structure in the .class files.
    If I've got a Java source file like this:
    package foo.bar;
    public class Baz
       public static void main(String [] args)
            Baz baz = new Baz();
            System.out.println(baz);
       public String toString()
           return "I am a Baz";
    }I'll store it in a directory structure like this:
    root
    +---classes
    +---src
          +---foo
               +---bar
                    +---Baz.javaWhen I compile, I go to root and compile by typing this:
    javac -d classes foo/bar/*.javaI can run the code from root by typing:
    java -classpath classes foo.bar.BazI hope this wasn't patronizing or beneath you. I don't mean to be insulting. - MOD

  • Length error occured in IMPORT statement

    Hello everyone,
    i hv one requirment in PO print(ME23N). in po print asset no nt display without changing other format.
    so that i first copy both smartform and driver program, in that i made certain changes such that i declare the patameter p_ebeln and i comment to data statement of p_ebeln & p_ebeln = nest-objky.
    then i join asset no (anek-anln1) with the help of inner join. then in smartform i gave condition that if bsart = 'ZCAP'
    wa_final-anln1 = gv_anln1.
    endif.
    i import gv_anln1 in smartform and exported in deriver program.
    both are synthetically currect but when i gave print preview dump is occured.
    length error occured in IMPORT statement
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
         not caught in
        procedure "%GLOBAL_INIT" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        During import the system discovered that the target object has
        a different length than the object to be imported.
    what i do?

    Hello,
    can u send me coding for that?
    program line is already created for that
    and their first coding is like that,
    if gv_bsart = 'ZCAP'.
    wa_final-matnr = space.
    endif.
    and in text they fetch matnr no.
    but as per requirement they want asset no when bsart = 'ZCAP'
    how that asset no will come.
    matnr comes there is bsart is other that ZCAP, but bsart = ZCAP they want asset no instead of matnr.

  • Import statement: pass parameter or variable in import statement ??

    Hi All..
    Is there a way to pass parameter or a variable to a url in the import statement..
    I'll be using a url in the import statement, the url will be having a dynamic .rtf file...something like
    <?import:http://#server#:#port#/xmlpserver/<mySubTemplate>.rtf?>
    where <mySubTemplate> is dynamic..
    I've been searching this thread for a while now and ended up close...
    Import sub template dynamically
    Thanks in Advance..

    Have you tried replacing the mySubtemplate.rtf part with a variable, or replace the entire URL using a variable? Try using the same construct from this example in the Report Designer's guide (page 7-14, 10.1.3.4).
    In Microsoft Word's Format Picture dialog box select the Web tab. Enter the
    following syntax in the Alternative text region to reference the image URL:
    url:{IMAGE_LOCATION}
    where IMAGE_LOCATION is an element from your XML file that holds the full
    URL to the image.
    You can also build a URL based on multiple elements at runtime. Just use the
    concat function to build the URL string. For example:
    url:{concat(SERVER,'/',IMAGE_DIR,'/',IMAGE_FILE)}
    where SERVER, IMAGE_DIR, and IMAGE_FILE are element names from your XML
    file that hold the values to construct the URL.
    This method can also be used with the OA_MEDIA reference as follows:
    url:{concat('${OA_MEDIA}','/',IMAGE_FILE)}

  • SSMS 2012:FOR XML PATH Using XPath Node Tests-Columnn name 'test()' contains an invalid XML identifier as required by FOR XML?

    Hi all,
    I am learning XPATH and XQUERY from the Book "Pro T-SQL 2008 Programmer's Guide" written by Michael Coles, (published by apress). I copied the Code Listing 12-8 FOR XML PATH Using XPath Node Tests (listed below) and executed it in my
    SQL Server 2012 Management Studio:
    --Coles12_8.sql // saved in C:/Documemnts/SQL Server Management Studio
    -- Coles Listing 12-8 FOR XML PATH Using XPATH Node Tests
    -- Retrieving Name and E-mail Addresses with FOR XML PATH in AdvantureWorks
    -- 16 March 2015 0935 AM
    USE AdventureWorks;
    GO
    SELECT
    p.NameStyle AS "processing-instruction(nameStyle)",
    p.BusinessEntityID AS "Person/@ID",
    p.ModifiedDate AS "comment()",
    pp.PhoneNumber AS "test()",
    FirstName AS "Person/Name/First",
    MiddleName AS "Person/Name/Middle",
    LastName AS "Person/Name/Last",
    EmailAddress AS "Person/Email"
    FROM Person.Person p
    INNER JOIN Person.EmailAddress e
    ON p.BusinessEntityID = e.BusinessEntityID
    INNER JOIN Person.PersonPhone pp
    ON p.BusinessEntityID = pp.BusinessEntityID
    FOR XML PATH;
    I got the following error message:
    Msg 6850, Level 16, State 1, Line 2
    Column name 'test()' contains an invalid XML identifier as required by FOR XML; '('(0x0028) is the first character at fault.
    I have no ideas why I got this error message.  Please kindly help and advise me how to resolve this error.
    Thanks in advance,  Scott Chang

    Hi Michelle, Thanks for your nice response.
    I corrected the mistake and executed the revised code. It worked nicely.
    I just have one question to ask you about the appearance of the xml output of my Co;les12_8.sql:
    <row>
    <?nameStyle 0?>
    <Person ID="1" />
    <!--2003-02-08T00:00:00-->697-555-0142<Person><Name><First>Ken</First><Middle>J</Middle><Last>Sánchez</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="2" />
    <!--2002-02-24T00:00:00-->819-555-0175<Person><Name><First>Terri</First><Middle>Lee</Middle><Last>Duffy</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="3" />
    <!--2001-12-05T00:00:00-->212-555-0187<Person><Name><First>Roberto</First><Last>Tamburello</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="4" />
    <!--2001-12-29T00:00:00-->612-555-0100<Person><Name><First>Rob</First><Last>Walters</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="5" />
    <!--2002-01-30T00:00:00-->849-555-0139<Person><Name><First>Gail</First><Middle>A</Middle><Last>Erickson</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="6" />
    <!--2002-02-17T00:00:00-->122-555-0189<Person><Name><First>Jossef</First><Middle>H</Middle><Last>Goldberg</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="7" />
    <!--2003-03-05T00:00:00-->181-555-0156<Person><Name><First>Dylan</First><Middle>A</Middle><Last>Miller</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="8" />
    <!--2003-01-23T00:00:00-->815-555-0138<Person><Name><First>Diane</First><Middle>L</Middle><Last>Margheim</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="9" />
    <!--2003-02-10T00:00:00-->185-555-0186<Person><Name><First>Gigi</First><Middle>N</Middle><Last>Matthew</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="10" />
    <!--2003-05-28T00:00:00-->330-555-2568<Person><Name><First>Michael</First><Last>Raheem</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    <?nameStyle 0?>
    <Person ID="11" />
    <!--2004-12-29T00:00:00-->719-555-0181<Person><Name><First>Ovidiu</First><Middle>V</Middle><Last>Cracium</Last></Name><Email>[email protected]</Email></Person></row>
    <row>
    I feel this xml output is not like the regular xml output.  Do you know why it is diffrent from the regular xml xml output?  Please comment on this matter.
    Thanks,
    Scott Chang
    What do you mean by regular xml document? Are you referring to fact that its missing a root element? if yes it can be added as below
    USE AdventureWorks;
    GO
    SELECT
    p.NameStyle AS "processing-instruction(nameStyle)",
    p.BusinessEntityID AS "Person/@ID",
    p.ModifiedDate AS "comment()",
    pp.PhoneNumber AS "text()",
    FirstName AS "Person/Name/First",
    MiddleName AS "Person/Name/Middle",
    LastName AS "Person/Name/Last",
    EmailAddress AS "Person/Email"
    FROM Person.Person p
    INNER JOIN Person.EmailAddress e
    ON p.BusinessEntityID = e.BusinessEntityID
    INNER JOIN Person.PersonPhone pp
    ON p.BusinessEntityID = pp.BusinessEntityID
    FOR XML PATH('ElementName'),ROOT('RootName');
    replace ElementName and RootName with whatever name you need to set for element as well as the root element
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dynamic parameter with an IMPORT statement

    Hello experts. I hope you can help me with this issue:
    I have a report performing an EXPORT statement into a Buffer:
      EXPORT I_USER    FROM P_USER
                    I_NAME    FROM P_NAME
                    I_SURNAME FROM P_SURNAM
               TO DATA BUFFER V_XPARVALUES.
    Then it calls the first FM where a type I program is created by using INSERT REPORT... This dynamic-generate INCLUDE has the explicits declaration for variables: I_USER, I_NAME, I_SURNAME.
    Afeter the dynamic Include generation, it calls a second FM, wich has the reference to the dynamic Include created before with the data declaration. The only thing remain is to IMPORT all the data from the buffer V_XPARVALUES:
    The following code lines are within a LOOP. wa_param-paramname has the name of the variable (I_USER, I_NAME I_SURNAME).
        ASSIGN (wa_param-paramname) TO
          FROM DATA BUFFER v_xparvalues.
    but what I need to achieve is dynamic parameters in the IMPORT statement.
    Had anybody came across this problem?
    I hope I have been clear with the explanation.
    Regards,
    Andrés Sarcevic.

    IMPORT/EXPORT scope didn't work out. Instead, I used CALL TRANSFORMATION and XML approach, besides some ABAP creativity.

  • Import collides with another import statement

    Suppose I have 2 packages, train and plane. Each package has a class called Engine. In addition, train.Engine and plane.Engine have nothing in common. In a 3rd class, I import both of these:
    import train.Engine;
    import plane.Engine;Doing so results in the following error:
    The import plane.Engine collides with another import statement
    How do I do this?

    One of these imports have to be commented. The imports are reside in the source code, not just in jar or other class path entries. If the imports are in different files then you'd browse the sources and find import with the same name but in different name spaces. This is happened if you you don't wanna add a big jar to the class path instead you created a class file with the same name because of huge references. And you just wanted route it out of the jar and possibly remove dependency.

  • JSP import Statement importing a Class File giving ERROR

    Hey guys,
    There is a problem to which I dont know the reason,
    Consider the code below:
    <%@ import Converter, ConverterHome %>
    It gives me a Compile Time error of this type:
    '.' Required in import Converter ;
    but when i put these classes in a package suppose "converter"
    and the above import statement like this :
    <%@ import converter.Converter,converter.ConverterHome%>
    It gives me no error
    So whats the reason behind this? Cant I compile a JSP program by refrencing classes without in any package?
    please Reply
    Thanks in advance..

    So whats the reason behind this?
    Cant I compile a JSP program by refrencing classes without in any package?No, I do not beleive you can, is you are using Java 1.4. In 1.4, you can only reference classes in the Default Package (none) from other classes in the default package. If you are in a package, then you can not import from the default package. And this is for ALL java classes, not just JSP and Serlets. Since the JSP servlet would be part of a package (which depends on the server you are using) you will need to put your classes into packages to import them...

Maybe you are looking for

  • Why is the item count in Photos for Mac significantly higher after upgrading from iPhoto?

    Since upgrading to Photos for Mac from iPhoto, I've noticed the number of photos and videos in my library is higher than what I had before. Granted I imported some photos into the new app since then but taking that into account there's still a big di

  • Remote debugging with APEX and SQL Developer

    Hi, I have problems concerning breakpoints within my SQL Packages I want to debug. I want to force SQL-Developer to suspend execution of a function, so I can get forward step by step. The SQL-Developer do not stop executing at the breakpoints I set i

  • Service sid XDB is down alert

    I constantly receive the alert <SID>XBD is down. We are not using XDB nor DISPATCHERS, or multi-threaded servers. At database creation time, from dbca, the parameter DISPATCHERS had a value. Afterwards we created a pfile and removed this parameter an

  • Trouble moving files to external harddisk

    Hey guys, anyone can advice me why can't i move files to my xternal hdd even though my xternal hdd has lots of space? I tried to change the sharing permissions of the external hdd but i can't even though i'm logged in as an administrator. Can someone

  • Get control after key press in listview?

    how to get control after key press in listview ???? example after keyboard key PAGE_DOWN  from listview execute my routine ????? Thank' s