Cannot find annotated field

Hello Guys,
I have created an annotation called RelatedEntity, I am using it to create a custom JPA library.
public @interface RelatedEntity {
    String entityAlias();
    String referencedField();
}On trying to find a field annotated with this class like this
    @RelatedEntity(entityAlias="enudi", referencedField="michael")
    private String address = "a.address";I cannot even find this field as annotated even though I am using appropriate reflection api, like
private void findAnnotation(Object obj){
        Class clazz = obj.getClass();
        Field[] fields = clazz.getDeclaredFields();
        for (Field currentField : fields){
            System.out.println("" + currentField.isAnnotationPresent(RelatedEntity.class));
            currentField.setAccessible(true);
            try {
                if (currentField.isAnnotationPresent(RelatedEntity.class)){
                    System.out.println("has annotations   " + currentField.getName());
                    RelatedEntity annotation = currentField.getAnnotation(RelatedEntity.class);
                    System.out.println("annotation is " + annotation);
                    String joinCol = annotation.referencedField() + " " + annotation.entityAlias();
                    System.out.println(" >>> " + joinCol);
                } else {
                    System.out.println("no annotation     " + currentField.getName());
            } catch (IllegalArgumentException ex) {
                ex.printStackTrace();
    }What am I doing wrong or what can be done.
Regards,
Michael

Your annotation, RelatedEntity doesn't specify retention policy, and the default policy is that the annotation isn't available at runtime. See the Retention annotation.
Kaj

Similar Messages

  • Cannot find the field for the Contact Role in Contact object.

    Hi, friends,
    I need to set Contact Role when creating new Account and Contact. I tried the following tests but cannot figure it out:
    1. Create new Account and then new Contact, set the AccountContactRole in Account WSDL as “Main” but failed to set that field in form
    2. Create new Account and then new Contact, set the ContactRole in Contact WSDL as "Main” but failed to set that field in form
    3. Create new Contact and then new Account, set those two fields, but failed to set that field in form
    So far I know, the Account Contact Role is kind of picklist type in Account Contact Field. I could find its customization in Admin-> Application Customization -> Account -> Account Contact Fields -> Contact Roles. However, I cannot find the exact item in WSDL file to map this item. The AccountContactRole in Account WSDL and ContactRole in Contact WSDL are suspicious.
    It will be appreciated if anyone could help me on this issue.
    Thank you very much
    Ray
    Edited by: user9015675 on Jan 19, 2010 2:59 PM

    Hi, Sean, I tried the Web Service 1.0 call to create a new Contact and then a new Account with created Contact ID. But the CRMOD return the "Access Deny" fault. Is there somewhere I could see or change this kind of access rights? Or some bug in my web service call?
    I am sorry I did not open a new topic thread as I think they are related and easy for reference. Thank you very much.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <AccountWS_AccountInsert_Input xmlns="urn:crmondemand/ws/account/10/2004" xmlns:ns2="urn:/crmondemand/xml/account">
    <ns2:ListOfAccount>
    <ns2:Account>
    <ns2:AccountName>XXXX1264030832268</ns2:AccountName>
    <ns2:ListOfContactRole>
    <ns2:ContactRole>
    <ns2:ContactRole>Main</ns2:ContactRole>
    <ns2:ContactId>XXXX1264030828034</ns2:ContactId>
    </ns2:ContactRole>
    </ns2:ListOfContactRole>
    </ns2:Account>
    </ns2:ListOfAccount>
    </AccountWS_AccountInsert_Input>
    </soap:Body>
    </soap:Envelope>
    Return:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>Method &apos;SetFieldValue&apos; of business component &apos;Account Contact Role&apos; (integration component &apos;Account Contact Role&apos;) returned the following error:
    &quot;Access denied.(SBL-DAT-00542)&quot;(SBL-EAI-04376)</faultstring>
    <detail>
    <siebelf:siebdetail xmlns:siebelf="http://www.siebel.com/ws/fault">
    <siebelf:logfilename>OnDemandServicesObjMgr_enu_18122.log</siebelf:logfilename>
    <siebelf:errorstack>
    <siebelf:error>
    <siebelf:errorcode>(SBL-DAT-00542)</siebelf:errorcode>
    <siebelf:errorsymbol></siebelf:errorsymbol>
    <siebelf:errormsg>Method &apos;SetFieldValue&apos; of business component &apos;Account Contact Role&apos; (integration component &apos;Account Contact Role&apos;) returned the following error:
    &quot;Access denied.(SBL-DAT-00542)&quot;(SBL-EAI-04376)</siebelf:errormsg>
    </siebelf:error>
    </siebelf:errorstack>
    </siebelf:siebdetail>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • Cannot find a field for creating a condition table

    Hi all,
    I m trying to create a shipment scenarios which involves shipment cost based on prices,boxes,material....etc. to start with i tried to create a condition table, here the key combination needs to have the filed 'boxes' in it. I am not able to find it even in the master table. Is there any other place whr i can find it or how can i add this into the list?(master table)
    any input is highly appreciated.
    regards/aryan.

    Hi
    Try to ad the filed from the field catalog ,In case the required combination field is not there u can add the field through the following process to filed catalog and create the condition table.
    It is most common that one or other time we need to use this function while configuring multi tasking & complex Pricing Architecture.
    Here Aim giving a simple guide to add fields to the Pricing Field Catalogues:
    For example you want to use field PSTYV ('Sales document item category') that is included in structure KOMP ('Pricing Communication Item') as a key for a condition table.
    When you create a condition table (Transaction V/03), however, the system does not propose the field in the field catalog.
    Condition access, field catalog, allowed fields, KOMG, KOMK, KOMP, KOMPAZ, KOMKAZ, PSTYV are the other terms which we need to know about, to add Fields.
    Reason and Prerequisites
    For technical reasons, field PSTYV was included in structure KOMP, however, not in structure KOMG ('Allowed Fields for Condition Structures').
    Proceed as follows:
    1. Call up the ABAP Dictionary (Transaction SE11) and create data type ZZPSTYV. Choose PSTYV as a domain.As a short text, you can use, for example, 'ZZ - sales document item category' and as a field label, you can use the field labels of PSTYV.Save, check and activate your entries.
    2. Call up structure KOMPAZ in the ABAP Dictionary (Transaction SE11) in the change mode and make the following entry:
    Component Component type
    ZZPSTYV ZZPSTYV
    Save, check and activate the change you made.
    3. Note:Because of the change in structure KOMPAZ, field ZZPSTYV is now known in structures KOMG and KOMP because structure KOMPAZ is included in both structures.
    4. Call up Transaction SPRO. Navigate to 'Sales and Distribution -> Basic Functions -> Pricing -> Pricing Control' and execute 'Define Condition Tables'.
    Choose 'Conditions: Allowed fields' and include ZZPSTYV as a new entry.
    5. Note:Now you can use field ZZPSTYV as a key field when you create a condition table Axxx.
    6. Supply the new field you defined by including the following source code line in USEREXIT_PRICING_PREPARE_TKOMP:
    MOVE xxxx-PSTYV TO TKOMP-ZZPSTYV.
    In order processing you find the user exit in Include MV45AFZZ, and in billing document processing you find it in Include RV60AFZZ.
    Consider that you can also use this note as a help if you want to use other customer-specific fields as key fields in a condition table.
    For header fields, use structure KOMKAZ instead of structure KOMPAZ and USEREXIT_PRICING_PREPARE_TKOMK instead of USEREXIT_PRICING_PREPARE_TKOMP.
    For more information, see Transaction SPRO via the path 'Sales and Distribution -> System Modifications -> Create New Fields (Using Condition Technique) -> New Fields for Pricing' and OSS Note 21040.

  • Cannot find some fields from SAP interface (employee master data screen)

    Dear All,
    We are using SAP881 US localization. When I open OHEM table or form settings of list of employees, I can see some additional fields. E.g.
    Health insurance code
    Vacation: Current year
    Those fields I cannot see it from the interface. Can anybody tell me how to key-in those kind of information? Thanks.
    Regards,
    Yuka

    Hi
      Please Check is those fields are Active and Visible In form Settings of Employee Master Screen.....
    Regards
    Naresh.KS

  • Cannot find fields in LSMW

    hi abap gurus,
    i need your help,
    this is a Purchase order conversion program, from4.7 to ECC 6.0,
    the iput is an excel file which contains the extracted data from 4.7
    the structure of the iput file would be
    Purchase Req Number  from ECC 6.0  ( EBAN-BANFN )
    PR Item     from ECC 6.0                  ( EBAN-BNFPO)
    Old PO Number from 4.7                 ( EKKO-EBELN )
    Old PO Item from 4.7                       ( EKKO-EBELP)
    Vendor                                              ( EKKO-LIFNR )
    Material                                            ( EKPO-MATNR).
    Quantity                                            ( MENGE-EKPO)
    i was asked to do LSMW with a standrd program,
    so, i started like this in the first step i chose direst input, with
    Object 0085
    Method 0001
    program # RM06EEI0
    program type is D
    In the step "Field Mapping & Conversion Rules "
    Except for the first two, ie.
    Preq Number
    PReq item,      i could assign the source fields to the std program fields displayed,
    but  i could not find the two fields to map ie, PReq #, Preq Item.
    is it that, these two fields are from ECC, i cannot find them in the std prog.
    can some one helpme in solving this,
    thank you

    hi srinivas,
    thank you for response,
    yes you are right,
    it is the first time they are uploading POs, and also they donot have PReqs in system as of now,
    but my question is as i am using the std program in lsmw, those filds should appear as target fields in order to map, i am only in the step of mapping, so the error of PReqs not found may be at later stage,
    but the std program should show these fileds right?
    i think these Preq are bieng used as refernce while creating the POs, in me21
    so is this a way, or can we do this way for creating the POs with reference of PReqs
    using a std program in LSMW,
    or is it a better way to do recording.

  • FB01 - Need to update fields and cannot find solution

    I have a need to update VERTN, KUNNR, WERKS, and PPRCT when posting an invoice with FB01.  The only field I can find a way to change is PPRCT (through substitution).  I have looked at all the user exits, BADI's, BAPI's, and BTE's and cannot find a solution.  Nothing I can find has these fields available to change. 
    I thought BTE 1020 was my solutution, but it seems you can't change any data with it - which I can't figure out the point of it then.  Right after the call to the BTE, it sets the BSEG internal table back to the way it was before the call.
    Anyone have any suggestions?

    Hi,
    You are corrent that the fields you want to substitute are not available in <b>BSEG_SUBST</b>.
    To get these fields you will have to maintain <b>table GB01 and GB01C</b>. This is where you define which field you can substitute. The fields you want are define as non substitutable in table GB01 ( BEXCLUDE = 'X' ).
    I know that you can substitute custom fields by adding entry in these table but i do not know if it is advisable to change the entry in table to make the field substitutable. I checked OSS not but could not find any for the fields you have specified.
    You might want to check for OSS note by yourself and if you could not find any, write to SAP and ask if you can change the entry in GB01 and GB01C.
    Let me know if you have any question.
    Regards,
    RS

  • Where in the legal terms is the field for "agree"?  Downloaded a tv she terms and conditions popped up but cannot find "agree"

    Where in the legal terms is the field for "agree"?  Downloaded a tv she terms and conditions popped up but cannot find "agree"

    Did the terms pop-up or did you click on them in downloads tab in the iTunes app ? If you clicked on it then it's just for info - your TV show should have downloaded into the Videos app.

  • Cannot find dashboard and reports after upgrading rdp from 10g to 11g OBIEE

    Hi all
    I am trying to upgrade from OBIEE 10g to 11g. These two products are installed on different servers. I have followed the guide: http://www.oracle.com/technetwork/issue-archive/2011/11-jul/o41bi-402913.html and everything seems to work fine.
    So i have taken a copy of rdp from the server where was installed OBIEE 10g and took it in the server where OBIEE 11g is installed.
    Ran the upgrade tool and upgrade finished successfully. Restarted the BI Servers in core application on Enterprise Manager.
    Now when i access the upgraded rpd, the layers and the fields are fine but I cannot find all the reports and dashboards that i had created.
    Am I missing any upgrade steps?
    Please suggest
    Thank you and best regards

    Hi Deepak,
    Thanks for your response.
    Oracle also came back to me and looks like my method is not valid:
    Hi Jim,
    Thanks a lot for the information. First of all I would like to inform you that upgrade CANNOT be performed across two machine. So, if 10g installation is on Host A, then upgrade to 11g will be on Host A.
    So, in your scenario this is what you can do:
    1. On Host A running Forms/Discoverer 10g on Windows 2003, install Forms/Discoverer/Reports 11g (11.1.1.6.0)
    2. Run the upgrade Assistant to perform the upgrade from 10g to 11g.
    3. Now upgrade OS of Host A to Windows 2008
    In short, I would like to inform you that upgrades across machines does not work. Source instance which is 10g and destination instance which is 11g must exist on same box.
    Here is the documentation which you can follow:
    http://docs.oracle.com/cd/E23943_01/upgrade.1111/e10130/toc.htm
    (Oracle® Fusion Middleware Upgrade Guide for Oracle Portal, Forms, Reports, and Discoverer)
    11g Release 1 (11.1.1)
    Let me know if you have any further questions.
    Thanks,
    Rishi

  • Hi i have just downloaded maverick and cannot find a search icon that'l stay on my toolbar

    just up graded to mavericks and i cannot find a search icon that'll stay on my tool bar..? i can find the one in edit/find but it closes after use.  also safari help does now not work... would much appreciate some help
    thanks
    nicola6

    In Snow Leopard the Spotlight access is exactly the same. The only search field is in the Safari toolbar, and this has been amalgamated with the address field - as I said above, just type the search terms in the address field:

  • Error message on my development workstation: The system cannot find the file specified.

    Post Author: cseverin
    CA Forum: Crystal Reports
    Hi,
    I am currently developing an ASP.NET website using Visual Studio.NET 2005. I am using the .NET 2.0 framework, VB.NET as my programming language and I connect successfully to a SQL Server 2005 database.  I can select, insert, update and delete data from the database elsewhere in my project, so I know basic connectivity isn't an issue.  The problem seems to be with Crystal Reports. 
    I created a folder called 'Reports' in my project and added a Crystal Report file (OpenFiles.rpt) to it.  I designed the report and initally used a hard-coded SQL query as its datasource so I could quickly get the database fields onto the report and preview them.  All worked fine. 
    To make the report accessible to the rest of the website, I created an .xsd dataset file containing the three tables (and their corresponding tableadapters) that the report requires and then redeveloped the report using the dataset as the datasource for the report.  After doing this, the preview no longer worked.
    Next, I added a page to the website and dragged a Crystal Report Viewer Control onto it.  In the code behind the page I wrote:
    Option Strict On
    Imports System.Data
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Partial Class Reports
         Inherits System.Web.UI.Page
         Private objOpenFilesreport As OpenFilesReport
         Private rptOpenFiles As ReportDocument
         Private strLastErrorMessage As String = Nothing
         Private errLastException As Exception = Nothing
         Dim strFileKey As String
         Dim strJurisdictionCode As String
         Dim strStaffId As String
         Dim strReportId As String
         Private Sub ConfigureCrystalReports()
              Dim reportPath As String = Server.MapPath("OpenFiles.rpt")
              Dim rptopenfiles As New ReportDocument
              rptOpenFiles.Load(reportPath)  <== I checked this during execution and the value correctly points to the OpenFiles.rpt file in the Reports     folder of my project
              Dim ConnectionInfo As ConnectionInfo = New ConnectionInfo()
              ConnectionInfo.DatabaseName = my database
              ConnectionInfo.UserID = login id of user
              ConnectionInfo.Password = user's password
              SetDBLogonForReport(ConnectionInfo, rptopenfiles)
              CrystalReportViewer1.ReportSource = rptopenfiles
         End Sub
         Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
             ConfigureCrystalReports()
         End Sub
         Private Sub SetDBLogonForReport(ByVal ConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)
              Dim myTables As Tables = myReportDocument.Database.Tables
              For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
                   Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
                   myTableLogonInfo.ConnectionInfo = ConnectionInfo
                   myTable.ApplyLogOnInfo(myTableLogonInfo)
              Next
         End Sub
    End Class
    I added a hyperlink to one of the existing pages on the website to navigate to this page with the report viewer on it.  When I run the website in Visual Studio and click on the hyperlink I get the following:
    Server Error in '/MyTest' Application.
    The system cannot find the file specified.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: The system cannot find the file specified.Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
    &#91;COMException (0x80004005): The system cannot find the file specified.
    &#93;
       CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +126
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +442
    &#91;Exception: Load report failed.&#93;
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +513
       CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1378
       CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() +149
       CrystalDecisions.CrystalReports.Engine.ReportDocument.get_DataDefinition() +85
       CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ParameterFields() +158
       CrystalDecisions.Web.CrystalReportSource.BindControlParameter(Parameter parameter) +130
       CrystalDecisions.Web.CrystalReportSource.DataBindParameters() +191
       CrystalDecisions.Web.CrystalReportSource.EnsureParameters(Boolean forceDataBind) +90
       CrystalDecisions.Web.CrystalReportSource.LoadCompleteEventHandler(Object sender, EventArgs e) +47
       System.Web.UI.Page.OnLoadComplete(EventArgs e) +96
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4086
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832 
    Any ideas, anyone?
    Also, assuming I can get past this error, I will need to figure out how to fill the tables in the .xsd dataset file.  I have written a class for the dataset that includes functions that populate the tables in the dataset from the database by executing SQL queries.  But how do I call these functions at the time the report is run?
    This is my first Crystal report written in .NET and I've been struggling with it for days now.  Any help would be most appreciated!
    Thanks very much!
    Chris Severin

    hello, the error message is obviously coming from one of the installed mcafee extensions. please directly contact mcafee technical support - they can likely give you more detailed guidance and are the only ones who can fix bugs or make necessary adjustments in the addon.

  • Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finder

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

  • FRM - 41219 CANNOT FIND REPORT INVALID ID  - CALLING REPORT FROM FORM

    I am using Developer Suite 10g (forms 9i, reports 9i) . windows XP.
    I am using the following code in WHEN-BUTTON-PRESSED-PRESSED trigger in form to call report.
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status varchar2(20);
    BEGIN
    repid := find_report_object('C:\EMP.RDF');
    v_rep := RUN_REPORT_OBJECT(repid);
    END;
    as as result It is displaying FRM - 41219 CANNOT FIND REPORT INVALID ID.
    I have used the EMP.JSP also in find_report_object built-in. But there is no difference.
    what could be the reason - plz give the solution.
    with thanks
    by GMS

    Unless you made a mistake and overlooked it, what I suggested should work. Having said that, you did not mention the exact Forms version you are using. There may have been a problem in the version you are using which was corrected in a later release. I tested the example I offered using Forms 10.1.2.3 and it works correctly. Carefully review what you did. Verify that the file actually exists in the file system. Also, I would recommend renaming the file with all lower case letters and referencing it in the form with all lower case letters. Here is the complete code of the form I tested. I will also include the property values from the Report object.
    Report1 settings:
    Name - REPORT1
    Subclass Information -
    Comments -
    Filename - dummy.rdf
    Execution Mode - Batch
    Communication Mode - Synchronous
    Data Source Data Block - <Null>
    Query Name -
    Report Destination Type - File
    Report Destination Name -
    Report Destination Format -
    Report Server -
    Other Reports Parameters - On the form create the following items in BLOCK1:
    Text fields:
    <li>SERVERNAME
    <li>REPNAME
    <li>OTHERPARAMS
    Button:
    <li>CALL_REP
    In the WHEN-BUTTON-PRESSED trigger add this code:
    Declare
    repid REPORT_OBJECT;
    v_rep varchar2(256);
    rep_status varchar2(256);
    Begin
       repid := find_report_object('REPORT1');
    -- Set Report Object properties
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'HTML');
    -- Comm mode 1 = SYNCHRONOUS
    -- Comm mode 2 = ASYNCHRONOUS
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, 1);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, :block1.SERVERNAME);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME, :block1.REPNAME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,:block1.otherparams);
    SYNCHRONIZE;
    -- Run report and get status
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := report_object_status(v_rep);
    SYNCHRONIZE;
    -- Wait for Reports to generate results
        WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
        LOOP
          rep_status := report_object_status(v_rep);
        END LOOP;
        SYNCHRONIZE;
    -- If DESTYPE is appropriate for displaying to user, execute WEB.SHOW ;   
        IF rep_status = 'FINISHED' THEN
          WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||:block1.SERVERNAME,'_blank');
        ELSE
          message(rep_status);
        END IF;  
    END; When you run the form, enter the Report Server name and the Report filename (include the path if you have not configured REPORTS_PATH). Then click on the button. Note that the substr logic may need to be altered slightly if you are using an old version of Forms/Reports.
    .

  • I would like to see the added keywords under the picture like iPhoto does it. Is that possible? I cannot find an answer

    I would like to see the added keywords under the picture like iPhoto does it. Is that possible? I cannot find an answer in Aperture 3.2.1

    Hello Wontolla, I meant the Aperture main menu, there is a sub menu "View", see the Screenshot:
    Set all flags in the Metadata Display submenu as I did,  to show Metadata in Viewer and Browser, and then select "Customize"
    Pick the Metadata fields you want to display for all views.
    Make sure, that "Contents -> Keywords" is checked.
    Regards
    Léonie

  • Airpint cannot find HP LaserJet 1536dnf MFP- Please help

    I baught HP Laserjet 1536dnf a few months ago cause HP said that it is Airprint compatible. I actually went to a few stores just to get this last one in stock of the last store I visited. Till now, I still cannot get it to work and feel like a dumb buying this HP printer. If any of you or HP engineer can help ... please.
    I actually did some research and testing on the configuration. There were few time that I was lucky to see the printer show up (shortly) and I can print one document and the printer is gone. Both my ipad and iphone cannot find it again afterward, even after rebooting.
    I already updated my iOS to the latest version. Upgrade firmware on both Printer and my Zyxel router. Also, I replace the zyxel router with 3com (now back to zyxel). None of these help.
    _Here's my configurarition._
    Devices: iPhone 3GS (iOS4.3), iPad 1 (iOS4.3)
    Printer: HP LaserJet 1536dnf MFP (latest firmware 20110405); Fixed IP;
    Router: ZyXel P-660HN-F1z (latest firmware Version: 3.70(BJI.4) | 03/22/2010)
    Network Setting: All are in the same network 192.168.1.x
    Would really appreciate if anyone can help me out.
    This question was solved.
    View Solution.

    Thank you all, especially headsortails. Thought no one will answer this after so many months.
    I actually check that link (http://gothick.org.uk/2010/05/16/getting-the-apple-iphone-remote-app-working-with-a-zyxel-router/) before but it didn't help me at the time. Now there are a few more replies that enlighten me. 
    I would summarize what I did as follow; for others who may have the same problem.
    1. Turn off my printer HP1536
    2. Since there were so many things I tried and lost track of them e.g. multicast, IP version, fixed IP address, disable firewall. First thing I did today is to reset my Zyxel router and set up things from scratch (not from the configuration backup).
    3. Under Zyxel menu Network > LAN > Advance Setup, I change the Multicast to IGMP-V3. This time I leave other fields untouched, so  RIP direction is set to None and RIP version is N/A.
    4. Under menu Wireless LAN > Advance Setup, I uncheck the IGMP Snooping.
    5. Turn on my HP printer and reboot both iPhone and iPad
    Now I'm happy. I can print from my iphone, ipad, mac and PC. However, while testing, I found that sometime iphone may not found the printer if the ipad app printed something and hasn't quit. I guess it somehow lock the bonjour service. Anyway, I'll just mainly print from my ipad ... so I guess my problem is now solved. Thanks.

  • Cannot find any information on property 'Name' in a bean of type 'UserBean'

    Hello,
    I was trying to solve this problem myself but never got through, its really routine. So please can you see this error message, html file, jsp file and say if there are mistakes or if I need to add something else somewhere?
    Error
    org.apache.jasper.JasperException: Cannot find any information on property 'Name' in a bean of type 'UserBean'
    HTML
    <html>
    <head>
    <title>jsp test</title>
    </head>
    <body bgcolor ="white">
    <form action ="course.jsp" method ="post">
    <table>
    <tr><td>userName:</td>
    <td><input type="text"      name ="Name">
    </td>
    </tr>
    <tr>
    <td>userID:</td>
    <td><input type ="text" name ="ID"></td>
    </tr>
    <tr>
    <td>userAddress</td>
    <td><textarea name ="Description"></textarea></td>
    </tr>
    <tr>
    <td><input type ="submit" name ="submit"></td>
    </table>
    </form>
    </body>
    </html>
    JSP
    <%@ page language="java" contentType="text/html" %>
    <html>
    <body bgcolor="white">
    <jsp:useBean id="courseBean" class="UserBean">
    <jsp:setProperty name="courseBean" property="*" />
    </jsp:useBean>
    The following was done:
    <jsp:getProperty name="courseBean" property="Name" />
    <jsp:getProperty name="courseBean" property="ID" />
    <jsp:getProperty name="courseBean" property="Description" />
    </body>
    </html>
    JAVABEAN:
    public class UserBean implements Serializable{
    private String Name;
    private String ID;
    private String Description;
    public UserBean(){
    public void setName(String Name){
    this.Name=Name;
    public String getName(){
    return ID;
    public void seID(int userID){
    this.ID=ID;
    public int getUserID(){
    return ID;
    public void setDescription(String Description){
    this.Description=Description;
    public String getDescription(){
    return Description;
    Thank you in advance
    Ajlear

    Use a lower case initial on a bean property name.
    Instead of:
    <jsp:getProperty name="courseBean" property="Name" />try:
    <jsp:getProperty name="courseBean" property="name" />The same will apply to other properties. Also, make sure you use the lower case initial on form field names. e.g. <input type="text" name ="name"> for use in <jsp:setProperty name="courseBean" property="*" />

Maybe you are looking for

  • CUCM 8.6.2 /common Partition on read-only mode

    Hi Guys. We have installed a CUCM 8.6.2 on a UCS C210 and everything was looking fine for the last two weeks. I´ve noticed that "CDR Repository Manager" and "Cisco CAR DB" was not running, so I´ve accessed the CLI to start the "Cisco CAR DB" service.

  • Strans - Optional Transform templates

    Hi Gurus! I am new to transformations and I am having an issue that's revealing to be to mutch for me. <?sap.transform simple?> <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"                xmlns:ddic="http://www.sap.com/abapxml

  • Not working Billing Block functionality for Invoicing Plan

    Hi Experts, I am using Invoicing plan functionality to purchase materials by using Milestones from Network of Project System. The system is allowing to post Vendor Invoice (MIRO) without removing of Billing Block of Invoicing Plan from PO and the sys

  • Stroing PIN's

     How does any store PIN's on their Blackberry's Do you just add them to you contact list information??

  • My Apple TV is unresponsive how I fix the problem

    My Apple tv is unresponsive how I fix it