Hi James,

any relevant information you can provide on using JPA with Phoenix for persistence (i.e. how to use eclipselink or equivalent )

thanks.


On 2/10/2014 6:44 PM, James Taylor wrote:
Please include your DDL statement and Phoenix and HBase client and server version. Even better, if you can put together at end-to-end test case, that's the best way to get to the bottom of the issue quickly.
Thanks!
James

Thanks,

On Monday, February 10, 2014, Li Li <[email protected] <mailto:[email protected]>> wrote:

    what's wrong with it?
    exception stack:
    com.salesforce.phoenix.exception.PhoenixIOException: end index (1)
    must not be less than start index (7)
            at
    
com.salesforce.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:107)
            at
    
com.salesforce.phoenix.iterate.ParallelIterators.getIterators(ParallelIterators.java:217)
            at
    
com.salesforce.phoenix.iterate.MergeSortResultIterator.getIterators(MergeSortResultIterator.java:58)
            at
    
com.salesforce.phoenix.iterate.MergeSortResultIterator.minIterator(MergeSortResultIterator.java:73)
            at
    
com.salesforce.phoenix.iterate.MergeSortResultIterator.next(MergeSortResultIterator.java:100)
            at
    com.salesforce.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:741)

    my code:
    public static String getHtml(PhoenixConnection conn,String url) throws
    SQLException, MalformedURLException{
    PreparedStatement pstmt=null;
    ResultSet rs=null;
    try{
    String host=getReversedHostFromUrl(url);
    pstmt=conn.prepareStatement("SELECT html FROM vc.webpage where host=?
    and url=?");
    pstmt.setString(1, host);
    pstmt.setString(2, url);
    rs=pstmt.executeQuery();
    if(rs.next()) return rs.getString(1);
    else return null;
    }finally{
    DbTools.closeAll(null, pstmt, rs);
    }
    }


--
Ahmed Osama Ibrahim
ITS International Technology Services Corporation
Maryland, USA

Reply via email to