Add helper class public parts as used DC in EJB DC

Hi Experts,
I have created a JAVA DC project containing the helper classes.
For this helper classes i have created a Jar file.
I have also created two public parts
1) with an option Can be packaged into other build results (e.g. SDAs)
2) with an option Provides an API for developing/compiling other DCs
Now i want to use these public parts in my EJB DC.
I have added the API public part in my EJB DC as build time design time and run time.
Now when i am getting java.lang.NoClassDefFoundError: for the class defined in JAVA DC helper class.
Can you help me in resolving this?
Regards,
Ashish Shah

Hi
I have done following things:
1) I have a java DC containing helper classes and an EJB DC referring to it.
2) Now to access this EJB DC, I have created a java command bean DC.
3) And I am using this command bean Java dc in my WebDynpro application.
4)  Now for deploying the helper class, I have created a library project.
5)  To this library project I have added the SDA and API public part of helper class as used dc.
6)  I have added this java library file as used DC in WebDynpro DC and in EJB DC.
7)  I have added the library reference to the WebDynpro DC for J2ee server component library DC  As pg.comaptsc~dc_aptjl
8)  When i checked in Visual admin i could see the Assembly (SDA) helper class jar file.
In my helper class files, I am getting this warning.
Checking package reservation
Warning: Package pg.com.apt.help.cls is not reserved for DC : apt/sc/dc_apthc.
Now in my webdynpro DC when I refer to the helper class through the EJB, I get this error.
java.lang.NoClassDefFoundError: pg/com/apt/help/cls/TargetMarket at pg.com.atos.WebModuleProject.FetchSDCDataBean.SearchGTINTMDataEJB(FetchSDCDataBean.java:133) at pg.com.atos.WebModuleProject.FetchSDCDataObjectImpl0.SearchGTINTMDataEJB(FetchSDCDataObjectImpl0.java:119) ... 35 more ; nested exception is: java.lang.NoClassDefFoundError: pg/com/apt/help/cls/TargetMarket
Can you please guide on what I am missing.
Thanks in advance.
Regards,
Ashish Shah
Edited by: ashish shah on Dec 18, 2007 3:23 PM

Similar Messages

  • Help me which JNDIFactory to use to access EJB from a java class of JAR

    I am confused in understanding the different JNDI factories
    RMIInitialContextFactory, ApplicationInitialContextFactory and ApplicationClientInitialContextFactory
    And the different namespaces like global, container local and component local.
    Especially is there any relationship between the JNDI factories and the namespaces?
    Or are they related to the deployment descriptors.
    Because in application specific deployment descriptors (orion-ejb-jar.xml), we just map the JNDI location with the object (or its reference from ejb-jar.xml). We dont specify it can be accessed from this factory or that.
    Shall we access an EJB from using any JNDI factory?
    Specifically, I am stuck with what Factory to use to access an EJB from a Java class in a library (jar). The JAR is packaged with the EAR which contains the EJB Jar that I am trying to access.
    THANK YOU

    Ed,
    As Robin said, I think you need code similar to this:
    Context c = new InitialContext();
    Object o = c.lookup("java:comp/env/Name");where Name is the name of your EJB as it appears in the "ejb-jar.xml"
    deployment descriptor XML file.
    Good Luck,
    Avi.

  • Error in packing Public Part

    Hello Frnds,
    i have a 3 DC's .
    1. Dictionary DC
    2. EJB module project DC
    3. EJB Application DC
    i have exposed all the tables in the public part of the Dictionary DC. And added those public part into used DC of EJB module project DC. And EAR DC have the reference of EJB module project DC.
    When i am creating projects from inactive workspace , while creating the EAR DC it is giving error .. Failed to pack the public part.
    Error...
    <b>Failed to pack public part: Couldn't delete old file \.dtc\0\DCs\lti.com\inspire\jd_ddic\_comp\gen\default\ public\JD_PublicPart\lib\java\lti.cominspirejd_ddic~JD_PublicPart.jar</b>
    Regards
    Shobhan

    Hi Shobhan,
    what version of SAP_BUILDT are you using? Your problem matches SAP Note 913829. The issue was explicitly fixed for NW04 SP13 and SP14.
    Best regards,
    Marc

  • Public Parts and NoClassDefFound

    Hi,
    I created an EJB with a public part. in the public part there are two classes.
    now I want to use the classes in a WebDynpro-Project (same SC). I added the public parts as used-DC in my WebDynpro-DC and I am able to build and deploy the DC.
    But now I get a RuntimeException "NoClassDefFoundError".
    Did I forget to add a reference???
    Thanks in advance
    Jan

    Jan,
    Check
    1.) If the Public Part is declared to be used only at <i>Build Time</i>!!.
    2.) If the <i>ejb.jar </i> file of your EJB project has been added to the classpath of your WD project.
    3.) If the WebDynpro sharing reference property of your WD project has a reference to the EJB.
    Finally, refer this: WebDynPro call EJB
    Bala

  • How to make a webdynpro component to be as a public part of a DC?

    Hi All,
         I've created 2 java web dynpro DCs : DC_A and DC_B in both the same software component.
         I want to a component of DC_B, let's call it Comp_B, to be the "Used Web Dynpro Component" of Comp_A in DC_A.
         I've done the following work:
         1. Expose the Comp_B to be the public part of DC_B
         2. Add DC_A to the Access List of Comp_B
         3. Add DC_B to the "Used DCs" list of DC_A
    But when I use the "Embed an existing component" function of Comp_A, I cannot find the Comp_B of DC_B.
    Anyone can help me?
    Thanks,
    YiNing

    Hi ,
       1) Right click the component B and declare the component B  of DC B to the public part.(Add to the public part)
       2) Now go to Component A , Right Click Used COmponents>Development Component>Show in--> Component Properties .
    then click the Dependicies Tab and click ADD
    here you have add the Component B  From the "MYComponents" Which is Exposed to the public part, and click next.(Configure dependicies as you wish ie Design Time .Deploy Time , Run Time )
    3) After you added the component we have to build it.Right Click the Componenet A
         Used Components>Development Component>Build
    4) Now declare the Component Usage
       Right Click the Componenet A
         Used Components-->Add Used Component
        Now give the Component Usage Name (for eg ComponentBInst) and select Component B
    Now Exchange of data will take place between the component by Context of the interface controller

  • Helper Classes

    Hi,
    going through the J2EE Tutorial you'll read on page 76 that Helper Classes "... must reside in the EJB JAR file that contains the enterprise bean class".
    Now, when deploying the cart example, the BookException class is included in both EJB JAR and Client JAR files.
    I would like to understand this construction. Can you help me?
    TIA
    Ivo

    Hi Iwo,
    The reason why the BookException is placed both in the EJB Jar and in the Client Jar is that both the server and the client must know the Exception. Basically you can devide your bean into three parts:
    Remote interface, which is known both by the client and the server.
    Home interface, do.
    EJB class, which only the server knows.
    When an exception is declared thrown at an interface, then the Exception must be included beside the interface otherwise a ClassNotFoundException will be thrown.
    Second, the reason why the helper classes must be included in the EJB jar is that the enterterprise bean is using the classes. If you do not include the Helper classes the bean will not be able to instantiate the Helper classes and it will not work.
    Hope this information will be helpful to you.
    Regards,
    Jess

  • JavaBean Model classes not seen in public part

    Hi everybody
    I have several plain java bean classes from which I created java bean model classes under the same model CnfMdl.
    I have added to public part both the model and the plain .java classes.
    Unfortunately from outside the DC, upon declaring model usage and when trying to edit model binding for a model node, I can only see my CnfMdl model but no model classes below.
    Can anyone please help?
    Thanks in advance, Vincenzo

    Hi
    Use these links
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/d7/3e07419a60ef6fe10000000a1550b0/frameset.htm
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/c5/a9592b4405c140b86f5a2e7aecc0ae/frameset.htm
    Regards
    Anup

  • Upgrading to 7.30 tc/ddic/runtime/facade USED COMPONENT OR PUBLIC PART IS UNKNOWN OR UNDIFENED

    Good Day,
    Was wondering if anyone can help me please. We created a new 7.3 track in order to upgrade, however now we have alot of broken DC's in the new 7.3 track. All of it seems to stem from tc/ddic/runtime/facade. In the CBS under vaild usage section it shows that tc/ddic/runtime/facade is broken with the following reason USED COMPONENT OR PUBLIC PART IS UNKNOWN OR UNDEFINED. Has anyone faced this before and how do i fix this?

    Hi Hamendra,
    Thank you for all your help on this. You suggested solution fix our issues.
    Another question, do you perhaps have a link to some netweaver 7.3 documentation (how to configure, setup DC's and build and deploy)? 
    I created a new develpment configuration for the new track in netweaver 7.3, and checked out isa/web/b2c and home/shr/ext. But now every single jsp is in error as it cannot resolve any of its import files are java classes. Should i just have NWDS ignore jsp errors or is this a legitimate issue?
    The other issue i have is that the Deploy option is grey'ed out and i cannot seem to figure out how to setup my J2EE engine.
    Would really appreciate any help you can provide on this.

  • What SAP Public Part contains IUserMappingService class?

    Hello. I need to use the IUserMappingService class in some of my code. I'm working with the NWDI so all my code is in DCs.
    So far I've been able to create Used DCs to various SAP DCs whenever I needed to refer to any SAP code but I can't find anything that contains the IUserMappingService class.
    I know I can get the jar somewhere and put it in an external library DC and then expose it as a public part that way. I'd like to avoid that, however, if it's already in some SAP DC.
    Thanks in advance for any help.
    David.

    What I needed to accomplish (reading from UserMapping) was originally thought to require the IUserMappingService class.
    I was never able to find a Software Component named SAP_PRT so I researched some more and found that I could accomplish what I needed another way.
    UMFactory.getUserMapping()...
    Thanks!

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • JDI: When do i have to use public parts

    Hello,
    i created a development configuration with a ejb (dc) project an a web module project. I can call the ejb modules ejbs with the simple way per jndi - when do i need the public parts?
    Thanks for answers,
    André Siegling

    Hi,
    If you are using dovelopment components and one DC would like to access another DC, in case of nested Dc's etc where ever there is a dependency between DC's you have to create Public part.
    To know more about DC's Public part,explore the link below for scenario2+
    http://help.sap.com/saphelp_nw04/helpdata/en/01/9c4940d1ba6913e10000000a1550b0/content.htm.
    mean while look into JDI Forums
    hope this info helped you
    Regards,
    RK
    :P.S Consider rewarding suitable points if the given info helped you!!!

  • Entity type "EJB-JAR" may not be used in public part "ejbjar_api"

    Experts,
    Can you please help me to identify why the error 'Entity type "EJB-JAR" may not be used in public part "ejbjar_api", unsupported purpose.' appears on NWDS while creating a project on a DC and how can this be resolved.
    Thanks in advance
    -Lave

    Hi Jain,
    is the error message that the public part is not found prefixed with [dcmake]? If yes that rather points in the direction that there is a problem with the metadata information. (PP name not correctly spelled, renamed after initial creation, perhaps even some problems with upper/lower-case letters depending on your platform.)
    What SP are you using? The log looks like some rather old build plugins are used on a newer NWDI installation.
    The warning from the [wdgen] task and the subsequent failure of the [wdminimizer] can be ignored. "ERROR: Non Fatal Error" is a bit quaint, but it really is not fatal. It just means that the minimizer didn't find the data required to operate. The [wdgen] warning means that the WebDynpro generator could not write the information. So the jar files in your public part are maybe a bit bigger than necessary but that's all.
    Best regards,
    Marc

  • Pls help - cant connect to my database while my class is part of a package

    Can anyone please tell me why one can't connect to a database, while the class is part of a package?
    package Application;
    import java.sql.*;
    public class GameDatabase
    GameDatabase ()
    connect ();
    public void connect ()
    try
    String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=Profiles.mdb";
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection dbcon = DriverManager.getConnection (url);
    catch (ClassNotFoundException a)
    System.out.println ("ClassNotFoundEx");
    catch (SQLException e)
    System.out.println ("SQLEx");
    public static void main (String [] args)
    new GameDatabase ();
    gives a SQLexception while the "package Appplication;" is present,
    yet works perfectly when its commented.
    Any suggestions how to bypass this?

    Well, it just cannot find the file? Maybe you've to supply a path?
    Further on, one more lesson:
    System.out.println ("ClassNotFoundEx");
    System.out.println ("SQLEx");Please don't ignore exceptions. They are not intented for phun. Rather use e.printStackTrace();

  • Using Thread in Helper Class Used By MDB

    Using Thread in Helper Class Used By MDB
    I am writting one Message driven bean (MDB) which will be deployed on
    weblogic 6.1.
    In MDB.onMessage I create instance of helper class.
    call it's method HelperClass.doSomething(s1,s2)
    in doSomething I start new thread
    checks if thread is alive
    when thread is dead return flag
    run method of helper class does following
    1. opens socket connection to some server
    2. writes some data to it
    3. read some data from it
    4. depending on response set flag
    I want to know whether this approach is corect.
    Specially when weblogic recommends not to use threads (or be extreamly
    careful about thread handling) .
    Following is code..
    MessageDrivenBeanClass{
         puboic void onMessage(Message msg){
              String s1 = "s1";
              String s2 = "s2";
              HelperClass helper = new HelperClass();
              boolean flg = helper.doSomething(s1,s2);
    HelperClass implements Runnable {
         String s1;
         String s2;
         boolean flg = false;
         public void HelperClass(){}
         public boolean doSomething(String s1, String s2){
              this.s1 = s1;
              this.s2 = s2;
              Thread t1 = new Thread(this);
              t1.start();
              while(true)
              if(!t1.isAlive())
                   break;
              return flg;
         public void run(){
              // do actual processing
              if(something)
                   flg = true;
              else
                   flg = false;

    What is the purpose of creating an extra thread in this scenario (if your
    code is going to wait until thread terminates anyway) ?
    Also, creating new threads can be expensive, so it is always better to use
    thread pool and not to create new thread every time.
    And,
    Thread t1 = new Thread(this);
    t1.start();
    while(true)
    if(!t1.isAlive())
    break;
    is going to waste ALOT of CPU time. t1.join() will work much better.
    sk <[email protected]> wrote:
    Using Thread in Helper Class Used By MDB
    I am writting one Message driven bean (MDB) which will be deployed on
    weblogic 6.1.
    In MDB.onMessage I create instance of helper class.
    call it's method HelperClass.doSomething(s1,s2)
    in doSomething I start new thread
    checks if thread is alive
    when thread is dead return flag
    run method of helper class does following
    1. opens socket connection to some server
    2. writes some data to it
    3. read some data from it
    4. depending on response set flag
    I want to know whether this approach is corect.
    Specially when weblogic recommends not to use threads (or be extreamly
    careful about thread handling) .
    Following is code..
    MessageDrivenBeanClass{
         puboic void onMessage(Message msg){
              String s1 = "s1";
              String s2 = "s2";
              HelperClass helper = new HelperClass();
              boolean flg = helper.doSomething(s1,s2);
    HelperClass implements Runnable {
         String s1;
         String s2;
         boolean flg = false;
         public void HelperClass(){}
         public boolean doSomething(String s1, String s2){
              this.s1 = s1;
              this.s2 = s2;
              Thread t1 = new Thread(this);
              t1.start();
              while(true)
              if(!t1.isAlive())
                   break;
              return flg;
         public void run(){
              // do actual processing
              if(something)
                   flg = true;
              else
                   flg = false;

  • DC Properties Public Parts Tab Add Button is in diable mode

    Hi All,
    I am unable to add public parts to my webdynpro DC because ADD button is in disable mode
    Can any one please help me
    If you want you can see with attachments.
    Thanks In Advance.

    create the project first

Maybe you are looking for

  • What do you like in an application.

    hey guys, I've been discussing with a couple of friends about what makes the games that we use addictive, and makes you want to use it in your spare time. so of use have some time, could you please describe what you like in an Application for iPhone/

  • Is there a way to Rate TVshows like GP-R- etc in iTunes so...

    My son cannot see any TV show I have listed that I don't feel is for him? I know you can do this in Movies but what about a TV show in iTunes? Thank you for looking. Tom

  • I get an error when I try to update to version 7.0.4 on my iPad 2

    When I try to download the software update to 7.0.4, I get a error message saying there was an error downloading the software.

  • 16:9 and television

    hello, I did a compression of an 1hours45min sequence using final cut compressor with the settings best quality 120 min 16:9:.. It took more than 20 hours to finishing... once i burned the dvd , I noticed that in the televison I could see it well.. t

  • JPEG, Lossy Here?

    I have read the messages in the forum but I have a couple of basic questions about Photoshop Elements 4.0: 1. After opening my Organizer and editing a few photos, saving the edited photos as PSD, will the closing/exiting of Elements affect the qualit