Error! : duplicate definition for 'org.kxml2.io.KXmlParser '.

Hi all

Below I have attached my code using KSoap2.

The following error message get up when I run the project.

".. \lib\kxml2-min-2.3.0.jar(org/kxml2/IO/KXmlParser.class): error! ': duplicate definition for 'org.kxml2.io.KXmlParser', in: org.kxml2.io.KXmlParser.

I looked in the forums of BB, but I can't solve this problem...

Please tell me hoe to solve this problem

package mypackage;

import java.io.InputStream;
import java.io.OutputStream;

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParser;

import net.rim.device.api.compress.GZIPOutputStream;
import net.rim.device.api.system.CoverageInfo;
import net.rim.device.api.system.WLANInfo;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.MainScreen;

/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
public final class MyScreen extends MainScreen
{
    /**
     * Creates a new MyScreen object
     */
    public MyScreen()
    {
        // Set the displayed title of the screen
        setTitle("MyTitle");
        ButtonField bf = new ButtonField();
        add(bf);
        BenoListener benoListener = new BenoListener();
        bf.setChangeListener(benoListener);
    }

    public class BenoListener implements FieldChangeListener {
        public void fieldChanged(Field field, int context) {
            try {
                String serviceNamespace = "http://www.google.com/Services/google/";
                String soapAction = "http://www.google.com/Services/google/Login";
                String methodName= "Login";
                String result = "";
                String begin = ""
                        + "http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
                        + "";
                String end = "" + "";
                String soapBody =begin;
                soapBody += "http://www.google.com/Services/google\">";
                soapBody += "";
                soapBody += "[email protected]";
                soapBody += "";
                soapBody += "";
                soapBody += "12345678";
                soapBody += "";
                soapBody += "";
                soapBody += end;
                SoapObject rpc = new SoapObject(serviceNamespace, methodName);
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
                envelope.encodingStyle = SoapSerializationEnvelope.ENC;
                HttpConnection connection = (HttpConnection) Connector.open("https://services.google.com:8443/axis2/services/api/V1.0/GoogleServices"+ getConnectionParameter(),Connector.READ_WRITE);
                connection.setRequestProperty("SOAPAction", soapAction);
                connection.setRequestProperty("Content-Type", "application/x-gzip");
                connection.setRequestProperty("Content-Encoding", "gzip");
                connection.setRequestProperty("Accept-Encoding", "gzip");
                connection.setRequestProperty("Content-Length","" + soapBody.getBytes().length);
                connection.setRequestProperty("User-Agent", "kSOAP/2.0");
                connection.setRequestMethod(HttpConnection.POST);
                OutputStream os = connection.openOutputStream();

                zipRequest(os, soapBody);
//              os.write(soapBody.getBytes(), 0, soapBody.getBytes().length);
//              os.close();
                soapBody = null;
                InputStream is = connection.openInputStream();
                XmlPullParser xp = new KXmlParser();
                xp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
                xp.setInput (is, null);
                envelope.parse(xp);
                result = (envelope.getResponse()).toString();
                Dialog.alert("Result---"+result);
            } catch (Exception ex) {
            }

        }

        private String getConnectionParameter() {
            String connectionParameter = "";
            if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) {
                connectionParameter = ";interface=wifi";
            } else {
                int coverageStatus = CoverageInfo.getCoverageStatus();
                if ((coverageStatus & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS) {
                    connectionParameter = ";deviceside=false";
                } else if ((coverageStatus & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) {
                    connectionParameter = ";deviceside=true";
                }
            }
            return connectionParameter;
        }

            public void zipRequest(OutputStream io, String data) throws Exception{
                try{
                    GZIPOutputStream gz = new GZIPOutputStream(io);
                    byte[] bytes = data.getBytes("UTF-8");
                    gz.write(bytes, 0, bytes.length);
                    gz.close();
                }
                catch(Exception ex){
                }
        }

}
}

I solved this problem of "Preverify" jar

Tags: BlackBerry Developers

Similar Questions

  • Error! : duplicate definition for 'org.kobjects.base64.Base64', in: org.kobjects.base64.Base64

    Hi, using ksoap 2 jar, I get following error. Someone can he figure out?

    "Error!: duplicate definition for 'org.kobjects.base64.Base64', in: org.kobjects.base64.Base64 '...

    Maybe you added two libraries with this class? for example ksoap2 and kxml?

  • error "duplicate definition of the function.

    How can I change the code below to avoid an error?

    It gives me an error "duplicate function definition. Of course, I learn fast enough and little error.

    thumpy.addEventListerner (MouseEvent.CLICK, onClick);

    function onClick(evt:MouseEvent):void {}

    var url: String = " " http://www.thumpersf.com '; '.

    var req:URLRequest = new URLRequest (url);

    navigateToURL (req, "_blank");

    }

    You are right about the two lines is necessary.  One involves the transfer of the event listener with the identification of the function of Manager in it:

    humpy.addEventListener (MouseEvent.CLICK, onClick);

    and the other is the actual event handler function

    function onClick (...

    The duplication error will arise when you have two functions sharing the same name...

    function onClick (...

    function onClick (...

    Unfortunately I do not see the history of the display when writing, so I don't know if it is possible that some other functions were duplicated, rather than that which is currently focused on until now.

    To answer your original question and rule the entrance/exit or not that code is the problem, change the code as follows:

    thumpy.addEventListener (MouseEvent.CLICK, clickThumpy);

    function clickThumpy(evt:MouseEvent):void {}

    var url: String = ""http://www.thumpersf.com "; "

    var req:URLRequest = new URLRequest (url);

    navigateToURL (req, "_blank");

    }

    (Don't sweat short-circuit the code...) If you're new to AS3, it is better to learn it realizing that there are three distinct parts to bond a URL did you watch... you can drive with one hand after completing some experiments using two)

  • Duplicate definition

    Hello. I get the following message appears when I try to compile and run my project on the BB Simulator.

    Packaging Project ProjectName failed

    Error! : duplicate definition for 'org.kxml2.io.KXmlParser', in: org.kxml2.io.KXmlParser

    Now, it makes sense because I have references to kxml2 - ksoap2-j2me-core-prev - 2.1.2.jar and 2.3.9.jar, which contain the org.kxml2.io.

    My question is simple. How can I get rid of one?

    The two pots contain required files I am looking to just remove the org.kxml2.io of one or the other.

    Thanks in advance.

    Problem solved. Just find the .jar to your hard drive file and rename it so that the extension is .zip. Then from there, you can go and delete all you want.

    Be sure to rename it to .jar.

  • Error 80070670 installing KB915597 (definitions for Windows Defender)

    Original title: Windows Defender

    My windows was just trying to download an update to Windows Defender 80070670 KB915597 1.139.1240 definition. It is the first time that has happened. Is this serious.
    Can I download the new update?  How can I download this update?

    My operating system is Windows Vista HomePremium 32 Bit and my browser, IE9.

    Thank you.

    Jerry.

    HI Milton,

     
    Thank you for writing to Microsoft Communities. From your problem description, I understand that you would like to know if it is safe to download Windows Defender updates. Please correct me that I misunderstood.
     
    Do you have any other antivirus on your computer?
     
    Yes, it's absolutely perfect, if you download and install the latest updates for Windows Defender. Updates to Windows that are available to you are intended to improve the performance of the operating system, add new features and keep the computer up to date.
     
    If you use Windows Defender on the computer as a security software, it is recommended to keep it updated as this will improve the performance of Windows Defender to secure the operating system against viruses and Trojans.
     
    Method 1:
    Run the patch from the following link and check the status of the question...
    The problem with Microsoft Windows Update is not working
     

    Method 2:

    You can download and install the update for Windows Defender definition through Windows updates, or else you can manually download and install the same using the link below.
    How to manually download the latest definitions for Windows Defender updates
    http://support.Microsoft.com/kb/923159
     
    Description of the Windows Defender definition updates
    http://support.Microsoft.com/kb/915597
     
    As you mentioned that you receive error 80070670 when installing the definitions for Windows Defender, I suggest to try the steps in the following link and check if it helps.
    How to troubleshoot Windows Defender definition update
    http://support.Microsoft.com/kb/918355
    Note: You may have to disable the antivirus installed on the computer software. (Any third-party antivirus software)
    Antivirus warning: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.
     
     
    Please follow the advice given and navigate the sites mentioned and let us know the result. We will be happy to help you.
  • ERROR-OGG-00423 found definition for source.person

    Hi Experts,

    I use GG to test replication between 10g SchemaA g SchemaB 10 bodies. But when I try to launch my continued it shows abending status :( The error it give is "2012-03-05 13:22:21 ERROR OGG-00423 found no definition for the SOURCE." NO ONE. »

    These are the parmas

    EXTRACT EXTOCC
    Username source@//localhost:1521/xe PASSWORD xyz
    discardfile. / dirrpt/extocc.dsc, purge
    reportcount every 30 minutes, rate
    NOCOMPRESSDELETES
    exttrail l1
    table source.person.

    -DATAPUMP

    EXTRACT DPOCC
    PassThru
    rmthost localhost, mgrport 7809
    NOCOMPRESSDELETES
    rmttrail R1
    table source.person.


    replicat repocc
    Username dest@//localhost:1521/xe PASSWORD xyz
    discardfile. / dirrpt/repocc.dsc, purge
    reportcount every 30 minutes, rate
    card source.person, target dest.person;


    Can someone guide me where I am doing wrong or have I missed something to do/Include?

    In the param Replicat please try ASSUMETARGETDEFS, if source and target have the same structure of the table...
    If the two structures are different, generate a source definition and use SOURCEDEFS in Param to replicate.

  • 10.3 workspace error: same definition label for pages multiple .portal file

    Hello

    We apply unique Internet portal with three files .portal. The page label and the book definition for books pages are the same on all three .portal. This was done for re-use, because the underlying code base functional is the same for all three .portals.

    It was great working on weblogic 8.1.We are now trying to port it in weblogic 10.3, but construction did not reach 10.3 workspace studio, complain of the same label definition page/book existing in all three .portal.

    (1) why is 10.3 considering this as a mistake?

    (2) how is it possible to get rid of these errors? The server will complain also mistakes, or is it due to some restrictions on the studio 10.3 workspace?

    Help, please.

    Thank you

    Glad that helped! Here is the external link to the section of the portal development guide that explains the objets.book/.page and how to use them in your .portal.

    http://download.Oracle.com/docs/CD/E13155_01/WLP/docs103/portals/develop_portals.html#wp1011957

  • Specification of the REP-0151 duplicate Argument for the keyword "P_VEND_LOW".

    Hi gurus,

    I signed the report in oracle R12 with date setting applications, vendor number, supplier number to and the supplier site settings.

    For provider numbers, I used the same valueset for LOVs

    When I try to run the report from the SRS window, report is implementation error.

    In the log file, below error. Could someone help me please on this issue.

    Specification of the REP-0151 duplicate Argument for the keyword "P_VEND_LOW".

    Thank you

    Anill

    Hi Anill,

    It seems that the definition of your simultaneous program includes two parameters with the same domain "Token", which is the field to the report. Review the settings and check if this is the case.

  • No schema definition for 'HTNG_ReadRQ' (namespace ") in parent ' / '.

    I have successfully registered all the schema that are included in HTNG_ReadRQ. I tested the pattern recorded by validating against a xml code generated by a query PLSQL. I went to test the HTNG_ReadRQ and received the above error (no schema definition for 'HTNG_ReadRQ' (namespace ") in parent ' / '). I enclose you OTA_VehRetResRQ.xsd and HTNG_ReadRQ.xsd. I registered with GENTYPES = true and GENTABLES = false.

    What a waste.

    According to HTNG_ReadRQ, the target namespace is ' http://htng.org/2014B', not ' http://www.opentravel.org/OTA/2003/05'.»»» "

    Second question is that you also have the attribute xsi: schemaLocation evil.

    When the schema declares a target namespace, this attribute should read as follows:

    "" xsi: schemaLocation = " "

    where is, in this case, "http://htng.org/2014B".

    and is the url you use for registration of the scheme.

  • 'System.DateTime' does not contain a definition for 'HasValue '.

    I develop a lightswitch application. But me make mistakes trying to build the application:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.LightSwitch;
    namespace application
    {

    partial public class Section
    {
           
    SectionDisplay_Compute partial Sub (Ref DateTime result)
    {

    If ((this. Course! (= null) & (StartDate! = null) & (teacher! = null))
    {

    Assign the result to the value of the desired field

    result = String.Format ("{0} ({1}) [{2} - {3}]", Course.CourseName, Teacher.UserName, StartDate.ToShortDateString (), ((StopDate.HasValue)? ") StopDate.Value.ToShortDateString (): "'));

    }

    }
    }
    }
    This is the code. Get the following errors

    Error 1 'System.DateTime' does not contain a definition for 'HasValue' and no extension method 'HasValue' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    Error 2 'System.DateTime' does not contain a definition of 'Value' and no extension method 'Value' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    anyone help me please in this ASAP?

    Hello

    What operating system is installed on the computer?

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums. You can follow the link to your question:

    http://social.msdn.Microsoft.com/forums/en-us/categories/

    Hope this information helps.

  • Definition for KB915597 Defender Windows Update (Vista Pro)

    Repeating the failures to install this update: KB915597, 1.71.1143.0, ideas, any help or advice? Thank you!

    Hello

    Do these 1:

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    Do the two of them:

    How to reset the Windows Update components? a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system update for Windows Vista, for Windows Server 2008 analytical tool, for
    Windows Server 2008 R2 Release Candidate for Windows 7 Release candidate
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------

    Troubleshooting of Windows Defender
    http://support.Microsoft.com/kb/555957

    "%ProgramFiles%\Windows Defender\MsAsCui.exe" is the folder of the default Defender

    Start - type in the area of research-> Windows Defender - find top - make a right click on it - RUN AS ADMIN

    If no joy using Start - computer or Windows Explorer to access this folder and create a shortcut to
    on the desktop and the Start Menu. You can also right click on everything there are shortcuts and see if they point to here.

    Goal
    "%ProgramFiles%\Windows Defender\MsAsCui.exe".

    Start in
    "%ProgramFiles%\Windows defender.

    How to enable or disable the Windows Defender
    http://www.Vistax64.com/tutorials/93118-Windows-Defender-off.html

    -------------------------------------------------------------
    Maybe something here if necessary:

    What is display / causing the error message? Some anitvirus/security/antispyware products can cause this error.
    On those who use you, including those that your never had even these uninstalled (leftovers can cause
    Questions). McAfee is just an example of what many can do.

    Start - type in the search box - Services - find top - Right Click - Run as Admin

    Windows Defender - value STARTED and AUTOMATIC
    -------------------------------------------------------------

    How to manually download the latest definitions for Windows Defender updates
    http://support.Microsoft.com/kb/923159/

    Malware Protection Center - Download the latest definitions
    https://www.Microsoft.com/security/portal/definitions/ADL.aspx?WA=wsignin1.0

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Windows will not install updates after "update definition for windows defender-KB915597(Definition 1.21.1279.0) 03/03/09 '"

    Since I installed the updated definition for windows defender-KB915597(Definition 1.21.1279.0) 03/03/09, I was not able to install the new updates. I don't know why, but none of the updates I have been install, or at least try, are installation and saying "Success" next to them. I've used different methods to dispose of everything, if I have any, virus and still have not seen any progress. And unfortunately, I deleted all my restore points to keep the memory on my laptop. I have too many errors, report them all, but some of the things I did to check to ensure that I have no viruses do analyses of the complete system and remove a mysterious software they gave me an alert by (using McAfee Security). Any help will be considered. Help, please! :(

    If you install the hidden recovery partition to do the cleaning, you will probably not the product key. Otherwise, use one on the sticker attached to the computer. ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Definition for Microsoft Security Essentials - (definition 1.129.566.0) KB2310138 update failed to install.

    Definition for Microsoft Security Essentials - (definition 1.129.566.0) KB2310138 update failed to install.

    Hello

    1. Is there an error code or the message that displayed when installation fails?
    2. How you try to install the update? You use the update or you have downloaded the stand-alone pack and tried to install it?
    Check out the link and follow the steps.
    How to manually download the latest Microsoft Security Essentials definition updates
    http://support.Microsoft.com/kb/971606
  • widows system error: duplicate name exists on the network

    at startup I get the following: Windows system error: duplicate name on exists on the network, how can I get rid of this?

    Change the name of your computer? See if this helps: http://support.microsoft.com/kb/295017 - B -.
    http://www.officeforlawyers.com | http://www.OneNote-tips.com
    Author: Guide to counsel for Microsoft Outlook

  • Adobe animate CC error 1172: Definition com.adobe.serialization.json:JSON could not be found.

    Hello

    All advice is appreciated.

    I have an AIR for iOS file is previously in Flash Professional CC 2015, with com.adobe.serialization.json.JSON and com.adobe.serialization.json.JSONParseError imported into a folder to parse and decode the JSON string for oauth2 procedure. Since I've upgraded to Adobe animate CC 2015, today when I open the file and I tried to publish the API, it returns the following errors:

    1172: definition com.adobe.serialization.json:JSON could not be found.

    1172: definition com.adobe.serialization.json:JSONParseError could not be found.

    1120: access of undefined property JSON.

    1046: type was not found or is not a compilation constant: JSONParseError.

    1046: type was not found or is not a compilation constant: JSONParseError.

    I don't know what caused it in the new CC animate and how to solve this problem. Please help if you can provide solutions and ideas. Thank you very much!

    Kind regards
    Yu

    This question is already answered here: Adobe animate error 1172: definition com.adobe.serialization.json:JSON could not be found

Maybe you are looking for