What makes a Java Bean invaild for a model import?

I'm busy prototyping some functionality that will expose some MDM 5.5 data through a WebDynpro application.  I'm having a problem creating a java bean that will sit in front of an EJB, in that the Bean importer will refuse to import a bean if a certain line of code in a method is visible.  Here's the offending code from the method:
try {
     A2iResultSet rs = cat.GetRecordsByValue(ary, rsd, Schema.MyTable.NAME);
     setEventLocation(rs.GetValueAt(0, Schema.MyTable.EVENT_LOCATION).GetStringValue());
} catch (StringException e) {
     setEventLocation("failed to find record");
Note that I have a class instance variable called 'eventLocation', which has get/set methods defined for it, thereby satisfying the Javabean requirement.
The first two lines of the 'try' block are the problem.  If I comment them out and assemble the DC, I can import the Bean into a model with no issues.  If I uncomment them, I cannot import the bean - I get a message that says 'Invalid Jar - no beans to import'.
Can someone explain why this is happening?  Does it have something to do with the StringException?  As far as I can tell from the Java bean model import documentation, I think I'm doing everything correctly, but something must be amiss.
Suggestions?

Pablo,
Now I understand your question in comments to my blog better
You have to add "ejb20" classes to your WebDynpro project as well, and import model afterwards.
In WebDynpro DC expand path (<project> -> DC MetData -> DC Definition -> Used DC) and invoke "Add Used DC..." in contextual menu. In dialog select "<dev. config> -> SAP-J2EE -> ejb20 -> DC MetaData -> Public Parts -> default". Set dependencies Built-time (probably Design-time as well). Click OK. Try to import model. If fails, restart IDE and try to import again.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com/

Similar Messages

  • How to make my java bean internationalization?

    hi,
    I have a project on tomcat. I have rewrite my jsp to multi-language according to user's browse language setting. User's language is English, the jsp shows them English. User's language is Chinese, the jsp shows them Chinese, and so on. But in my java bean code, some exception are thrown out with some message or alert. Can anybody tell me how to make these java beans show the language string acording to user's browse language setting?
    thx
    Pierre

    Dear one_dane,
    Thank you. That is a great document to me. The fact is that my owner code throws exception with a string. The code is:
    if(amount<0) throw new Exception("Please input correct amount.");
    If the code is in jsp, I can convert it to a internationalized String using struts tag <bean:message...>. But it is in a deep function of java class. So must I add a Locale object parameter to the function and all calling functions?
    thx
    yours,
    Pierre

  • Dynamic Java bean classes for XSD using JAVA (not any external batch or sh)

    Hi,
    How can we generate dynamic Java bean classes for XSD (dynamically support All XSD at runtime)?
    Note: - Through java code via only needs to generate this process. (Not using any xjc.bat or xjc.sh from JAXB).
    Thanks

    Muthu wrote:
    How can we generate dynamic Java bean classes for XSD (dynamically support All XSD at runtime)?
    Pretty sure you can't. Probably can do a lot of them with years of work.
    And can probably can do a resonable subset suitable for the business at hand with only a moderate effort.
    Note: - Through java code via only needs to generate this process. (Not using any xjc.bat or xjc.sh from JAXB).The Sun jdk, not jre, comes with the java compiler as part of it. You can create in memory class (I believe in memory) based on java code you create.
    I believe BCEL alllows the same thing (in memory) but you start with byte codes.
    You could just create a dynamic meta data solution as well, via maps and generic methods. Not as fast though.

  • How to make view Java Bean as .ocx file.

    Hi All,
    I want to use a visual Java Bean in Visual basic. So that I can modify all the bean properties as modify properties in a ocx file.
    I used ActiveX Com bridge downloaded from Sun's site. But the packager
    makes a .tlb file .
    This file can only be added as a reference in visual basic but not as a ActiveX control. Is there any way out to do that???
    Thanks & regards.
    Nimesh

    The packager creates a registry file and a tlb file.
    After registering this .reg file, java bean can be used as an ActiveX control.
    From within Visal Basic, select the "Tools" menu and "Custom Controls" item and add the Bean control that was generated.
    Avinash.

  • What makes an audio file ineligible for Match

    What determines what is suitable for Match?  I have a series of lectures that I have loaded onto iTunes but they are not eligible for uploading why?

    The probably fall below the bit rate minimum requirement. Music files must be 96 Kbps or above to be scanned by the iTunes Match service.

  • What make's java different from other kinds of programming?![/b]

    How is it different from the other programs like the turbo programming and all those other stuff?!

    you jut can't copare Java to every other programming language. each language are designed differently. an answer to your question ccould well be 100,000+ pages (single space). There are many programming languages..most of which..you and i have never heard of.
    Many programming languages are created to target a specific domain (intentionally or unintentionally).
    1. procedural language (c, c++, fortran, basic, pascal)
    2. object oriented (java, small talk, c#, c++) - although c++ and Java are hybrid
    3. metalanguage (HTML)
    4. recursive (ML)
    5. logic (Prolog)
    6. forgot the category) (Schema, LiSP)
    Shema and Lisp are more suited for writing artifical inteligence. Java is more toward solving buisness problem. Choosing the right language culd means ease of development and saving in cost, and possibly performance.

  • How to make the java files compile for a project created outside of Eclipse

    Hi^^,
    I have created a project outside of Eclipse. It has the following folders
    1. config
    2. source
    3. WEB-INF
    I want to execute the project on remote server. Will it compile automatically creating a new folder for .class files corresponding to the source folder or do i need to include a build.xml to enable the project to create a new folder for .class files. Also pls tell me how do I write this build.xml
    Please advise.

    Hi^^,
    Actually I have created a project without using eclipse.
    My source files are inside WEB-INF/source
    Now I want to compile the files using build.xml so that I can create class files. I am using the following build.xml
    <project name="jsp" default="all" basedir="./">
      <property environment="env"/>
      <property file="ArmorJSP.properties"/>
      <!-- set global properties for this build -->
      <property name="source" value="."/>
      <target name="all" depends="copy, jspc, testservlet"/>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled jsp classes into it -->
      <target name="jspc">
        <!-- Run ejbc to create the deployable jar file -->
        <java classname="weblogic.jspc" fork="yes">
          <arg line="-webapp ${APPLICATION_HOME} -compileAll -d ${APPLICATION_WEB_CLASSES} ${source}/*.jsp"/>
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </java>
      </target>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled Servlets classes into it -->
      <target name="testservlet">
        <!-- Run ejbc to create the deployable jar file -->
        <javac destdir="${APPLICATION_WEB_CLASSES}" srcdir="${source}" includes="*.java">
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </javac>
      </target>
      <target name="copy">
        <copy todir="${APPLICATION_HOME}">
          <fileset dir="${source}">
            <include name="*.jsp"/>
          </fileset>
        </copy>
      </target>
    </project>I do not know how to compile the project using this build.xml
    The motive of doing all this is to understand how is Eclipse doing the build project step. I simply cannot find any build.xml inside any of my projects created in Eclipse however when right click on the project and choose build project, it compiles excellently. ???
    Edited by: pksingh79 on Nov 24, 2008 1:19 PM

  • What replacement SSD should I get for iMac Model A1225

    With a failed hard disk in my iMac, What is the best and most suitable replacement available.
    Disk space isn't really a factor, >120GB will suffice, my primary concern is getting the right make/model to fit my imac.

    geevesr wrote:
    Thanks,
    I have watched a couple of YouTube clips... How hard can it be, right!! ;o)
    Extremely! It's best done by a AASP that does this type of service.

  • Just wondering, what kinda tools do you prefer for data modeling

    Reading alot about datamodeling, from E-R diagrams to UML. In your database designs. From the conceptual, logical and physical model. What tool you prefer the most and why. What is a good tool for such things. And does Oracle supply such tools. Just curious as to what the professionals use.
    Pete

    ER-WIN is your tool for Database physical / Logical data modeling.

  • I have a macbook 13"screen purchased in 2007; I want to hook it up to my HDTV; I purchased a mini display port to hdmi adaptor but it does not fit.   what kind of adaptor will work for this model?

    I have a Macbook, 13" screen, purchased in 2007.    I want to hook it up to my HDTV; I purchased a mini display port to hdmi adapter but it does not fit.   Any suggestions?

    If you connect yourMacBook using a MiniDVI/HDMI adapter you will need to use external speakers for audio since the pre-2010 MacBooks will only send video through the MiniDVI or MiniDisplay Port . The MiniDVI/HDMI doesn't carry audio and there's no audio plugs on the TV to work with HDMI since it's expecting audio with the HDMI.
    If your TV has a DVI input plug you can use a MiniDisplayPort/DVI adapter. Then a DVI cable to the DVI input plug on the TV. The TV will have RCA audio plugs for use with the DVI. Plus DVI gives a sharper image than HDMI.

  • Any tutorials on how to make or edit tetxure images for 3d modeling?

    wondering if anybody knew where some tutorials are on this. when I crop an image say for an example a plank image even though the result ion is over 1k it still looks unclear. see how the one furniture image (2048 x 2048 ) looks clear compared to a cropped image that still has a resolution of 1845 x 395
    crop image

    You have to read up on how texturing actually works in the 3D program sense. You know, texture filtering settings, UV parametrization and whatnot. You image probably looks soft because you are forcing it to expand to the full UV range. You will need to tweak you actually mapping just as much as the image.
    Mylenium

  • Generate Java Bean Steleton with WSDL error

    Hi everyone:
    We are using CE 7.1 EHP1 SP01. We use ESR to create model and use NWDS to create java Bean Steleton for ESR model. It works fine in CE7.1. But when we upgrade to CE7.1 EHP1 SP01. An error occurs. When we create the skeleton. We find an error in the wsdl. The error is like "The 'EmbeddedSupport' port type specified for the  'EmbeddedSupportBinding' binding is undefined. Check the 'EmbeddedSupport' port type name and ensure it is defined."
    Due to everything is generated automatically by Java Bean skeleton wizard. I think there is sth wrong with ESR wsdl. Does anyone encount this issue?
    Thanks
    Elliot

    Hi,
    you have to delete some tags.
    k.      When imported, the wsdl file is validated. Open the wsdl file to check the errors.
    If you get the following error: '<Your service>_In' port type specified for the '<Your Service Binding>' binding is undefined.  Delete the policy tag wsp:Policy under the tag wsdl:portType and under the tag wsdl:binding.
    This is an extract of the blog:
    /people/abdelmorhit.elrhazi/blog/2009/10/30/how-to-consume-an-inbound-backend-web-service-in-nwdsjboss-environment
    Regards,
    Christoph

  • Java Beans in 11g !

    Hi everyone,
    We are using 11gr2 Forms/Reports 64-bit on Windows Server 2008 64-bit.
    Now we want to use JAVA BEANS in our application.
    Suggest me link and steps for installing/using JAVA BEANS compatible for 11gr2 Forms/Reports.
    Kindly tell me benefits of using JAVA BEANS in our applications.
    Thanks vth Regards.
    Bhatt.

    Advantage of java beans is you can enhance the behavior of forms. Forms is as you know applet based running on the client. (There is a different technology associated with inserting your own java code into the loop on the application server, should you want to do that.) So with beans in theory you can get more code to run on the client and do things like read and write files on the client, communicate with devices on the client, etc.
    Regarding doing that I think the executive summary is mostly look up Fbean in forms builder help.
    How I came to that tentative conclusion (I haven't gotten mybean to work yet! What do I know?) follows.
    Home of much forms info:
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    Java beans are java obviously one has to acquire a certain level of expertise in java to deal with them but more importantly how to understand how to communicate between forms and the bean? It's hard for formists, living their lives at the outside of forms, who come up with an idea of something exceptional they want to do in forms, to translate that into the bean world. Then you have to think like a form and that's unknown territory.
    One problem is terminology: what is a PJC and what is a bean? Is a bean a PJC? I have yet to definitely figure that out. The paper below says: "A javabean is a pjc which is of an unspecialized type". However after that was written seems like in many cases when people are referring to "pjc"'s they are thinking the pjc is a specialized type.
    "Oracle9i Forms provides two mechanisms for extending the client with Java. The
    Pluggable Java Component (PJC) mechanism, which was introduced with Forms
    6i, and the newer Oracle9i Forms specific, enhanced JavaBean support
    mechanism." (paper 2 below).
    I was reading this document from 2000 which is interesting:
    Paper 1:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    It's talking about handlers and views and it's quickly getting over my head as I don't know enough forms internals to make much of this. For example I would like to write a bean that can print a small form. I have a proof of concept in java (6) that can print text to the default printer. So next step, create a bean that can get the data out of the form. From my formist perspective here I am in a bean how do I access some fields in a record in a block in forms? It's tough going. What does that mean in this handler/view world? Or do I have to be in the form and think of sending data to the bean and telling it to print it?
    Paper 2:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    Starts out with more on the handler/view thing. Unfortunately I am totally mvc or handler-view impaired. It escapes me totally.
    "The Handler class is responsible for both maintaining the current value of any data and controlling the visual representation of the data."....vs.... "The View class is singularly responsible for presenting the data to the user in some
    manner and handling user input. The View class may allow the data to be changed
    by the user.". What? I am lost I have no idea what the handler does and what the view does. How about a discussion that is strictly goal oriented? If you want to do this, you have to talk to the (Handler| View)? Don't leave it to me to understand the handler/view thing and then figure it out from that. (This mvc thing is precisely what repels me about jdeveloper. You can't embrace jdev if you haven't drunk the mvc koolaid.)
    Further on in the paper they bring up fbean:
    "So in Oracle9i Forms a new simpler mechanism was introduced to allow you to integrate JavaBeans and Java
    Applets as custom components without writing any Java Code at all. This is all handled using a PL/SQL package in Forms called FBean.
    "FBean provides a full PL/SQL API to allow interaction with any public methods,
    properties and events that a JavaBean or Applet exposes."
    Now you're talking! This is more like it!:
    "Executing Methods
    Methods on the JavaBean are executed using one of the variety of
    FBean.Invoke methods. Like the property getters and setters there are various
    versions of this method which handle calling methods on the JavaBean that return
    different datatypes (or return void):
    • FBean.Invoke_Char()
    • FBean.Invoke_Bool()
    • FBean.Invoke_Num()
    • FBean.Invoke()
    Ok now that we know about the fbean thing we can find fbean in the forms builder help system. Looking good. I am pretty sure that somewhere in there you have to get your bean in a jar file and sign it (not a trivial proposition) and
    change the forms server configuration to include your jar file. I also think that the bean has to import frmall.jar and some of the packages regarding that view stuff. A tutorial about fbean and all these details from start to finish would be super!
    So you can talk to another applet? Really? Can this still be done considering all the security concerns in current browsers?

  • Java bean newbie

    to create a java bean, is it necessary to have the BeanBox tool ?
    what is a java bean actually? if we don't have the tool would it still be possible to code a java bean?
    is it difficult to install the bean tool?
    thanks!!!

    I usually just write the code for a bean without any tools. :)

  • Expose EJB through Java Bean model importer in Web Dynpro

    Hi,
    I am planning to expose EJB like following:
    1. Create Stateless session bean as a façade for DAO access.
    2. Create DAO to access database. In my case is Oracle DB
    3. Create Java Bean to encapsulate session bean
    4. Import java bean model to web dynpro
    Few of my business method return the object array e.g. Customer[] which contains all properties of customer, and getter, setter.
    Has anyone done this before? Is there any sample code?
    Best Regards,
    Zhang Yan

    Hi
    I think u can refer to the following link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Thought this link is also Useful
    Creating and Deploying Web Services for an EJB
    Wishes
    Krishna kanth

Maybe you are looking for

  • New Ipod touch can't connect to itunes due admin restrictions.

    I just got a new Ipod touch. Where I'm located i'm unable to connect to the iTunes store since it is blocked. Is there any otherway to activate my iPod. I'm unable to go any other place in which I would be able to connect to the store. It's going to

  • My Internet Security has gone. How do I get it back on this browser?

    My Trend Micro Internet Security which keeps me safe from all bad places has disappeared leaving me feeling unprotected, which I don't like at all. How do I get it back on this updated firfox? If this can't be done I would like to revert back to the

  • Java Automation Program Debugging help

    Dear fellow members, a ex-coworker has written a java applet for my system measuring automation. Unfortunatly it stopped working and i have no idea why. I will write down what the program is supposed to do and what it does. Thank you in advance for a

  • BSIS Query performance issue.

    HI, our BSIS table contains almost 10 millions records, now during check printing process when we are quering BSIS table for getting cost center from the line item. it is taking almost 30-60 seconds which is slowing the check printing process. SELECT

  • Command to clear the bgp vrf table.

    Hi, I want to clear the bgp table on this vrf. Here is how it looks like :- address-family ipv4 vrf mj redistribute connected neighbor 12.12.12.12 remote-as 1111 neighbor 12.12.12.12 activate neighbor 12.12.12.12 send-community neighbor 12.12.12.12 a