Comments in generated code

Hi,
Our standards require that all deployed code should have a standard header containing information such as change history, author, etc. We have been putting this section in the 'Description' of the mapping, but the generated code does not contain this header. Where should I put comments that I want to appear in the generated PL/SQL package code ?
Thanks in advance.
Regards,
Biswa.

Biswa,
We already have an enhancement request like this. Not sure if it will find its way into the next release. For now all I can offer is the workaround where knowing a package name you can find out the description you entered in OWB for that map. Use a public view of the design repository for that, such as:
select DESCRIPTION from ALL_IV_XFORM_MAPS where MAP_NAME = '[your package name]'
More details on public views are in the User's Guide http://download.oracle.com/docs/html/B12146_01/toc.htm
Nikolai Rochnik

Similar Messages

  • Error in generated code :Component Interface

    Hi All,
    I have my webdynpro component active works fine in Dev Server.
    When we move it to qualtiy we got a strange error " Error in Generated Code, Type Z*IWCI is unknown.
    Its related to the Component interface which gets generated automatically while any WDA is created but in our system it isnt getting generated?
    Looking for your valuable comments on ths
    Regards
    Bhanu

    Hi Bhanu,
    Goto se09 check for that request ICF service is generated or not? I think you first created in $TMP and assigned package.
    If ICF service is not available, just copy it to new comp, it will create new ICF service. I dont know this is the solution,
    just a guess.
    Cheers,
    Kris.

  • Generated Code Problem?

    So now, when I try to create an instance of my bean
    Context art3ic = new InitialContext(env);
    PersonHome pHome = (PersonHome) art3ic.lookup("Person");
    Person pRemote = pHome.create(); <---- Exception
    I get an exception saying I'm trying to find a primary key inside a create call. This is not the case:
    public String ejbCreate() {
    return null;
    So I'm guessing the generated code has placed a getPrimaryKey call there?
    Any comments or advice?
    Exception in thread "main" java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have an identity yet, see the EJB 2.0 specification chapter 10.5.4
         at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1558)
         at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1511)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
         at __Proxy1.create(Unknown Source)
         at com.art3.UnitTesting.PersonTest.<init>(PersonTest.java:37)
         at com.art3.UnitTesting.PersonTest.main(PersonTest.java:52)

    Yup, it's a bug. I read the generated code. So is there a bug/problem/issue report on this within Oracle? If so what's the status? When are we slated to see a fix? Quite a few people have run into this (turns out this subject was already under discussion - silly me not to search first).

  • Comment on this code please

    I would like your comments on this code. Doesn't it have a few oppertunities? I know it's jsp, but question is not directed toward the jsp, just the logic/syntax/etc. How about the == for starters?
    <%
              String z_Desc = (((String)hshipTrackSummaryDocList.get("Z_DESC")) == null) ? "" : (String)hshipTrackSummaryDocList.get("Z_DESC");
              if (z_Desc  == "" ) {
         %>
         <%
              }else {
         %>
                      <%=(((String)hshipTrackSummaryDocList.get("Z_DESC")) == null) ? "" : (String)hshipTrackSummaryDocList.get("Z_DESC")%></font>
         <%
         %>

    Hi mlovern! This code has several opportunities for "improvement". I noticed that the get("Z_DESC") method is called on hshipTrackSummaryDocList object several times. Each time, it returns the very same value. Hence, in the interests of efficiency, it's a better idea to call it once, save the return value and then use the latter.
    Also, I'm not too clear about exactly what you intended to do in the else clause. As it stands, your else clause will cause the JSP to fail.
    Be very careful while using the "==" operator while comparing strings. That causes object comparison, not object content comparison. The latter is the required test most of the time. Also, while comparing the contents of the strings, it's better to call the equals() method on the empty string or a constant string. So, if I needed to compare a test value against an empty string or a constant, here's how.
    if ( "".equals( testString ) )
       // do something
    else if ( SOME_CONSTANT.equals( testString ) )
       // do something
    }In the above code, even if testString was null, a runtime exception will not be generated. However, if the equals() method was called on testString and it happened to be null, you'd be looking at an exception.
    Here's how I would have written the code you supplied.
    String zDescValue = (String) hshipTrackSummaryDocList.get( "Z_DESC" );
    if ( zDescValue == null ) zDescValue = "";
    if ( "".equals( zDescValue ) )
       // do something useful
    else
      // do something else
    }I've also come across similar situations. In order not to repeat the same code everywhere, I've wound up writing a couple of utility methods to assign "" to a string if it's null. Here are those methods.
    public static String processStringValue( String inputString, String defaultValue )
       return ( inputString == null ? defaultValue : inputString );
    public static String processStringValue( String inputString )
       return processStringValue( inputString, "" );
    }Finally, you may want to be careful about the code fragments you post. From your post and profile, I can guess where you work. Your employer may or may not care if parts of their code start showing up on the Internet. It's better to create a general piece of code that approximates what you want to convey. However, it's better to be safe than sorry.
    Hope this helps!
    Cheers!

  • Error while generating code in brf+ function

    Hi all,
    i am getting error while generating code in function in bRF+
    am using weight fields ..if i dont use quantity fields am able to generate code .
    please help.
    Thanks.

    Can you provide more details? What exactly is the error?
    I think we have provided a note for the issue. With the details it should be possible to identify the note number.

  • OWB Error while generating Code for a mapping

    I have a simple mapping loading from a source to a flat file. When I try to generate code it gives me the following Error
    VLD-2357: Target Data File name not specified for file <target Flat file name>.
    I am new to OWB so any help on the same will be greatly appreciated. How can I specify target Data File name in the mapping configuration under Flat file operators
    Thanks
    Anish

    If you configure the mapping in the UI from the main design tree and select the name of your file operator under the tree node 'Flat File Operators' on the right hand side panel the properties should be displayed - one of these properties is 'Target Data File Name', enter the name of your target data file name.
    Cheers
    David

  • Error while deploying generated code from sup to iPhone

    Hi
    I generated the code using Sap unwired platform for Objective-c.  I followed the steps specified in the below link
    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01213.0153/doc/html/mqu1264543829068.html
    for deploying the generated code into iPhone simulator, i am getting the following error
    Undefined symbols:
      "_OBJC_CLASS_$_SUPEntityAlias", referenced from:
          objc-class-ref-to-SUPEntityAlias in SUP101_Customer.o
          objc-class-ref-to-SUPEntityAlias in SUP101_LogRecordImpl.o
    Can any one help me in this
    Edited by: KiranSanka on Dec 2, 2010 1:18 PM
    Edited by: KiranSanka on Dec 3, 2010 7:26 AM

    Hi
    While compiling did you get a warning? something along the line "missing required architecture i386 in fileu201D? if so refer this link http://stackoverflow.com/questions/1456185/build-error-missing-required-architecture-i386-in-file
    Regards
    Jinesh

  • Error while generating code for deployment

    I am getting the following error:
    Error generating findTest1ByMarks(java.lang.Integer) query for Bean Test1(Abstract scheme name=Test1) Error=query cannot be pushed down
    Query="select ..."
    Could someone help me?
    I am trying to generate code of Container Managed Entity Bean in WSAD 5.0.
    Thanks

    If you configure the mapping in the UI from the main design tree and select the name of your file operator under the tree node 'Flat File Operators' on the right hand side panel the properties should be displayed - one of these properties is 'Target Data File Name', enter the name of your target data file name.
    Cheers
    David

  • Auto generated code in makefile

    For our product we have a TCL script that reads a series of text files and generates C++ classes for easy access to database records. Our code has been in use for make years and works very well. We have always used a solaris command prompt dmake to compile, which first generates the C++ files then complies them. It uses a series of enviroment variables which a user must set before compilation.
    I recently tried to create a Sun Studio Express based on NetBeans 6.5.rc1 project from a make file. This has worked for every other makefile except for this one. The others do not have any auto generated code.
    To run sun studio I in a command prompt source in the environments then run netbeans. Then I choose to build the product but I get an error. I then try to copy the command it is running into telnet window and it works fine. Does anyone have an idea on why in the sun studio I get and error while the telnet window works fine.

    I think the problem is that the SunStudio IDE runs the build command in a wrong directory.
    Can you verify that the working directory is correct?
    (it is in project properties: Build > Make)
    Also you can find this directory in the message in the output, when you try to build the project.
    That's the message, that you copied to the terminal window.
    Thanks,
    Nik

  • How to use generated code from "Import Web Services" with Cairngorm Framework

    I recently downloaded Flex Builder 3 beta 2 and tried out the
    wizard that lets you import web services. The code that is
    auto-generated makes if fairly straight forward to consume web
    services using the object types defined in the WSDL. No longer does
    the developer need to decode the XML payload! The only problem I am
    having is how does you integrate the auto- generated code with the
    Cairngorm framework? This seems like a huge question for anyone who
    might want to leverage Cairngorm and the auto-generated proxy code
    in the same project (like me).
    Here are the problems that I see so far.
    1) How do you configure the generated service class to work
    with the Cairngorm service locator? The service constructor only
    accepts a “LCDS destination string” which implies that
    you must use Lifecycle data services. Unfortunately, the project I
    am trying to retrofit currently uses a WebService and does not use
    data services. All I really need to do is change the endpoint URL
    (ie from local to a development server). This issue is noted in the
    bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is
    needed is a way to set the endpointURI in the Services.mxml file.
    2) Even if I come up with a hack around #1, I do not receive
    a callback to my IResponder even though I register it immediately
    after the method call. I can register and listener function within
    my business delegate and receive the callback, but my Command
    object, which implements IResponder, does not receive the call back
    even though it is registered. From what I read in the ASDocs it
    should but it doesn’t for me!
    These are the issues I have observed in 3 hours of messing
    with this. I hope this makes sense. I would love to integrate
    auto-generated web service proxies into Cairngorm but I don’t
    see a straight forward way without re-architecting Cairngorm. Has
    any one else run across this issue? If so, do you have any insights
    on how to proceed? Any help is appreciated.

    Since I posted this question, I have abandoned the notion of
    auto-generated web services and embraced the good old FDS concept
    where the RemoteObject meta-tag does all the conversion work for
    me. We are now using the Granite DS package and it is working well
    for us. I would love to consume web services, but it just isn't
    worth the hassle when all you have to do with Granite (and FDS) is
    cast your return objects to the proper object type.
    BTW, since this posting, I have investigated competing Flex
    app frameworks. After my research, I checked out the PureMVC
    framework. Wow!! Cairngorm always left me with an uneasy feeling
    and I guess I am not alone. Apparently, Cliff Hall felt the same
    way. That is why he started the project. I like his approach alot
    more than Cairngorm especially since it includes notifications
    which allow me to broadcast my own app level events independent
    from the AS Event framework. Check out PureMVC. For what it is
    worth, it has my humble endorsement. Cliff was even gracious enough
    to acknowledge the other Adobe Consulting guys for their work. Good
    for you Cliff, I respect that. Check out a better way at
    http://www.puremvc.org/

  • I have new Adobe premier Elements13 and Photoshop elements 12, but Cannot access website to generate code and register

    I have new Adobe premier Elements13 and Photoshop elements 12, (Download from Amazon) but Cannot access website to generate code and register. Please help if you can.
    I do not know how to find my PC specific code, nor can I simply use another PC if the programs are then only for use on that (not my main) PC!. I have entered the correct serial/codes which came in the download files but simply cannot go further as each time I try it fails to connect with the website?
    Vince

    Please post Photoshop Elements related queries over at
    http://forums.adobe.com/community/photoshop_elements

  • Need help with flashvars in cs5.5 html generated code

    how could use flashvars in cs5.5 html generated code, there are tutorial in net about flashvars but its all cs4 with javascript in it while cs5.5 html code doesn't have. here is the code for non-IE generated by cs5.5
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="sample.swf" width="800" height="800">
    <param name="movie" value="sample.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="window" />
    <param name="scale" value="showall" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <param name="allowScriptAccess" value="sameDomain" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    how can I put flashvars in html and as3?

    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="sample.swf" width="800" height="800">
    <param name="movie" value="sample.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="window" />
    <param name="scale" value="showall" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <PARAM NAME=FlashVars VALUE="imageFilename=images%2Fimage1%2Ejpg">
    <param name="allowScriptAccess" value="sameDomain" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    and you can read via flash AS3:
    http://www.permadi.com/tutorial/flashVars/indexAs3.html

  • NoSuchMethodError in findMethodInfo(__methodSig) in ejbc generated code

    Hi All,
    Happy new year!
    Does anyone know when weblogic.ejbc calls "findMethodInfo(__methodSig)" in its
    generated "*HomeImpl.java" classes?
    This is causing my code to end in a NoSuchMethodError exception.
    The generated code for the included beanManaged.AccountHome does not include this
    call, while the code generated for my code does.
    Can anyone tell me why?
    Anyone from the Weblogic people?
    Thanks,
    Boogie

    boogie wrote:
    Rob Woollen <[email protected]> wrote:
    boogie wrote:
    Thanks for the reply, Rob.
    So the "findMethodInfo()" is caused by the presence of multiple interfacesat
    compile time.It's probably caused because ejbc generates code for version 1 of your
    interface
    but you then deploy a jar that loads version 2 of your interface.
    <boogie>
    i'm using the same interface. however, at compile time, the interface is both
    on the classpath (since i've just compiled it) and in the pre-ejbc jar file (which
    i'm passing to weblogic.ejbc).If it's in the classpath and in the ejb.jar, then ejbc finds the version in the classpath and
    generates code against it.
    from what you've said, i gather this is why ejbc
    puts in a "findMethodInfo()" call in the --HomeImpl.java files that it generates.
    </boogie>
    <boogie>
    SCENARIO 1: I use my build script.
    condition: the home interface is found and compiled, the EJB classes placed in
    a temporary jar file, then passed to EJBC (with -keepgenerated flag)
    output: the generated MyBeanHomeImpl.java calls "findMethodInfo()" and i get NoSuchMethodError
    exception at runtime
    If the version in the classpath and the version in the jar file were exactly the same, then ejbc
    would run fine. It fails when they are different. ejbc is generating code for a method that
    appears in the version that it is loading.
    -- Rob
    >
    SCENARIO 2: I manually build.
    condition: i jar the files manually, pass the jar to weblogic.ejbc (with -keepgenerated)
    without specifying a classpath; the current classpath doesn't include the compiled
    home interface;
    output: the generated MyBeanHomeImpl.java doesn't call "findMethodInfo()", code
    runs as expected
    SO, i need to build with scenario 1 AND still make it run at runtime. i don't
    have multiple copies of the EJB classes/interfaces at deployed or in the classpath
    runtime, but i keep getting the NoSuchMethodError exception because of the "findMethodInfo()"
    call that weblogic.ejbc insists on making. what can I do to solve this problem?
    thanks!
    really appreciate the help!
    </boogie>
    -- Rob
    Rob Woollen <[email protected]> wrote:
    There's some sort of mis-match between the interfaces that ejbc is
    finding
    (and
    generating code for) and the interfaces being deployed.
    I would check your classpath and remove all occurrences of the homeinterface
    class. It should only be in the jar file. Then re-run weblogic.ejbc
    -- Rob
    Boogie wrote:
    Hi All,
    Happy new year!
    Does anyone know when weblogic.ejbc calls "findMethodInfo(__methodSig)"in its
    generated "*HomeImpl.java" classes?
    This is causing my code to end in a NoSuchMethodError exception.
    The generated code for the included beanManaged.AccountHome does
    not
    include this
    call, while the code generated for my code does.
    Can anyone tell me why?
    Anyone from the Weblogic people?
    Thanks,
    Boogie

  • Error In CMP Generated Code

    I have a CMP 2.0 local entity bean, and when I try to create one from a session bean, I get this:
    java.lang.IllegalStateException: Can not call getPrimaryKey() inside ejbCreate(...) methods, the entity does not have an identity yet, see the EJB 2.0 specification chapter 10.5.4
         at com.evermind.server.ejb.EJBUtils.throwGetPrimaryKeyInEJBCreateException(EJBUtils.java:963)
         at WebLine_EntityBeanWrapper2.getPrimaryKey(WebLine_EntityBeanWrapper2.java:2595)
         at WebLineHome_EntityHomeWrapper16.create(WebLineHome_EntityHomeWrapper16.java:497)In other words, the generated code for the home's create method is calling getPrimaryKey on the generated code for the entity, and this is failing because even the container can't call getPrimaryKey at that time. It doesn't seem to matter what's in my ejbCreate method, unless it throws an exception (which prevents this problem, of course). Looks like a problem with the generated code to me.

    Thanks for that tip. Looking at the generated code, I see:
              boolean imIt = false;
              try
                while(!imIt)
                  if(com.evermind.server.ApplicationServer.DEBUG) debug("In while(!imIt)\n");
                  WebLine_EntityBeanWrapper2 other;
                  other = (WebLine_EntityBeanWrapper2)getWrapperInstance(response.getPrimaryKey(), 90000l, false);That last line is where the error happens (line 520 in the stack trace above). It seems like getPrimaryKey is being called intentionally, to see if the entity is already in the cache or something? Anyway, the generated code for the instance call is:
      public Object getPrimaryKey()
        if(this.primaryKey == null) com.evermind.server.ejb.EJBUtils.throwGetPrimaryKeyInEJBCreateException();
        return this.primaryKey;
      }So that seems reasonable, I suppose. The question is, what is causing the instance to have no PK when the home thinks the PK should be there? I've tried a lot of variants of my code, with no improvement, but I could still be doing something wrong. Also, it only seems to be happening with one bean...

  • Generated code with some transformations - need help

    I have a mapping as below:
    1. Source table and input parameter are input to splitter
    2. Splitter has conditions as if input parameter is NULL then insert/update target table
    3. There is a constant with 4 Attributes, which also directly insert into the target table
    4. If the input parameter is NOT NULL then output from splitter goes into a filter where the condition is checked with the value from input parameter
    5. the output from filter is inserted/ updated into the target table. Here again the values from constant are also inserted into the target table.
    The Target table has 15 columns out of which I have 11 columns set for matching. I have the loading type set to 'UPDATE/INSERT'
    When I generate this code a merge statement is included in the code and everything works fine.
    My environment is:
    OWB: 10.2.0.2
    DB source & Target : 10g Rel2.
    I changed the mapping so that instead of 4 attributes in the constant above, I have 2 attributes.
    I have another constant with one of the 2 attributes removed from the above constant.
    The value from this constant goes as an input to transformation operator, the transformation operator has 2 outputs. I mapped these outputs to the splitter input.
    There after this is similar to the above mapping explained earlier. Basically the 2 attributes which were part of the constant in the first mapping are now from a transformation operator (procedure) and I have these values passed all across the mapping (through splitter and filter as is without any changes).
    Now when I generate the code, the generated code does not have a merge statement but processed row by row and hence have a cursor and then separate update and insert.
    This code is much slower than the earlier one.
    I want to retrieve the values through a procedure as in the second case instead of the constant but want to have a set based processing as in the first case. How Can I do this?
    Any help please?
    Thanks,
    Maruthi

    Hi,
    Do not use the transformation operator. All transformation are nothing but built-in SQL functions. Take your constant values into an expression operator and then make two output attributes in it. In the expression builder call the function appropriately and as mentioned above, generate the code in set based fail over to row based (default mode) and execute it. The mapping should execute in Set Based Mode.
    Regards
    -AP

Maybe you are looking for