How to use native XML driver in CR XI 2 (to avoid "Database Logon Failed")?

Hello,
I have a simple scenario:
The Java Part:
-Our Java application creates a pair of files: one XML and one XSD.
-Both files are uploaded to an ASP.NET page along with a report (RPT file - based on the same XSD and some generated XML using the native XML driver) for rendering a PDF.
The ASP.NET(VB) Part:
-Reads and stores 3 files (XML, XSD and RPT) to temporary files.
-Loads the report
-Updates connection attributes ("Local Schema File" and "Local XML File") to point to those temporary files.
-Exports the report to a PDF which is returned to the Java part.
What are the correct steps to accomplish this? I keep on getting "Database logon failed." exceptions.
My code looks like this:
Dim doc As ReportDocument = New ReportDocument
doc.Load(rptPath)
Dim attr As DbConnectionAttributes
attr = New DbConnectionAttributes()
attr.Collection.Set("Local Schema File", xsdPath)
attr.Collection.Set("Local XML File", xmlPath)
Dim conn As IConnectionInfo
conn = doc.DataSourceConnections.Item(0)
conn.Attributes.Collection.LookupNameValuePair("QE_LogonProperties").Value = attr
conn.Attributes.Collection.LookupNameValuePair("QE_ServerDescription").Value = xmlPath & " " & xsdPath
conn.Attributes.Collection.LookupNameValuePair("QE_SQLDB").Value = False
doc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "")
Thank you for any help,
David
(Crystal Reports XI Rel 2. SP4, .NET assembly 11.5.3700)

Hi,
When you get a database logon prompt like this it normally means the dataset you're creating at runtime does not match the schema that the report was designed with.
The simplest thing to do is write out the dataset to XML with Schema after you fill the dataset. Once you've written out the dataset you can go back to the report in Crystal Reports itself and try to point the report to the XML file directly. If you get any errors this confirms that the dataset does not match what the report is expecting.
Try it, address any differences, and you should be all set.
Sincerely,
Amit

Similar Messages

  • VB6 & XML Datasource using Native XML Driver

    We used to use reports that used ADO XML dataset, and in VB 6 we easily told the report which XML file to use by:
    Dim objCRReport As CRAXDRT.Report
    Set objCRReport = objCRApplication.OpenReport(App.path & "\crystal\" + rptName)
    objCRReport.DiscardSavedData
    objCRReport.Database.Tables.Item(1).Location = xmlFile
    where xmlFile was the fully qualified path to the xml data to pass to the report.
    Now we are trying to do this with a new report which uses a XML Native driver as its connection method. In VB6, how can we pass different xml files to use?
    We looked at objCRReport.Database.SetDataSource, but it expects some parameters that I don't understand ( data , { data type } , { table number  } )
    Is there an example anywhere of how to switch your datasource in code while using the XML Native Driver?

    See [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note.
    I would also recommend that you read the following regarding distribution of the runtime. This is important as the xml driver (crdb_xml.dll) uses Java:
    Apart from the regular deployment procedure for COM/RDC/NET applications, you have to follow the additional below-given steps in the client machines.
    Install the Java (JVM) 2 Runtime Environment (this is essentially the Java Framework needed to launch the crdb_xml native driver 1.4.2 from the java sun web site at:
    http://java.sun.com/j2se/1.4.2/download.html.
    Create a java folder inside the " C:Program FilesBusiness ObjectsCommon3.0";.
    Copy over the Crconfig.xml(C:Program FilesCommon FilesBusiness Objects3.0java) file from the development machine to the deployed machine in at the following path "C:Program FilesCommon FilesBusiness Objects3.0java" path. Open the crconfig.xml ; this file in Notepad and search for the line <JavaDir>. If JRE is installed to C:Program FilesJavaj2re1.4.2_12 in then the value should be look like this <JavaDir> C:Program FilesJavaj2re1.4.2_12 in</JavaDir>.
    Create a folder called lib in the "C:Program FilesCommon FilesBusiness Objects3.0java".
    Copy over the entire contents of the lib folder (especially the external folder) from the development machine to the newly created lib machine on the deployed machine. The point of this is to ensure that the crconfig.xml file contains all the files here which exist at the correct path which they now should because we copied over the lib and external directories.
    Copy crdb_xml.dll, crdb_xml_res_en, and all the files with "crdb_xml_res_xx from your development machine to the deployment machine (C:Program FilesCommon FilesBusiness Objects3.0 in).
    Restart your machine and try accessing your web application. The reports will show up the data without any issue.
    The above is written for CR XI release 1. You may have to adjust the path given above as you do not specify the version of Crystal reports you are using.
    Ludek

  • Native XML Driver Deployment

    For a while we had trouble using the native xml driver, but it has been worked out here:
    VB6 & XML Datasource using Native XML Driver
    In that thread there was mention of deploying the driver, and some extra work that needed to happen. I found those instructions repeated again here for another user:
    https://boc.sdn.sap.com/node/1428
    We have followed the instructions of coping the required files and java runtime to a new test client, but our reports do not launch.. we get this error after a good 30 seconds of hang-time,
    Invalid Argument Provided
    I've doubled checked the instructions and all files are copied, and edited the crconfig.xml to point to the new j2re bin folder. There doesn't appear to be many discussions with this error, what does it mean? Thanks.
    Note that we are using the RDC, Native XML Driver, Crystal Reports XI R2 SP4.

    Ok I went over the process again, and am a little confused -
    Install the Java (JVM) 2 Runtime Environment (this is essentially the Java Framework needed to launch the crdb_xml native driver 1.4.2 from the java sun web site at:
    http://java.sun.com/j2se/1.4.2/download.html.
    Create a java folder inside the " C:\Program Files\Business Objects\Common\3.0";.
    Copy over the Crconfig.xml(C:\Program Files\Common Files\Business Objects\3.0\java) file from the development machine to the deployed machine in at the following path "C:\Program Files\Common Files\Business Objects\3.0\java" path. Open the crconfig.xml ; this file in Notepad and search for the line <JavaDir>. If JRE is installed to C:\Program Files\Java\j2re1.4.2_12\bin then the value should be look like this <JavaDir> C:\Program Files\Java\j2re1.4.2_12\bin</JavaDir>.
    Create a folder called lib in the "C:\Program Files\Common Files\Business Objects\3.0\java".
    Copy over the entire contents of the lib folder (especially the external folder) from the development machine to the newly created lib machine on the deployed machine. The point of this is to ensure that the crconfig.xml file contains all the files here which exist at the correct path which they now should because we copied over the lib and external directories.
    Copy crdb_xml.dll, crdb_xml_res_en, and all the files with "crdb_xml_res_xx from your development machine to the deployment machine (C:\Program Files\Common Files\Business Objects\3.0\bin).
    Restart your machine and try accessing your web application. The reports will show up the data without any issue.
    The above is written for CR XI release 1. You may have to adjust the path given above as you do not specify the version of Crystal reports you are using.
    On my development machine,  there is no Crconfig.xml  at this location (C:\Program Files\Common Files\Business Objects\3.0\java)   .  In fact the java folder is not there either, I only see bin and crystalreportviewers11 folders.  Can these instructions be confirmed for me as accurate? I do not even see a 3.5 folder under C:\Program Files\Common Files\Business Objects\

  • Special Character Restrictions for Native XML Driver

    Hi,
    I have found the following special character restrictions in the documentation:
    "Because they are handled specially by the Native XML driver, do not use the following special characters to define element types and attributes in your XML schema:u201C.u201D, u201C/u201D, u201C\u201D, u201C:u201D u201C@u201D."
    After checking the createad XML-Files in our projects that we will use for CR4E there is often a  u201C.u201D in the definition. Because this is delivered from third-party, we wish that the  u201C.u201D  will be enabled.
    In the moment we create the XSD-Files from the XML-File with XML2XSD.
    It is possible in the future?
    Best Regards
    Arnold Meier

    The changes aren't in XI Release 2, but in 2008.
    Do you still have Nha's XML data?  I edited Document_Policy, Policy_AllCoverages, Policy_Beneficiary to Document.Policy, Policy.AllCoverages, Policy.Beneficiary, then use the following code in CR4E 2.0:
    reportClientDocument reportClientDocument;
    ConnectionInfo connectionInfo;
    PropertyBag propertyBag;
    * Connect to the Java Print Engine and create a new document.
    reportClientDocument = new ReportClientDocument();
    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
    reportClientDocument.newDocument();
    * Define connection to the XML and XSD files.
    propertyBag = new PropertyBag();
    propertyBag.put("Local XML File", "C:\\Documents and Settings\\tueda\\Desktop\\nha.xml");
    propertyBag.put("Local Schema File", "C:\\Documents and Settings\\tueda\\Desktop\\nha.xsd");
    propertyBag.put("Convert Multivalue to Table", Boolean.FALSE);
    propertyBag.put("Database DLL", "crdb_xml.dll");
    connectionInfo = new ConnectionInfo();
    connectionInfo.setAttributes(propertyBag);
    * Specify the dataset in the XML as a Table, and add to the report.
    Table table = new Table();
    table.setConnectionInfo(connectionInfo);
    table.setName("Document.Policy/Policy.Beneficiary");
    table.setAlias("Document_Policy/Policy_Beneficiary");
    reportClientDocument.getDatabaseController().addTable(table, null);
    * Save report to file C:\local_xml.rpt
    reportClientDocument.saveAs("nha_local_xml.rpt", "C:\\", ReportSaveAsOptions._overwriteExisting);
    reportClientDocument.close();
    Sincerely,
    Ted Ueda

  • HOW TO: Use the XML parser in Oracle 8.1.7

    I am trying to figure out how to use the xml parser provided in oracle 8.1.7. all i want to do is parse a xml report that is defined using a schema, and place the data into the proper tables. i am totally unfamiliar with the xml parser and how it works. i have done some reading on the subject, but seem to be getting some conflicting infromation about which utilites i need and how to invoke them. can someone please tell me what utilities i need, how to invoke them, and what i need to do to get a xml document to parse and insert to a table? I would greatly appreciate any help anybody could offer. thanks.

    You can parse the XML Document with XML Parser and place the data into database using XSU(XML SQL Utility).
    Both of these are included in XDK for Java at:
    http://otn.oracle.com/tech/xml/xdk_java
    The following document could also help:
    Oracle9i XML Developer's Guide--XDK [PDF] at http://otn.oracle.com/tech/xml/doc.html

  • How to use a jdbc driver in caf

    Hi, all.
         I tried to make a ws to access DB with CAF, but I had no idea how to use a jdbc driver(.jar).
        Can anyone do me a favor? Thx 
        PS: my server is ce7.1
    Edited by: Louis HUANG on Jul 27, 2009 1:09 PM

    hi
    If you want to interact with db tables in caf,try like this.
    it may work..
    Using EJB call database tables using jdbc driver.
    Expose EJB as webservice.
    and using External service option of caf utilise this webservice in caf,do the necessary mappings..
    you can search in sdn,how to call DB tables in EJB..
    Regards
    sowmya.

  • How to use external hard drive and iTunes together?

    how to use external hard drive and iTunes together?

    Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...

  • How to use native method

    how to use native methods

    ----- BEGIN CANNED RESPONSE -----
    Download and read Sheng Liang's book, ftp://ftp.javasoft.com/books/specs/jni.pdf
    Read the JNI specs on java.sun.com site ( http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html )
    Beware with the JNI tutorial on the java.sun.com site - it is slightly outdated, and the samples need modifications to compile
    ----- END CANNED RESPONSE -----

  • How to use multiple tape drive for single filesystem on single client.

    Hello All.
    I want to backup single filesystem with multiple tape drive.
    Incase of Symantec veritas netbackup "NEW_STREAM" for multi-stream backup.
    Backup client has a  single backup filesystem like /data1  directory with 4 LTO6 drives.
    /data1 directory doesn't have a sub-direcotry, just present a files.
    If /data1 directory has a sub-directory like /data1/aaa, /data1/bbb, /data1/ccc , Is it possible to use multiple drives?
    Please anybody answer the questions.
    Thanks advanced.

    See how to use multiple tape drive from single client when I want to backup single filesystem?

  • How to use the dvd drive...?

    Hi Guys,
    Just bought my new 15" 2.53 Mhz Duo Core MacBook Pro a month ago but until now I haven't figured out how to use the DVD drive. Well I can't seem to find where it is actually... Does all MacBook Pro has dvd drive? Coz when I check back apple's website and look for the same macbook pro specification like my one, it has a dvd drive included so I thought my macbook has it for sure but can't or don't know how to use it... This is my first time to have an apple that's why...
    Hoping for your help..
    Thanks,
    Danny

    Hi there Danny.
    I believe you are looking for the location of the DVD drive... right?
    If you are looking at your computer while it is open, it should be on the right hand side... "under" the keyboard. There is a slit that allows the DVD to be inserted into the computer. I think if you start to insert a DVD in there (shiney side down) part way, it will suck it into the computer.
    (note: I'm not exactly sure, because I use a 7 year old iBook that has a pop-out DVD tray... but I think it will suck it in for you)

  • Database Logon Failed when loading Access mdb that use a system mdw

    I am trying to get my Report Viewer ASP.NET application running 11 R2 SP3 to open a report that uses Access database with a system database file (mdb and mdw file)
    the report runs fine in the designer and it runs fine on the developer test computer
    but the production environment that does not have the full Crystal Designer installed just the runtime engine (but does have the full MSAccess running) cannot load the database
    i keep getting "Database Logon Failed"
    SWIP Reports
    Error Exporting Report
    Report:     Help Desk Reports Over 3 Days
    Server Name:     \\poseidon\IT\Databases\itdept.mdb
    Database Name:     \\poseidon\IT\Databases\itdept.mdb
    User:     GLOBAL\ADMINISTRATOR
    IP:     127.0.0.1
    ============================================================
    | Exception Information
    +----------------------------------------------------------------------
    |  Exception Message:     Database logon failed.
    |  Exception Source:     CrystalDecisions.ReportAppServer.DataSetConversion
    |  Inner Exception:          
    |  Begin Stack Trace:
    |        at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.T_
    |          hrowDotNetException(Exception e)
    |        at CrystalDecisions.ReportSource.EromReportSourceBase.Exp_
    |          ortToStream(ExportRequestContext reqContext)
    |        at CrystalDecisions.CrystalReports.Engine.FormatEngine.Ex_
    |          portToStream(ExportRequestContext reqContext)
    |        at CrystalDecisions.CrystalReports.Engine.ReportDocument._
    |          ExportToStream(ExportOptions options)
    |        at CrystalDecisions.CrystalReports.Engine.ReportDocument._
    |          ExportToHttpResponse(ExportOptions options, HttpRe_
    |          sponse response, Boolean asAttachment, String atta_
    |          chmentName)
    |        at CrystalDecisions.CrystalReports.Engine.ReportDocument._
    |          ExportToHttpResponse(ExportFormatType formatType,_
    |          HttpResponse response, Boolean asAttachment, Strin_
    |          g attachmentName)
    |        at reports.PushReport(ExportFormatType expType, String Co_
    |          ntentType, String Ext, Boolean Popup)
    |        at reports.exportReport(String strExpFmt)
    +----------------------------------------------------------------------
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    does anyone have any advice on why this is failing only on the server but is not failing on the developer or the designer computers.

    public Reports(String RptPath)
                this._ExpOptions.ExportDestinationType = ExportDestinationType.NoDestination;
                this._ExpOptions.ExportFormatType = ExportFormatType.NoFormat;
                this._RptDoc = new ReportDocument();
                this._RptDoc.Load(RptPath, OpenReportMethod.OpenReportByTempCopy);
                login();
    private void login()
                if (!_IsLoggedIn)
                    try
                        String dbName = this._RptDoc.DataSourceConnections[0].ServerName.ToString();
                        for (int i = 0; i < this._RptDoc.DataSourceConnections.Count; i++)
                            this._RptDoc.DataSourceConnections<i>.SetLogon(uid(dbName), pwd(dbName));
                        foreach (ReportDocument Sub in this._RptDoc.Subreports)
                            dbName = Sub.DataSourceConnections[0].ServerName.ToString();
                            for (int i = 0; i < Sub.DataSourceConnections.Count; i++)
                                Sub.DataSourceConnections<i>.SetLogon(uid(dbName), pwd(dbName));
                        ConnectionInfo coninfo = new ConnectionInfo();
                        coninfo.DatabaseName = this._RptDoc.DataSourceConnections[0].DatabaseName;
                        coninfo.ServerName = this._RptDoc.DataSourceConnections[0].ServerName;
                        coninfo.UserID = this._RptDoc.DataSourceConnections[0].UserID;
                        coninfo.Password = this._RptDoc.DataSourceConnections[0].Password;
                        foreach (CrystalDecisions.CrystalReports.Engine.Table crtbl in this._RptDoc.Database.Tables)
                            TableLogOnInfo logoninfo = crtbl.LogOnInfo;
                            logoninfo.ConnectionInfo = coninfo;
                            crtbl.ApplyLogOnInfo(logoninfo);
                        _IsLoggedIn = true;

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

  • How to use Native XA in XE database?

    Hi,
    I am having problem in using XA datasource in XE. I understand if we are using XE database, jvm is not available. Thus, we have to use Native XA which requires using JDBC Thin Driver.
    My JBoss hit below error during initialization.....
    =====================================
    2006-03-28 16:14:27,645 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:18s:482ms
    2006-03-28 16:16:05,887 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=snz-dcs-001//51, BranchQual=] errorCode=XAER_RMERR
    oracle.jdbc.xa.OracleXAException
         at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
         at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
         at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
         at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
         at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:636)
         at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
         at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
         at
    Can anyone help to enlighten?
    Or maybe provides me with basic configuration of using XA datasource in XE database so I can check whether my config is correct or not?
    Any help will be appreciated!
    Thanks before.
    Joel

    Hi,
    Here's an update regarding my problem with XA transaction using XE.
    I don't know exactly how, but it works now.
    Here are the steps I did :
    ===================
    1. I decided to try creating JAVA_XA package in XE database. I took the script
    from oracle enterprise edition.
    This package can't be compiled in XE Production version, but it can be compiled
    in XE beta version.
    2. After using compiling, the JBoss initialization was still failing.
    3. Backup the database (with JAVA_XA) , and upgraded the beta-version to
    Production version.
    4. Restore the database (with JAVA_XA) into the Production version.
    5. it works :))
    Hopefully I can get some inputs/comments from the experts here in the forum.
    Thanks for those who has responded to my previous posts.
    Regards,
    Yoel
    Good job! A nice extra mile.

  • How to use Native SQL String

    Hi all,
    How do i use Native SQL String in the Reciver JDBC Adapter.
    Do i need to change the message format could u suggest me some blogs on the same.
    Also please can anyone let me knw if i can use this for stored procedure.

    hi aditya,
    there shud be no format as such. for sql xml format there are specific structure. but for native sql there shudnt be any specific structure.
    as pointed in sap documentaion:
    Instead of an XML document format, a text is expected that represents any valid SQL statement.
    When inserting a line into a table the corresponding document looks as follows:
    INSERT INTO tableName  (column-name1, column-name2, column-name3) VALUES(‘column-value1’, ‘column-value2’, ‘column-value3’)
    so jus make sure that u give a valid sql statement becoz if will be passed as it is to the database and try ur scenario.
    regards,
    latika.

  • How to use native dlls in jws

    hi,all
    I need to use native dll to read registry,I know nativelib label,but after I put the dlls to a jar,and use label <nativelib> to quote the jar,the system tell me error following:
    JNLPException[category: Security error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.LaunchDownload.checkJNLPSecurity(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    when I use jar href="..."to use this jar(This jar is packed dll files),the system tell me
    com.sun.deploy.net.FailedDownloadException: Unable to load resourcesFfile:/H:/test/dist/lib/ICE_JNIRegistry.jar
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    and
    java.util.zip.ZipException: ZIP file must have at least one entry
         at java.util.zip.ZipOutputStream.finish(Unknown Source)
         at java.util.zip.DeflaterOutputStream.close(Unknown Source)
         at java.util.zip.ZipOutputStream.close(Unknown Source)
         at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
         at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    now I'm not sure how to zip the dlls so that it can be used in nativelib?and how to used the <nativelib> label? just add it in the jnlp file ok?
    Thanks.

    >
    Thanks,Andrew!>Your detailed and technically specific reply is all the thanks I need ( and probably more than I deserve ;).
    I am still mulling (thinking) over your reply, there is nothing that 'jumps out at me' as being wrong with the way it is done, it all is looking like it 'should' work. The only other thing I can think to check is "did JaNeLA report any problems with it?"
    Oh hang on, wait just a second..
    If this webstart app. uses a native lib, it must declare security 'all-permissions'. See below for a 'hand written' variation to your posted JNLP file. Please make sure you validate these edits, since I did not (and I'm a little drunk, at this moment!).
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp codebase="file:/H:/test/dist/" href="launch.jnlp" spec="1.0+">
        <information>
            <title>Basic Application Example</title>
            <vendor>Sun Microsystems Inc.</vendor>
            <homepage href="http://appframework.dev.java.net"/>
            <description>A simple java desktop application based on Swing Application Framework</description>
            <description kind="short">Basic Application Example</description>
        <offline-allowed/>
    </information>
    <security>
      <all-permissions />
    </security>
        <resources>
    <j2se version="1.5+"/>
    <jar eager="true" href="test.jar" main="true"/>
        <jar href="lib/appframework-1.0.3.jar"/>
    <jar href="lib/swing-worker-1.1.jar"/>
    <jar href="lib/registry.jar"/>
    <jar href="lib/swing-layout-1.0.3.jar"/>
    <nativelib href="lib/ICE_JNIRegistry.jar"/>
    </resources>
        <application-desc main-class="test.TestApp">
        </application-desc>
    </jnlp>Oh yeah, yeah. And if you could note for future posts..
    When posting code, code snippets, HTML/XML(/JNLP) or input/output, please use the code tags. To do that, select the code, then click the CODE button seen on the Plain Text tab of the message posting form. This helps to retain the indentation and formatting of the text, and also helps avoid characters in the code as being interpreted as formatting (by the 'forum software'). ..And it also makes it pretty - but perhaps I should not mention that (it seems so 'un-hacker').
    And BTW, what is that standalone=''no" attribute in the opening XML element? Are you +sure+ you validated this in JaNeLA?

Maybe you are looking for