Help with toplink queries

Hello,
I really hope that someone has encountered this problem before.
I have a table that is keyed by following three Varchar Keys:
PURPOSE_NAME VARCHAR
GROUP_NAME VARCHAR
IV_TYPE VARCHAR
I have a class that has only three attributes defined, namely:
purposeName
groupName
IVType
I am mapping this class to the table, all columns Direct to Field. I have defined all these three attributes as key fields in the mapping.
I have a toplink query that does the selection of the rows in the table by PURPOSE_NAME.
When I look at the log file, it shows me that a SQL statement was run, which was something like this:
'SELECT GROUP_NAME, IV_TYPE, PURPOSE_NAME FROM IV_TYPE_GRP_MBR WHERE (PURPOSE_NAME = ?)'
It also says binding attribute DRMWKSTN
But there are no rows to be displayed !!!
I changed the query not to have any selection (WHERE clause) and it shows all the data.
I am baffled. I have tried different options. SQL Plus shows me all the data, Toplink Log shows me the right query, but there is no data shown.
Has anyone encountered this issue before?
Thanks for any help.
Regards,
Neeraj

In answer to your question, no I have not encountered this before. However I have a few suggestions:
Add an integer PK field to the table and to the Object. It is good database design to have a primary key. Toplink works best when the PK field is a sequential integer. It will work with other types of PK, but ints are easiest.

Similar Messages

  • Help with these queries

    Hi all,
    I need a help with these queries, because is happening a strange problem when I try to execute it.
    This first query is executed faster than the other one, around 30 minutes faster.
    The queries are the same, but there is a single difference, I switch the hard code value '5.93218%' in a like condition by a variable P_COD_RAIZ || '%', because it can't be hard code.
    SELECT max(oh.ohipp) as mesano_ultfatura
    INTO V_MESANO_FATURA
    FROM sysadm.orderhdr_all@dl_bsc oh,
    customer_all@dl_bsc ca
    WHERE ca.custcode like '5.93218%'
    and ca.customer_id = oh.customer_id
    and oh.ohipp = (select max(yy.ohipp)
    from orderhdr_all@dl_bsc yy
    where yy.customer_id = oh.customer_id
    and oh.ohinvtype = 5);
    SELECT max(oh.ohipp) as mesano_ultfatura
    FROM sysadm.orderhdr_all@dl_bsc oh,
    customer_all@dl_bsc ca
    WHERE ca.custcode like P_COD_RAIZ || '%'
    and ca.customer_id = oh.customer_id
    and oh.ohipp = (select max(yy.ohipp)
    from orderhdr_all@dl_bsc yy
    where yy.customer_id = oh.customer_id
    and oh.ohinvtype = 5);
    What I want to know is, why the execution time of the second query is greater than the first, if the only difference between it is a variable instead of hard code?
    Thanks,
    Murilo.

    I assume column custcode is also varchar2. Then it looks like a problem with bind values and not evenly distributed data.
    When you first run the query with the parameter = '5%' you may get many values and another execution plan as with '5.93218%' on a second run. However the execution plan is saved between the first and second run and not adopted to the new values.
    There are ways out of this "bind" problem. But all have to do with providing us a good execution plan first.
    However you can start by yourself with forcing the use of the index on the column custcode.

  • Please Help With toplink deployment

    Hello
    I have a simple j2ee application that runs great in jdeveloper but bombs when I deploy it to my OAS server.
    JDev Version 10.1.2
    OAS 10.1.2
    Technologies used
    Struts, toplink
    I have 1 table I mapped with toplink, I have a toplink-deployment-descriptor.xml, sessions.xml and a TopLink Mappings.
    I have a struts action called kicker.
    In kicker I do the following:
    <code>
    oracle.toplink.tools.sessionconfiguration.XMLLoader xmlLoader = new oracle.toplink.tools.sessionconfiguration.XMLLoader("META-INF/sessions.xml");
    oracle.toplink.tools.sessionmanagement.SessionManager sessionManager = oracle.toplink.tools.sessionmanagement.SessionManager.getManager();
    DatabaseSession session = (DatabaseSession)sessionManager.getSession(xmlLoader, "default", Thread.currentThread().getContextClassLoader());
    Vector objects = session.readAllObjects(t3.model.NibuSalaryWorksheets.class);
    System.out.println(objects.size());
    request.getSession().setAttribute("results",objects);
    return mapping.findForward("success");
    </code>
    Then in a jsp page I iterate over the results collection and print it out.
    When I try to deploy this it blows up on the server with the following error :
    Local Exception Stack:
    Exception [TOPLINK-6007] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.QueryException
    Exception Description: Missing descriptor for [class t3.model.NibuSalaryWorksheets].
    Query: ReadAllQuery(t3.model.NibuSalaryWorksheets)
    Can someone please help me, I am desparate to use toplink over ejb's but I can't get it to run on the server.
    thanks
    troy

    Seems to be some kind of classloader issue.
    You can check if the session has a descriptor for the class by calling,
    session.getDescriptor(Class.forName("t3.model.NibuSalaryWorksheets"));
    It is most likely that the class is on the classpath twice.
    Instead of loading the sessions.xml with the thread class loader you could try using the classes class loader.
    i.e.
    DatabaseSession session = (DatabaseSession)sessionManager.getSession(xmlLoader, "default", t3.model.NibuSalaryWorksheets.class.getClassLoader());

  • Help with executing queries in code

    First here is the code for the servlet so far, basically, what it does, is connect to a database which is already populated with pageContent from websites. The user goes to a html page which contains a text field for typing in words to search for, selecting any of the words, all, or exact, selecting the number of results to return, once they click submit, they would receive a page showing the number of results or they would receive a page saying no results found if that were the case. I'm not sure how to setup the correct queries based on the logic they use suh as any, all, or exact and how to find out how many rows were returned by the search. I really appreciate the help, thanks alot Here is the code:
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class WelcomeServlet extends HttpServlet {
          public void init()
            try
                Class.forName("com.mysql.jdbc.Driver");
            }catch(ClassNotFoundException cnfe)
              System.out.println("No Driver");
             try
            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/test",
            "root", "");
           }catch(SQLException sqe)
    protected void doGet( HttpServletRequest request,
          HttpServletResponse response )
             throws ServletException, IOException
          String keywords = request.getParameter( "keywords" );
          String logic = request.getParameter("logic");
          String number = request.getParameter("number");
          response.setContentType( "text/html" );
          PrintWriter out = response.getWriter();
          out.println("<html><head><title>Search Engine</title></head>");
          out.println("<body>");
          out.println("</body></html>");
          public void search(String keywords, String logic, String number)
            Statement stmt = null;
            ResultSet rs = null;
            int num = Integer.parseInt(number);
            String[] tokenList = new String[20];
            int i = 0;
            int max = 0;
            StringTokenizer st = new StringTokenizer(keywords);
            while(st.hasMoreTokens())
              tokenList[i++] = st.nextToken();
              max = i;
            if(logic.equalsIgnoreCase("any"))
            else
                if(logic.equalsIgnoreCase("all"))
                else
                    if(logic.equalsIgnoreCase("exact"))
          }

    I know this is a VERY old topic i'm replying to, but i'm new and couldn't figure out how to contact you directly, and i felt that this wassn't important enough to create a new topic..
    okay duffymo.... would you consider this a search for Lucene or SQL.
    database contains breif description of company's services (max 200 characters), price...name...etc.
    Users can search the database by a form field; the servlet searches the name of hte company as well as the description of the company, and returns all results (10 results per page).
    I think i kinda answered my own question... i think SQL is adequate, but your comment as well as others would be welcome.

  • Help with SQL queries following migration

    Hi there,
    I have just migrated from MS SQL Server database to Oracle 10g database using the Oracle SQL Developer.
    My application is using JDBC to access the database, and there are heaps of SQL statements that need to be verified and tested. I've found a number of SQL compatibility issues from my testing of the Oracle database and I hope you can help me the following.
    1. Case sensitivity
    Is it possible to not enforce case sensitivity (by default) when performing a select query?
    If this is not possible, all the SQL statements will need to be changed to evaluate column based on uppercase.
    2. Trailing white space
    Is it possible to not evaluate trailing white space (by default) when performing a select query?
    For example, suppose a table column studentNo has trailing spaces (after database migration), e.g. 'A182D '
    when performing query - select * from student where studentNo = 'A182D'
    no results can be found
    3. Issue with Where condition containing with '' = ''
    There are quite a number of SQL statements with Where condition containing '' = ''.
    For example, the following SQL query doesn't return any results even though there are matching suburb that starts with 'ST'. These types of queries are mostly used in dynamic generated queries.
    select * from Address where (suburb like 'ST%') and ('' = '' or country = '')
    Any help or advice will be greatly appreciated.
    Regards,
    Jason Gordon

    As justin mentioned setting those NLS parameters will make oracle not to use your regular index. for that you must create a function based index. See example below.
    SQL> create index t_idx on t (name)
      2  /
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user,'T',cascade=>true)
    PL/SQL procedure successfully completed.
    SQL> explain plan for
      2  select * from t where name = 'karthick'
      3  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 2946670127
    | Id  | Operation        | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |       |     1 |     9 |     1   (0)| 00:00:01 |
    |*  1 |  INDEX RANGE SCAN| T_IDX |     1 |     9 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - access("NAME"='karthick')
    13 rows selected.
    SQL> delete from plan_table
      2  /
    2 rows deleted.
    SQL> alter session set NLS_COMP=ANSI;
    Session altered.
    SQL> alter session set NLS_SORT=BINARY_CI;
    Session altered.
    SQL> explain plan for
      2  select * from t where name = 'karthick'
      3  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |     9 |     5   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |     9 |     5   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(NLSSORT("NAME",'nls_sort=''BINARY_CI''')=HEXTORAW('6B61727
                  46869636B00') )
    14 rows selected.
    SQL> create index t_idx_1 on t(NLSSORT(name,'NLS_SORT=BINARY_CI'))
      2  /
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user,'T',cascade=>true)
    PL/SQL procedure successfully completed.
    SQL> /
    create index t_idx_1 on t(NLSSORT(name,'NLS_SORT=BINARY_CI'))
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    SQL> delete from plan_table
      2  /
    2 rows deleted.
    SQL> explain plan for
      2  select * from t where name = 'karthick'
      3  /
    Explained.
    SQL> select * from table(dbms_xplan.display)
      2  /
    PLAN_TABLE_OUTPUT
    Plan hash value: 2580036035
    | Id  | Operation                   | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |         |     3 |    27 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T       |     3 |    27 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | T_IDX_1 |     3 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access(NLSSORT("NAME",'nls_sort=''BINARY_CI''')=HEXTORAW('6B6172746869636B00') )Thanks,
    Karthick.

  • Please Help With TopLink and JNDI datasource

    Hello
    I have been trying to figure this out for a while now and I am stuck. I have a simple J2EE project that uses toplink to access 1 table with 2 coulumns (JDev 10.1.3).
    I setup a sessions.xml and in there set my data Source Location to be my JNDI datasource.
    In my tlMap1 file I am required to put a Deployment Connection and no matter what I do it uses that connection. Is there some way I can make it use the JNDI connection that I specified in sessions.xml instead?
    i turned on debugging and it gives the following:
    [TopLink Config]: 2006.06.02 10:21:06.140--ServerSession(1216)--Connection(1242)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--connecting(DatabaseLogin(
         platform=>Oracle10Platform
         user name=> "access_tst_d"
         connector=>JNDIConnector datasource name=>jdbc/accessEJB
    [TopLink Config]: 2006.06.02 10:21:06.328--ServerSession(1216)--Connection(1244)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--Connected: jdbc:oracle:thin:@access-web-test.admin.uni.edu:1525:WEBT
         User: ACCESS_TST_D
         Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning and Data Mining options
         Driver: Oracle JDBC driver Version: 10.1.0.5.0
    [TopLink Info]: 2006.06.02 10:21:06.343--ServerSession(1216)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--default login successful
    [TopLink Finer]: 2006.06.02 10:21:06.343--ServerSession(1216)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--client acquired
    [TopLink Finest]: 2006.06.02 10:21:06.343--ClientSession(1246)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--Execute query ReadAllQuery(pl.model.PlLoginPrefixes)
    [TopLink Fine]: 2006.06.02 10:21:06.375--ServerSession(1216)--Connection(1229)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--SELECT LOGIN_PREFIX_ID, PREFIX FROM PL_LOGIN_PREFIXES
    [TopLink Finer]: 2006.06.02 10:21:06.953--ClientSession(1246)--Thread(Thread[RMICallHandler-0,5,RequestThreadGroup])--client released
    It looks like it sees the JNDI connection but it uses the "user name" parameter from tlMap1 instead. I am really getting desparate and any help would be greatly appreciated.
    Thanks
    troy

    Sorry to be such a pest about this but I have a bit more info now. If I go in to my tlMap file and select <none selected> for my deployment connection, the compiler gives me warnings and the mapping status report gives an error but it uses the jndi source from session.xml.
    Does anyone know of a way to do this (use the jndi datasource) without these compiler warnings? I just have this feeling I am doing something wrong, something that should be simple but nevertheless is turning out to be nearly impossible for me to figure out.
    thanks
    troy

  • Need help with report quering store procedure

    I posted earlier today with my code, but I thought I should start a new thread and explain my scenario properly. Sorry for that.
    have to find if a person visited a particular type of store, lets say pets mart in last six months. Every time a member of us go to store, the transction is saved into a database, which means that there are 100s of records for each member. I have few condition to apply (like flags). For example, if a member visited pets mart in last 6 months, we can send him cuopan for that store.
    In my last code, I was using count(*) which takes for ever as everytime function is been called, it checks everything and then return more then one row. And my scenario requires only a flag kind of stuff, like either that member visited a particular store or not.
    I am not sure what approach would be the best and optimised, obviously not the count one. I tried the case statment and it also returns more then one record (for each visit of the member) and I am looking for something like if it occured then Y else N.
    My old code was something like that
    function fnc (memberno, startdate, endate) return number as abc number;
    begin
    select count(*) into abc
    from table a, table b
    where a.zz = b.cc
    and a.shop_date between startdate and endate)
    and a.store_shoped in ('st01' , 'sto02' , 'sto3')
    and a.store_location in ('loc1' , 'loc2');
    return (abc);
    end fnc;
    I really appreciate if you can suggest me a better way to handle my situation.
    Could someome please help me?

    Something involving WHERE EXISTS or add a ROWNUM = 1 filter:
    function fnc (p_memberno in number, p_startdate in date, p_enddate in date)
      return number
    as
      abc number;
    begin
      select count(*)
        into abc
        from dual
       where exists (select null
                       from table a, table b
                      where a.zz = b.cc
                        and ?? = p_memberno
                        and a.shop_date between p_startdate and p_enddate
                        and a.store_shoped in ('st01' , 'sto02' , 'sto3')
                        and a.store_location in ('loc1' , 'loc2'));
      return (abc);
    end fnc;With either approach, the count will return only 0 or 1 and will stop at the first match it finds.

  • I need help with my queries of my inventory system

    I want tosubtractthe number of entrieswiththe number of outputsof my products,but I have aproblem...the result isnot correct,when
    I dothe subtractionto getthe current amount ofmy products.
    also I have several inputs and outputs of the same
    product.
    please I need your help
    select e.codpro,(sum(e.cantidad)) as productentry from entradapro e
    group by e.codpro
    select s.codpro,(sum(s.cantidad)) as productoutput from salidapro s
    group by s.codpro
    select e.codpro,(sum(e.cantidad)- sum(s.cantidad))as total from entradapro e inner join salidapro s
    on e.codpro = s.codpro
    group by e.codpro
                  

    Try this please:
    ;WITH A1 as
    SELECT e.codpro ,
    ( SUM(e.cantidad) ) AS productentry
    FROM entradapro e
    GROUP BY e.codpro
    ), A2 AS
    SELECT s.codpro ,
    ( SUM(s.cantidad) ) AS productoutput
    FROM salidapro s
    GROUP BY s.codpro
    SELECT e.codpro ,
    e.productentry - s.productoutput AS total
    FROM A1 e
    JOIN A2 s ON e.codpro = s.codpro
    sqldevelop.wordpress.com

  • Need help with REX queries

    Can anyone help explain behavior in the OER Extensibility Framework/REX openapi that I am seeing. I may have misunderstood the documentation and I admit I'm looking at the 11g version of the api online and using it against 10.3
    Anyway I'm trying to figure out how to query for only assets that are Registered on keywords, dates, and additional criteria.
    I know it is possible because I can see the actual UI of the product does this but I'm having different behavior.
    So from the api it led me to believe that if off of the AssetCriteria class I called setBrowsableOnly("true") it would only bring back browsable/registered assets (unless in progress flag is set). That was not filtering non-registered assets.
    So I then attempted to set up a SearchTerm where I tried both the key of the SearchTerm to be both registered as well as assetstatus, on registered key I set the value to REGISTERED and on the assetstatus I set the value to 100.
    But in all instances it is still bringing back more than registered assets.
    There are other criteria I want to set as well but I'm missing some sort of basic here.
    So example code is:
                   //Create Criteria
                   AssetCriteria criteria = new AssetCriteria();
                   //By default search browsable only assets
                   criteria.setBrowsableOnlyCriteria("true");
                   //By default do not do exact match search
                   //criteria.setExactMatchCriteria("false");
                   //Do general criteria search on provided keyword
                   criteria.setGeneralCriteria(keyword);
                   //Create SearchTerm to help get only registered assets
                   SearchTerm[] searchTermArray = new SearchTerm[1];
                   //TODO: Need to figure out what search term is needed if any for only registered
                   SearchTerm term = new SearchTerm();
                   term.setKey("/assetstatus");
                   term.setValue("100");
                   searchTermArray[0] = term;
                   criteria.setSearchTerms(searchTermArray);
                   //TODO: probably will need to remove the following code as final gets closer
                   //For testing purposes pull count right now
                   int count = repository.assetQueryCount(authToken, criteria);
                   logger.debug("Count is; " + count);
                   //Due to memory requirements pull back summary for now
                   //TODO: Figure out best approach for number of assets we will be pulling back
                   //assets = repository.assetQuery(authToken, criteria);
                   assetSummary = repository.assetQuerySummary(authToken, criteria);
    I have looked at OER103-REX_Asset.pdf so unless it is clearly spelled out in there and I keep missing it, I already know it exists. Maybe I do keep missing it in there.
    So likewise I need to understand how to query for assets that are active, retired, etc...which appears to be in the status field. But again I haven't gotten the SearchTerms to work correctly.
    Thanks,
    Diane
    Edited by: user10818227 on Jul 30, 2010 12:46 PM

    Add a class of 'hide' to the Site Links <article> tag as below:
    <article class="column hide">
    <h4>Site Links</h4>
    You already have a class of 'rightlist' for the Interested in Exclusive Articles? <article> tag so we'll use that.
    <article class="column rightlist">
    <h4 class="style4">Interested in Exclusive Articles?</h4>
    Add this media query to your css styles:
    <style>
    @media screen and (max-width: 500px) {
    .hide, .rightlist {
    display: none;
    </style>

  • Need help with media queries

    Ok most of my attempts have been successful. BUT I have one problem.
    I would like Column 1 (Site Links and Column 3 (Exclusive Articles) to Hide when the page is at max-width 500 pixels. I have no idea how to make a CSS sheet remove HTML coding, which is why I came here to ask. Important Note: Coding to remove are highlighted in Red.
    Html Coding of Footer:
    <footer>
          <h2 class="hidden">Our footer</h2>
          <section id="copyright">
            <h3 class="hidden">Copyright notice</h3>
            <div class="wrapper">
              <div class="social"> <a href="index.html"><img src="img/G.png" alt="G" width="25"/></a> <a href="index.html"><img src="img/U.png" alt="U" width="25"/></a> <a href="index.html"><img src="img/I.png" alt="I" width="25"/></a> <a href="index.html"><img src="img/D.png" alt="D" width="25"/></a> <a href="index.html"><img src="img/E.png" alt="E" width="25"/></a> <a href="index.html"><img src="img/S.png" alt="S" width="25"/></a> </div>
              &copy; Copyright 2014 by Expertpcguides.com. All Rights Reserved. </div>
          </section>
          <section class="wrapper">
            <h3 class="hidden">Footer content</h3>
            <article class="column">
              <h4>Site Links</h4>
                <div id="class2">
                  <p><a href="web-contributors.html" class="style10">Developers/Contributors</a></p>
                </div>
                <div id="class2">
                  <p><a href="create-a-page.html" class="style10">Create a page</a></p>
              </div>
              <div id="class2">
                <p><a href="point-system.html" class="style10">Rewards System</a></p>
              </div>
              <div id="class2">
                <p><a href="privacy" class="style10">Privacy</a></p>
              </div>
            </article>
            <article class="column midlist2">
              <h4 class="style4">Follow Us</h4>
              <ul class="style4">
    <li>
      <div id="class2">
                  <p><a href="javascript:void(0)"><img src="img/Facebook logo.png" alt="Twitter Image" width="30" height="33"/></a><a href="https://www.facebook.com/expertpcguides" class="style18"> Facebook</a></p>
    </div></li>
    <li class="style10">
      <div id="class2">
                  <p><a href="javascript:void(0)"><img src="img/Twitter Logo.jpg" alt="Twitter Image" width="30" height="33"/></a><a href="https://twitter.com/ExpertPcGuides" class="style18"> Twitter</a></p>
              </div>
    </li>
    <li class="style10">
      <div id="class3">
        <p><a href="javascript:void(0)"><img src="img/Google+ Logo.jpg" alt="Google + Image" width="30" height="33"/></a><a href="https://plus.google.com/115474035983654843441" class="style18"> Google Plus</a></p>
      </div>
    </li>
    <li class="style10">
      <div id="class4">
        <p><a href="javascript:void(0)"><img src="img/Pininterest Logo.png" alt="Google + Image" width="30" height="32"/></a><a href="http://www.pinterest.com/expertpcguides/" class="style18"> Pininterest</a></p>
      </div>
    </li>
              </ul>
            </article>
            <article class="column rightlist">
              <h4 class="style4">Interested in Exclusive Articles?</h4>
                <div id="class2">
                  <p><a href="login.html" class="style10">All you need to do is login/register</a></p>
                </div>
            </article>
          </section>
    <section class="wrapper"></section>
            </footer>
    CSS Stylesheet Snapshot of the coding:
    @media (max-width: 500px)
        #four_columns
                    width: 500px;
      display:none;

    Add a class of 'hide' to the Site Links <article> tag as below:
    <article class="column hide">
    <h4>Site Links</h4>
    You already have a class of 'rightlist' for the Interested in Exclusive Articles? <article> tag so we'll use that.
    <article class="column rightlist">
    <h4 class="style4">Interested in Exclusive Articles?</h4>
    Add this media query to your css styles:
    <style>
    @media screen and (max-width: 500px) {
    .hide, .rightlist {
    display: none;
    </style>

  • Help with: oracle.toplink.essentials.exceptions.ValidationException

    hi guys,
    I really need ur help with this.
    I have a remote session bean that retrieves a list of books from the database using entity class and I call the session bean from a web service. The problem is that when i display the books in a jsp directly from the session bean everything works ok but the problem comes when I call the session bean via the web service than it throws this:
    Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session. This often occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after serialization. To avoid this issue, instantiate the LAZY relationship prior to serialization.
    at oracle.toplink.essentials.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:887)
    at oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:233)
    at oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:105)
    at oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:208)
    at oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:330)
    at oracle.toplink.essentials.indirection.IndirectList$1.<init>(IndirectList.java:425)
    at oracle.toplink.essentials.indirection.IndirectList.iterator(IndirectList.java:424)
    at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:278)
    at com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.iterator(Lister.java:265)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:129)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:277)
    at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:100)
    at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)
    at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:315)
    at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
    ... 29 more
    This happens when I test the web service using netbeans 6.5.
    here's my code:
    session bean:
    ArrayList bookList = null;
    public ArrayList retrieveBooks()
    try
    List list = em.createNamedQuery("Book.findAll").getResultList();
    bookList = new ArrayList(list);
    catch (Exception e)
    e.getCause();
    return bookList;
    web service:
    @WebMethod(operationName = "retrieveBooks")
    public Book[] retrieveBooks()
    ArrayList list = ejbUB.retrieveBooks();
    int size = list.size();
    Book[] bookList = new Book[size];
    Iterator it = list.iterator();
    int i = 0;
    while (it.hasNext())
    Book book = (Book) it.next();
    bookList[i] = book;
    i++;
    return bookList;
    Please help guys, it's very urgent

    Yes i have a relationship but i didnt want it to be directly. Maybe this is a design problem but in my case I dont expect any criminals to be involved in lawsuit. My tables are like that:
    CREATE TABLE IF NOT EXISTS Criminal(
         criminal_id INTEGER NOT NULL AUTO_INCREMENT,
         gender varchar(1),
         name varchar(25) NOT NULL,
         last_address varchar(100),
         birth_date date,
         hair_color varchar(10),
         eye_color varchar(10),
         weight INTEGER,
         height INTEGER,
         PRIMARY KEY (criminal_id)
    ENGINE=INNODB;
    CREATE TABLE IF NOT EXISTS Lawsuit(
         lawsuit_id INTEGER NOT NULL AUTO_INCREMENT,
         courtName varchar(25),
         PRIMARY KEY (lawsuit_id),
         FOREIGN KEY (courtName) REFERENCES Court_of_Law(courtName) ON DELETE NO ACTION
    ENGINE=INNODB;
    CREATE TABLE IF NOT EXISTS Rstands_trial(
         criminal_id INTEGER,
         lawsuit_id INTEGER,
         PRIMARY KEY (criminal_id, lawsuit_id),
         FOREIGN KEY (criminal_id) REFERENCES Criminal(criminal_id) ON DELETE NO ACTION,
         FOREIGN KEY (lawsuit_id) REFERENCES Lawsuit(lawsuit_id) ON DELETE CASCADE
    ENGINE=INNODB;So I couldnt get it.

  • Problems with toplink in a ROLAP application - please , I need help

    Hello,
    I am not too much experieced with toplink but I want use it for building a ROLAP (relational OLAP) client (something like Discoverer Plus) . Because of an database bug , Oracle Warehouse Builder can not generate materialized views creation scripts that help in agregation . This bug wiil be eliminated in 11gR2 database . OWB generate these materialized views creation scripts in a clob column of database but these scripts is not valid. These scripts can be extracts from database , corect and run .
    This ROLAP-enabled schema is a star schema (a fact table in center sourounded by dimensions tables , with FK in these tables) generated by OWB . It does not have a PK associated with fact table.
    Because of this fact , when I try to generate a status report of map associttiaded with tables from schema , I receive this
         Descriptor SalesCube -> No primary keys specified in SSB.SALES_CUBE table.
    Discoverer Plus does not complain about this PK missing, but it knows fact tables does not have PK .
    Please give an ideea,
    TIA.
    Aurel

    I am using jdeveloper 10.1.3.1 and I get the following error :
    Exception [TOPLINK-6044] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException Exception Description: The primary key read from the row [DatabaseRecord( ORG_DIM_V.FARMACIE_NUME_FARMACIE => Titan 1 => 357142.3)] during the execution of the query was detected to be null. Primary keys must not contain null. Query: ReadAllQuery(app5.model.OrgDimV); nested exception is: Exception [TOPLINK-6044] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException Exception Description: The primary key read from the row [DatabaseRecord( ORG_DIM_V.FARMACIE_NUME_FARMACIE => Titan 1 => 357142.3)] during the execution of the query was detected to be null. Primary keys must not contain null. Query: ReadAllQuery(app5.model.OrgDimV)
    and ,of course, I have a primary key , but on the column ORG_DIM_V.DIMENSION_KEY .
    ORG_DIM_V is o view on the table ORG_DIM and I build PK with this two statements:
    ALTER VIEW SSB.ORG_DIM_V ADD CONSTRAINT org_dim_v_pk PRIMARY KEY (DIMENSION_KEY) disable novalidate
    ALTER VIEW SSB.ORG_DIM_V MODIFY CONSTRAINT org_dim_v_pk RELY
    What's happining?
    Many thanks,
    Aurel

  • Help with useing toplink please..

    Hello
    I am writing J2EE apps that will run on a 10g app server. I thought that toplink was what I should be using to do my model layer. But there are several simple things I can't find out how to do. Things like make a LOV, how do I set a where clause and restrict what the end user is looking at?
    Should I be using the ADF stuff instead? I was under the impression TopLink was the future direction at oracle so thats why I picked it. I have worked all the toplink tutorials I found. I can create mappings and all that. Setting it up isn't the problem, using it once I have it set up thats what I need to figure out. Can anyone point me in the direction of some tutorials or examples on how to use toplink? (especially in j2ee apps).
    Thanks
    troy

    Troy,
    TopLink is a core piece of Oracle's enterprise Java strategy. We are dedicated to standardization of ORM persistence through EJB 3.0 and TopLink is our implementation and the basis of Sun's reference implementation. Additionally, the use of TopLink is not mutually exclusive to using ADF. Within ADF you can use a variety of persistence technologies including TopLink.
    Here is a sample workshop on building applications with TopLink in ADF: http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm
    In order to filter or restrict results coming back from the database you need to make use of queries. TopLink has 5 query options available:
    1. TopLink's Expression API
    2. EJB QL
    3. Custom SQL
    4. Stored Procedures
    5. Query By Example
    Quick Tour overview: http://www.oracle.com/technology/products/ias/toplink/quicktour904/que01_01.htm
    You can develop your queries directly in the API of your application or you can use the mapping editors (JDeveloper or Workbench) to declaratively construct your queries. I would recommend using the mapping editors and the expression framework. This will allow the tools to assist you as your application evolves. When mappings change you will be notified if they break any of your defined queries.
    In the 10.1.3 documentation you can start learning about queries at:
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/DP4/_html/persun005.htm#sthref5432
    Cheers,
    Doug

  • Help with queries about boot camp and partition, please.

    Hi, I am hoping to partition my HDD. I have done this before, when I first got my macbook but got rid of it, and now I can't fully remember the do's and don'ts' of boot camp. I just need a few questions answered before I take any action.
    1. I have a 120GB HDD with about 15GB free space. If I partition the drive will I lose any data on my existing HDD?
    2. What is the minimal amount of space I can partition the drive and install Windows?
    (I have a copy of Windows XP SP2, and really only need to install it for the use of one program that isn't available on the Apple operating systems.)
    3. I tried using Parallels in which Windows took up about 6GB, will it be about the same again? I uninstalled it because I found it to lag a bit.
    If you can help with any of these queries I would really appreciate it, thanks!

    Maybe you should first get a larger drive; you don't have much more than the minimum 10% free space that Mac OS needs.
    Retry with Sun's VirtualBox. Maybe you just need more memory.
    Lose data? Step #1: backup.
    You may need to backup and erase your hard drive and then restore.
    I'd invest in 300GB drive though.

  • I am Learning Sql + ...Please help me with my queries ..Thanx in Advance

    1. what is the meaning of 'MGR" in EMP table ?
    2.DISPLAY EMPNO,ENAME,SAL,ANNUAL SAL, ROUND TO NEAREST 100, EXPERIANCE WITH 3 DECIMAL PLACES,
    DNAME,LOCATION OF EMPLOYEE IN THE SORDED ORDER OF LOCATION?
    PLEASE HELP WITH ABOVE TWO ...
    HAVE A GREAT DAY...
    RAVI

    856530 wrote:
    Hi Aman thanks for your kind reply, i will make sure no more upper case anymore...
    display empno,ename,sal,annual sal, round to nearest 100, experiance with 3 decimal places,
    dname,location of employee in the sorded order of location?
    In the above query only i need to know how to round to nearest 100 rest of the query i was aware of it.
    thanks
    RaviAll the functions (including ROUND) are documented in the fine SQL Reference manual. See
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions135.htm#i78633

Maybe you are looking for

  • How do you bring a mp3 into garageband ?

    im trying to bring in beats and other mp3 clips into garageband from my itunes but the dragging and dropping does not work. how do you do it !!?? please help  /FYI: im using a 15inch mac book pro OSX 10.8.2

  • Media Sniffer: updating file pathnames in CMS

    I created some playlists in Creative MediaSource Organizer (versions 3 and 5). At the time, the mp3s were all in a temp folder called "temp" (on my C drive). Now they are scattered about in other folders (on my external F drive). So when I now try to

  • Stuck on HP logo with spinning circle under it

    When I turn on my HP Pavillion-15 laptop there is a HP logo on the screen with a circle spinning around and does not seem to go through that process. I don't know what happened but before the process there was a thing that said battery alert. Please

  • HT1848 how to download iTunes on my nexsus 7 tablet?

    How to download iTunes on my nexsus7 tablet?

  • Black bar problems

    I've searched all for for an answer to this question... and can't find one. In Final Cut, the black canvas behind the video of one of my movies has decided to expand into a letterbox. How to I get it back to the original size of the video so there's