"Content not allowed in Prolog" XML error while using RemoteSession API

Hi,
I am trying to create a view by using a RemoteSession object CREATED on the RPC URL of Sun Identity Manager. Here is the code I am trying out.
try
URL url = new URL ("http","localhost",8080,"/idm/servlet/rpcrouter2");
System.out.println (url.toString());
RemoteSession _remoteSession = new RemoteSession   
(url,Constants.CONFIGURATOR, new EncryptedData
("configurator"));
System.out.println ("Remote session is "+_remoteSession);
GenericObject view = _remoteSession.createView ("Role",null);
System.out.println ("View is "+view);
catch (MalformedURLException male){
     male.printStackTrace ();
catch (WavesetException wes){
     wes.printStackTrace ();
catch (Exception e){
     e.printStackTrace ();
When this line is called,
GenericObject view = _remoteSession.createView ("Role",null);
The code throws the following exception.
[java] http://localhost:8080/idm/servlet/rpcrouter2
[java] Remote session is com.waveset.session.RemoteSession@1cbda0a
[java] com.waveset.util.XmlParseException: XML Error: 1:1: Content is not a
llowed in prolog.
[java] at com.waveset.util.XmlParser.wrapException(XmlParser.java:886)
[java] at com.waveset.util.XmlParser.parseString(XmlParser.java:519)
[java] at com.waveset.util.XmlUtil.parseString(XmlUtil.java:440)
[java] at com.waveset.session.RemoteSession.getResultObject(RemoteSessi
on.java:1028)
[java] at com.waveset.session.RemoteSession.rpc(RemoteSession.java:995)
[java] at com.waveset.session.RemoteSession.callx(RemoteSession.java:92
3)
[java] at com.waveset.session.RemoteSession.call(RemoteSession.java:907
[java] at com.waveset.session.RemoteSession.call(RemoteSession.java:893
[java] at com.waveset.session.RemoteSession.call(RemoteSession.java:880
[java] at com.waveset.session.RemoteSession.call(RemoteSession.java:869
[java] at com.waveset.session.RemoteSession.createView(RemoteSession.ja
va:753)
[java] at com.sun.idm.idmx.myspefiles.MyRemoteApiUsage.createAndProvisi
onUser3(MyRemoteApiUsage.java:496)
[java] at com.sun.idm.idmx.myspefiles.MyRemoteApiUsage.demoBasicProvisi
oning(MyRemoteApiUsage.java:475)
[java] at com.sun.idm.idmx.myspefiles.MyRemoteApiUsage.runDemo(MyRemote
ApiUsage.java:656)
[java] at com.sun.idm.idmx.myspefiles.MyRemoteApiUsage.main(MyRemoteApi
Usage.java:670)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
Is this a known issue in the SDK ? If I construct my own XML and populate a GenericObject, _remoteSession.checkinView (view) does not have any problem in checking in the view. The exception is thrown irrespective of the view id I use , i.e. IDMXUser, User, Role etc.
Thanks,
Srinivas

Hi Srini,
Have you solved this problem. If yes then can you help me with the solution?
Thanks!

Similar Messages

  • Org.xml.sax error content not allowed in prolog

    Hi,
    I am running Jetty 6.x on SUSE and there is a webapp called pyjasper i am trying to run on it. the context maps fine and it displays the content however, when i use the applet in the webapp to create a report (.jasper) it gives me a org.xml.sax Parse exception: content not allowed in prolog.
    A little part of the error is pasted below:
    generating report /tmp/pyJasper/compiled-reports/6390c37d0ea810c7fae3e647c2f86817.jasper
    Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    2010-03-04 09:15:59.073::WARN: /pyJasper/jasper.py
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    I am guessing this is some sort of an error in xml parsing. I found couple of solutions on sun java forums but none of them worked for me. Right now I am trying to figure out whether this is being caused by the applet or the java itself.
    Apparently other people who use this applet do not have a problem and they have the exact same files as me. So I am not sure what exactly is causing tihs problem. Bit of a noob.
    Any help would be greatly appreciated.
    THANK YOU VERY MUCH!!!! :)

    Hi thanks you very much for the reply.
    In my message I forgot to mention that I edited my prologs to "<?xml version = "1.0" encoding = "UTF-8"?>" and the jetty.xml that has the server configuration has:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    I apologize for the clarity of my message. I meant to say that I was wondering whether the problem is with the xm files that java has, or the xml files that are in the pyjasper package that I downloaded?
    I also checked for byte order mark using hex editor to see if those six characters were in front of my xml files. None of the files in the pyjasper package had the BOM so that solution did not work.
    Is there something wrong with the above xml prolog?
    I have been reading tons of different posts and stuf trying to figure this out for the past month but juts cannot seem to get it to work.
    Thanks.

  • How to resolve Content not allowed in prolog with PDF files

    We are using PI 7.1 to read a file and using ASMA get the file name and pass it to a target mapping and call a web service with the file name.
    We have a scenario that reads a PDF file as Binary form a folder.  Our mapper uses ASMA to get the file name and folder of the
    file to map to the target.
    Testing in mapper works fine except for the ASMA does not function (known issue).
    At runtime we drop a file and it is picked up as expected BUT from SXMB_MONI we see the following:
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_FileNotification_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Content is not allowed in prolog.
    This error does not happen all the time either.  When it appears it is typically only the first time a file is mapped and on subsequent retries it processes normally.  In dev we have shown that PI seems to get stuck on a few initial files u2013 process properly on the first retry and then at some point has no issues and will process files very fast.
    u201CContent not allowed in prologu201D at least from an XML perspective is related to characters appearing before the xml file declaration:
    <?xml version="1.0".encoding="UTF-8"?>
    If chars appear before this you get this error in Java parsers.  This could be related but we do not have control over how PI parsed the file content and puts into XML messages inside the mapper as we do nothing with the file content.
    The same file will go through randomly with this exception on multiple drops.  Sometimes it gets processed properly and sometime it doesnu2019t u2013 but in dev it u201Calwaysu201D gets processed properly on the automatic retry.  It does not seem to matter what PDF we drop in there either.
    Our tyoes look something like this:
    Source:
    DT_FILE - xsd:hexBinary
    Target:
    FilePath - xsd:String
    I have tried with DT_FILE as xsd:base64Binary with the same results...
    We use a UDF to get the file name from ASMA as follows:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    String ourSourceFileName = conf.get(key1);
    String ourSourceDirName = conf.get(key2);
    //conf.put(key1, ourSourceDirName + "/" + ourSourceFileName);
    return ourSourceDirName + "
    ToProcess
    " + ourSourceFileName;
    Edited by: Carey Bingham on May 26, 2010 12:24 AM

    > Is using a custom adapter module the standard way to handle files when we do not want the content? 
    I would rather say this is a feasible solution
    > If so does anyone have generic code that we can use for the purposes of simply monitoring a file and passing the file name/folder out implemented as modules already?
    The questio is. What do you want to do with this information?
    Here is a sample code written for a specific purpose, you can adapt this to your needs:
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0SetAttachmentName
    > Is this a known workaround to get around the "content not allowed in prolog" issue?
    At least it is known by me

  • Problem with Exception - "Content not allowed in Prolog"

    I was using org.w3c.dom package to handle all my XML data in JDK 1.4.1 environment. Recently, I have upgraded my Java version to JDK 1.5. When I run my code, while parsing the XML data, it is throwing an Exception - "Content not allowed in Prolog". I know that this Exception is because the XML data does not contain xml declaration in prolog.
    But, I have the code that queries the database and builds the records in XML format. The sample XML is as follows.
    <list>
    <row>
    <fld1>Val1</fld1>
    <fld2>Val2</fld2>
    </row>
    <row>
    <fld1>Val3</fld1>
    <fld2>Val4</fld2>
    </row>
    </list>
    I want to know why the JVM is validating for XML declaration? Why can't it continue parsing the XML in case it is well formed? Is there any way so that I can skip this validation?
    Please reply. I am in a big trouble because, in case some changes are required, I need to implement in many places of my API.

    The isELIgnored flag just fixes this page.
    If you want to use EL on your pages a better solution is to update your web.xml file:
    EL Expressions in JSP2.0 containers:
    In order to evaluate EL expressions, your web.xml file must be up to date.
    If web.xml states that it is version 2.3 or less, then EL evaluation is disabled by default for backwards compatibility.
    So if your web.xml starts with this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>Replace it with this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    Cheers,
    evnafets

  • Error while using ego_item_user_attrs_cp_pub API

    Hello All,
    We are using ego_item_user_attrs_cp_pub API to insert UDA's in ego_mtl_sy_items_ext_b table.
    The API will pick the record from ego_itm_usr_attr_intrfc table and the following is the script used.
    DECLARE
    x_message_list Error_Handler.Error_Tbl_Type;
    x_errbuf VARCHAR2(100);
    x_return_status VARCHAR2(100);
    p_debug_level NUMBER:=0;
    p_purge_successful_lines VARCHAR2(100):=FND_API.G_FALSE;
    p_initialize_error_handler VARCHAR2(100):=FND_API.G_FALSE;
    p_validate_only VARCHAR2(100):=FND_API.G_FALSE;
    p_ignore_security_for_validate VARCHAR2(100):=FND_API.G_FALSE;
    p_data_set_id NUMBER;
    BEGIN
    p_data_set_id:=1055513;
    ego_item_user_attrs_cp_pub.process_item_user_attrs_data
    ERRBUF =>x_errbuf
    ,RETCODE =>x_return_status
    ,p_data_set_id =>p_data_set_id
    ,p_debug_level =>p_debug_level
    ,p_purge_successful_lines =>p_purge_successful_lines
    ,p_initialize_error_handler =>p_initialize_error_handler
    ,p_validate_only =>p_validate_only
    ,p_ignore_security_for_validate =>p_ignore_security_for_validate
    commit;
    IF (x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
    DBMS_OUTPUT.PUT_LINE('x_return_status = ' || x_return_status);
    ELSE
    DBMS_OUTPUT.PUT_LINE('Error Messages :');
    Error_Handler.GET_MESSAGE_LIST(x_message_list=>x_message_list);
    FOR i IN 1..x_message_list.COUNT LOOP
    DBMS_OUTPUT.PUT_LINE(x_message_list(i).message_text);
    END LOOP;
    END IF;
    END;
    When we run the script return status is 0 but the process status for the corresponding record in interface table is 3 which means error.The error message are not getting displayed in mtl_interface_errors table too.Could any one please throw some light on this.
    Thanks in advance.
    Regards,
    Sumi.
    Edited by: user11165279 on Aug 11, 2009 9:54 PM
    Edited by: user11165279 on Aug 11, 2009 11:15 PM

    Then there must be an exception handler (hider would be more appropriate) which does not propagate the exception.
    Not knowing your environment, my guess would be inside: ego_item_user_attrs_cp_pub.process_item_user_attrs_data

  • What is Invalid header signature error while using POI API

    Hello all,
    i'm using poi api for extracting the text part from word file while uploading using the POI api. it shows the error
    "Invalid header signature; read 3255307777713450285, expected -2226271756974174256"
    Can anyone help me solve the problem.
    Here's my code:
    <%@ page language="java" import="org.apache.poi.hwpf.extractor.*,java.io.*" %>
    <%-- String fil = request.getParameter("fil"); --%>
    <% ServletInputStream st = request.getInputStream();
    DataInputStream dis = new DataInputStream(st);
    WordExtractor woe = new WordExtractor(dis);%>
    <%String s = woe.getText();
    %>
    thanks a lot...

    Did you find any solution to that??? I am also stuck at such a place...

  • Error while using element api

    Hi,
    while using pay_element_types_api.create_element_type api,system is giving me following error:
    ORA-20001: PAY_6137_ELEMENT_DUP_NAME:
    ORA-06512: at "APPS.PAY_ELEMENT_TYPES_API", line 686
    ORA-06512: at line 100
    Please help.
    Regards
    Akash

    before calling the api, run a query on the pay_element_types_f table and see if an element with the same name already exists.
    Edited by: Giuseppe Bonavita on 17-Dec-2012 09:30

  • Getting error while using CAN api's. Says channel not found in MAX.

    Hi,
    I am using NI-CAN series2, can card. The same is not connected to my system. Hence i have used the virtual channel 256. Here i am reading the DBC file and providing an option to the user to select a set of messages to transmitt\receive. But i am getting an error saying
    "Error -1074388479 occurred at CAN Get Channel Data Type.vi
    Possible reason(s):
    NI-CAN:  (Hex 0xBFF62201) Channel not found in MAX or the CAN database file.  Solutions: Check for proper spelling using MAX; For Get/Set Property, ensure that the channel name exists in the task."
    Please help.
    Regards,
    Yogesh

    Hi Marshall,
    Thanx for the reply and spending time for the same. I tried the example which u had mentioned. This example is working with 256 virtual channel. But my code is no executing and giving he same problem even after loading the DBC file into max(Same loaded im my code). Always load the dbc file in max and then only i should run the code, is it so? But this can not happen, since the user may not hav max. I hav attached the code. Pls verify it, and give me the feedback.
    Waiting for the reply,
    Yogesh
    GET
    Larsen & Toubro
    India
    Attachments:
    CanMsgFrame.vi ‏68 KB

  • Error while using OAM API

    I have created Domain , authentication, authorization policies in OAM.I would like to allow access to the users through API (those users lready present in the OID)
    ObAccessManager am=new ObAccessManager()
    am.setAdmin("orcladmin","welcome1");
    When executing am.set admin line following error is throwing
    Invalid Access Management message: code. Message: To be parsed:
         at com.oblix.accessmgr.ObAMSerializedObject.deserializeInt(ObAMSerializedObject.java:285)
         at com.oblix.accessmgr.ObAMException.<init>(ObAMException.java:403)
         at com.oblix.accessmgr.ObAccessManager.sendRequest(ObAccessManager.java:163)
         at com.oblix.accessmgr.ObAccessManager.setAdmin(ObAccessManager.java:195)
         at com.orderentry.util.AccessManager1.main(AccessManager1.java:59)

    Host Identifier: null
    com.oblix.access.ObAccessException: The AccessGate is unable to contact any Access Servers.
         at com.oblix.access.ObConfig.jni_initialize(Native Method)
         at com.oblix.access.ObConfig.initialize(ObConfig.java:115)
         at com.orderentry.util.AccessManager1.main(AccessManager1.java:42)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
    after
    sdk: AccessServerSDK_Ver_10.1.4
    Exception in thread "main" com.oblix.access.ObAccessException: SDK is not initialized
         at com.oblix.accessmgr.ObAccessManager.jni_AccessManagementRequest(Native Method)
         at com.oblix.accessmgr.ObAccessManager.sendRequest(ObAccessManager.java:160)
         at com.oblix.accessmgr.ObAccessManager.setAdmin(ObAccessManager.java:195)
         at com.orderentry.util.AccessManager1.main(AccessManager1.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
    Error 10061, localhost:6021Error 10061, localhost:6021Error 10061, localhost:6021Error 10061, localhost:6021
    Process finished with exit code 1

  • Error while using motorola api

    Hi,
    I'm using the MOTOROLA's API to develop a MIDlet for an A835 phone. I used the location API (package com.motorola.location) to access the device's incorporated GPS. The emulator doesn't create problems, but when I try to dowload the MIDlet on the device via wap, the dowload proceeds until an "Application not authorized" error occurs.
    The jad content is the following:
    MIDlet-Jar-Size: 6254
    MIDlet-Jar-URL: http://www.verona.miz.it/sites/navigator.jar
    MIDlet-Name: NavMIDlet
    MIDlet-Vendor: Mizar Mediaservice
    MIDlet-Version: 0.0.1
    MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microedition.io.Connector.socket
    Anyone could help me?
    Thanks.

    Hi Monica,
    I am developing J2ME application for GPS. I have the following query:
    Can we develop GPS enabled application for motorolla handsets using Only J2ME kit or we must need Motorola kit. Actualy i wanna make the application independent of mobile brands so it will work across all the devices supporting GPS.
    If you can send a code snipet (Example) how to get GPS coordinates, it will be great
    Also any reference links and sites will help a lot.
    Please reply at your earliest ..
    Thanks in advance
    Hamid
    [email protected]

  • CAN error while using Channel API

    Hi
    Please find attached error message and code. I am sending message "BS_200" to the CAN channel 0. I get reference of the message from the dbc file called A.dbc. Please let me know  why does it show such an error message.
    Thanks and Regards
    Anoop
    Attachments:
    CAN error.JPG ‏20 KB
    test_2_Chnl api.vi ‏24 KB

    Hello,
    The maximum number of tasks you can have is 128, and the maximum number of messages is 272-number of tasks.  It's weird that you are getting that error though, since you are only using one message in your VI.  If you create a message in Measurement and Automation Explorer (MAX) and try to use that in your program, do you still get the error? If you import the dbc file into MAX (Right-click on CAN Channels, and select "Import Import from CANdb file") and use the message from MAX in your program instead of from the the file, do you still get the errror? Do you get the error if you try to use a different message, or does it only occur with the "BS_200" message?
    Please let me know what the results are, and I'll see if I can figure out what's going on here. Also, if it's possible for you to send me the dbc file you have (if it's not top secret),  I could try to reproduce the error. Hope this helps! Thanks!
    Regards,
    Ebele O.
    National Instruments

  • Data Warehouse:java.lang.NoClassDefFound Error while using OWB API for Java

    I was writing code to use the OWB APIs for Java:
    I have imported the folowing files:
    oracle.owb.connection.RepositoryManager;
    oracle.owb.connection.OWBConnection;
    oracle.owb.connection.ConnectionFailureException;
    when jvm tries to get instance of Repositary Manger by the following code
    reposManager = RepositoryManager.getInstance();
    I get the following exception:
    Exception in thread main
    java.lang.NoClassDefFoundError: com/objectspace/jgl/HashMap
    I have checked my OWB and Java environment but I cant locate com/objectspace/jgl.jar file. Can some one tell me were this jar is located in so i can import it.

    Either use some criteria you develop related to one of the keys on the table or use some sort of record limiting method.
    Note the method of limiting will vary related to the database you are using. You will have to look at the documentation.
    For example I am told this will work in MySQL to get 200 records starting at record 100.
    SELECT * FROM myTable ORDER BY whatever ASC LIMIT 100,200
    Because you are running out of memroy I assume the table is large,
    I am not sure what the impact of the above will have on performance because if in the above if the order by is not based on an index at the server level all the records will be selected and sorted before the records are limited.
    I would make sure you have an appropriate index.
    If you use the advanced search over the user forums using "resultset paging" and possibility the database you are using you should be able to get some ideas.
    I hope this makes sense to you.
    rykk

  • Java.lang.NoClassDefFound Error while using OWB API for Java

    I was writing code to use the OWB APIs for Java:
    I have imported the folowing files:
    oracle.owb.connection.RepositoryManager;
    oracle.owb.connection.OWBConnection;
    oracle.owb.connection.ConnectionFailureException;
    when jvm tries to get instance of Repositary Manger by the following code
    reposManager = RepositoryManager.getInstance();
    I get the following exception:
    Exception in thread main
    java.lang.NoClassDefFoundError: com/objectspace/jgl/HashMap
    I have checked my OWB and Java environment but I cant locate com/objectspace/jgl.jar file. Can some one tell me were this jar is located in so i can import it.

    Do you have JAVA_HOME set in your environment?
    What's the result of
    env
    Make sure DBCA is calling the java under $ORACLE_HOME not from other installation.

  • [Fatal Error] :1:1: Content is not allowed in prolog. ..XML READ ERROR

    Hi I am developing an application where it will read xml elements from the http site (http://www.w3schools.com/Xml/note.xml) and display in my program using DOM. while executing its giving CONTENT IS NOT ALLOWED IN PROGRAM below error. but when i am use coded xml in program itself as comment as shown in program its giving correct value. I need to read from http not from coded xml in the program. its immediate please help me out.
    [Fatal Error] :1:1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at SimpleXML1.main(SimpleXML1.java:34)
    import javax.xml.parsers.*;
    import org.xml.sax.InputSource;
    import org.w3c.dom.*;
    import java.io.*;
    public class SimpleXML1 {
    public static void main(String arg[]) {
    String xmlRecords = "http://www.w3schools.com/Xml/note.xml";
    /* String xmlRecords =
    " <note>" +
    " <to>John</to>" +
    " <from>Manager</from>" +
    " <heading>XML Program</heading>" +
    " <body>Simple XML</body>" +
    "</note>";*/
    try {
    DocumentBuilderFactory dbf =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    InputSource is = new InputSource();
    is.setCharacterStream(new StringReader(xmlRecords));
    Document doc = db.parse(is);
    NodeList nodes = doc.getElementsByTagName("note");
    for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);
    NodeList from = element.getElementsByTagName("from");
    Element line = (Element) from.item(0);
    Node child1 = line.getFirstChild();
    CharacterData cd = (CharacterData) child1;
    System.out.println(cd.getData());
    catch (Exception e) {
    e.printStackTrace();
    }

    chrisacess wrote:String xmlRecords = "http://www.w3schools.com/Xml/note.xml";
    /* snip */
    is.setCharacterStream(new StringReader(xmlRecords));
    Is that really how you're trying to read the online XML document? Because I don't see anything that makes a connection to the site. All you're doing is trying to parse the string "http://www.w3schools.com/Xml/note.xml" is if it were XML.
    ps, That "Content not allowed in prolog" error message is worse than useless IMO. They might as well say "It didn't work" for all the good does.

  • Trying to create a pdf with jasper - Content is not allowed in prolog

    hi all,
    Im trying to create a pdf file with jasper reports but i get this error message:
    29/11/2007 16:52:03 org.apache.commons.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.commons.digester.Digester.parse(Digester.java:1666)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.loadXML(JRPrintXmlLoader.java:151)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.load(JRPrintXmlLoader.java:103)
         at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1376)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:243)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:214)
         at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:140)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:397)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:328)
         at br.com.abril.contratos.Gerar.geraRelatorio(Gerar.java:38)
         at br.com.abril.contratos.Gerar.main(Gerar.java:47)

    cause of the error:
    After some extensive research on the web, it is found that that you are using an UTF-8 encoded file with byte-order mark (BOM). Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. UTF-8 files with BOMs are commonly generated by tools such as Window's Notepad. This is a known bug in Java, but it still needs fixing after almost 8 years...
    There are some hexadecimal character at the begining of the file, which is giving error"content not allowed in prolog". No solution is provided for this till now.
    Example: suppose your file start with <?xml version="1.0" encoding="utf-8"?>. you will see this in a editor. But if you open this file with any hexadecimal editor you will find some junk character in the start of the file.that is causing the problem
    solution:
    1) convert your file into a string and then read the file from the forst character that in my case the first character will be "<".so the junk character will not be there in the string and then again convert it into a file.
    2) some people are able to solve this problem by changing the "utf-8" to "utf-16". remember only in some case. some times this problem also exits in "utf-16" file.
    3) some are able to solve this problem by changing the LANG to US.en.
    4) If the first three bytes of the file have hexadecimal values EF BB BF then the file contains a BOM.so you can also handle by your own.
    5)Download a hexadecimal editor and remove the BOM.
    6) In case you are not able to think furthe then please to more research in internet may be you find some other solution to this problem. But These solution are some type of hack not exactly a solution.

Maybe you are looking for