Loading local JRE classes tries first from document base (jaxp?)

I am using JAXP in my applet with JRE 1.5. I have set the system property for JAXP to find the correct implementation. Both the implementation and the JAXP "interface" files are located in rt.jar in the local JRE installation.
But everytime I call a JAXP class it first looks under my document base, in this case the jar file from server where the applet code is! Worse is, ity thinks that is a directory and checks "under" that directory.
Finally, it does not find the JAXP classes in that jar (on the server), and it finds it locally. But this generates much network traffic.
Is it possible to tell JVM how to find it's classes in rt.jar?
This is the console debug logging:
network: Connecting http://xx.xxx.xxx/xx/applet/egate.jar/META-INF/services/javax.xml.transform.TransformerFactory with proxy=DIRECT

I have built a desktop application that can use these
calls to check if the xml contained in the document
called "file" is well formed.
Ok. So, the application works fine then?
DocumentBuilderFactory domFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder domBuilder =
lder domBuilder = domFactory.newDocumentBuilder();
     domBuilder.parse(file);
They are part of the javax.xml.parsers.*; package.
Problem is that to serve this I need to put it in an
applet but since I have to write the xml string to a
file local to the server the applet is not working.
Huh? You lost me there. Are you getting security exceptions from the applet? If yes, you need to sign the applet. Otherwise, what is not 'working' in the applet compared to the application? Also, why do you need to first write it to a file?
My question is if anyone knows of some classes in the
API that will allow me to check if a String of XML is
well formed or not.
If the document is not well-formed, the parse() call will throw an exception. Catch this and process as needed.
I basically need to get a string from a field in a
data base in XML format and be able to test it
without first writing it to a document so I can get
the applet to work.
If you want to access an external database from an applet, you will need to sign the applet. You should not need to first write it to a file before parsing. Rather, simply use a stream (either InputStream or Reader) and wrap it in a StreamSource object.
If anyone knows something on this or has an
alternative suggestion please do tell.
Thanks.- Saish

Similar Messages

  • VS2013.4 Class Diagram inheriting from a base type (how do I)

    Hi Folks,
    I am creating a VS2013.4 class diagram and one of my classes inherits from a base class System.Configuration.ProviderBase.
    In VS2010 there is a way to do this and the class new class would show (Abstract Class -> ProviderBase) in its description.   Is there a way to
    When I look at the properties for the class there is no property specifying inheritance.  In VS2010 there is an 'Inherits' property.
    Regards
    Andy

    If the User-Agent contains "Fennec/" then it is Firefox for mobile. If it contains "Android" then it is running on an Android device.
    We have an open request to add more device info to the User-Agent header. For details, see:
    https://bugzilla.mozilla.org/show_bug.cgi?id=625238
    We'll consider this request, but we must balance it against user privacy, and attacks like browser fingerprinting. For now, in cases where you don't detect a known device from the User-Agent header, you can ask the user instead (for example, have them choose from a list of devices). This will also benefit Android users who have changed their browsers' User-Agent headers for various reasons.

  • How can I load one photo at a time from Documents into the Firefox Photo Album. Using Vista ome Basic

    I really cannot see exactly where to start

    select the head with one of Photoshop's selection tools
    When doing this, I find it quite helpful to create an intermediate image with a transparent background that contains only the head to be pasted into the second image. First I paste the head onto this transparent background, scale it, rotate it or skew it to make it fit into the other image, adjust the lighting, then select it.
    To be able to paste the head seemlessly into the second image (and without aliasing effects), I make the border of the selection soft (⌥⌘D); my Photoshop has a german interface, so I am not sure about the english localization, this command must be something like "selection -> modify selection -> soft border".
    I would not bother to get the lighting and color excactly right in Photoshop, that is  far easier with the "dodge" and "burn" brushes and color adjustments in Aperture.
    To do this completely in Aperture, you would have first to combine both images into one (for example by creating a book page), then use the retouche->clone tool to stamp the head from one image to the other. I use this occasionally to stamp a face into a flower bud or for  similar effects. However, for this to work you need a plain background and nearly circular shapes to be pasted.
    Léonie

  • Can't get Firefox to load at all after trying fixes from support web site. Have checked for lock file, processes running, reboot, reinstall. NO JOY.

    I'm running Vista for operating system on an HP laptop that's about 2 years old. I've installed all current updates.
    I've always used Firefox. It started crashing and creating processes but not launching. Went to support and scoped it out -- there was a lock file my profile directory. I deleted it, and Firefox started loading.
    Used it a few times -- closed the app each time on exist as per suggestions on support site info. One time -- back to square one, wouldn't load, just created a process. Reboot, ending process, checking for lock file, reinstalling -- all unsucessful.

    Brian
    Below is from using a SIP build.  It does offer G722, but it's way down on the list so it's never used...
    m=audio 32678 RTP/AVP 0 8 18 102 9 116 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:102 L16/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:116 iLBC/8000
    a=fmtp:116 mode=20
    a=rtpmap:101 telephone-event/8000
    Taking Sreekanth's suggestion to try a Skinny build, I get the following when I make a call.  It offers codecs in the order I SET THEM AND ONLY THE CODECS I SET!  YAY!
    m=audio 19374 RTP/AVP 9 0 101
    a=rtpmap:9 G722/8000
    a=fmtp:9 bitrate=64
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    Using a Skinny build on the phones also solved other issues.  The phones use G711 when the whole path supports G711 and G722 when the whole path supports G722.  It doesn't always use G722 and rely on transcoding for the call paths that can't use it.  It's fantastic..  The phones also receive the QoS tagging that I set and that seems to result in better audio quality than on the SIP builds, which never did get those settings.  Finally, it even solved a slow Exchange 2013 answer issue I have been experiencing for quite some time.  I practically fell out of my chair when I saw everything that was fixed just by switching...
    Cisco, PLEASE FIX YOUR SIP BUILDS!  It's insane how the SCCP builds work perfectly and the SIP builds don't, especially with how much these phones cost..  I was thinking of possibly acquiring some 9951s, which are SIP only.  I'm a little leery about that at this point.  If they have the same kinds of issues as the SIP builds for the 7975g, there's no SCCP alternative to use..
    Sreekanth
    Thank you for suggesting a Skinny build..  That was about the only thing I didn't try.  I am happy beyond belief that this is working so well now, even though the SIP builds should be just as well developed as the SCCP ones.

  • "iTunes was unable to load class data information from sync services"

    I own iTunes 10.5 beta 3 64-bit for my 64-bit windows 7 pc, and it gives me this message whenever I try to sync ANY of my devices: "iTunes was unable to load class data information from Sync Services". I own an old iPod video and an iPhone 4 with iOS 5 beta 3. I've tried uninstalling all Apple products, searching through my hard drive and deleting everything Apple, cleaning the registry, EVERYTHING. I've reinstalled at least 4 times now. The problem refuses to become fixed. I've searched every article online possible, and none of the solutions have worked. Is there anything I can do to get my stuff back on to my devices???

    In the course of your troubleshooting to date, have you worked through the following document?
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert

  • Failed to load Main-Class manifest attribute from Hello.jar???

    HI all
    This is my first post, I hope its in the right section
    I followed the tutorial on [http://www.cs.princeton.edu/introcs/85application/jar/jar.html|http://www.cs.princeton.edu/introcs/85application/jar/jar.html] and I tried out the simple example below
    A simple example. Let's say we wanted to distribute the simple program Hello.java as a JAR. First, we create a text file named Hello.mf which contains:Manifest-Version: 1.0
    Main-Class: Hello
    Then, we create the archive by typing:
    jar cmf Hello.mf Hello.jar Hello.class Hello.java
    and run it by typing:
    java -jar Hello.jar 
    But when I ran the command java -jar Hello.jar the following error message showed on my command prompt
    Failed to load Main-Class manifest attribute from Hello.jar
    I don't know what I have done wrong, i followed the tutorial to the letter.
    Can anyone shed some light on whats going wrong please?
    Many thanks
    HLA91

    Sorry about double post but i dont know whether editing my first one will bump the thread, and i need it bumped :).
    I downloaded netbeans and I built my project and a jar file was created in oblong/dist (oblong is my project name) but again when i try to run the file the warning
    Failed to load Main-Class manifest attribute from oblong.jar
    appears and I dont know what i can do this time seen as i dont make the manifest file (read prior posts to see what i previously did wrong) , the compiler does it all for me so either im missing something that i have to do before building my project or netbeans is messing up for some strange reason. Can anyone provide insight?
    Many thanks
    HLA91

  • "Failed to load main class manifest attribute from " directory path

    i get this error when trying to run a jar file i made with eclipse. does anyone know how to fix it? thanks derek
    "Failed to load main class manifest attribute from "<directory path>

    A JAR file is simply a collection of class files, in order to make it an "executable" JAR file you must specify which class file is the "main" class file. In other words, which class should the runtime start executing first. You do this using what is called a manifest file, this is meta information included into the JAR file that the runtime extracts and uses. One attribute is the Main-Class key, which specifies the application's entry point.
    The Java tutorial goes into further detail on how to do this
    http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html
    You may also do this using Eclipse by going File -> Export -> Java -> JAR and follow the wizard.
    Using Netbeans this almost comes for free.

  • Error message: Failed to load Main-Class manifest attribute from local_poli

    OS: SLED 10 SP3 (Linux)
    Production Installation: to have the freebXML.org "Hermes2" work on nhn.no
    Hermes, apache-tomcat, jce, are all installed in same directory, and the first steps of Hermes installation is OK, but I cannot reach Hermes in http://localhost:8080, and I wonder if the JCE is part of this.
    I need to have the JCE Ecryption Extension installed, but upon trying <java -jar local_policy.jar> the error message comes like this:
    *" Failed to load Main-Class manifest attribute from local_policy.jar "*
    I am uncertain why this message comes.

    816248 wrote:
    >I need to have the JCE Ecryption Extension installed, but upon trying <java -jar local_policy.jar> the error message comes like this:
    *" Failed to load Main-Class manifest attribute from local_policy.jar "*
    I am uncertain why this message comes.
    I'm uncertain why you think you need to execute "java -jar local_policy.jar" since the jar file local_policy.jar has no executable parts and is simply a container for two 'policy' files. Can you post a reference to the documentation that says you need to do this?
    The only time you are likely to be directly interested in this jar file is when installing the 'unlimited strength' jar files when it is replaced.

  • IPhone would not let me delete individual song from library, tried deleting album to remove music from local storage, now certain songs from album do not show in iTunes match on iPhone only on computer

    Upon completion of matching and uploading my very large library of music (+15,000), I wanted to see how iTunes Match worked on my iPhone. I started it and selected the first album in the list to listen to. I let it play the entire album and then decided that I wanted to remove certain songs off of the iPhone's local storage. Tried to delete the individual songs and it would not let me. So I figured that I would go back and just delete the album. After selecting delete I went back to listen to one of the songs on the album and realized that it deleted several of the songs from the iTunes Match completely. When pulling iTunes up on my computer the songs are still there but does not give me the option to upload to iTunes Match.
    I have tried turning off Match on iPhone and back on (doesn't seem to do anything cause when turned off the iPhone still displays the music.)
    Then tried power cycling. (Still shows the music)
    Then I tried power cycling again and resyncing the phone and the iPhone still shows the music as it was on the phone.
    How do I get the music to be accessable on the iPhone again.. I have been messing with this for the course of 3 hours now.. and any help would be appreciated!!
    iPhone 3GS 8GB

    Actually Michael I know exactly how to delete.. The iPhone would not let me swipe to the left to delete the individual song, so I went to the album view and did it there.. The issue I am having is a bug because it removed 3/4 of the albums availablity off my iPhone.. You post proved no help because it is basic troubleshooting which, if you read my post, I have already done.. I did however figure out how to fix my issue on my own.. Basically I had to remove the album from my iTunes on my computer and upload it again to iTunes Match..

  • Loading local swf files from Application Dir (ios)

    Hi Guys,
    I would like to load additional local swf files to my ios release build but I am confused a little bit because of the new API changes.
    As far as I know at the moment (from Air 3.7 or newer) it is allowed to load local swf files that contains compiled actionscript both from local folder and from a predefined remote host as well. 
    My assumption based on this article:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/
    I created the text file to include all of my local swf file names and created the following node in the application.xml:
    <iPhone>
           <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs>
    </iPhone>
    When I compile the release build (ipa) using command line adt, it converts all of my local swfs into the stripped swfs which is perfect, but even though I include all the swfs in the compiler command, it puts only the SampleSWFInfoFile.txt file into the assets folder in the ipa but not the swf files.
    I assume, it thinks I will load these files from an external host, but I would like to include them in the app itself.
    I tried to copy the stripped swf files from the externalStrippedSwfs folder and comment the <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs> node in the application.xml and compile it and this way it puts the swf files into the ipa, but when I try to install and launch the app it crashes and when I test it using Flash Builder it shows an error message
    "VerifyError: Error #1042: Not an ABC file."
    Do any of you guys know the  solution for this problem?
    Thank you for your help in advance!

    You're publishing in AOT mode as long as you use one of these:
    The AIR Developer Tool or ADT has targets that lets you package apps either for the AOT mode or Interpreter mode. The targets for packaging in AOT mode are ipa-app-store, ipa-ad-hoc, ipa-test and ipa-debug.
    Flash Pro CS6 and Flash Builder automate this process pretty well so it's invisible but the SWF loads and executes code just fine for me when directly published.
    If I take it to command line I can use this to compile successfully (iPad test app):
    adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore my.p12 -provisioning-profile my.mobileprovision NameOfApp.ipa NameOfApp-app.xml NameOfApp.swf iTunesArtwork iTunesArtwork@2x AppIconsForPublish swfs/swfs.txt swfs/GenerateText.swf
    I at least include generic icons in there but I made a 'swfs' folder and placed 'swfs.txt' and 'GenerateText.swf' in there. The SWF uses code to randomly generate text and changes every second using a Timer. I load it in using the same code you do with the ApplicationDomain.currentDomain context. I see the SWF appear and text start randomly changing.
    As I compile there's a folder generated called 'externalStrippedSwfs' with the stripped SWF in there.
    One thing to note is I do not supply <externalSwfs>swfs/swfs.txt</externalSwfs> in my iPhone settings. If I do that it doesn't work. I supply the path to the text file containing the SWF I want to be stripped to adt itself along with the SWFs I want stripped and it takes care of the rest.

  • JAXBContext and unmarshaling xml document to a class that came from a jar.

    I'm trying to unmarshal, code:
                   try {
                        JAXBContext jc = JAXBContext.newInstance(clazz);
                        Unmarshaller m = jc.createUnmarshaller();
                        Document doc = XmlUtils.createDom(body);
                        javax.xml.bind.JAXBElement<T> res = (javax.xml.bind.JAXBElement<T>)m.unmarshal(doc);
                        return res.getValue();
                   } catch (JAXBException e) {
                        Log.exception(e);
    now i have an ObjectFactory inside the jar that resolve (xmlRegistry) the correct type.
    but the @XmlAccessorType(XmlAccessType.FIELD) binding is not working while the class is comming from a jar.
    when i 'Link source' to my project is working fine.
    I guess it has something to do with reflection.
    the class which i want to unmarshal to looks like this:
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "GetSessionIDResponseType", propOrder = {
    "sessionID"
    public class GetSessionIDResponseType
    extends AbstractResponseType
    implements Serializable
    private final static long serialVersionUID = 12343L;
    @XmlElement(name = "SessionID")
    protected String sessionID;
    * Gets the value of the sessionID property.
    * @return
    * possible object is
    * {@link String }
    public String getSessionID() {
    return sessionID;
    * Sets the value of the sessionID property.
    * @param value
    * allowed object is
    * {@link String }
    public void setSessionID(String value) {
    this.sessionID = value;
    not the field as u can see is protected though it has getter and setter.
    anyway i must get the link source project to a jar and i cant do that cause the unmarshal is basically failing.
    any idea?
    Edited by: 813927 on Nov 20, 2010 6:10 AM

    I've overcome the problem by adding the unmarsheling code inside the jar.
    though i dont the problem i tried to set the fields to be public and it didnt work.
    very strange so far.

  • Failed to load Main-class manifest attribute from jarfile

    Hi there,
    i am having problem to execute a jar file in command line (DOS). firstly I jar the files by using command line.
    1 - c:\jack> jar cfv myJar.jar Test
    myJar.jar file and Test folder are located in jack folder in c drive.
    then
    2 - c:\jack> jar tf myJar.jar
    display the following:
    META-INF/
    META-INF/MANIFEST.MF
    Test/
    Test/....class
    Test/....class
    then
    3- c:\jack> java -jar c:\jack\myJar.jar
    failed to load Main-class manifest attribute from myJar file.
    what should i do? did i miss any step??
    someone please help....

    Hi,
    You should declare the main class within you JAR file. This declaration is done into the manifest file or by specifying a particular swithch before you bild the JAR archive.
    For more information you can refer to the java tutorial regarding JAR tool "http://java.sun.com/docs/books/tutorial/jar/"
    Ferad Zyulkyarov

  • Failed to load Main-Class manifest attribute from HelloWorld.jar

    Hi,
    I got a file call HelloWorld.java and a file call mainClass which contain one line ==>
    Main-Class: HelloWorld
    Then I run the command:
    jar cmf mainClass HelloWorld.jar HelloWorld.class
    java -jar HelloWorld.jarAnd I got the following error:
    =======================================
    Failed to load Main-Class manifest attribute from
    HelloWorld.jar
    =======================================
    Why is that? I follow the instruction from the sun website, but still not working... can anybody help??
    Thanks

    For whatever reason the last line of the Manifest file is always ignored. So if your Main-Class is the first AND last line it is being ignored. Solution, make sure you have at least one or more blank lines after the Main-Class line.

  • Failed to load Main-Class manifest attribute from oc4j.jar

    Hi All
    I am trying to start OC4J in the SOA suite from the command line but every time i issue the command i.e.
    java -jar ORACLE_AS_HOME/j2ee/home/oc4j.jar
    I get the fololwing error
    "Failed to load Main-Class manifest attribute from oc4j.jar"
    I have checked the oc4j jar and the class oracle.oc4j.loader.boot.BootStrap does exits and it does have a main class
    Is the Manifest file broken?
    Does anyone know why this is happens?

    Hi,
    did you try the SOA Suite forum ?
    SOA Suite and OC4J 11g Technology Preview
    Frank
    Edited by: Frank Nimphius on Jan 30, 2009 1:41 PM

  • Failed to load Main-Class manifest attribute from TextEditor.jar

    Hi, I'm trying to make a JAR file containing a Java application that I can run by double-clicking under windows.
    Everything works fine, except I get the error "Failed to load Main-Class manifest attribute from TextEditor.jar"
    I have tried to set up my manifest file to contain the Main-Class attribute. Eg:
    Manifest-Version: 1.0
    Main-Class: texteditor/TextEditorClass.classBut I get the error:
    java.io.IOException: invalid manifest formatIf I include a Name: header...
    Manifest-Version: 1.0
    Name: texteditor
    Main-Class: texteditor/TextEditorClass.class...then the manifest is used, (and I can even see my Main-Class attribute within the JAR), but if I double-click the JAR or use "java -jar TextEditor.jar" from an MSDOS prompt, then I still get the error message "Failed to load Main-Class manifest attribute from TextEditor.jar"
    I am using Java version "1.2fcs" Classic VM (build JDK-1.2fcs-S, native threads)
    How do I get the mainfest to accept the Main-Class attribute?
    thanks,
    Tim

    Thanks for the reply Kurt.
    Unfortunately I still get the same error. I have actually tried all sorts of combinations of the file with and without "Name:" and with and without .class.
    I must admit I never tried it with the Name line second like you showed, but I have now, and it gives me the same old "invalid manifest format" message.
    I was wondering if somehow I've ended up with an old version of JAR that cannot handle the Main-Class attribute. The problem is that unlike JAVA, JAR won't tell you what version it is. Any ideas how I might prove I'm running the latest version of JAR? Mind you, I get the same problem at home and at work, and my work version is the latest GenRel one so I think this is pretty unlikely.

Maybe you are looking for