Code Generation Using Annotation Processing

I'm trying to figure out how to do something like thus:
Given this source file with the following custom annotation:
@Composite(interfaces=Mammal.class)
public class Dog implements IComposite
};I want to create an annotation processor that inserts a data member, implementation into the constructor, and a public method into this class:
@Composite(interfaces=Mammal.class)
public class Dog implements IComposite
    IComponent[] m_inner_objects;
    public Dog()
        m_inner_objects = new IComponent[1];
        m_inner_objects[0] = Mammal.compose(this);
    public IComponent getComponent(Class<?> inInterface)
        if(inInterface == Mammal.class)
           return m_inner_objects[0];
        return null;
};Are all three tasks possible? Are any of the three tasks possible? If yes to any of my questions how would I go about this. I've gotten just past the 'hello world' state in writing a custom annotation processor so I just need the more advanced knowledge of how to actually affect the code once I'm actively processing it.
cheers,

brucechapman wrote:
sednivo wrote:
I can get the CompilationUnitTree. Yes
Then I can modify it with Compiler Tree API.Really?
Where is a pitfall in my train of thought?The Tree API is an immutable API, you can look, but not modify.Here is example of modifying compiler tree.
http://svntrac.hanhuy.com/repo/browser/hanhuy/trunk/panno/src/com/hanhuy/panno/processing/PropertyProcessor.java
Also, the javax.annotation.processing.Filer will not allow you to overwrite an existing compilation unit, and you must use the Filer if you wish a generated class to be compiled in the next round.I don't use Filer class. Method writeCompilationUnit that I've wrote works well for existed files.
There is a fundamental principle of java that the same program always has the same meaning. See the 3rd paragraph of the Preface to the first edition of the Java Language Spec . >This is the reason why you can't modify existing source code.We can mark generated methods in a class with @Generated annotation.

Similar Messages

  • SAP RF/ Bar code generation using IM

    Hi folks
    Can any one experiencing in using SAP Console / Bar code generation using Inventory Management .

    Please read this article
    http://tdworld.com/info_systems/highlights/peak-pepco-inventory-management/
    Is it possible to generate the barcoding using Handling unit or any other module without WMS ?
    Thanks for your input
    Jeevan

  • JATO 1.2 / 1.1 code generation using S1AF 2.0 in Sun1Studio 4 (update 1)

    Hi Folks,
    I just found that using Studio 4 when I generated the ViewBean using
    RAD tools, the code is just not the code I can use with my existing
    application written/migrated with Jato 1.2.
    Is there any way we can generate the code as per the old JATO api
    with Studio 4 and S1AF 2.0 ?
    As per some of the ealier messages, it sounds like not possible.
    Checking again with all of you.
    Any help?

    Correction: Studio 4/4u1 uses JATO 2.0. Studio 5u1 uses JATO 2.1.
    Rajesh, it is true you cannot use the Studio-generated code with JATO 1.2. However, you can run your existing JATO 1.2 code with the later versions of JATO. This means that once you bring your existing JATO application into the Studio, you can continue to develop it using JATO 2.0, and existing JATO 1.2 code will continue to run with the new version.
    Todd

  • Code generation using Visual cafe

    I'm using visual cafe for GUI development. It includes it's own libraries though the equivalent ones are available in JDK.
    For example: to place a component in GRid Bag layout it generates code with symantec's constructor
    new com.symantec.itools.awt.GridBagConstraintsD(,...) instead of java.awt.GridBagContraints(,...) constructor.
    Is there any way to tell Visualcafe to use jdk instead of it's own libraries when applicable? let me know if anyone knows how to do this?
    thanks,
    sampath

    The simple answer is NO, or its not simple nor reliable.
    The unsolicited answer is; stop using that garbage. I used it for 4 years. Symantec completely dropped the ball. I use the free Jbuilder version. It uses ALL official classes and does NOT force you into code conventions, nor does it complain about many things. VC has its own private section in the code where you can not manually edit it. headache. VC does geenrate much less anonymous classes, but all in all, try JBuilder. Maybe even Forte as I hear good things about that too.
    When I converted to JBuilder, I simply changed the symanted gridbag class into the sun gridbag class. In general the symantec class is EXACTLY the same, but symantec was ahead of its time, and needed to make its own classes in order to have the GUI editing since sun didnt have completel beans available at the time. But sun has not privided these beans for years, and still symantec has not adapted. I think they are arrogant now and hope this keeps you forced into their IDE since changing seems hard(though "replace" works just fine in these situations)...

  • Urgent pls ! Error during Container code generation using weblogic.ejbc

    HI all,
    Iam using weblogic6.1 and EJB 2.0. I have to communicate session and entity ejb's and iam using local interfaces for entity beans and access the entity beans thru session ejb's. After creating my programs and jar files, when i use java weblogic.ejbc code.jar Containercode.jar, i get the following error....
    --------- Error -------------
    C:\Sathish\Ejb\wl6.1\LocalInterfaces\Code\ejbcgen\CodeBean_tvm2r0_ELOImpl.java:34
    0: cannot resolve symbol
    symbol : constructor EJBException (java.lang.String,java.lang.Exception)
    location: class javax.ejb.EJBException
    throw new javax.ejb.EJBException("Unexpected exception in " +
    ^
    1 errors
    Exec failed .. exiting
    Can anyone say why this error is occuring......
    regards
    sathish

    In J2EE 1.3, EJBException added a third constructor of the form:
    EJBException(java.lang.String, java.lang.Exception)
    WebLogic contains a file called j2ee12.jar in the lib directory that when placed in front of the classpath, disables J2EE 1.3 features and replaces them with J2EE 1.2. In J2EE 1.2 this constructor did not exist.
    So in order to compile using J2EE 1.3 features, you must make sure that j2ee12.jar is not in your classpath.

  • New com.sun.mirror.* packages - annotation processing

    Hello,
    i would like to use annotation processing tool (APT), but there is much to learn yet.
    So, please help me.
    Let�s have an annotation that can be apllied to all code declarations (source code entities).I want to process some *.java files (their proper source code) via APT.From this code i wanna gain (in any way) those declarations (classes, ifaces, methods, constructors, etc.) that are annotated just with the only one annotation that i have.
    i was already going through the API, but not well-understood.
    As written, i created AnnotationProcessorFactory (just my annotation should be processed by this factory) with an appropriate AnnotationProcessor.
    I�ve already done some steps to succeed, but you know, that�s not that i want
    Of course, all is performed in build-time, after i call apt command with the option factory with the appropriate factory class
    Thank you a lot

    Hi,
    I am new to this forum and also just started
    working on apt can u plz tell me where do i get
    com.sun.mirror package and its sub-packages
    hanksIf you can use JDK 6, I strongly recommend using the standardized annotation processioning in javac and the packages javax.annotation.processing and javax.lang.model..* instead of apt and its com.sun.mirror.* API. To get started, take a look at
    sample/javac/processing/src/CheckNameProcessor.java
    under the JDK 6 install directory.
    If you just need to compile against the apt API, it is found in the tools.jar file in Sun's JDK; see http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html
    You can find a jar file with just the API definition from https://aptmirrorapi.dev.java.net/.

  • Annotation-Processing Using Custom ClassLoader Fails

    Hi,
    I have the following problem concerning annotations.
    I am using Jaxb2 to marshal some classes and Jaxb relies heavily on processing annotation information contained in them.
    If I put the Jaxb JAR's directly in the classpath everything works fine.
    However, if I use a custom URLClassLoader to load all the Jaxb-related classes the annotation processing fails thus making Jaxb believe that the objects can't be marshaled.
    Note that the classes to marshal containing the annotations to read are loaded with a different ClassLoader which is higher in the hierarchy.
    I tracked down the problems to the class RuntimeInlineAnnotationReader of the Jaxb API which simply calls Class.getAnnotion(..).
    When searching for this bug I also found the bug report 5015623 which relates to this problem. But it is rather outdated, so I hope that there are some better solutions than just ignoring it.
    I wouldn't like having the Jaxb JARs on the global classpath 'cause they are used in only one class out of 100 and thats not worth the possible conflicts with other 3rd party libs.
    Best regards,
    beebop

    No problem, I will give you some details about my architecture.
    First of all I encapsulated the code which uses the Jaxb-API in one class, say Foo, which implements the interface FooInterface.
    Secondly I load the Foo class in another class, Bar, using my derivation of URLClassLoader, called MyClassLoader. Then I use the interface to marshal an object gen of type GenClass where GenClass was generated using xjc:
    class Bar {
      void method(URL[] urls, GenClass gen) {
        ClassLoader parent = Bar.class.getClassLoader();
        ClassLoader myCL = new MyClassLoader(urls,parent);
        Class clazz = myCL.loadClass("Foo");
        FooInterface foo = (FooInterface)clazz.newInstance();
        foo.marshal(gen);
    }So my class loader will be a child of the current class loader. The delegation model of class loading is reversed in MyClassLoader so that first the urls will be checked and then, if the class was not found, the parent class loader.
    Note that GenClass and its ObjectFactory which acutally contain the annotations Jaxb needs will be loaded by the current class loader, not my own. All classes of the Jaxb-API will be loaded by MyClassLoader. If I try to marshal gen, the annotations of the ObjectFactory corresponding to GenClass won't be readable causing the Class.getAnnotation(...) method called in the class RuntimeInlineAnnotationReader to return null.
    If I don't use my own class loader, say
    FooInterface foo = new Foo();everything works fine and the annotations of the ObjectFactory are loaded correctly.
    I observed the different behaviour by stepping through the classes and methods around JaxbContext.newInstance(...).
    MyClassLoader is not that different from URLClassLoader, only the loadClass method is overridden to change the delegation behaviour. Thats why I suspect an error in the annotations framework and not in my class loader but I may be mistaken.
    Best regards,
    beebop

  • Code generation from use cases

    I have to build a system that inputs use cases and outputs code. I am as yet unsure how to do this. I assume the easiest way would be to go via class diagrams because code generation seems not a huge leap from there, but how would you suggest I get from the text use cases to a class diagram? Any help and pointers would be very very welcome.
    Cheers,
    Nicholas

    If you invent this, they will have to create a new Nobel prize for computing. And we as developers will all be out of business. Best of luck.
    - Saish

  • What Message type and Process Code to use for Purchase Order Change in 4.6C

    I like to implement in SAP R/3 4.6C a scenario for Purchase Order Change, via inbound IDoc.
    I have been searching, but could not find what Message Type, Idoc Basic Type and Process Code to use.
    I can not imagine this functionality does not exist in 4.6C.
    Any suggestions for my problem are welcome.

    Hello,
    In this case you should use the message PORDCH and BAPI method BAPI_PO_CHANGE but only exist as of release 4.7.
    Function module    BAPI_IDOC_INPUT1
    Idoc Type              PORDCH01
    Message Type      PORDCH
    So check carefully the following OSS notes:
      [Notes 589066 - BAPI_PO_CHANGE: Incorrect account assignment to network |https://service.sap.com/sap/support/notes/589066] (not be fooled by the description)
    [ Notes 197958 - BAPIs for purchase orders - Missing Functions|https://service.sap.com/sap/support/notes/197958]
    Regards,
    Andrea
    Edited by: Andrea Olivieri on Sep 3, 2009 10:17 AM

  • Annotation processing using JDK 1.6 and Apache Ant

    Hello,
    I am trying to run my annotation processor using ant.
    I already built the processor, the javax.annotation.processor.Processor file is in the correct place with the correct content.
    The jar with the processor is in the classpath (i can see it in ant -v), but it does not process my classes. in fact, i get the warning:
    warning: Annotation processing without compilation requested but no processors were found.Do i have to specify -processor or -processorpath or can i just leave it to the default classpath scanning?
    I think everything is in the correct place, because when i compile with maven instead of ant, specifying the processor, it runs nicely. My pom contains:
                   <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                             <source>1.6</source>
                             <target>1.6</target>
                             <compilerArguments>
                                  <processor>br.com.sonner.infra.seguranca.SegurancaAnnotationProcessor</processor>
                             </compilerArguments>
                        </configuration>
                   </plugin>i am using jdk 1.0.6_02 and ant 1.7.0.
    Can anyone help me find out what am i doing wrong?

    Julio.Faerman wrote:
    Hello,
    I am trying to run my annotation processor using ant.
    I already built the processor, the javax.annotation.processor.Processor file is in the correct place with the correct content.
    The jar with the processor is in the classpath (i can see it in ant -v), but it does not process my classes. in fact, i get the warning:
    warning: Annotation processing without compilation requested but no processors were found.Do i have to specify -processor or -processorpath or can i just leave it to the default classpath scanning?When -processor is not given, a service loader is used to find the annotation processors (if any). In addition to the class files of the process, to allow your processor to be found as a service, make sure you've also provided the needed META-INF data in the jar file. The general service file format is described in
    http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html
    That said, I'd recommend setting an explicit processor path separate from your general classpath.

  • Export Adaptive Filter Toolkit Algorithm To C Using LabVIEW C Code Generation Toolkit

    I want to evaluate the performance of some of the standard adaptive filters & have planned to use "Adaptive Filter Toolkit" from NI. Once the desired adaptive filter is selected I want to implement the same filter algorithm in FreeScale controller.
    I understand that LabVIEW C code generation toolkit exports the LabVIEW code to ANSI C code. However, I'm interested in knowing if this toolkit would be able to export Adaptive filter toolkit algorithm as well (since the underlying IP would be in the form of DLL's).
    Any help on this matter would highly be appreciated !!

    I want to evaluate the performance of some of the standard adaptive filters & have planned to use "Adaptive Filter Toolkit" from NI. Once the desired adaptive filter is selected I want to implement the same filter algorithm in FreeScale controller.
    I understand that LabVIEW C code generation toolkit exports the LabVIEW code to ANSI C code. However, I'm interested in knowing if this toolkit would be able to export Adaptive filter toolkit algorithm as well (since the underlying IP would be in the form of DLL's).
    Any help on this matter would highly be appreciated !!

  • Error during distribution for compiled code generation-Reply

    Hi,
    Looking at your error messages, it looks as though your build is failing during the code generation phase of an autocompilation. To determine why the code generator crashed, either look in the $FORTE_ROOT/log/forte_ex*.log files or don't use autocompilation and use fcompile.
    There are many reasons why the code generator could crash. Some of the things I've come across are running out of memory and trying to find invalid classes.
    If its the invalid class problem you'll find a message like:
    Generating code for partition BLTCustomWindow_cl0_Part1.
    ERROR: Exiting due to following exception:
    SYSTEM ERROR: Client partition FTCompile_cl0_Client was terminated by escaped
    exception. See the remainder of the error stack for more information.
    Class: qqsp_ResourceException
    Error #: [1001, 3]
    Detected at: qqrt_ForteExecAgent::LoadPartition at 1
    Error Time: Tue Aug 18 17:52:44
    Exception occurred (locally) on partition "Forte_Executor", (partitionId =
    9EA25A00-36FE-11D2-87C4-502F15BEAA77:0x1, taskId =
    [9EA25A00-36FE-11D2-87C4-502F15BEAA77:0x1.6]) in application
    "FTCompile_cl0", pid 28331 on node stardev in environment <unknown>.
    FATAL ERROR: Invalid class ProductBMServices.ProductSecurityMgrProxy
    (0x4ecd,0x19a)
    Class: qqsp_ImplementationException
    Detected at: qqcg_TRclass::SetClass at 2
    Last TOOL statement: method ForteCompiler.ProcessPGF
    Error Time: Tue Aug 18 17:52:44
    Exception occurred (locally) on partition "Forte_Executor",
    (partitionId = 9EA25A00-36FE-11D2-87C4-502F15BEAA77:0x1, taskId =
    [9EA25A00-36FE-11D2-87C4-502F15BEAA77:0x1.6]) in application
    "FTCompile_cl0", pid 28331 on node stardev in environment <unknown>.
    The solution for this instance is to clean up the invalid classes using the c4tstdrv utility.
    c4tstdrv > setrepos star8
    c4tstdrv > setwork dmcompiledbuild
    c4tstdrv > open
    Type Service Flags Level
    err sh * 255
    trc rp 1 4
    c4tstdrv > findproj productbmservices
    c4tstdrv > cleanuprtclasses
    Removing extraneous RTclass ProductShootingLocationMgrProxy
    Removing extraneous RTclass PRTerritoryBaseMgrProxy
    Removing extraneous RTclass PRTerritoryMgrProxy
    Removing extraneous RTclass TalentBaseMgrProxy
    Removing extraneous RTclass TalentTypeMgrProxy
    Removing extraneous RTclass TitleTypeBaseMgrProxy
    Removing extraneous RTclass TitleTypeMgrProxy
    Removing extraneous RTclass ProductSecurityBaseClass
    Removing extraneous RTclass ProductSecurityBaseQuery
    Removing extraneous RTclass ProductSecurityQuery
    Removing extraneous RTclass ProductSecurityMgrProxy
    c4tstdrv > commit
    c4tstdrv > exit
    Integrate the changes to the workspace, start the build again and this should have cured the problem.
    However, its hard to know what the cause of your problem is without seeing the output in the log files.
    Good luck.
    Mark Carruthers
    20th Century Fox
    "Forte Consultants" <[email protected]> 01/22/99 08:35am >>>
    Hi,
    I'm doing application distribution for my application using a fscript
    script and am forcing compilation on 2 of my partitions.
    This I have been doing from quite sometime successfully. Recently I
    developed a new service and plugged it into my application for
    deployment.
    I'm successfully able to distribute & deploy the interpreted code. But
    I'm getting a long list of system errors when I try doing distribution
    for compiled code. And I see only one of the .exe generated instead of
    two because of which I'm unable to go ahead with installaion. I would
    appreciate if anybody let me know why this's happening ?. The following
    is the main chunk of this error list.
    Thanks in advance.
    --Anand Ramaswamy
    SYSTEM ERROR: Cannot resolve the distributed reference for an object of
    class
    (qqlo_Object) named (<Unknown>) for the reasons below.
    Class: qqsp_DistAccessException
    Error #: [601, 144]
    Detected at: qqdo_ProxyMgr::ResolveOutGoingProxy at 10
    Error Time: Fri Jan 22 10:44:22
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: Can not initially communicate with the object named
    (Unnamed),
    which is supposed to be in partition
    (32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x616:0x1).
    Class: qqsp_DistAccessException
    Error #: [601, 140]
    Detected at: qqdo_ProxyMgr::CheckAccess at 1
    Error Time: Fri Jan 22 10:44:22
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: Attempt to send to unknown destination partition
    (32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x616:0x1).
    Class: qqsp_DistAccessException
    Error #: [601, 102]
    Detected at: qqdo_PartitionMgr::SendMsg at 1
    Error Time: Fri Jan 22 10:44:22
    Distributed method called: qqdo_InternalMessage.<Message> (object
    name
    Unnamed) from partition "CodeGenerationSvc_cl0_Part1-router",
    (partitionId
    = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615.2]) in application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: Partition (32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x616:0x1)
    no
    longer exists. The process associated with the partition probably
    terminated.
    Class: qqsp_DistAccessException
    Detected at: qqdo_PartitionMgr::CheckStarted at 1
    Error Time: Fri Jan 22 10:44:22
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: This method invocation is being retried because the
    failures
    shown below and the fact that the dialog duration is MESSAGE. This is
    try #2.
    Class: qqsp_DistAccessException
    Error #: [601, 54]
    Detected at: qqdo_Message::Failed at 1
    Error Time: Fri Jan 22 10:44:19
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: The load balanced router is disabled or has no members.
    This
    can happen if all of the members terminated or failed.
    Class: qqsp_DistAccessException
    Error #: [601, 161]
    Detected at: qqdo_LbRouter::Route at 1
    Error Time: Fri Jan 22 10:44:19
    Distributed method called: GenerationMgrProxy.GeneratePartitionCode
    (object name
    site/codegenerationsvc_cl0/codegenerationsvc_cl0-codegensvc)
    from partition "Fscript_cl9_Client", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614.2]) in application
    "fscript",
    pid 4b81 on node MOOSUP in environment IGTSDENV
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    SYSTEM ERROR: This method invocation is being retried because the
    failures
    shown below and the fact that the dialog duration is MESSAGE. This is
    try #1.
    Class: qqsp_DistAccessException
    Error #: [601, 54]
    Detected at: qqdo_Message::Failed at 1
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (locally) on partition "Fscript_cl9_Client",
    (partitionId = 32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1,
    taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.1]) in application
    "fscript", pid 4b81 on node MOOSUP in environment IGTSDENV.
    SYSTEM ERROR: Access to a load balanced router member (which is a
    service
    object) failed for the reasons below.
    Class: qqsp_DistAccessException
    Error #: [601, 162]
    Detected at: qqdo_LbRouter::Route at 2
    Error Time: Fri Jan 22 10:44:15
    Distributed method called: GenerationMgrProxy.GeneratePartitionCode
    (object name
    site/codegenerationsvc_cl0/codegenerationsvc_cl0-codegensvc)
    from partition "Fscript_cl9_Client", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614.3]) in application
    "fscript",
    pid 4b81 on node MOOSUP in environment IGTSDENV
    Distributed method called: qqlo_Object.<Message> (object name
    Unnamed)
    from partition "Forte_Executor", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615.12]) in application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    SYSTEM ERROR: Cannot resolve the distributed reference for an object of
    class
    (qqlo_Object) named (<Unknown>) for the reasons below.
    Class: qqsp_DistAccessException
    Error #: [601, 144]
    Detected at: qqdo_ProxyMgr::ResolveOutGoingProxy at 10
    Error Time: Fri Jan 22 10:44:15
    Distributed method called: qqlo_Object.<Message> (object name
    Unnamed)
    from partition "Forte_Executor", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615.12]) in application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    SYSTEM ERROR: This distributed reference was previously invalidated due
    to the
    reasons below.
    Class: qqsp_DistAccessException
    Error #: [601, 132]
    Detected at: qqdo_ProxyMgr::ResolveOutGoingProxy at 3
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: The connection to the partner was terminated by the
    Communication
    Manager for the reasons below.
    Class: qqsp_DistAccessException
    Detected at: qqdo_PartitionMgr::StopLocation at 1
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: Network partner closed connection. This usually means the
    process at the other end of the wire failed. Please go look there and
    find
    out why.
    Class: qqsp_DistAccessException
    Detected at: qqcm_HoseFSM::ReceivedClose at 2
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: Asynchronous Failure: Recieved a close from the network
    partner:
    Internet Location - Host: moosup.iroquois.com Port Number: 2504 Dot:
    193.1.11.26 %LINKDISCON, network partner disconnected logical link
    Event 4
    Class: qqsp_DistAccessException
    Detected at: qqcm_HoseFSM::ReceivedClose at 1
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    SYSTEM ERROR: This method invocation is being retried because the
    failures
    shown below and the fact that the dialog duration is MESSAGE. This is
    try #1.
    Class: qqsp_DistAccessException
    Error #: [601, 54]
    Detected at: qqdo_Message::Failed at 1
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: The connection to the partner was terminated by the
    Communication
    Manager for the reasons below.
    Class: qqsp_DistAccessException
    Detected at: qqdo_PartitionMgr::StopLocation at 1
    Error Time: Fri Jan 22 10:44:15
    Distributed method called: qqlo_Object.<Message> (object name
    Unnamed)
    from partition "Forte_Executor", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615.12]) in application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: Network partner closed connection. This usually means the
    process at the other end of the wire failed. Please go look there and
    find
    out why.
    Class: qqsp_DistAccessException
    Detected at: qqcm_HoseFSM::ReceivedClose at 2
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    INFORMATION: Asynchronous Failure: Recieved a close from the network
    partner:
    Internet Location - Host: moosup.iroquois.com Port Number: 2504 Dot:
    193.1.11.26 %LINKDISCON, network partner disconnected logical link
    Event 4
    Class: qqsp_DistAccessException
    Detected at: qqcm_HoseFSM::ReceivedClose at 1
    Error Time: Fri Jan 22 10:44:15
    Exception occurred (remotely) on partition
    "CodeGenerationSvc_cl0_Part1-router", (partitionId =
    32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x615:0x1, taskId =
    [32271CD0-4E62-11D2-AF29-9F40A9E1AA77:0x614:0x1.10]) in
    application
    "CodeGenerationSvc_cl0", pid 7487 on node MOOSUP in environment
    IGTSDENV.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    If this INCLUDE is in a function group go the MAIN program and activate from there.
    Can you list out the include name?

  • Generic oracle eway code generation error in Java caps 5.1.3

    Hi,
    I'm using an oracle eway for adding records to a table. I have a prepared statement in the otd. When I try to build the project I'm getting the following error. Could any one let me know how this problem can be fixed?
    com.stc.codegen.framework.model.CodeGenException: Generic Oracle eway code generation error(ERROR_CODEGEN_GENERIC_CODELET_GENERAL)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1860)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.processCodelets(CodeGenFrameworkImpl.java:640)
         at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.process(CodeGenFrameworkImpl.java:1544)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:405)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.process(DeploymentVisitorImpl.java:308)
         at com.stc.codegen.frameworkImpl.model.DeploymentVisitorImpl.traverseDeployment(DeploymentVisitorImpl.java:268)
         at com.stc.codegen.driver.module.DeploymentBuildAction.loadCodeGen(DeploymentBuildAction.java:923)
         at com.stc.codegen.driver.module.DeploymentBuildAction.access$1000(DeploymentBuildAction.java:174)
         at com.stc.codegen.driver.module.DeploymentBuildAction$1.run(DeploymentBuildAction.java:599)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
    Caused by: com.stc.codegen.framework.model.CodeGenException: Exception when generating OTD code ...Exception: javaClass: Oracle_std_otdOTD: Exception when invoke DB Codegen Task...Exception: Invalid parameter type: Class : [Std_insert_PreapredStat] Object: [Param1] Param Type : [DECIMAL].(ERROR_CODEGEN_DB)(ERROR_CREATE_OTD)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateOtdJarFile(OracleEWayCodeletFactory.java:2045)
         at com.stc.oracle.codegen.OracleEWayCodeletFactory$OracleEWayCodelet.generateFiles(OracleEWayCodeletFactory.java:1756)
         ... 10 more
    Regards,
    Abdul

    hi...
    i too getting same problem..how did u reslove this...
    please help me out...
    thanks in advance
    KK

  • JDK 1.6: Annotation Processing & Compiler Hack

    Hello,
    I am currently using JDK 1.6.0_23
    For one of the requirement, I am going with annotation processing & compiler Hack using Tools.jar available as part of JDK.
    I have refered a PDF - "The Hacker's Guide to javac (PDF) by David Erni and Adrian Kuhn (2008)
    " suggested from page of - http://openjdk.java.net/groups/compiler/
    My requirement is below ->
    Origional Source:
    public void someMethod() {
    }Modified Source:
    public void someMethod() {
       int items = new example.Product().getItems();
    } Below is my code to generate the variable declaration -
    private TreeMaker make; // fetch it from somewhere
    JCNewClass newProduct = make.NewClass(null, List.<JCExpression>nil(), make.Ident(names.fromString("example.Product")), List.<JCExpression>nil(), null);
    JCFieldAccess fieldAccess = make.Select(newProduct, names.fromString("getItems"));
    JCMethodInvocation getTimeMethodInvocation = make.Apply(List.<JCExpression>nil(), fieldAccess, List.<JCExpression>nil());
    expression = getTimeMethodInvocation;
    JCVariableDecl itemsDeclaration = make.VarDef(modifiers,name,varType,expression);
    System.out.println(itemsDeclaration); // this prints int items = new example.Product().getItems(); This itemsDeclaration, I am adding to a List<JCStatement> of JCBlock of JCMethodDecl.
    However modified code does not compile :(
    If I make below changes - Modified does compile
    1)
    JCNewClass newProduct = make.NewClass(null, List.<JCExpression>nil(), make.Ident(names.fromString("Product")), List.<JCExpression>nil(), null);Product insteadof example.Product
    2) Add belwo statement in the origional source code
    import examle.Product; What exactly am I missing here ???
    The AST tree is diffcult to understand with minimum documentation & without much help on the interent.
    I hope this is correct forum, for my query.
    It will be a great help.
    Regards,
    Vikas Parikh

    Hello,
    I couldn't contact them, as the white papaer didn't conatin any email address / contact info.
    I have investigated myself on this & would like to share with you guys, so that any other developer
    do not have to invest precious time like I have done.
    To create a New Class, you require a JCExpression.
    Below would work, if class already has imported Product class.
    make.Ident(names.fromString("Product"))However, if class has not imported the Product class, then there are 2 options -
    1) Create a Ident</pre> from <pre>Symbol (ClassSymbol)
    2) Create a JCField</pre> from <pre>NameI used a later approach.
    Regards,
    Vikas Parikh
    Edited by: 996153 on Mar 31, 2013 11:04 PM

  • Code 'Generation' with DRY (don't repeat yourself)??

    Hello I am new to the forum so please be kind,
    I have recently gotten an internship with one of the offices with my University and am working a project (for a while now). I spend most of the day just getting all the classes assembled to be used (often a two day process) and what I would like to do is pass in a few parameters then have it generate the majority of the standard code that takes so much time to type out.
    What I am referring to is Consructors/ Setters/ Getters and toString.
    Parameters:
    Class name
    int first 5
    double secondMost of this stuff is pretty standard, but I figured there was a template or something I could build to do much of this for me. Unfoturnaly the University teaches C++, so learning Java on my own is somewhat difficult at times.
    Oh. I had found a wikipedia page about a design method called DRY, basically it pointed out that I could do just what I am wanting to do, but unfortunately I cannot seem to find an example or any detailed information about this method.
    This is what I have rolling around in my head at the moment:
    The use a bunch of strings and printf("%s, args) ...to build this entire page, then go in and enter the things that I couldn't generate.
    I could see this working, but I had felt this would go against code resuability because when the class/things I would generate would change, I would have to do some serious changes to this to get it working again. (Maybe that is the point).
    I would greatly appreciate some guidance on this, or pointed to more information.
    Thanks

    dajohnson1s wrote:
    Hello I am new to the forum so please be kind,
    I have recently gotten an internship with one of the offices with my University and am working a project (for a while now). I spend most of the day just getting all the classes assembled to be used (often a two day process) and what I would like to do is pass in a few parameters then have it generate the majority of the standard code that takes so much time to type out.
    What I am referring to is Consructors/ Setters/ Getters and toString.
    Parameters:
    Class name
    int first 5
    double second
    Most of this stuff is pretty standard, but I figured there was a template or something I could build to do much of this for me. Unfoturnaly the University teaches C++, so learning Java on my own is somewhat difficult at times.
    First step is recognizing a pattern.
    Second step, experience wise, is learning to recognize the difference between something that should be generated and something that shouldn't.
    Third step is implementation.
    Code generation should only be used if it can be insured that it eases the task now and in addition does not complicate the task in the future. That must include the possibility that the generation part will be abandoned so the generated code itself must be in such a state that it can be maintained.
    Once you have a pattern then you must choose a way to represent the pattern as a 'source'. Sources can one or more of the following: text, xml, sql scripts, sql databases, existing source files, existing code bases, design document, pdf files. Anything that you can extract a definition from will work.
    An example text file relevant to your task might look like this.
          Class: XxxMyclas
          Attribute: Count int
          Attribute: Name String.From that you create a standard compiler type idiom
    1. Parse (read file and collect data)
    2. Syntax (validate collected data, which might also be part of 1)
    3. Generate (use data to generate new source)
    Each phase can embodied certain complications (can not must). Some examples.
    1. Parse - provide an xml to define data types.
    2. Generate - provide a template file used to generate the code, define where the output goes, insure existing files not overwritten, etc.
    Your description sounds like a one shot - in that you will not be generating every everytime but rather will generate it once and then modify it.
    Oh. I had found a wikipedia page about a design method called DRY, basically it pointed out that I could do just what I am wanting to do, but unfortunately I cannot seem to find an example or any detailed information about this method.
    The only general books I have found on the subject is one directed at Perl (Perl Munging) which is sort of related and one for .Net (or maybe java) but which is directed at a proprietary commercial product.
    This is what I have rolling around in my head at the moment:
    The use a bunch of strings and printf("%s, args) ...to build this entire page, then go in and enter the things that I couldn't generate.
    I could see this working, but I had felt this would go against code resuability because when the class/things I would generate would change, I would have to do some serious changes to this to get it working again. (Maybe that is the point).
    Code generation has its best usage if you can recognize a pattern and then implement it such that manual modifications are not needed. This however is tempered by the requirement that I first mentioned that the generated code must be maintainable by itself.

Maybe you are looking for

  • Getting Pop Up Ads on my Mac Book Pro All of a Sudden, Regardless of Which Browser I use (Chrome, Safari, FireFox)

    I'm getting Pop Ads via Google Chrome / Safari / Firefox all of a sudden in the last 2 weeks. I use a Mac Book Pro OS X (10.6.4). I've never had pop up problems w/ Mac before, I've been using Mac for a few years.  I've also been using Google Chrome e

  • Use IBIC for a program

    Apparently, you can install a BASIC program on the IBIC platform. It is hinted that there are subroutines available that make the program actually work. Where are these subs? Are they DLLs? What are there names? Thanks Warren Sanders

  • Acrobat pro 9 insufficient rights

    I'm sure this is an easy one, but I'm unable to install this w/o admin rights. If I create the object & point it to the MSI, everything runs wonderfully. BUT, I'm wanting to use Adobe's customization wizard to create an MST to do a full, patched inst

  • How to copy game data from one device to another

    I downloaded Injustice: Gods Among Us onto an iPhone 5 and I wanted to have all of my save data copied onto the iPhone 5. The same iCloud account is used on both devices and I recently backed up my iPhone 4. I want to know how to copy (if there is a

  • Locale: ä,ö,ü

    hello! i have a little problem with the locale settings. i use the en_US.UTF8 locale. all is working perfect - console and programs. i can use ä,ö,ü. but my eterm terminal shows me "???" instead of "äöü". a "ls" command shows me questions marks, but