PDEContentGetAttrs returns zero attributes

Hi,
I'm currently in the process of adjusting a plugin written with Acrobat SDK 8.0 to Acrobat SDK 10.0 (X).
All goes well but I'm stuck on something very annoying...
In order for the plugin to parse the contents of the current page there is the following code:
PDEContent pdeContent= PDPageAcquirePDEContent(page, gExtensionID); //Gets the content of the page
parsePageObjects(pdeContent); //Parse the content of the page - this caches some objects in-memory for later use (this function is recursive).
PDPageReleasePDEContent(page, gExtensionID); //Releases the aquired contents of the page, no need for it anymore after parsing the contents
First question:
1) I did not find any reference to the API calls: PDPageAcquirePDEContent & PDPageReleasePDEContent. Although they are documented in the Acrobat 9.0 SDK manuals, I did not find anything mentioning these calls in the X SDK. They seem to be working (no errors, no crashes etc.). Are these function calls still relevant in SDK X? If not - maybe the next described issue is a side effect of these "old" (?) calls.
In the parsePageObjects method the content stream of the page is being parsed. All goes well, but for some reason when the current PDEElement is a form (/Type /XObject /Subtype /Form), after extracting the form's content's stream, the call to PDEContentGetAttrs populates the attrs structure with ZEROs.
For example:
void parsePageObjects(const PDEContent& pdeContent) //Receives the page contents
     int numElems = PDEContentGetNumElems(pdeContent); //Get number of elements in the contents
     for (int j=0; j < numElems; j++)
      PDEElement pdeElement = PDEContentGetElem(pdeContent, j); // get the current element
      PDEType type=(PDEType)PDEObjectGetType((PDEObject) pdeElement); //Get the element type
      switch(type)
       case kPDEForm: //In case the element is a Form XObject
          PDEContent fc=PDEFormGetContent((PDEForm)pdeElement); //Get the Form's content
          PDEContentAttrs attrs; //Declare an Attrs struct to be filled by the next call to GetAttrs
          PDEContentGetAttrs(fc,&attrs,sizeof(PDEContentAttrs)); //Fills the attrs structure with the data
After the last API call (PDEContentGetAttrs), the attrs structure is filled with ZEROs (like after memset(&attrs, 0, sizeof(attrs))). Even the forms matrix is all ZERO's.
For example: this is the dictionary (without the content stream) of a Form XObject which it's attrs are returned as ZERO, although the matrix & bbox are non zero:
20 0 obj
<<
    /Type /XObject
    /BBox   [ 0.000000 110.880000 252.000000 252.000000]
    /Filter   [/FlateDecode]
    /FormType 1
    /Length 5682
    /Matrix[ 1 0 0 1 -0.000000 -110.880000]
    /Name /Frm2
    /Resources 19 0 R
    /Subtype   /Form
>>
stream
endstream
endobj
Other questions:
1) Why does the attrs return filled with zeros although the object is 100% valid?
2) Why is this working perfectlly on Acrobat SDK 8.0 only (when compiling with Acrobat 9.0 SDK - the behaviour is not consistent. The attrs can retun as a valid value or zeros)?
3) How can I make it wok with Acrobat X SDK?
Thanks,
Omri

For this level of support, you REALLY need to open a formal support case
with our Developer Support staff.

Similar Messages

  • TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the Vhd capacity is 20 gb in size, vmm 2012 r2

    Hi All,
    TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the template has Vhd capacity is 20 gb in size, vmm 2012 r2. I can create VM using this template too.
    For other templates it is returning correct value though.
    Can anyone help us understanding the root cause and the solution too.
    Thanks in advance.
    Debabrata

    I booted this drive from another computer (Asrock M3A770DE mobo) and works fine, speed with dd was ~100MB/s
    I also update bios on my first computer with Intel D945GSEJT (there is selected AHCI mode) still the same transfers with dd (~10Mb/s)
    I have no idea what to do with it now
    EDIT:
    More tests with other hdd (Samsung HD502IJ), dd on mounted NTFS partition:
    Intel D945GSEJT booted from Archlinux iso:
    hdparm: ~75 MB/s
    dd: ~10 MB/s
    Intel D945GSEJT booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~60 MB/s
    dd: ~10 MB/s
    Asrock M3A770DE booted from Archlinux iso:
    hdparm: ~87 MB/s
    dd: ~76 MB/s
    Asrock M3A770DE booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~81MB/s
    dd: ~76 MB/s
    What is broken on D945GSEJT?
    Last edited by miskoala (2012-03-30 13:47:23)

  • Bug Report: ResultSet.isLast() returns false when queries return zero rows

    When calling the method isLast() on a resultset that contains zero (0) rows, false is returned. If a resultset contains no rows, isLast() should return true because returning false would indicate that there are more rows to be retrieved.
    Try the following Java source:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    public class Test2 {
    public static void main (String [] args) throws Exception {
    Connection conn = null;
    String jdbcURL = "jdbc:oracle:thin:@" +
    "(DESCRIPTION=(ADDRESS=(HOST=<host computer>)"+
    "(PROTOCOL=tcp)(PORT=<DB port number>))"+
    "(CONNECT_DATA=(SID=<Oracle DB instance>)))";
    String userId = "userid";
    String password = "password";
    try{
    // Load the Oracle JDBC Driver and register it.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // *** The following statement creates a database connection object
    // using the DriverManager.getConnection method. The first parameter is
    // the database URL which is constructed based on the connection parameters
    // specified in ConnectionParams.java.
    // The URL syntax is as follows:
    // "jdbc:oracle:<driver>:@<db connection string>"
    // <driver>, can be 'thin' or 'oci8'
    // <db connect string>, is a Net8 name-value, denoting the TNSNAMES entry
    conn = DriverManager.getConnection(jdbcURL, userId, password);
    } catch(SQLException ex){ //Trap SQL errors
    // catch error
    //conn = new OracleDriver().defaultConnection(); // Connect to Oracle 8i (8.1.7), use Oracle thin client.
    PreparedStatement ps = conn.prepareStatement("select 'a' from dual where ? = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // Use any query that will return zero rows.
    ps.setInt(1, 1); // Set the params so that the query returns 0 rows.
    ps.setInt(2, 2);
    ResultSet rs = ps.executeQuery();
    System.out.println("1. Last here? " + rs.isLast());
    while (rs.next()) {
    // do whatever
    System.out.println("2. Last here? " + rs.isLast());
    ps.close();
    rs.close();
    EXPECTED RESULT -
    1. Last here? true
    2. Last here? true
    ACTUAL RESULT -
    1. Last here? false
    2. Last here? false
    This happens to me on Oracle 9.2.0.1.0.

    387561,
    For your information, I discovered this problem from
    running a query that did access an actual DB table.
    Try it and let me know.I did say I was only guessing, and yes, I did try it (after I posted my reply, and before I read yours). And I did check the query plan for the queries I tried -- to verify that they were actually doing some database "gets".
    In any case, the usual way that I determine whether a "ResultSet" is empty is when the very first invocation of method "next()" returns 'false'. Is that not sufficient for you?
    Good Luck,
    Avi.

  • Global Temp Table, always return  zero records

    I call the procedure which uses glbal temp Table, after executing the Proc which populates the Global temp table, i then run select query retrieve the result, but it alway return zero record. I am using transaction in order to avoid deletion of records in global temp table.
    whereas if i do the same thing in SQL navigator, it works
    Cn.ConnectionString = Constr
    Cn.Open()
    If FGC Is Nothing Then
    Multiple = True
    'Search by desc
    'packaging.pkg_msds.processavfg(null, ActiveInActive, BrandCode, Desc, Itemtype)
    SQL = "BEGIN packaging.pkg_msds.processavfg(null,'" & _
    ActiveInActive & "','" & _
    BrandCode & "','" & _
    Desc & "','" & _
    Itemtype & "'); end;"
    'Here it will return multiple FGC
    'need to combine them
    Else
    'search by FGC
    SQL = "BEGIN packaging.pkg_msds.processavfg('" & FGC & "','" & _
    ActiveInActive & "','" & _
    BrandCode & "',null,null); end;"
    'will alway return one FGC
    End If
    ' SQL = " DECLARE BEGIN rguo.pkg_msds.processAvedaFG('" & FGC & "'); end;"
    Stepp = 1
    Cmd.Connection = Cn
    Cmd.CommandType = Data.CommandType.Text
    Cmd.CommandText = SQL
    Dim Trans As System.Data.OracleClient.OracleTransaction
    Trans = Cn.BeginTransaction()
    Cmd.Transaction = Trans
    Dim Cnt As Integer
    Cnt = Cmd.ExecuteNonQuery
    'SQL = "SELECT rguo.pkg_msds.getPDSFGMass FROM dual"
    SQL = "select * from packaging.aveda_mass_XML"
    Cmd.CommandType = Data.CommandType.Text
    Cmd.CommandText = SQL
    Adp.SelectCommand = Cmd
    Stepp = 2
    Adp.Fill(Ds)
    If Ds.Tables(0).Rows.Count = 0 Then
    blError = True
    BlComposeXml = True
    Throw New Exception("No Record found for FGC(Finished Good Code=)" & FGC)
    End If
    'First Row, First Column contains Data as XML
    Stepp = 0
    Trans.Commit()

    Hi,
    This forum is for Oracle's Data Provider and you're using Microsoft's, but I was curious so I went ahead and tried it. It works fine for me. Here's the complete code I used, could you point out what are you doing differently?
    Cheers,
    Greg
    create global temporary table abc_tab(col1 varchar2(10));
    create or replace procedure ins_abc_tab(v1 varchar2) as
    begin
    insert into abc_tab values(v1);
    end;
    using System;
    using System.Data;
    using System.Data.OracleClient;
    class Program
        static void Main(string[] args)
            OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger");
            con.Open();
            OracleTransaction txn = con.BeginTransaction();
            OracleCommand cmd = new OracleCommand("begin ins_abc_tab('foo');end;", con);
            cmd.Transaction = txn;
            cmd.ExecuteNonQuery();
            cmd.CommandText = "select * from abc_tab";
            OracleDataAdapter da = new OracleDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            Console.WriteLine("rows found: {0}", ds.Tables[0].Rows.Count);
            // commit, cleanup, etc ommitted for clarity
    }

  • Query returns zero records in coldfusion context, but works fine in Navicat

    I've got a query that's returning zero records when I load a page.  If I copy and paste that same query (from the debug output) into navicat, I get rows returned (as I expect).  Has anyone seen this?  It happens locally (CF9) AND remotely on our staging server (CF10).  Even weirder, it's a query that was previously working fine - I simply added an if statement to the where clause, and all of a sudden... 
    Here's the query:
            <CFQUERY name="LOCAL.getEncounterServices" datasource="#REQUEST.dsn#"> 
            SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
              <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
               </CFIF>
                AND c.LocationID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.locationID#">
                AND c.CustomerID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.customerID#">
            </CFQUERY>
    All of this worked just fine before I added the lines:
             <CFIF IsDefined("ARGUMENTS.encounter") AND IsObject(ARGUMENTS.encounter)>
                     AND c.EncounterID = <CFQUERYPARAM cfsqltype="cf_sql_integer" value="#ARGUMENTS.encounter.getID()#">
             <CFELSE>
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
              </CFIF>
    Previously, it had just been:
                    AND c.DateTimeClosed >= <CFQUERYPARAM cfsqltype="cf_sql_date" value="#ARGUMENTS.startDate#">
                    AND c.DateTimeClosed < <CFQUERYPARAM cfsqltype="cf_sql_date" value="#DateFormat(DateAdd('d', 1, ARGUMENTS.endDate), 'yyyy-mm-dd')# 00:00:00">
    With no IF/ELSE statement.
    Anyone seen anything like this before?  Any ideas? 
    Thanks.

    Right, I'll start disabusing myself of the DateFormat!
    I'm sorry, I should've posted the actual query too.  It's inserting the first part - "AND c.EncounterID = ....."
    Here's the full query:
    LOCAL.getEncounterServices (Datasource=xmddevdb, Time=9ms, Records=0) in /Applications/ColdFusion9/wwwroot/XMD_NEW/xmd_dev/cfc/ShoppingGateway.cfc @ 16:56:28.028
    SELECT
                a.EncounterProductID,
                a.DateTime AS ServiceDate,
                aa.CartItemID,
                aaa.CartID,
                aaaaa.CartStatus,
                b.ProductID,
                b.ProductName,
                b.CPTCode,
                b.Price,
                c.EncounterID,
                c.DateTimeClosed AS EncounterClosedDate,
                d.FirstName,
                d.LastName
            FROM
                EncounterProducts a
                    LEFT JOIN CartItemProduct aa ON (a.EncounterProductID = aa.EncounterProductID AND aa.Active = 1)
                    LEFT JOIN CartItem aaa ON (aa.CartItemID = aaa.CartItemID)
                    LEFT JOIN Cart aaaa ON (aaa.CartID = aaaa.CartID)
                    LEFT JOIN CartStatus aaaaa ON (aaaa.CartStatusID = aaaaa.CartStatusID),
                Product b,
                Encounters c,
                Contacts d,
                EncounterStatuses e
            WHERE
                1 = 1
                AND (aa.CartItemID IS NULL OR aaaaa.CartStatus = 'Deleted')
                AND a.Active = 1
                AND a.ProductID = b.ProductID
                AND a.EncounterID = c.EncounterID
                AND c.PatientID = d.ContactID
                AND c.EncounterStatusID = e.EncounterStatusID
                AND e.EncounterStatus = 'Closed'
                     AND c.EncounterID = ?
                AND c.LocationID = ?
                AND c.CustomerID = ?
    Query Parameter Value(s) -
    Parameter #1(cf_sql_integer) = 28
    Parameter #2(cf_sql_integer) = 16
    Parameter #3(cf_sql_integer) = 6
    Thansk again for the help!

  • 0fi_ar_4 INIT returning zero records

    Hi gurus,
    0fi_ar_4 INIT is returning zero records while loading into ODS.I have checked in RSA3 it is returning zero records with INIT selection but is it is fetching records with Full update.Can ne one tell me what to do.how to solve this problem.
    rgds,
    ***Points Assured**

    Hi Suravi,
    Check at the Info Package selection-- Init with out data transfer.
    Make it with data transfer..
    Hope it helps..

  • Shadowing API Issues on 2012R2 (SM_REMOTECONTROL GetSystemMetrics and WTSStopRemoteControlSession) Always Returns Zero

    According to the MSDN article on the GetSystemsMetric API, SM_REMOTECONTROL returns zero if the user is not currently being shadowed but will return non-zero if the user is currently being shadowed.  It lists no restirction on OS support from what I
    can see.
    WTSStopRemoteControlSession also lists no restrictions on OS support in MSDN.
    I have a simple VB.NET application that calls these APIs.  It basically reads:
    <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> Public Shared Function GetSystemMetrics(ByVal nIndex as Integer) As Integer
    End Function
    Private Const SM_REMOTECONTROL as Integer = &H2001
    <DllImport("wtsapi32.dll", SetLastError:=True)> Public Shared Function WTSStopRemoteControlSession(ByVal iLoginId as Int32) as Int32
    End Function
    Private Declare Function ProcessIdToSessionId Lib "Kernel32.dll" Alias "ProcessIdToSessionId" (ByVal processID as Int32, ByRef sessionID as Int32) as Boolean
    retVal = GetSystemMetrics(SM_REMOTECONTROL)
    On 2008R2, retVal = 1 when the user is being shadowed, retVal = 0 when the user is not being shadowed.
    On 2012R2, retval = 0 no matter if the user is being shadowed or not shadowed.
    Dim sessionIDCurrent as Int32
    ProcessIdToSessionId(Process.GetCurrentProcess, sessionIDCurrent)
    WTSStopRemoteControlSession(sessionIDCurrent)
    On 2008R2, the shadow session will be stopped and WTSStopRemoteControlSession returns non-zero (indicating success)
    On 2012R2, the sahdow session will NOT be stopped and WTSStopRemoteControlSession returns zero (indicating failure).  LastDLLError returns zero as well.
    Has anyone else run into this?  Is this a known issue?

    Known issue,similar to this question: http://stackoverflow.com/questions/14725781/getsystemmetrics-returns-different-results-for-net-4-5-net-4-0
    http://connect.microsoft.com/VisualStudio/feedback/details/763767/the-systemparameters-windowresizeborderthickness-seems-to-return-incorrect-value
    https://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
    Best Regards,
    Please remember to mark the replies as answers if they help

  • Popularity Trends report always returns zero

    Hello,
    I have a SharePoint installed on “Windows server 2008 -R2”.
    I have a SQL Data base installed on the same machine.
    I create a new web application with port “2020”. Then I create w new site collection “Publishing”.
    I activate the feature “Reporting” in the site collection level.
    I Open central admin “Monitoring >> Configure usage and health data collection”. I checked “Enable usage data collection” Check box. And I Checked All “Events to Log” check boxes.
    I have configures the following services applications :
           -Business Connectivity Service
           -Excel Services Application
          -Search Service Application
         -Security Token Service Application
         -Application Discovery and Load Balancer Service Application
         -WSS_UsageApplication.
    I run the crawl search. And it is completed successfully.
    The search service account is member of “WSS_WPG” group.
    I have checked the following values from SharePoint PowerShell:
             AppEventTypeId          : 00000000-0000-0000-0000-000000000000
             EventTypeId                 : 1
             EventName                   : Views
             LifeTimeManagedPropertyName : ViewsLifeTime
             RecentManagedPropertyName   : ViewsRecent
            ApplicationName             :
            RecommendationWeight        : 1
           RelevanceWeight             : 1
          RecentPopularityTimeframe   : 14
          AggregationType             : Count, UniqueUsers
         Rollups                     : SiteSubscriptionId, SiteId, ScopeId
        TailTrimming                : 2
       Options                     : AllowAnonymousWrite
        IsReadOnly                  : False
    I open the “default.aspx” page on the portal (I have opened it more than 10 times in different browser window).
    Next day I open “popularity Trends” report, I found that it returns zero.
    I open the “Analytics Report” data base. Then I open “AnalyticsItemData” table. There are already items in the table.
        So I need to know why the “popularity Trends” excel sheet report returns zeros all the time.
    ASk

    Hi,
    According to your description, the popularity Trends report always returns no records.
    Please check the status of the 3 timer jobs: Microsoft SharePoint Foundation Usage Data Import, Microsoft SharePoint Foundation Usage Data Processing and Web Analytics
    Trigger Workflows to see if they are configured to run at regular intervals.
    Also you can take a look at the two links about the similar issue for more information:
    http://www.myriadtech.com.au/blog/Ben/Lists/Posts/Post.aspx?ID=7
    http://sharepoint.stackexchange.com/questions/66476/whats-popular-webpart-is-empty
    Feel free to reply if there any progress.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Having trouble with a "pop up" LOV that should return several attributes

    all the examples i've seen return a single value. what if my foreign key is concatenated? how do i return several attributes? right now the listener sets "value = #{row.xxx}.

    Hi,
    with "popup LOV", do you mean the dialog framework? Note that a dialog also can return multiple values in its returnFromDialog method of the AdfContext class. The first argument in this method is a single object, whereas the second is a HashMap so you can return multiple values.
    However, the question is not completely clear to me as to what listener is writing to where. Note that EL can also be concatinated #{row.xx1} #{row.xx2}
    Frank

  • Ldapsearch returning multiple attributes with wildcard?

    I'm running DSEE 6.2 and I'm wondering if it's possible to return multiple attributes in an ldapsearch request based on the attribute name.
    For instance, I have corpXattr1, corpXattr2, corpXattr3 in my directory, and I want to return all attributes for a particular user that start with corpX* .
    I haven't found a way of doing this, but maybe somebody can help?

    It is not possible to specify patterns (or wildcards) in the list of attributes that can be returned by the Directory Server.
    This is not part of the LDAPv3 specification.
    Regards,
    Ludovic.

  • Return zero

    Can i have simple select query to get the expected out. if negative balance return zero otherwise return as it is. Please provide a select query to get expected output
    Actual output
    Balance
    -20
    40
    50
    -60
    Expected output(if balance negative return 0)
    Balance
    0
    40
    50
    0

    Hi,
    Try this:
    SELECT     GREATEST (balance, 0)     AS balance
    FROM     table_x
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • Resolving "IOException: Underlying input stream returned zero bytes" errors

    Hi guys,
    I'm currently working on a simple application that reads GPS receiver data from a serial port using the RXTX library. However, everytime I try to read the resulting InputStream (which I convert to a BufferedReader) using readLine(), after 2 or 3 lines of reading normally, I always get the following exception:
    GPSNotifier::run(): I/O error encountered while reading from COM4
    java.io.IOException: Underlying input stream returned zero bytes
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:268)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    at discomm.gps.GPSNotifier.run(GPSNotifier.java:260)
    at java.lang.Thread.run(Thread.java:619)
    I'm not sure how to fix this problem, since it occurs everytime I run the application. The code for opening the stream is as follows:
    // Open up the port: no problems here ...
    CommPortIdentifier comm = CommPortIdentifier.getPortIdentifier(port_name);
    CommPort port = comm.open(APP_NAME, OPEN_TIMEOUT);
    SerialPort serial_port = (SerialPort) port;
    serial_port.setSerialPortParams(PORT_BAUDRATE, PORT_DATABITS, PORT_STOPBITS, PORT_PARITY);
    BufferedReader in = BufferedReader(new InputStreamReader(serial_port.getInputStream()));
    String line = null;
    // Problem is here ...
    while ((line = in.readLine()) != null) {
    }The IOException always occurs when readLine() is called. Any ideas on how to fix this problem?
    Thanks in advance,
    Simon Liu

    I don't use readLine() but read()
    A bit of code:
              BufferedReader inStream = new BufferedReader(new InputStreamReader(inputStream));
              byte ch = 0;
              char myChar;
              int charVal;          
              try{               
                   while((ch = (byte)inStream.read()) != -1){
                        if((ch == 13) || (ch == 10)){ //In ASCII code: 13 = Carriage return, 10 = line feed. When the GPS receiver sends those characters, the while loop must be broken to avoid an IOException                         
                             break;
                        }else{
                             myChar = (char)ch;
                        charVal = myChar;
                        //System.out.print("byte=" + ch +" myChar=" + myChar + " charVal=" + charVal + "\n");
                        System.out.print(myChar);
                   }

  • XPath query string returns zero node error

    I have created car loan bpel application. One is Citi Loan and another is Star Loan.
    I have created just like similar to sample loan demo.
    I have entered the SSN, email, carModel, carYear, loanAmount and creditRating value and submitted. It will initiated the following tasks successfully.
    StarLoan Instance
    CitiLoan Instance
    TaskManager Instance
    CreditRating Instance
    Root appln. instance
    I have created one user approval page for Approve/Reject (jsp). Through this page, I have approved the CitiLoan offer. I have faced the following errors.
    <output>
    <part name="payload" >
    <loanOffer>7.4</loanOffer>
    </part>
    </output>
    <loanOffer>7.4</loanOffer>
    <selectionFailure>
    <part name="summary" >
    <summary>XPath query string returns zero node. According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node. Please check the BPEL source at line number "90" and verify the <to> part xpath query. </summary>
    </part>
    </selectionFailure>
    Please help me.
    Thanks in advance.
    Regards,
    Sara

    Let us know if you have customized SOA composite for user creation approval?
    -Vamsi.

  • Help! .TMIB service not returning local attributes

    I've the following src to create a an FML request buffer with TA_FLAGS set to MIB_LOCAL...
    FBFR32* buf = (FBFR32*)tpalloc("FML32", NULL, 1024);
    Finit32(buf, Fsizeof32(buf));
    long flags = MIB_LOCAL;
    Fchg32(buf, TA_OPERATION, 0, "GET", 0);
    Fchg32(buf, TA_CLASS, 0, "T_QUEUE", 0);
    Fchg32(buf, TA_FLAGS, 0, (char*)&flags, 0);
    Fchg32(buf, TA_RQADDR, 0, qaddr, 0);
    FILE* f = fopen(dumpfile, "a");
    Ffprint32(buf, f);
    long len;
    tpcall(".TMIB", (char*)buf, (long)0, (char**)&buf, &len, 0);
    Ffprint32(buf, f);
    fclose(f);
    Which produces the following output in the dumpfile...
    TA_FLAGS        65536
    TA_CLASS T_QUEUE
    TA_OPERATION GET
    TA_RQADDR LMQ
    TA_ERROR 0
    TA_MORE 0
    TA_OCCURS 1
    TA_GRACE 60
    TA_MAXGEN 3
    TA_MSG_CBYTES 0
    TA_MSG_QBYTES 65536
    TA_MSG_QNUM 0
    TA_RQID 52527126
    TA_SERVERCNT 1
    TA_WKQUEUED 0
    TA_CLASS T_QUEUE
    TA_STATE ACTIVE
    TA_CONV N
    TA_RCMD
    TA_RESTART Y
    TA_RQADDR LMQ
    TA_SERVERNAME <ommitted>
    TA_SOURCE <ommitted>
    TA_LMID slc00caq
    Note the lack of local attributes. I have analogous src to query local attrs of the T_SERVER class which works fine. Any ideas on why I'm not getting T_QUEUE local attrs?

    Michael,
    The local attributes in the T_QUEUE class aer TA_TOTNQUEUED, TA_TOTWKQUEUED, TA_SOURCE, TA_NQUEUED, and TA_WKQUEUED.
    TA_WKQUEUED and TA_SOURCE are being returned as part of the result.
    For TA_TOTNQUEUED the TM_MIB(5) manual page T_QUEUE class definition lists the following limitation:
    Limitation: If the T_DOMAIN:TA_LDBAL attribute is "N" or the T_DOMAIN:TA_MODEL attribute is "MP", TA_TOTNQUEUED is not returned. In the same configuration, updates to this attribute are ignored. Consequently, when this attribute is returned TA_LMID and TA_SOURCE have the same value.
    There is a similar limitation listed for TA_TOTWKQUEUED and TA_NQUEUED. That is why you are not seeing those 3 attributes in the result.
    Regards,
    Ed

  • Stored proc returns zero result

    Hello, please help me. I am quite new to oracle stored
    procedures. I have a proc that returns data to cfm but it keeps
    giving zero results. But if i don't use stored proc, the same query
    gives me something. please help. my stored proc and cfm goes
    something like below:
    ************************************ stored procedures
    CREATE OR REPLACE PACKAGE PACK_REFCURSOR_NHM_TRANSACTION AS
    TYPE TRANS_TableRows IS REF CURSOR;
    PROCEDURE REFCUR_NHM_TRANSACTION (
    IN_sTMPACC IN varchar2,
    IN_sITEM_TYPES IN varchar2,
    OUT_TRANS OUT TRANS_TableRows);
    END PACK_REFCURSOR_NHM_TRANSACTION ;
    CREATE OR REPLACE PACKAGE BODY PACK_REFCURSOR_NHM_TRANSACTION
    AS
    PROCEDURE REFCUR_NHM_TRANSACTION (
    IN_sTMPACC IN varchar2,
    IN_sITEM_TYPES varchar2,
    OUT_TRANS OUT TRANS_TableRows)
    IS
    BEGIN
    OPEN OUT_TRANS FOR
    SELECT T.TRANSACTION_ID, T.TRANSACTION_TYPE,
    T.TRANSACTION_DATE, T.TRANSACTION_TIME,
    T.ITEM_CODE, 0 OE_DETAIL_ID,
    T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
    T.GST_AMOUNT, 'I' INSURER_TYPE
    FROM NHM_TRANSACTION T
    WHERE DISPENSED_FLG = 'Y'
    AND T.ACCOUNT_ID = IN_sTMPACC
    AND T.TRANSACTION_TYPE IN ('01','02', '09')
    AND NVL(T.STATUS,'F') != 'C'
    AND T.BILLED_FLG = 'N'
    AND T.ITEM_TYPE IN (IN_sITEM_TYPES)
    AND T.BILL_ITEM_FLG = 'Y'
    UNION ALL
    SELECT T.OE_TRANSACTION_ID TRANSACTION_ID, TRANSACTION_TYPE,
    T.TRANSACTION_DATE,
    T.TRANSACTION_TIME, NVL(T.ITEM_CODE,T.PACKAGE_CODE)
    ITEM_CODE, T.OE_DETAIL_ID,
    T.QUANTITY, T.LIST_PRICE, T.DISCOUNT, T.SALE_PRICE,
    T.GST_AMOUNT, 'S' INSURER_TYPE
    FROM NHC_OE_TRANSACTION T, NHC_MASTER_ITEM M, NHM_PACKAGE P
    WHERE T.ACCOUNT_ID = IN_sTMPACC
    AND T.ITEM_CODE = M.ITEM_CODE(+)
    AND T.PACKAGE_CODE = P.PACKAGE_CODE(+)
    AND (DECODE(T.ITEM_CODE,NULL,P.BILL_OPTION,M.BILL_OPTION) in
    ('P','O','F'))
    AND NVL(T.STATUS,'F') != 'C'
    AND T.BILLED_FLG = 'N'
    AND ((T.TRANSACTION_TYPE = '09' AND STATUS IN ('P','R'))
    OR T.TRANSACTION_TYPE IN ('01','02','11','12', '10'))
    AND T.BILL_ITEM_FLG = 'Y'
    AND T.ITEM_TYPE IN (IN_sITEM_TYPES) ;
    END REFCUR_NHM_TRANSACTION ;
    END PACK_REFCURSOR_NHM_TRANSACTION ;
    *************** the cfm code (note: i am using coldfusion
    MX************
    <cfstoredproc datasource="#application.datasource#"
    procedure="NSCOCT.PACK_REFCURSOR_NHM_TRANSACTION.REFCUR_NHM_TRANSACTION">
    <cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR"
    value="#TMPACC#" dbvarname="IN_sTMPACC">
    <cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR"
    value="#QRYLOCITEM.ITEM_TYPE#" dbvarname="IN_sITEM_TYPES">
    <cfprocresult name="getPrescItems">
    </cfstoredproc>
    ***** i dumped getPrescItems and returns no data. it's
    suppose to return something . Any help is much appreciated. Thank
    you. *********

    just an update. i found out that it has something to do with
    the condition "IN". the values there is supposed to be a list (e.g.
    a,b,c,d,e,f,g). What I suspect is that when in stored proc, it
    interprets in the query as "IN('a,b,c,d,e,f,g')" instead of
    "IN('a','b','c','d','e','f','g')" which is what I actually want.
    I have also tried the quotedvaluelist in cfm but still no
    result, so i suspect again, using quotedvaluelist, that it
    interprets in the proc as "IN(''a','b','c','d','e','f','g'')".
    Can anybody help me whit this so i can have the proc
    interpret my IN condition as "IN('a','b','c','d','e','f','g')"?
    Thanks.

Maybe you are looking for

  • Unable to load the 'C:\InetPub\robohelp\' project.  The project is invalid.

    We're having troubles opening/viewing our 'prepsmart' project on our production server. (It works fine in our test environment). I have tried re-installing RoboEngine 4.0, and successfully re-generated and re-published the project to the server. Howe

  • Ubuntu 13.10 on U410 - Fn keys don't work

    Dual-booting Windows 8 and Ubuntu 13.10. In Ubuntu the Fn>Function Key combination doesn't work - e.g. F11 to make browser full screen doesn't work. Any one seen this, and is there a fix? (The non-Fn key functions work perfectly well....)

  • Select query does not return rows

    Hi all, The following query does not returning rows even though values are there in table. Kindly let me know why it is creating problem. thanks, P Prakash /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */ SELECT pr.pa_rqst_sid, ptr.sbmtr_t

  • Possible to change the CCFL myself?

    Hi the screen of my ibook is starting to get really dim and i suspect it could be due to the CCFL, the backlight of the LCD. Is there a way i can change it myself? Or can i ask apple to change it for me? A friend of mine tried asking apple to change

  • Does anyone know where I can get replacement case screws?

    I've got a 12-inch PowerBook 867MHz that I've had for 3.5 years, so there's no more AppleCare on it. My Hard Drive just died on it, and in the process of getting into the case to replace the drive, I discovered that the screw under the F11/F12 key wa