Class file is referencing a type outside the classpath???

Hi All,
I'm developing a EJB project in NWDS.
I'm getthing the below syntax error.
This compilation unit indirectly references the missing type com.sap.exception.BaseException (typically some required class file is referencing a type outside the classpath)
Can you please help me to resolve this?
Thanks in advance.
Sundar

Hi Sundar,
You need to add the ejb20.jar file to your Project classpath.
If you are developing the project locally then the jar file can be directly added to the class path using the Project Properties --> Java build PAth --> Libraries tab --> Add External Jar.
If it is a DC development, the ejb20.jar can be found under the SAP-JEE software component of your track.
Hope it helps.
Regards,
Alka.

Similar Messages

  • How to save library symbols' class files in packages that are not the default package?

    Hi,
    I perform the following in Flash CS5 with Flash Builder 4
    1) Create a new library symbol.
    2) Do a RightClick->Properties on the new symbol
    3) Check the options for "Export for ActionScript" and "Export in frame 1".
    4) I write a new name for my class "Class1" and click on the pencil icon "edit class definition" to edit the class.
    At this point my FlashBuilder 4 takes over and opens the "New ActionScript" dialog.
    4) I then click on Package-Browse to select a package e.g. com.mycompany.myfiles as the new class destination.
    The as file is created as com.mycompany.myfiles/Class1.as as everything seems just fine.
    5) I close the ActionScript file and back in Flash CS5 I RightClick on the symbol and select "Edit Class".
    At this time, FB4 suggests again to create the file, ignoring the fact that I already created it before.
    Do you know of a way I can make Flash CS5 remember where I created the file?
    Thanks.

    Hi,
    I didn't remove the project or delete any of the files.
    All I did was create the class file under a package that is not the default package. Then when I clicked on the Flash symbol's "Edit Class" It asked me again to create the same class file.
    Only if I create the class in the default package, it won't ask me to recreate it again.
    Bye,
      RaamEE-IL

  • How to stream flv files from a diffferent directory outside the applications folder

    Hi everyone,
    I want to stream the flv files from a different location
    stored in the hard disk, which is outside the applications folder
    in the FMS installation root directory. Does anyone know how to do
    it?
    Regards,
    Diptanu

    VOD changes won't help him, he said outside the applications
    folder. According to adobe any new vod folders must be in the
    applications folder, hence virtually worthless for most purposes. A
    better question may be, how do you specify a folder on a different
    local hard drive. I wish adobe wouldn't make it so complicated, it
    should be a really simple matter.

  • Using Reflection on classes outside the classpath

    Hi all,
    Im writing a tool that takes a directory containing class files (from other internal projects) and returns information such as the Class name, package, parent, constructors and public methods. These projects will not be on the classpath and will also use jars that are not on the classpath.
    I decided that ClassLoaders were the way to go. So I created a SimpleClassLoader class that takes a file, reads it in as an array of bytes and calls defineClass:
    public class SimpleClassLoader extends ClassLoader
         public SimpleClassLoader()
         public synchronized Class loadClass(String name, boolean resolveIt) throws ClassNotFoundException
              System.out.println("1) loading class:   " + name);
              return super.loadClass(name, resolveIt);
         public synchronized Class loadClass(File classFile) throws ClassNotFoundException
              System.out.println("2) Loading class: " + classFile.getName());
              try
                   byte[] data = getClassData(classFile);
                   return defineClass(name, data, 0, data.length);
              catch (IOException e)
                   throw new ClassNotFoundException();
         byte[] getClassData(File classFile) throws IOException
              byte result[];
              try
                   FileInputStream in = new FileInputStream(classFile);
                   result = new byte[in.available()];
                   in.read(result);
                   in.close();
                   return result;
              catch (IOException e)
                   throw new IOException();
    public class ClassParser
         public Class parse (File classFile)
              SimpleClassLoader loader = new SimpleClassLoader();
              Class reflectClass = null;
              try {
                   return loader.loadClass(classFile);
              } catch (ClassNotFoundException cnfe) {
                   System.out.println("Error loading class: " + classFile.getName() + "\n" + cnfe);
                   return null;
    }This worked for simple classes but when the superclass was in a jar or another file in the directory that hadnt already been loaded a ClassNotFoundException was thrown. So I then decided to try using URLClassLoader and loading in the jars and the entire source directory before calling findClass on it.
    class MyURLClassLoader extends URLClassLoader
         public MyURLClassLoader(URL[] urls)
              super(urls);
         public Class findClass(String classname) throws ClassNotFoundException
              return super.findClass(classname);
    public class ClassParser {
         private URL[] _classpath;
         private String _root;
         public ClassParser(File[] files, String root) {
              _root = root;
              _classpath = new URL[files.length];
              for (int i = 0; i < files.length; i++) {
                   try {
                        URL url = new URL("jar", "", files.toURL() + "!/");
                        this._classpath[i] = url;
                   } catch (MalformedURLException e) {
                        e.printStackTrace();
         public Class parse (File classFile)      {
              MyURLClassLoader urlLoader = new MyURLClassLoader(_classpath);
              Class reflectClass = null;
              String classname = "";
              // Try to load a Class instance from the file
              try {
                   classname = getClassName(classFile);
                   return urlLoader.findClass(classname);
              } catch (ClassNotFoundException cnfe) {
                   System.out.println("Error loading class: " + classname + "\n" + cnfe);
                   return null;
         String getClassName (File file) throws ClassNotFoundException {
              if (file.getAbsolutePath().startsWith(_root)) {
                   String packagePath = file.getAbsolutePath().substring(_root.length(), file.getAbsolutePath().lastIndexOf("."));
                   packagePath = packagePath.replace(File.separatorChar, '.');
                   return packagePath;
              } else {
                   throw new ClassNotFoundException();
         public static void main(String args[]) {
    File [] files = new File [] {
    new File("C:\\Projects\\app\lib\\jacob-1.6.jar"),
    new File("C:\\Projects\\app\\lib\\xalan.jar"),
    new File("C:\\Projects\\app\\lib\\xmlunit1.0.jar"),
    new File("C:\\Projects\\app\\classes\\com\\foo\\bar\\swing\\")
    parser = new ClassParser(files, "C:\\Projects\\app\\classes\\");
    This seems to work when I call findClass on a class thats in one of the jars but not on a class in the classes directory.
    Does anyone have any ideas what im doing wrong or whether im barking up the wrong tree completely??
    Thanks,
    Conor

    The URLs that you supply to an URLClassLoader each define the location of the default package for that portion of the classpath for the ClassLoader.
    This is the problem line
    new File("C:\\Projects\\app\\classes\\com\\foo\\bar\\swing\\")I suspect that it should be..
    new File( "C:\\Projects\\app\classes" )as this is the location of that default package.

  • Property file should be externalize and outside the archive (say ear) ?

    My team architect is suggesting me to externalize the property files like locale resources (e.g messages.en.properties ), log4j (e.g log.properties) etc .The reason is to avoid recompiling incase of changes to this resources.
    Example tomorrow if something goes wrong in production and we want to enable the debug log,then we can change the property file ,restart the server and we are good.If it was inside the archive file we have to create a brand new
    a brand new archive file ,redeploy it and restart the server again.
    In my entire work experience I never externalized this resources because they are inherent part of the archive file.Hence any changes then recreate the archive file and redeploy.
    The team architect might have some good reason.
    Please advice.
    Thanks
    m

    Manjit wrote:
    My team architect is suggesting me to externalize the property files like locale resources (e.g messages.en.properties ), log4j (e.g log.properties) etc .The reason is to avoid recompiling incase of changes to this resources.
    Example tomorrow if something goes wrong in production and we want to enable the debug log,then we can change the property file ,restart the server and we are good.If it was inside the archive file we have to create a brand new
    a brand new archive file ,redeploy it and restart the server again.
    In my entire work experience I never externalized this resources because they are inherent part of the archive file.Hence any changes then recreate the archive file and redeploy.
    The team architect might have some good reason.
    Please advice.
    Thanks
    mIf the major hurdle is changing log levels dynamically..you could look at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PropertyConfigurator.html#configureAndWatch%28java.lang.String%29

  • How to invoke a .class file on a perticuler time during the day

    i need to invoke a .class file everyday on a perticuler time, please help me in this regard, kindly give me some details and an example code if possible.

    OS'es tend to thave their ways to accomplish this.
    See crontab on Unices and so on.

  • JUNIT test failure-Configuration file bc4j.xcfg not found in the classpath

    Hi All,
    As part of an ESS project,Im having a model project containing a VO(parameters VO).This VO is configured to have Read-only access through SQL query and have only one transient attribute each.For the model projects containing the VO for pre merge checker compliance I had to create JUNIT Test projects containing new AMs for testing the parametersVO. While running the JUNIT tests I got an exception like
    “oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.ConfigException, msg=JBO-33001: Configuration file /oracle/apps/hcm/goals/core/dataMigration/publicEssModel/test/applicationModule/common/bc4j.xcfg is not found in the classpath.”.—even though this file is contained in both the src/classes folder of the project.
    When i try to run the TestAM I'm getting an exception like 'configuration tester.xcfg not found in the calsspath.
    While debugging this error, we found that we are able to successfully run the JUNIT tests if we make some changes in the adf-config.xml file of the Application. The change required is to comment out the mdsC:adf-mds-config tag in the xml file.
    After doing this change Im also able to run my AM without any exception.
    Is this a known issue?.
    Since modifying the adf-config.xml is not a recommended practice is there any workaround that we can get rid of this exception.
    Regards,
    Ajin.

    Just checked but could only find this thread Unable to run ADFBC JUNIT Test Classes with JDEV11G 11.1.1.6
    As it's also dealing with junit and 11.1.1.6.0 you might want to read it.
    Timo

  • [b]Need to access a file which is not specified in the classpath[/b]

    Hi everybody ,
    I need your help to proceed with my application. I've tried accessing a file without setting it in Classpath using getResourceAsStream(..), but i'm getting an error.
    error :
    java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
    at abc.func(LoadProp.java:13)
    at LoadProp.main(LoadProp.java:35)
    Application :-
    import java.io.* ;
    class test
    public void func(String file )
    String thisLine ;
    try
    InputStream is = test.class.getClassLoader().getResourceAsStream(file);
    System.out.println("File load successful");
    BufferedReader myInput = new BufferedReader(new InputStreamReader(is));
    while ((thisLine = myInput.readLine()) != null) {
    System.out.println(thisLine);
    catch (Exception e)
    System.out.println("Inside Catch");
    e.printStackTrace();
    public class LoadProp
    public static void main(String args[])
    String testname = System.getProperty("propfile");
    System.out.println(testname);
    test t = new test() ;
    t.func(testname) ;
    System.out.println("End Main!") ;
    Output:-
    test.properties
    File load successful
    Inside Catch
    java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
    at test.func(LoadProp.java:13)
    at LoadProp.main(LoadProp.java:35)
    End Main!
    Anyone of you help me to get rid of this problem..
    Thanks & Regards
    BK

    It has to be in the classpath for getResourceAsStream
    to "get" it.So if your question is really about needing to read a file which is not in the classpath and won't be, then as long as you have the path to that file, just use FileInputStream to read it.
    InputStream is = new FileInputStream(pathToFileHere);

  • Configuration file bc4j.xcfg not found in the classpath.

    When i try to run an application that uses ADF BC i get an error telling me the bc4j.xcfg was not found.
    When i open my AppModule and click the bc4j.xcfg link it opens. When i look at the path it stored in, it is different from the path the error says.
    It's something like this:
    Configuration file /be/something/model/common/bc4j.xcfg is not found in the classpath
    but my appModule opens the bc4j.xcfg in a different folder:
    /be/something/utility/common/bc4j.xcfg
    It's a fact i modified the project and managed the packages a bit but i always used the refactor menu of jdeveloper in order to move or rename files.
    It appears that something has failed while moving/changing name.
    I looked inside my project to look for references for bc4j.xcfg but i can't find any so i can't see were to change the directory he needs to look for the bc4j file.
    How do i fix my project?

    John,
    In the DataBindings.cpx i can't find any reference to a datacontrol...
    This is my bindings:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Application xmlns="http://xmlns.oracle.com/adfm/application"
                 version="11.1.1.56.60" id="DataBindings" SeparateXMLFiles="false"
                 Package="be.usermanagementProv.portlets" ClientType="Generic">
      <definitionFactories>
        <factory nameSpace="http://xmlns.oracle.com/adf/controller/binding"
                 className="oracle.adf.controller.internal.binding.TaskFlowBindingDefFactoryImpl"/>
        <dtfactory className="oracle.adf.controller.internal.dtrt.binding.BindingDTObjectFactory"/>
      </definitionFactories>
      <pageMap>
        <page path="/UserManagement/view.jspx"
              usageId="be_usermanagementProv_portlets_viewPageDef"/>
      </pageMap>
      <pageDefinitionUsages>
        <page id="be_usermanagementProv_portlets_viewPageDef"
              path="UserManagement.viewPageDef"/>
      </pageDefinitionUsages>
    </Application>In the datacontrol section when i right click the DC the "edit definition" is grayed out. Probably because the DC comes from the library and is not created in the application.

  • OA_MEDIA referencing a value outside the Context Element

    I am attempting to use XML Publisher to change a logo image at the top of a template. I have used the following command with great success:
    url:{concat('${OA_MEDIA}’,’/',//C_PAYGROUP',.jpg')}
    Unfortunately, this works fine when I have C_PAYGROUP in the Context Element of the XML output I am referencing... in reality this is not the case as I need to get to the absolute path and specify my C_PAYGROUP value from the top level down... i.e:
    /HBOSRA0830/LIST_G_SEL_CHECKS/G_SEL_CHECKS/C_PAYGROUP
    I have tried the following syntax to no avail and hope someone will be able to help me out a little...
    url:{concat('${OA_MEDIA}/',/HBOSRA0830/LIST_G_SEL_CHECKS/G_SEL_CHECKS/C_PAYGROUP,'.jpg')}
    Many many thanks,
    Terence

    Hi Terence,
    Looks like a slight problem with where the slashes etc are.
    The following will work - note the slash after OA_MEDIA as a seperate field in the concat.
    url:{concat('${OA_MEDIA}','/',/HBOSRA0830/LIST_G_C_PAYGROUP/G_C_PAYGROUP/C_PAYGROUP,'.jpg')}
    Robert

  • Cannot find the class file for com.sap.portal.services.api.connectorgateway

    Hi,
    I was trying the "How to BI JAVA SDK in a Portal iView and get the following error.
    The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.portal.services.api.connectorgateway.IConnectorGatewayService. Fix the classpath and try rebuilding this project.
    I have the following in my portalapp.xml file
    <property name="SharingReference" value="com.sap.portal.ivs.connectorservice"/>
    and i have also added the jar file "com.sap.portal.ivs.connectorservice_api" in the set of lib's
    Has some faced a similar issue? or can someone suggest how I could possibly resolve this.
    Thanks,
    Smitha

    Hi Smitha:
       My webdynpro dc was build failed for "This compilation unit indirectly references the missing type com.sap.engine.services.webservices.espbase.client.dynamic.content.GenericObject (typically some required class file is referencing a type outside the classpath)".
    How should i do?  Thank you!

  • Cannot find the class file

    Hi All,
    Can any one help me regarding the issue?
    Error:
    package com.support.misc.feedback
    I am getting the following error for the above line. But I have created the Hierarchy in folder structure. But still it is throwing the error.
    1. Cannot find the class file for com.sapportals.htmlb.page.DynPage
    2. This compilation unit indirectly references the missing type com.sapportals.htmlb.page.DynPage (typically some required class file is referencing a type outside the class path)     FeedbackBean.java
    Thanks in Advance.
    Message was edited by: Gowsika Kannan

    Hi Gowsika,
    the class needed is located in htmlb.jar which can be found under <irj-root>/WEB-INF/portal/portalapps/com.sap.portal.htmlb/lib
    You need to integrate this jar in your .classpath
    Hope this helps,
    Robert
    PS: Please do not post the same question 3 times

  • Trying to access methods from a .class file by creating instance of class

    Hey all,
    I'm hoping you can help. I've been given a file "Input.class" with methods such as readInt(), readString(), etc. I have tried creating instances of this class to make use of it, but I receive the error "cannot find symbol : class Input".
    If you could help at all, I would greatly appreciate it.
    Here's my code. The first is the base program, the second is the driver.
    import java.util.*;
    public class CarObject
         private String makeType = "";
         private String modelType = "";
         private int yearOfRelease = 0;
         private double numOfMiles = 0.0;
         public void setFilmTitle(String make)
              makeType = make;
         public void setMediaType(String model)
              modelType = model;
         public void setYearOfRelease(int year)
              yearOfRelease = year;
         public void setNumOfMiles(double miles)
              numOfMiles = miles;
         public String getMakeType()
              return makeType;
         public String getModelType()
              return modelType;
         public int getYearOfRelease()
              return yearOfRelease;
         public double getNumOfMiles()
              return numOfMiles;
    The program is used by a rental car company and the object takes on desired attributes.
    import java.util.*;
    public class TestCarObject
         static Scanner keyboard = new Scanner(System.in);
         public static void main(String[] args)
              System.out.println("Please answer the following questions regarding your rental car order.");
              Input carinput = new Input();
              String makeType = carinput.readString("Enter your desired make of car: ");          
              String modelType = carinput.readString("Enter your desired model of car: ");
              int yearOfRelease = carinput.readInt("Enter the oldest acceptable year of release to rent: ");
              double numOfMiles = carinput.readDouble("Enter the highest acceptable number of miles: ");
              System.out.println("Make: " + makeType);
              System.out.println("Model: " + makeType);
              System.out.println("Year: " + makeType);
              System.out.println("Mileage: " + makeType);
    }

    No, I don't know the package name....Is there a way
    to import the Input.class by itself without importing
    the entire packge?
    I tried extending the driver program too...It didn't
    work either...
    Message was edited by:
    BoxMan56How do you know you have a class called Input.class ?
    You got a jar file which contains it ? or just a simple .class file ?
    You have to set the classpath in either case.
    But for the former, you should also need to explicitly telling which package containing the class file you looking for (i.e. Input.class)
    e.g. java.util.Vector which is a class called Vector inside java.util package.
    You don't have to import the whole package, but you should tell which package this class belongs to.

  • How to refer to a protected class outside the enclosing package

    Hi all,
    At the page 357 of the book Java Language Specification(Second Edition), when saying about checking accessibility of Type and Method, they concern Let C be the class containing the method invovation T.m, if T is in a different package than C, and T is protected then T is accessible if and only if C is a subclass of T. I just wonder how to refer a protected type outside the package it declared.
    For example,
    package test;
    public class test {
    static protected class protectedTest {
    public void foo() {..}
    in another package
    import test.*;
    class subtest extends test.protectedTest {  <- error
    Anyone can give me an example showing an invocation directly to foo() declared in class test.protectedTest ? The invocation should appear outside package test.
    Thanks,
    Ha Chau

    The protected inner class would be accesible only within a class which extends test, where you could either use or extend it as in:
    class subtest extends test {
        private static class sub2 extends protectedTest {
               }

  • Whether to import the class file put in JAVA_TOP

    I have put the java class file in JAVA_TOP. Now i want to access the method in that class from jsp, is it necessary to import the class file path in jsp. Without importing the class file path how can i access the method.
    JSP Coding
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.*" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <%
    sample objsample = new sample();
    %>
    <b>
    NAME : </b><input type="text" value="<%=objsample.getName()%>">
    </body>
    </html>
    Class file
    public class sample
    public sample()
    String name = "JOHN";
    public String getName()
    return name;
    Pls help me

    Hi,
    For sys outs check the following log files:
    <ORACLE_SOA_HOME>/opmn/logs/default_group~home~default_group~1.log
    or
    <ORACLE_SOA_HOME>/j2ee/home/log/home_default_group_1/system_*.log
    Here server instance name is home, change it with your server instance name.
    Dharmendra
    http://soa-howto.blogspot.com

Maybe you are looking for

  • X1 Carbon 2014 Keyboard

    Dear Lenovo, I have always been a huge fun of the Thinkpad line, pretty much all my laptop are thinkpads. Brought both the 2011 and 2012 versions of X1 and they were great!!! I am such a heavy user I do all my work on those. especially the 2012 X1, b

  • Inventory account is not defined [Goods Receipt PO - Rows - Warehouse Code

    Hai All, When I copied from PO to GR PO the below said error accord. G/L are set by  Item level. General Setting > Inventory Tab > Set G/L Accounts as : *by item level* Error: Inventory account is not defined [Goods Receipt PO - Rows - Warehouse Code

  • Safari displaying question marks on images

    Hey guys, i ran into a problem with my RSS Reader /GoogleReader/. As a fan of photography i have several photographers blogs in my RSS reader. In past two weeks noticed, that a lot of posts with single pictures keeps showing me just question marks an

  • Why won't PC let me back up iTunes onto disc?

    I know I am doing it right. I click on Back Up To Disc. It checks..checks..then says it will take 14 discs to back up. Fine. The box says 'Data Disc' or 'Cancel.' I select Data disc as that's what a CD-R is..and it goes in and comes back out. These a

  • Problem with activating FaceTime on iOS 6

    I have recently updated to  iso6  on my iphone 4s however now my facetime does not work it just says waiting for activation. I have tried to reboot it and sign in and out but still nothing works this just appears. Does anyone know what i can do?