Import cannot be resolved issue

Hi
    I had installed a project package in my package manager. It has src.bnd bundle file which includes all my java classes. Eventhough i build the bundle (bundle is active in console also); the package in the bundle is not resolved. When i checked the referenced libraries in the project explorer; the bundle was not installed there automatically.
Can any one say what is the issue ? How can i resolve it. Because each time i cannot manually add the JAR to the referenced libraries
Thanks
Veena

Hi Veena,
When any bundle deploys in felix console it resolves all its package import via taking reference of api shared through other bundles using export-package property set in bundle. Where as when you work on same bundle using any editor (for example CRXDE ) you will not get those export api support here and you have to manually add/configure to your application as we normally do for other java application (and if you are using any build tool like Maven then API dependencies should be resolved through adding those dependencies in pom.xml)
I hope it clarifies your doubt. Let me know for more information.
Thanks,
Pawan

Similar Messages

  • Always getting 'import cannot be resolved' for IPrivate* imports

    Hi,
    Everytime I import a Web Dynpro DC from our NWDI I see 'import cannot be resolved' errors when I open for example the Component Controller implementation. An Organize Imports does not fix this. If I rightclick inside the code and select 'Show in Package Explorer' it jumps to the .java file for the implementation (within the gen_wdp folder). In that same tree I can see the IPrivate*.java files as well.
    I also tried Repairing and Rebuilding the project. All to no avail...
    Why is this happening and how can I resolve it?
    Kind regards,
    Pascal Willemsen

    If I open the generated Java files in gen_wdp I see loads of errors (all '...cannot be resolved...'), but the Tasks view contains no errors at all (answer to Armin).
    A development component build runs and seems to succeed without problems.
    It seems that the Web Dynpro's contain a circular dependency, which I think is the cause of the problem:
    1. wdThis in the Component Controller is an IPrivateComponent instance.
    2. IPrivateComponent extends IPublicComponent.
    3. IPublicComponent has a gen_delegate member which is an InternalComponent instance.
    4. InternalComponent implements IPrivateComponent.
    I guess NWDS doesn't know where to start...?

  • Import cannot be resolved for IPrivate* imports

    Hi All,
    I got the error "import cannot be resolved for IPrivate* imports'" when I import existing project. And then I close the project, copy files to gen_wdp folder again and open project according to the method in Thread
    Always getting 'import cannot be resolved' for IPrivate* imports.
    Then the problem resolved.
    After that I have done some modifications and rebuild it. However the same problem occurs again. I repeat close/open project again but it doesn't help. That's to say I cannot make any modifications to the project and build out any new EAR files.
    If anyone can help, I will appreciate it a lot.
    Xiao

    Hi Xiao,
    Is <b>ShineWay_ReClaimsView</b> a view in your component in this project ?
    If yes ensure that it doesn't have any errors. Then rebuild your project.
    If you in dc environment and this view is from other project (dc). Then ensure that the dc having this view is build (dc build) correctly.
    As abhilash said the gen_wdp files are generated and you shouldn't touch them. You will get more problems than solutions.
    Best Regards,
    <a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/ashwaniKrSharma&">Ashwani Kr Sharma</a>

  • Import cannot be resolved

    Hi All,
        Our NWDS always shows that certain import which generated by meta data cannot be found or resolved.
    For instance "import com.xx.sc_os_sale.dc_ws_styleinfo.comp.wdp.IPrivateStyleInfoComp;"
    I can find the code file in my local path
    "D:\Documents\01 WORK\03 Programming\cobest\dtc\0\DCs\xx.com\DC_WS_StyleInfo\_comp\gen_wdp\packages\com\xx\sc_os_sale\dc_ws_styleinfo\comp\wdp"
    And the "D:\Documents\01 WORK\03 Programming\xx\dtc\0\DCs\xx.com\DC_WS_StyleInfo\_comp\gen_wdp\packages\" has been add to the project as the Java Build Path automatically when the project was created,
    But the error is still there.
    If I build the project, no error would show in task and err log page. Also the CBS can build this project successfully. I'm totally mazed about it.
    Anyone can help me?
    Thanks,
    YiNing
    Edited by: YiNing Mao on Mar 11, 2008 11:55 AM

    Thanks, all. After close and reopen my project, the "cannot be resolved" problem is gone, but there's a new one.
    One of my web dynpro component has been expose as public of its DC, and another component from an other DC uses it as a used component, I keep being infomed of following error:
    1. The project was not built since its classpath is incomplete. Cannot find the class file for com.xx.sc_os_sale.dc_wsv_customer.model.Response_SC_OS_SALE_CustomerInfoViDocument_getCustomerList. Fix the classpath then try rebuilding this project.
    2. This compilation unit indirectly references the missing type com.xx.sc_os_sale.dc_wsv_customer.model.Response_SC_OS_SALE_CustomerInfoViDocument_getCustomerList (typically some required class file is referencing a type outside the classpath)
    I've tried to delete local project and reimport from DTR, but it doesn't help at all.
    Hope you can help me.
    YiNing
    Edited by: YiNing Mao on Mar 11, 2008 7:25 PM

  • BO XI 3.1 SDK and Eclipse: import cannot be resolved

    I am preparing my Eclipse 3.4.1 installation to develop using the BO XI 3.1 SDK; I got some samples from the SAP Developer network, however, Eclipse always shows import errors like "The import com.crystaldecisions cannot be resolved"
    I added the paths "C:\Program Files\Business Objects\common\4.0\java\lib" and "C:\Program Files\Business Objects\common\4.0\java\lib\external" to my project (rigt click -> Properties -> Java Build Path -> Libraries -> "Add external class folder" button) but I am still getting these errors.
    I also tried Netbeans 6.5 but it shows similar errors: "package com.crystaldecisions.sdk does not exist".
    It's a BO XI 3.1 server installation.
    What am I doing wrong?
    Thanks!

    Hi Stefan,
    Instead of adding the "Add external class folder" try out to add to your Java Build Libraries "Add External JARs"
    When you click on this button you can select the path of all the jar files from your Business Objects installation directory.
    E.g. C:\Program Files\Business Objects\common\4.0\java\lib"
    and "C:\Program Files\Business Objects\common\4.0\java\lib\external"
    Regards,
    Anu

  • MSS - Import cannot be resolved

    Hello
    I am new to the NWDS in regards to the MSS package.
    I have loaded MSS in NWDI and I have created a project in NWDS for mss/cat/approval[sap.com]
    I am able to see the entire project structure. When I go into FcCatapprove component I get errors.
    I guess I need to add some jar files or a library but I have not been able to figure out which ones.
    These Imports it cannot find
    import com.sap.xss.hr.cat.approve.blc.wdp.IPrivateFcCatApprove;
    import com.sap.xss.hr.cat.approve.model.approval.CatsApproval;
    import com.sap.xss.hr.cat.approve.model.approval.Hrmss_Cat_Appr_Scenario;
    import com.sap.xss.hr.cat.approve.model.approval.Hrmss_Cat_Wd_Approval_Input;
    import com.sap.xss.hr.cat.approve.model.approval.Hrmss_Cat_Wd_Approval_Output;
    import com.sap.xss.hr.cat.approve.model.approval.Hrxss_Cat_Rfc_Cell_Value;
    I am using
    NWDS 7.0
    Portal NW 7.0 sp15
    java 1.4.2_19
    MSS 600
    Any Help in this area would be appreciated.
    Thank you,
    Sarah

    Hi,
    May be you forgot import the dependencies of the track.
    List of Dependencies:
    sap.com_SAP_JTECHS
    sap.com_SAP_BUILDT
    sap.com_SAP-JEE
    sap.com_SAPPCUI_GP
    Business packeage:
    sap.com_SAP_ESS
    sap.com_SAP_MSS
    you need to have all this packages in your track
    May be helpful for you.
    Cheers,
    Appu

  • Import of Private View cannot be resolved

    I have a web dynpro component I wrote a while ago.  I just pulled it down from NWDI.  Created the project.  Build works great.  Even made changes and checked in and activiated.  All things work.
    Here's the trouble.  When I look at the Implementation tab on my DetailView my private view's import cannot be resolved.
    import spiritaero.com.cats.emp.wdp.IPrivateDetailView;
    Message says "The import spiritaero.com.cats.emp.wdp cannot be resolved"
    How do I fix this?
    Diane

    Diane,
    Some times, all the class files may not ge generated when you import the project into your NWDS. Reload + Rebuild the project. If still errors are there, close the project and open again. Hopefully it will generate all the classes and your problem will be solved.
    Regards,
    Sridhar

  • Import org.mozilla.javascript.Context; !!ERROR This import cannot be resol.

    Hello to All,
    I am attempting to use an open source program for speech recognition and several "training" files for the program have a number of
    import org.mozilla.javascript.Context;imports that bring the error "This import cannot be resolved"
    I know for an import to work it must be part of the "package" or "API" from Sun.
    I am using javasdk1.5.0, Eclipse 3.1 and Ant.
    So, What do I have to do to actually "import the org.mozilla.javascript"????
    This must be a very simple answer but I have not had much understanding here.
    Thanks for the help!
    Chetanji
    Edited by: Chetanji on May 4, 2008 11:28 AM

    Thanks tschodt,
    That would have been the answer, except I did some more googling right after my question was asked and found that I needed the js.jar.
    I looked in the jsapi.jar and found it was already there.
    So I built it and much of the "red" disappeared from the project in Eclipse.
    I know now I must reorganize the project, as the imports are calling for files that cannot be found, that happen to be elsewhere or not in the build path.
    Bringing Unix/Linux OpenSource into Windows is usually tricky, but well worth the investment in time spent.
    I give you the Duke as you were correct and the only one to answer.
    Blessings,
    Chetanji

  • RAWSTRING issue in NWDS 7.3  - B cannot be resolved to a type

    Dear Experts,
    I'm facing an issue while importing a structure in RFC which has RAWSTRING in NWDS 7.3 SP09. This worked well in NWDS 7.0 but having issues in NWDS 7.3
    In the inbuilt Java files I'm having error in the method ( B cannot be resolved to a type )
      public [B getBinary1() {
        return ([B)super.getAttributeValue("Binary1");
    Appreciate your suggestions if you faced similar issues.
    Thanks

    hi mohamed ,
    as already specified  in the thread  ,http://scn.sap.com/thread/3286933  you can use the deprecated rfc , as even we were not able to solve that issue even though we deleted and reimported several times , you can use deprecated rfc . we tried changing the type of the attribute from xtring to other compatible types at abap side but it didnt work , so we used deprecated rfc.
    Regards
    Govardan

  • Getting an error like this The import javax.servlet cannot be resolved

    HI
    i am getting an error like this "The import javax.servlet cannot be resolved".wht i ahve done in eclipse right click->open->servlet->packge name->servlet name->next->nexyt>finish.hereinterfaces is javax.servlet.Servlet.
    do i need add jar for it.can any one tell me why i got error like this.
    vijay

    Please don't doublepost. Answer is given here: http://forum.java.sun.com/thread.jspa?threadID=5220686

  • The import com.sapportals.htmlb cannot be resolved

    Hi,
    I am working on EP7 and trying to create a sample application for DynPage Portal Component.
    After I create a new DynPage in NWDS, i get the following error:
    The import com.sapportals.htmlb cannot be resolved
    I found a link similar to this problem but not clear abt how to solve it:
    Re: I cant import com.sapportals.htmlb.*
    How do I resolve this error? Are there some set of files that need to be import before I can develop this application.
    Thanks in advance,
    CD

    Hi CD,
    1. Regarding the availability of the KIT, checkout the link:
    Link: [Role for a Java developer;
    2. Regarding the Path for the mentioned libraries:
            **Program FilesSAPJDTeclipseplugins
    **must be in your C:
    If you do not find the specified jar file there, you can use the JAR File Locator. Checkout the link:
    Link: [Re: EP7 PDK;
    Regards,
    Chander Kararia
    #If problem solved, close the thread after rewarding points.

  • The import oracle cannot be resolved

    I am new to ODI. I wrote a code for an Open Tool. But it throwing The import oracle cannot be resolved exception. Even I have imported ojdbc14.jar file. Can anybody tell me how to resolve it or the right way to import this file again. I am using eclipse for the same.

    hi,
    thnx for reply...my problem is above exception throws while creating jar file for open tool. Before few days it was not comming. May be its because as I add some new features to it or because of ojdbc14.jar file is not imported correctly in package. I am new to java as well as to ODI.

  • Import org.apache.avalon cannot be resolved

    Hi, I am new to Eclipse and J2EE in general and I have tried to import a project in Eclipse 3.0.1. However, I am getting several compile errors having to do with the following imports:
    import org.apache.avalon.framework.activity.Initializable;
    import org.apache.avalon.framework.activity.Startable;
    import org.apache.avalon.framework.configuration.Configurable;
    import org.apache.avalon.framework.configuration.Configuration;
    import org.apache.avalon.framework.configuration.ConfigurationException;
    import org.apache.avalon.framework.logger.AbstractLogEnabled;
    import dragon.common.services.cache.janitor.ICacheJanitorService;
    import dragon.common.services.cache.store.IExpiringStoreComponent;
    import dragon.common.services.cache.store.IStoreComponent;
    stating that
    "The import..." [import package name] "...cannot be resolved"
    Can anyone help with what I should do? Thanx

    I am trying to compile code but keep getting an error stating that the import of a class is not working? I wondered if I am having the same problem. I am running eclipse 3.0. The applet is called joole and it is importing CBoolFkt but it is evidently not working. Appreciate any ideas.
    The applet is not initiating and the error messages is as follows:
    java.lang.Error: Unresolved compilation problems:
         The import CBoolFkt cannot be resolved
         The import ShowCopyright cannot be resolved
         at Joole.<init>(Joole.java:8)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

  • Import javax.jms cannot be resolved

    This is error i am getting The import javax.jms cannot be resolved even though
    my class path contains mail.jar and activation.jar.
    please suggest me, to resolve above error
    Thanks in advance

    sir
    These below import packages are not resloved by class path
    import javax.jms.ObjectMessage;
    import javax.jms.Session;
    import javax.jms.Topic;
    import javax.jms.TopicConnection;
    import javax.jms.TopicConnectionFactory;
    import javax.jms.TopicPublisher;
    import javax.jms.TopicSession;
    and below packages are resolved
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;

  • The import org.apache cannot be resolved

    Hi All,
    I am a Java\Eclipse newbie. I am trying to import the org.apache.xerces package, and the import is failing with this error:The import org.apache cannot be resolved
    I am not using Maven\Ant for building the project. I know I need to download some class files\jar files to get this to work, but I am not sure where to download these packages from. Could someone please help me out here?
    import org.w3c.dom.Node;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.dom.traversal.TreeWalkerImpl;
    import org.apache.xerces.domx.traversal.NodeFilter;
    import org.apache.xerces.dom.DocumentImpl;
    THanks a lot!

    Well, if you are in fact looking to download the JARs for the Apache Xerces project, you should be able to find them at the Apache Xerces project page.
    If you already have the JARs downloaded, you need to make sure that they appear on your CLASSPATH, otherwise your application will never find them. Since you are using an IDE, this should be as easy as adding the JARs to your project.

Maybe you are looking for