Weblogic generated finder method not setting parameters in prepared statement

Hi,
I am using weblogic 6.1 sp2 and have a CMP bean with a finder defined as follows:
<query>
<query-method>
<method-name>findByPcPayclass</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT DISTINCT OBJECT(p) FROM Payments p, PaymentType
t WHERE p.paymentType.pcPayClass = '?1'</ejb-ql>
</query>
The weblogic generated code follwos:
public java.util.Collection ejbFindByPcPayclass(java.lang.String param0) throws
javax.ejb.FinderException
if(__WL_verbose) {
Debug.say("called findByPcPayclass");
java.sql.Connection __WL_con = null;
java.sql.PreparedStatement __WL_stmt = null;
java.sql.ResultSet __WL_rs = null;
__WL_pm.flushModifiedBeans();
try {
__WL_con = __WL_pm.getConnection();
} catch (java.lang.Exception e) {
__WL_pm.releaseResources(__WL_con, __WL_stmt, __WL_rs);
throw new javax.ejb.FinderException("Couldn't get connection: " + EOL +
e.toString() + EOL +
RDBMSUtils.throwable2StackTrace(e));
try {
java.lang.String __WL_query = "SELECT WL0.DEPOSIT_UID, WL0.GLA_ID, WL0.MARKET_CODE,
WL0.ORIGINAL_PAYMENT_ID, WL0.PAYMENT_ACCT_NUMBER, WL0.PAYMENT_ACK, WL0.PAYMENT_AMOUNT,
WL0.PAYMENT_CARD_CHECK_NUM, WL0.PAYMENT_CARE_SITE, WL0.PAYMENT_CUST_NAME, WL0.PAYMENT_DESIGNATOR,
WL0.PAYMENT_EFFECTIVE_DATE, WL0.PAYMENT_ID, WL0.PAYMENT_INV_ID, WL0.PAYMENT_MOBILE_NUMBER,
WL0.PAYMENT_SPLIT, WL0.PC_PAYCLASS, WL0.PT_UID, WL0.TT_UID FROM payment_type
WL2, payment_type WL1, payments WL0 WHERE (WL2.PC_PAYCLASS = '?1') AND WL0.PT_UID
= WL2.PT_UID " + __WL_pm.selectForUpdate();
if(__WL_verbose) {
Debug.say("Finder produced statement string " + __WL_query);
__WL_stmt = __WL_con.prepareStatement(__WL_query);
// preparedStatementParamIndex reset.
__WL_rs = __WL_stmt.executeQuery();
} catch (java.lang.Exception e) {
__WL_pm.releaseResources(__WL_con, __WL_stmt, __WL_rs);
throw new javax.ejb.FinderException(
"Exception in findByPcPayclass while preparing or executing " +
"statement: '" + __WL_stmt + "'" + EOL +
e.toString() + EOL +
RDBMSUtils.throwable2StackTrace(e));
The parameter is never set in the prepared statement before it executes. This
causes the finder to return an empty result set. Is this a bug or is there some
configuration that I missed. I am using ant 1.5 to do the ejbc. the ant target
follows:
<target name="ccas.ejbc" depends="ccas.compile, ccas.stage, dd.combine">
<ejbjar srcdir="${buildClasses}/"
descriptordir="${buildOutput}/ear_dd"
basejarname="CCAS"
flatdestdir="true"
dependency="full">
<support dir="${buildClasses}">
<include name="CCAS/**/*.class"/>
</support>
<weblogic destdir="${ear.stage.dir}"
rebuild="false"
keepgenerated="true"
jvmdebuglevel="16">
<classpath refid="classpath"/>
<wlclasspath refid="classpath"/>
</weblogic>
<include name="ejb-jar.xml"/>
<exclude name="**/*-weblogic*.xml"/>
</ejbjar>
</target>

replace '?1' with ?1
"Eugene Stephens" <[email protected]> wrote in message
news:[email protected]...
>
Hi,
I am using weblogic 6.1 sp2 and have a CMP bean with a finder defined asfollows:
<query>
<query-method>
<method-name>findByPcPayclass</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT DISTINCT OBJECT(p) FROM Payments p,PaymentType
t WHERE p.paymentType.pcPayClass = '?1'</ejb-ql>
</query>
The weblogic generated code follwos:
public java.util.Collection ejbFindByPcPayclass(java.lang.String param0)throws
javax.ejb.FinderException
if(__WL_verbose) {
Debug.say("called findByPcPayclass");
java.sql.Connection __WL_con = null;
java.sql.PreparedStatement __WL_stmt = null;
java.sql.ResultSet __WL_rs = null;
__WL_pm.flushModifiedBeans();
try {
__WL_con = __WL_pm.getConnection();
} catch (java.lang.Exception e) {
__WL_pm.releaseResources(__WL_con, __WL_stmt, __WL_rs);
throw new javax.ejb.FinderException("Couldn't get connection: " +EOL +
e.toString() + EOL +
RDBMSUtils.throwable2StackTrace(e));
try {
java.lang.String __WL_query = "SELECT WL0.DEPOSIT_UID, WL0.GLA_ID,WL0.MARKET_CODE,
WL0.ORIGINAL_PAYMENT_ID, WL0.PAYMENT_ACCT_NUMBER, WL0.PAYMENT_ACK,WL0.PAYMENT_AMOUNT,
WL0.PAYMENT_CARD_CHECK_NUM, WL0.PAYMENT_CARE_SITE, WL0.PAYMENT_CUST_NAME,WL0.PAYMENT_DESIGNATOR,
WL0.PAYMENT_EFFECTIVE_DATE, WL0.PAYMENT_ID, WL0.PAYMENT_INV_ID,WL0.PAYMENT_MOBILE_NUMBER,
WL0.PAYMENT_SPLIT, WL0.PC_PAYCLASS, WL0.PT_UID, WL0.TT_UID FROMpayment_type
WL2, payment_type WL1, payments WL0 WHERE (WL2.PC_PAYCLASS = '?1') ANDWL0.PT_UID
= WL2.PT_UID " + __WL_pm.selectForUpdate();
if(__WL_verbose) {
Debug.say("Finder produced statement string " + __WL_query);
__WL_stmt = __WL_con.prepareStatement(__WL_query);
// preparedStatementParamIndex reset.
__WL_rs = __WL_stmt.executeQuery();
} catch (java.lang.Exception e) {
__WL_pm.releaseResources(__WL_con, __WL_stmt, __WL_rs);
throw new javax.ejb.FinderException(
"Exception in findByPcPayclass while preparing or executing " +
"statement: '" + __WL_stmt + "'" + EOL +
e.toString() + EOL +
RDBMSUtils.throwable2StackTrace(e));
The parameter is never set in the prepared statement before it executes.This
causes the finder to return an empty result set. Is this a bug or is theresome
configuration that I missed. I am using ant 1.5 to do the ejbc. the anttarget
follows:
<target name="ccas.ejbc" depends="ccas.compile, ccas.stage,dd.combine">
<ejbjar srcdir="${buildClasses}/"
descriptordir="${buildOutput}/ear_dd"
basejarname="CCAS"
flatdestdir="true"
dependency="full">
<support dir="${buildClasses}">
<include name="CCAS/**/*.class"/>
</support>
<weblogic destdir="${ear.stage.dir}"
rebuild="false"
keepgenerated="true"
jvmdebuglevel="16">
<classpath refid="classpath"/>
<wlclasspath refid="classpath"/>
</weblogic>
<include name="ejb-jar.xml"/>
<exclude name="**/*-weblogic*.xml"/>
</ejbjar>
</target>

Similar Messages

  • Test-OutlookConnectivity WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.

    Hi All,
    When we do a test-outlookconnectivity -protocol:http the result is a success but then we get the following:
    ClientAccessServer   ServiceEndpoint                               Scenario                           
    Result  Latency
    (MS)
    xxxxxxxxxxxx... xxxxxxxxxxxxxx                 Autodiscover: Web service request.  Success   46.80
    WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance
     of an object.
    Object reference not set to an instance of an object.
        + CategoryInfo          : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
        + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
    So it looks like it's not completing successfully.
    I can't find anything on this in particular, and don't really know how to go about solving it - We are fully up to date, Exchange 2010 Sp2 with Rollup 5-v2
    Any help appreciated!

    hi,
    I have the same issue also on Exchange 2010 SP2 RU5v2
    I ran your command and get the below
    [PS] C:\Installs\report\Activesync>Test-OutlookConnectivity -Protocol:http |FL
    RunspaceId                  : ebd2c626-1634-40ad-a17e-c9a713d1a62b
    ServiceEndpoint             : autodiscover.domain.com
    Id                          : Autodiscover
    ClientAccessServer          : CAS01.domain.com
    Scenario                    : Autodiscover: Web service request.
    ScenarioDescription         :
    PerformanceCounterName      :
    Result                      : Success
    Error                       :
    UserName                    : Gazpromuk.intra\extest_645e41faa55f4
    StartTime                   : 8/21/2013 4:08:50 PM
    Latency                     : 00:00:00.1250048
    EventType                   : Success
    LatencyInMillisecondsString : 125.00
    Identity                    :
    IsValid                     : True
    WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
    Object reference not set to an instance of an object.
        + CategoryInfo          : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
        + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
     Any help would be greatly appreciated, I also get random failures of OWA, EAS and web services, very frustrating
    I have no errors in the app event log
    thanks
    Faisal Saleem Windows Systems Analyst 07595781867

  • Unable to set string in prepared statement

    Hi all,
    I just want to set an string to a prepared stmt.
    the setting string is in the format..... the integers with comma saparated....
    str="23,55,22"
    ps.setString(1,str)
    The prepare statement is taking only the first integer... i.e. 23
    can any one help me out..........
    thanks in advance,
    prakhyath

    if i am not mistaken.... If I create the Prepared
    Statement after receiving the arguments that are to
    be provided to it.... the actual purpose.. Of using
    a prepared statement is not served at all....Not creating a new Statement each time, is only one of the purposes of PreparedStatement. In this case, since the arguments should be ints (and I hope you are checking that), then it doesn't make much of a difference. But a PreparedStatement is alos used to easily facilitate the proper quoting and escaping of the parameters set, which almost eliminates any chance of an SQL injection attack. There are also a few other convienences associated with a PreparedStatement, but, in this case, you are probabyl right in that there is no advantage of PreparedStatement over Statement (as long as you are checking that the arguments provided are actually ints, otherwise you are opening yourself up to an injection attack).

  • Set char in Prepared Statement

    Hi,
    Can any one let me know how to set Character value in Prepared Statement. I have my table in which the column is of Char type. Now in my prepared statment, I am saying
    PreparedStament pstmt = con.prepareStatement("select ticker from INSTRUMENT_TICKERXREF where ticker = ? ");
    pstmt.setString(1,'F');
    I even tried pstmt.setString(1,"F");
    It gives me incompatible types. Can any please help me on this asap.
    Regards,
    ..Raj

    Hi,
    I just tried using setString(), it does not seem to give any problems. But in any case, you could use setObject() too.
    I tried both setString() and setObject for an example table structure as below:
    create table testchar(col1 CHAR(3));
    insert into testchar('one');
    from java class:
    PreparedStatement pstmt = conn.prepareStatement("select col1 from testchar where col1 = ? ");
    //pstmt.setObject(1,"one");
    pstmt.setString(1,"one");
    Hope that helps.
    Savitha.
    OTN group@IDC

  • Weblogic 11g 405 Method not allowed

    Hello,
    Iam runing a webservice on a Weblogic 11g server. As soon as i send a request iam getting a 405 Error in my firebug: options method now allowed.   Any advise?

    You will find the server logs under following location.
    %Domain_Home% / servers / <servername> /logs/

  • Setting date in prepared statement

    I am using
    preparesStatement.setDate(param1,findAuditSearchDTO.getStgAuditGeneral().getAuditBeginDate());
    I am wondering setting date this way will slow down the query?
    should I use preparesStatement.setString where I can call to_date function or the above code will work fine and not make any difference in performance ?

    user11138293 wrote:
    I am using
    preparesStatement.setDate(param1,findAuditSearchDTO.getStgAuditGeneral().getAuditBeginDate());
    I am wondering setting date this way will slow down the query? No. And even if it did, it would still be the right way to do it. The main point of using PreparedStatement is so that you can use the correct types in your Java code and don't have to worry about formatting and such.
    As far as performance is concerned, any difference introduced by type conversion will be minuscule compared to roundtrip I/O between you and the DB and any disk I/O the DB needs to do. And of course, if it's a DATE column on the DB (which it had better be, if it's representing a date), then the DB would just have to convert the string to a date anyway.
    Focus on good design, and on using data structures, algorithms, classes, and methods, that are appropriate to what you're trying to do and that lead to easy-to-understand code.

  • Finder-method in orion-ejb-jar.xml

    Hi,
    Is there a way to let jdeveloper 9.0.3 preview to automatically generate finder-method descriptors for us? When I was developing a cmp-based entity bean, although I defined the ejb-ql in ejb-jar.xml, JDeveloper still just generated the first orion-ejb-jar.xml shown below. In the first orion-ejb-jar.xml, there is no definition for any finder-method. I have to manually add my own definition to it, which is shown in the second orion-ejb-jar.xml. I know that the oc4j container will generate the finder-method after deployment, but in some situation it generated incorrect finder-method descriptors. One of such situation is the between query like "between ?1 and ?2". Anyway, if JDeveloper can generate the finder-method during development, then we can know whether the descriptor is correct or not before deployment, and we can make modifications before deploying it to oc4j server.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" " " target="_new">http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd"> <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="BooksBean" data-source="jdbc/bookDS" table="BOOKS">
    <primkey-mapping>
    <cmp-field-mapping>
    <fields>
    <cmp-field-mapping name="isbn" persistence-name="ISBN" persistence-type="NUMBER(10)"/>
    </fields>
    </cmp-field-mapping>
    </primkey-mapping>
    <cmp-field-mapping name="isbn" persistence-name="ISBN" persistence-type="NUMBER(10)"/>
    <cmp-field-mapping name="title" persistence-name="TITLE" persistence-type="VARCHAR2(50)"/>
    <cmp-field-mapping name="author" persistence-name="AUTHOR" persistence-type="VARCHAR2(50)"/>
    <cmp-field-mapping name="price" persistence-name="PRICE" persistence-type="NUMBER(6,2)"/>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name="&lt;default-ejb-caller-role>" impliesAll="true"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" " " target="_new">http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd"> <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="BooksBean" data-source="jdbc/bookDS" table="BOOKS">
    <primkey-mapping>
    <cmp-field-mapping name="isbn" persistence-name="ISBN" persistence-type="NUMBER(10)"/>
    </primkey-mapping>
    <cmp-field-mapping name="isbn" persistence-name="ISBN" persistence-type="NUMBER(10)"/>
    <cmp-field-mapping name="title" persistence-name="TITLE" persistence-type="VARCHAR2(50)"/>
    <cmp-field-mapping name="author" persistence-name="AUTHOR" persistence-type="VARCHAR2(50)"/>
    <cmp-field-mapping name="price" persistence-name="PRICE" persistence-type="NUMBER(6,2)"/>
    <finder-method query="select * from books where $author like $1">
    <method>
    <ejb-name>BooksBean</ejb-name>
    <method-name>findByAuthor</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </method>
    </finder-method>
    <finder-method query="select * from books where $title like $1">
    <method>
    <ejb-name>BooksBean</ejb-name>
    <method-name>findByTitle</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </method>
    </finder-method>
    <finder-method query="$price between $1 and $2">
    <method>
    <ejb-name>BooksBean</ejb-name>
    <method-name>findByPriceRange</method-name>
    <method-params>
    <method-param>double</method-param>
    <method-param>double</method-param>
    </method-params>
    </method>
    </finder-method>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="&lt;default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    Any one has any idea?
    Thanks,
    Jingzhi

    Jingzhi -- If you define the correct EJB-QL you should get the correct SQL generated for the finder. If that's not happening can you verify it against the OC4J v903 production release and see if it is still happening. I don't know if this helps with the JDeveloper problem specifically but if you don't need to create your own finders then that I hope should help.
    Thanks -- Jeff

  • CMP and Finder methods

    I've got a table:
    id number primary key,
    name varchar2(50),
    price number
    How can i make finderXXX for this sql query:
    select * from table where name like 'beer' and price > 10;
    Thank's

    gday Max -
    For this, you'll need to make some a slight modification to the generated finder methods.
    Say you create an entity called Drinks which has the same structure as the table you provide as an example (and can I just say, what a great example you chose ;)
    It should go something like this - note, I've not tried this but this is what you need to look at doing:
    In the Home interface (DrinksHome) create a findermethod that looks like:
    public Collection findByName(String name, Double Price) throws RemoteException, FinderException;
    * note we make the return type a collection since it's possible that you may get more than one entity returned.
    Go ahead and deploy your EJB.
    When you deploy your EJB, OC4J will generate a finder method for this method for you.
    Now what you need to do is to modify the generated XML deployment descriptor to tune the query if you will.
    OC4J generates the deployment descriptor info it needs for an application in $OC4J/application-deployments.
    Go to to $OC4J/application-deployments/<app-name>/<ejb-name> where app-name and ejb-name are specific your deployed EJB.
    Open the orion-ejb-jar.xml file. This is the file OC4J uses to describe the deployed beans.
    Search through the file until you find the <finder-method> tag.
    Amend the query attribute of the finder-method tag to reflect the where clause of the query you want to execute:
    query="$name = $1 AND $price > $2"
    Now go to the generated SQL string and add the corresponding SQL where condition, using a ? in place of the actual value of the query string above
    It would become something like ...
    < !-- Generated SQL: "select drinks.id, drinks.name, drinks.price from drinks where drinks.name = ? AND drinks.price > ?" -->
    Note that in this query, the where clause matches the query you specified, but you omit the actual values.
    Check the method-params defined for the find below and ensure that the order of them lines up with the values you've specified in the finder query.
    Stop OC4J and restart it and the new finderMethod should come into effect.
    Give that a try and see how you go.
    cheers!
    -steve-
    null

  • Setting Application Set Parameters For Variable

    Hi Guys,
    When I've read the BPC help about "Setting application set parameters" and the statement likes this : 
    Allows you to define a custom email message that is sent when a work status code is changed. The message is applicable to all applications in the application set. You can customize the message using the following variables:
    %USER% - name of user who changed the status
    %ED% - Entity dimension
    %EM% - Entity member
    %CD% - Category dimension
    %CM% - Category member
    %TD% - Time dimension
    %TM% - Time member
    %STA% - Work status
    %OWNER% - Entity owner
    %TIME% - time of change
    For example, you can enter "This is to inform you that %USER% has updated the work status for %EM%, %CM%, %TM% on %TIME%". The message can be up to 255 characters, and there is no need for quotes or brackets around parameters.
    The Questions:
    When I put the "%ED" into the textfield "APPROVALSTATUSMSG", after that I try to send email from BPF and the "%ED" still same into the email message. But it should describe the value of variable.
    Could you help me how to view the value of variable ?
    Thanks,

    If I look at the available parameters in the helpfile 2 things are strange in my opinion:
    1)the parameter is called approvalstatusmsg, approval status was the V4 naming convention of the function, right now it is called workstatus, so it might be a V4 function. Never used it myself but maybe it is something not correctly migrated to v5.
    2) Even if it is working in V5, which I don't know for sure, then it is strange that you only have variables for Categroy, time and entity, since you can setup the workstatus for more then these 3 dimensions in V5 which you would also like to have in a case you set it up for more then 3 dimensions. For example for if you want to use Category,time,Entity & Product dimension in the workstatus, you would also like to inform the people which product is updated, since only just category,time and entity won't say that much.
    So I think you best check with support if this function is still usable in V5 or if it is an old function from V4. and if it is working in V5, how do you get the right parameters in the variables when you setup workstatus for other dimensions then just Category/time/Entity.
    I would like to know the results!
    Joost

  • How to call method in JCD - which will execute prepared statement

    Hi All,
    I have a scenari where I have to call method in JCD, where in this method I have to execute prepared statement and return value.
    Please suggest me how to do this.
    Thanks & Regards,
    Anitha.B

    hi bolla,
    this is 100% java code. can you elaborate a little more what is your exact problem?
    i think your scenario is easy to accomlish.
    regards chris

  • Not able to reload the data from DB using finder methods

    Hi all,
    <p>
    I am facing a weird problem while using finder methods.
    I am using weblogic 8.1 SP3 and entity beans are CMP with DB concurrency.DB is oracle
    </p>
    <h4>Problem Description</h4>
    <p>
    I am having one session bean which internally interacts with my entity beans,
    Now say my transaction is getting initiated in one of the session bean and I use some finder in it.
    </p>
    <p>
    To make the problem more clear lets say my entity bean is loanBean with loanId as primary key.
    Now say method A of session bean initiates the transaction and I use something like
    <br>
    LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
    <br>
    <b>Note that I am not using findByPrimaryKey method</b>
    <br>
    now this method A calls some other method B on some session bean which is having Required as its transaction attribute.
    <br>
    But before the call of B some other thread or background process updates the DB for this loanId and commits,
    <br>
    now when I fire the same finder in method B I am still getting the old data, ie I am not getting the data which has been modified in DB and committed by some other thread, I still get the old data and when I tried to generate the SQL queries which weblogic is firing, I see
    it fires the SQL for every finder other that findByPrimaryKey.
    <br>
    <b>
    Now my problem is I am getting the old data only and I need the new updated data of DB. isolation-level of DB and beans is READCOMMITTED.
    Note:: I cant use new transaction to read the data.
    </b>
    <br>
    And I couldn't understand that when weblogic is firing query for every finder then why it should not refresh the data in its cache. Is there any way to disable this kind of caching and say that everytime when i use finder just go to DB and get me the last committed data.
    </p>
    <br>
    Any help in this regard would be very helpful to me.
    <br>
    Thanks and Regards
    <br>
    Manish Garg.
    </p>

    Hi,
    In my understanding, cache is not involved in this scenario. As you
    observed, the container fires sql every time when you invoke this finder.
    So, it should just give the result that it got from the DB. Is there a
    possibility that the DB is using repeatable_read or serializable for
    isolation level?
    You can debug further by doing couple of things -
    1. Instrument the code in the generated RDBMS java file for the entity bean
    (if you use -keepgenerated option for weblogic.ejbc, u can get the source of
    this file). This class will have the implementation for ejbFindByLoanId. You
    can just print the result set data after the query is fired.
    2. Try the same scenario without the ejb container. Like, write a jsp which
    will start a user tx and fire the query twice such that there is an update
    between the two queries. Note that, you need to use a TxDataSource to get
    the JDBC connection so that it will be tx aware.
    --Sathish
    <Manish Garg> wrote in message news:[email protected]...
    Hi all,
    <p>
    I am facing a weird problem while using finder methods.
    I am using weblogic 8.1 SP3 and entity beans are CMP with DB
    concurrency.DB is oracle
    </p>
    <h4>Problem Description</h4>
    <p>
    I am having one session bean which internally interacts with my entity
    beans,
    Now say my transaction is getting initiated in one of the session bean and
    I use some finder in it.
    </p>
    <p>
    To make the problem more clear lets say my entity bean is loanBean with
    loanId as primary key.
    Now say method A of session bean initiates the transaction and I use
    something like
    <br>
    LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
    <br>
    <b>Note that I am not using findByPrimaryKey method</b>
    <br>
    now this method A calls some other method B on some session bean which is
    having Required as its transaction attribute.
    <br>
    But before the call of B some other thread or background process updates
    the DB for this loanId and commits,
    <br>
    now when I fire the same finder in method B I am still getting the old
    data, ie I am not getting the data which has been modified in DB and
    committed by some other thread, I still get the old data and when I tried
    to generate the SQL queries which weblogic is firing, I see
    it fires the SQL for every finder other that findByPrimaryKey.
    <br>
    <b>
    Now my problem is I am getting the old data only and I need the new
    updated data of DB. isolation-level of DB and beans is READCOMMITTED.
    Note:: I cant use new transaction to read the data.
    </b>
    <br>
    And I couldn't understand that when weblogic is firing query for every
    finder then why it should not refresh the data in its cache. Is there any
    way to disable this kind of caching and say that everytime when i use
    finder just go to DB and get me the last committed data.
    </p>
    <br>
    Any help in this regard would be very helpful to me.
    <br>
    Thanks and Regards
    <br>
    Manish Garg.
    </p>

  • GPM Custom GPO-Settings: An error occurred while generating report: Object reference not set to an instance of an object.

    Hello,
    As you can tell from the title of this question, I am no expert with GPO's.  Before I begin, I spent a few minutes to an hour searching and reading in hopes of finding the solution and avoid putting myself out there as a "GPO Newb".  While
    I found several posts and answers that were similar and were related, the questions and answers were more advanced and did present the solutions providing the person had initial knowledge already.  That is not necessarily my case and I would ask for a
    little patience and a bit of 'hand-holding' for what I need.
    I run SBS 2011, and in Group Policy Management I have a custom GPO.  In this GPO I define all my settings.  I understand this may not be the best or most practical method of applying policies, but I am not very strict and have few settings.  This
    policy existed prior to my joining the company, and was migrated in to this SBS '11 from SBS '03.  That may be the issue, but before making any changes I am seeking expert advice.
    When I select that GPO, named "Main GPO", and click on the tab at the top "Settings" I see the error: "An error occurred while generating report: Object reference not set to an instance of an object."
    I saw that when I right click the GPO > View > Options and select the tab "Reporting" that it states that for reporting to work the location of the .adm files must be specified.  I see that my option for the location is set to "Default"
    which by my guessing would be located in the C:\Windows\sysvol directory.  Below is what I see there:
    C:\Windows\sysvol\domain
    C:\Windows\sysvol\staging
    C:\Windows\sysvol\staging areas
    C:\Windows\sysvol\sysvol
    I think the problem is that my custom GPO are not inside the default location, which I speculate is: C:\Windows\sysvol\domain\policies (which I do see some objects there).
    But instead I also see items in this folder: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies (while where I just typed 'JOHN.LOCAL' is my actual local domain).
    To further this, when I edit that custom GPO, then at the very top of the tree I right click on it and select Properties, I see a Unique Name listed there as a long string of numbers and letters, similar to a registry entry.  I searched my server for
    that same Unique Name and found it listed inside the folder: C:\Windows\sysvol\domain\policies
    If I am correct with my assumption and basic knowledge, I should move all objects as follows:
    -Move FROM: C:\Windows\sysvol\domain\policies
    -Move TO: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies
    My concerns are that I am not correct at all, that I will break something, that there may be an easier fix than moving anything, or that I am overlooking something causing this error altogether. 
    Thank you for anyone's help and time with assisting me with this request.
    John Fester

    > top "Settings" I see the error: "An error occurred while generating
    > report: Object reference not set to an instance of an object."
    That's due to a security setting (most possibly) your current OS does
    not understand. Hard to find out wich exact setting it is... To resolve
    this issue, we need the gtpptmpl.inf file residing in the policiy's
    sysvol folder. To open this folder, edit the policy, move to computer
    settings - policies - windows settings - scripts - startup, press "show
    files". Then move two folders upwards and back down to
    .\microsoft\windows nt\secedit. There you'll see the gpttmpl.inf - post
    its contents and we'll have a look at it.
    > location, which I speculate is: C:\Windows\sysvol\domain\policies (which
    > folder: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies (while where I just
    That's perfectly ok - JOHN.LOCAL in fact is a symlink pointing to "domain".
    > all objects as follows:
    > -Move FROM: C:\Windows\sysvol\domain\policies
    > -Move TO: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies
    No.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Getter & Setter Method not getting called for a field enhanced through AET

    Hello,
    I am new to SAP CRM 7.0 and working on a requirement.
    A Z-field was added by our functional guy in CRM 7.0 WebGui through AET in the 'Create Opportunity' transaction (Header data).
    Now the requirement is, as soon as the opportunity is created through the WebGui, I should post a document in R/3 and paste that document number back to the enhanced Z-field in opportunity.
    Work done by me:
    I pressed F2 on the enhanced Z-field in the WebGui screen and took the details of view, component name etc. After this I went to normal SAP CRM system and open tcode "BSP_WD_CMPWB", located the corresponding view "BT111H_OPPT/Details" and right clicked & enhanced the same.
    Then I opened the structure of this view, expanded context node, located context "BTOPPORTH" and inside this, located my Z-attribute. Now right clicked on the Z-attribute & selected the option "Generate SETTER & GETTER Methods" and these were generated successfully.
    Problem:
    The problem is even after putting external break points in these methods, these methods are not getting called while creating, modifying & displaying the Opportunity in WebGui.
    I hope that for the requirements that I have, I have to do the coding in "Getter & Setter" methods. But since these are not getting called, I am unable to proceed.
    Please help/suggest how to achieve this.
    Thanks in anticipation.
    Best Regards,
    Rahul Malani

    Hi,
    If you can see the field in UI and still get_ method is not being triggered then try to regenerate these methods. If it still doesn't work then please look for SAP notes or raise an OSS.
    There should be some note for the issue you faced.
    please refer:
    Help Needed immediately - AET getter setter methods not getting triggered
    Regards,
    BJ

  • RSPC Variant does not exist - Could not find or load print parameters

    We are on BI 7.0 (support pack SAPKW70017).  We recently freshed test system from production.   After the refresh, we have problems opening all the process chains.  
    1. When I go to RSPC to open a process chain, I get many messages like this:
    Variant &0000000067180 does not exist (there are different variant numbers)
    Message no. DB612
    Diagnosis
    You selected variant &0000000067180 for program RSPROCESS.
    This variant does not exist.
    2. When I go to SM21 to check the system log, it displays many entries like below:
    EJ  F Could not find or load print parameters for step 1, job BI_PROCESS_TRIGGER/09134500
    Documentation for system log message EJ F :                                                                               
    An error occurred during loading of the print parameters for a        
    background job step.                                                  
    The print parameter record may have been deleted even though there was
    a still a step that needed that data. This is an error as the         
    reorganization of the print parameters should prevent this from       
    happening.                                                            
    To fix the problem, edit the step and save it, copy the job, or       
    schedule a new job. The print parameters will be regenerated in all   
    these cases.    
    3. I applied the OSS note 1169659 - Correction: Process variants not entered by BDLS.   The Basis rerun BDLS.  But it did not fix the problem.
    Would appreciate if someone could provide any help.
    Thank you.

    Hi Rebecca.
    1) Please verify if exist process types called 'unknown job'. If exist:  delete process types called 'unknown job' in your process chain. To do that please remove the chain from scheduling (menu bar > process chain > remove from schedule), afterwards switch the detail view on (menu bar >  view) > right mouse click on the process type "unknown job" > displaying scheduled jobs > delete that job. After deletion of the 'unknown jobs' activate and schedule your process chain again.
    2) After the removal of the 'unknown jobs' please check if the error messages with the missing variants pop up when calling your process chain disappears. If not, please implement and execute the attached report Z_FIND_JOBS_WITHOUT_VARIANT which deletes the jobs without variants.
    I have already attached report as Report Z_FIND_JOBS_WITHOUT_VARIANT, you can download and create the report accordingly.
    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    REPORT  Z_FIND_JOBS_WITHOUT_VARIANT.
    data: l_t_job type table of tbtcp with header line,
          l_s_varsel    TYPE rsvar,
          l_t_variant   TYPE TABLE OF rsparams.
    parameters: delete type rs_bool.
    select * from tbtcp as job into table l_t_job
                        where progname = 'RSPROCESS'
                        and   exists ( select * from tbtco
                              where jobname = job~jobname
                              and   jobcount = job~jobcount
                              and   status = 'S' ).
    loop at l_t_job.
      l_s_varsel-report  = l_t_job-progname.
      l_s_varsel-variant = l_t_job-variant.
      CALL FUNCTION 'RS_VARIANT_CONTENTS'
        EXPORTING
          report               = l_s_varsel-report
          variant              = l_s_varsel-variant
          execute_direct       = 'X'
        TABLES
          valutab              = l_t_variant
        EXCEPTIONS
          variant_non_existent = 1
          variant_obsolete     = 2
          OTHERS               = 3.
      if sy-subrc <> 0.
        write: / l_t_job-jobname, l_t_job-jobcount.
        if delete = 'X'.
          CALL FUNCTION 'BP_JOB_DELETE'
            EXPORTING
              JOBCOUNT = l_t_job-jobcount
              JOBNAME  = l_t_job-jobname
            EXCEPTIONS
              OTHERS   = 1.
          IF SY-SUBRC <> 0.
            write 'not deleted'.
          else.
            write 'successfully deleted'.
          ENDIF.
        endif.
      endif.
    endloop.
    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

Maybe you are looking for

  • Itunes connection probleme

    i can`t access itune store via my itune and safari also i`ve try the parental controle firewall and uninstall it but it stays the same, it says " no connection check you connection and retry"! but chrome and my over device work perfectly help pls

  • HT5978 How do I schedule an event every third day?

    I cannot seem to be able to schedule an event to reoccur every third day in calendar. How can I do this?

  • Parsing Column Value. SQL / Stored Proc/ Function ?

    Hi, I just started writing SQL. Need your valuable input for the following query, Need to query a table and parse a column to produce a desired output. like suppose my column value is #ADFA /SDFGAS {ABC}: 123 {BCA}: 456 {DEF}: 789 and i need to get a

  • Guest Wireless and URL re-direct failure

    Hi, We have a successful guest wireless service with authentication via a Cisco NAC server.  One MAC user is having difficulty accessing the authentication URL (https://1.1.1.1/login.html) - this is using either Safari, Firefox or Google Chrome brows

  • Ecc 6.0 file system setup in solaries

    Hi,    I want to install ecc 6.0  on solaries system. Can any one provide file system setup before starting the installation. Like /usr/sap this kind of file setup. It will help ful to our installation. Regards, Venkat