Multiple palette files in a library/class file causes problems

While developing a labview class, I wanted to set the default palette, so I added the relevant dir.mnu file to the class. Unfortunately, the class already had a dir.mnu file in it. On adding the file, I got some error message about a dependency change*(which makes no sesne, how can a palette file have any dependencies !). On saving the class and then attempting to reopen it, LabVIEW claims it is corrupt. Inspecting the xml .lvclass files reveals that when I added the new paletee file, LabVIEW actually just added a second reference to the palette file already in the project, which it then considers to be a problem when it tries loading the class. This is clearly a bug on a number of levels:
It should not be possible for the user to induce LabVIEW to create corrupt xml files through such simple attempts to use documented features.
The underlying problem is that LabVIEW appears to be using the conventional search/linking rules to load library items irrespective of whether they are a vi (which should ahve a unique name) or other file (which might well be legitimately non-unique).
Given the near impossibility of renaming a palette file without breaking palette links this particular bug is extra annoying.
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
Solved!
Go to Solution.

Sorry for the delay, it took me a little longer to reproduce the problem systematically. Attached are three zip files of the same trivial class. The only difference between them is the contents of the class file itself.
The key point is that I have two folders in my class - Public and Protected (although I haven't actually set the access scope I realise). Each folder has a dir.mnu file in it and there is also a dir.mnu file in the main class folder. The class virtual folder structure maps directly to the on disc version.
In the first zip file the dir.mnu files are not added to the class.
In the second zip dile I added the dir.mnu by right clicking and doing Add file...  This is allowed because each dir.mnu has a distinct path. I then save the class file and close it.
To get the third zip file, I reopen the class file. I  get a single dependency warning about dir.mnu in one of the sub folders. So I think "fine ok, somethign funny about that dir.mnu file" - note if I'm loading a whole heirarchy of classes I may be told LabVIEW is laoding the dir.mnu file from somewhere completely different in my class structure. I then save the class file to give the thrid zip file.
The lvclass file in the third zip file is corrupt because it has multiple entries for the same file, because it didn't handle having more than 2 items conflicting.
The correct behaviour would be not to invoke the conflicting item names for non vi/ctl document types. I could imagine that there would be similar problems if I had a say a whole range of say README.html files strewn over the place.
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
Attachments:
Break Class File-1.zip ‏21 KB
Break Class File-2.zip ‏21 KB
Break Class File-3.zip ‏21 KB

Similar Messages

  • *Added* code to existing source file, compiled it, and class file shrunk

    Another newbie here. Fortunately, my classpath is ok, so I'm able to compile a .java file.
    I added one line of code (System.out.println) to write the value of a variable to a log. After compiling with javac, I noticed that the resulting [new] class file was smaller than the existing class file. I looked at each of the class files with Textpad. It's gibberish, but I quickly saw that a large block of code was missing in the new class file, even though the size of the source file had been increased.
    There is a difference, however, between how the two class files were created. The existing class file was compiled (along with many others) by exporting an .EAR file from a development environment (WSAD) to the WebSphere Administrator Console. Conversely, I am now compiling the same source file with javac on my machine.
    I suspect that this is the reason why I can add code to a .java file, compile it, and have the resulting class file actually lose code. Even if I am correct, I don't know what to do about it.
    Does anyone have an idea?
    Regards,
    Daniel T.

    Thank you both for your replies. I've read many posts over the past few months, and I know how important it is to provide as much info as possible, when asking a question here. That said, I have another tasty tidbit...
    After replacing the existing (larger) class file with the new (smaller) class file, my application now produces this:
    "*Error 500: LinkageError while defining class*..." [name of class]
    *"...(Unsupported major.minor version 50.0) This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader@6bd156d5 Local ClassPath:"*
    ...[the entire classpath]...
    Original exception--- java.lang.UnsupportedClassVersionError:
    I'm guessing that my focus should mostly be on the 'Original exception', and maybe I need to revisit the JRE or JDK or JVM (these terms are somewhat nebulous to me, so please forgive me using them interchangeably) on my machine. For now, I'll just keep trying stuff. Thanks again for the replies!
    Regards,
    Daniel T.

  • Files disappeared from library, "missing" files not really missing

    I had a folder with 3 files in different formats for each image.  These were imported several days ago, grouped into stacks, captioned, tagged, etc. and synced to the files.  They continued to exist in the library some time afterward, but today when I opened lightroom all of the jpg versions of all of the images and all 3 formats of one image in particular had vanished from the library.  It did not claim that it could not find them on disk (and in fact the files *do* still exist on disk right where they should), they just didn't show up.  I was able to re-import all of the jpg images without trouble, but for the other two formats of the one missing image, importing one of them fails because it "already exists in the library," and the other one is willing to import but then doesn't show up in the folder or the recently imported files list.  When I try to synchronize the folder, it suggests that I import that file, but it never actually does.  Since importing the jpgs, it also suggests that I remove 53 "missing" files, the number of jpgs imported.  When I view the missing files in the library, it shows only 2 of the jpgs, one of which belongs with the files that will not import and neither of which is actually missing--they can both be synchronized just fine by clicking the little synchronize icon on the actual photo.
    Does anyone know what's going on here and how I might be able to get the files that won't import back into the library?  And how to be sure that files won't just go away on their own again?
    Edit: to be clear, missing versions of files were definitely not stacked with the other ones and the "don't import duplicates" box was not checked when re-importing the ones that won't re-import

    I managed to get the photos that wouldn't import back in by deleting them directly out of the database and then reimporting them into lightroom. I'm a little concerned that they disappeared in the library view in the first place, though.  Does this sort of thing happen often, and under what circumstances?  I'm still in the free trial period and was very close to buying the program, but now I'm not so sure.  If I'm using an application to manage my photos, I want to know that it's actually managing all of the photos I put into it and not randomly forgetting about them.
    I'm still having the not-really-missing files problem, though.  I think it may actually be because they got associated as "sidecar" files somehow and are now in there twice, once as the sidecar file and another time as a separate jpg image.  I'm not really sure why only one of them shows up in the missing images view, I think it might be because I edited that one so it's in a slightly different state from the others?  If there are any tips on how to resolve that state, I'm all ears, I'd like it to stop telling me I have 53 missing files when I don't.

  • Hard drive failed - have music files but not library.itl file

    So here's the situation. The hard drive on my husband's laptop recently failed. It is now fixed, but his data is lost. Luckily, we had moved his music files to an external drive. It appears that we only moved the music files and not the library.itl file. We have a backup from November of the library.itl file.
    1. His ipod is fine. He wants to be able to pull the playlist info from his ipod to restore the info on the library.itl file. Is that possible?
    2. If that is not possible, what are the ramifications of restoring the library.itl file from November? Will he "lose" the music that was added since then?

    1. Not with itunes, sadly. It will try to wipe the ipod since it is a 'new 'library.
    2. Yes, he'll lose everything added since November.

  • Why require cap file why not only class file as in java

    why do we convert .class to .cap file why not simply load the .clss file to the card

    If Java Card has to accept .class file, it's certain
    that JCVM developers are going to spend more and more
    nights in their office.
    Just kidding. I'm one of them.LOL :)
    Put the CAP file converter on-card.

  • Getting file from directory where class files are

    hi i want to load a properties file from the directory where my java program is (the class/jar files)
    somebody told me that i could use System.getProperty("user.dir"); but it would only work under windows; under linux it points elsewhere.
    how can i determine the directory where my program lies? sounds easy but i failed :(

    why to hell put it in the classpath? Because that way you don't have to ask the user where the hell he put the file.
    and if i would do so the next question: how can my
    program modify the classpath?It can't. And it doesn't need to.
    isn't there another way to determine the directory
    where the app is started from???If you mean the current, or working, directory, then yes there are several ways to determine that. But that directory need not be where the classes are actually stored. In fact the current directory doesn't even have to be in the classpath.
    Now, here's the best way to deal with properties files. (IMHO of course.) Put them in the classpath, in the same directory or jar file as your classes. Then to create a Properties object and load it from your properties file named e.g. "default.properties" you do this:Properties props = new Properties();
    props.load(this.getClass().getResourceAsStream("/default.properties"));

  • How to make an exe file from a java class file

    i know one of the java's most powerfull properties is plataform independent, but if i have done one application (with GUI) that i want to run on Win32 for example, if anyone knows how to make it please send me a message to [email protected], how i know that can be make it? because HotJava is made in Java and in Win32 is a executable

    Do a search on these forums for any of the thousands of times this question has been asked and any of the thousands of times it's been answered.

  • FF25 downloads csv files as text instead of csv - causes problems I have reset my profile, but it still the same problem. Fix?

    I have a csv file that I download once a week and load into excel. Yesterday FF25 decides that the csv file is a text file (it is not) and converts everything to text. This is a new and unwelcome problem. To my horror, I was forced to try opening in IE where it worked just fine.
    The FF open screen has
    filename.csv
    which is: text document
    from https://companyName.com

    This means that the server sends the file as text/plain (this may have changed if it didn't happen before).<br />
    Firefox always opens a file send as text/plain in a browser tab.<br />
    You can right-click the link and choose "Save Link As" to save the file or use "Save Page As" if the file opens in a tab.

  • Tomcat6 does not load class files from WEB-INF/lib/myjarfile.jar  WHY???

    I have placed my jar file in c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar
    But, after restarting tomcat6, when i try to import the class file contained in the myjarfile.jar in a servlet, it says
    ProcessFileUpload.java:4: package test.test1 does not exist
    import test.test1.*;
    ^It clearly tomcat's class loading problem.
    As i unzipped my jar and placed the packagefolder structure to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\testand it works perfectly.
    Anyone knows its workaround? please suggest if any configuration changes is required in tomcat or so.
    Thanks.
    ---Sujoy

    Thank you gimbal2 . There was error in creating the jar file myjarfile.jar.
    But, now I have created it again and placed it in place
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jarand tried to use one on the Class file included within the jar to compile my servlet. But, still I am getting error at servlet compilation time. I want to place executable jar files in
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar and compile my servlet and execute the servlet.
    I DO NOT WANT TO unzip the jar, placing all unzipped files to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\ folder and comiple my servlet and execute the servlet. But, I am failing to user WEB-INF\lib\ folder facility....please help me why i am not getting class files from WEB-INF\lib\ folder.
    If you please see the small code bit and tell me any possible error that would be very helpful.
    Step 1: my library java file MyClass.java
    package test.test1;
    public class MyClass {
         String myName = "Default return string value";
         public void setMyName(String varName) {
              this.myName = varName;
         public String getMyName() {
              return this.myName;
    }Step2 : Creating jar file of my library class files
    C:\jdk1.6\bin>jar cvf myjarfile.jar test
    added manifest
    adding: test/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/MyClass.class(in = 452) (out= 296)(deflated 34%)
    adding: test/test1/MyClass.java(in = 230) (out= 140)(deflated 39%)
    C:\jdk1.6\bin>Step3 : Double checking the created jar file content by listing its content
    C:\jdk1.6\bin>jar tf myjarfile.jar
    META-INF/
    META-INF/MANIFEST.MF
    test/
    test/test1/
    test/test1/MyClass.class
    test/test1/MyClass.java
    C:\jdk1.6\bin>Step4 : Placed myjarfile.jar to
    c:\tomcat6\webapps\my-application\WEB-INF\lib\Step5 : Restarted standalone Tomcat6 in my Windows XP SP2.
    Step6 : Created a simple servlet LibFolderTest.java within my-application\WEB-INF\classes\ folder with code
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import test.test1.*;
    public class LibFolderTest extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              MyClass mc = new MyClass();
              out.println(mc.getMyName());
    }Step7 : Tried to compile my servlet LibFolderTest.java and got the following error
    LibFolderTest.java:4: package test.test1 does not exist
    import test.test1.*;
    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                                     ^
    3 errorsThe above servlet compilation error on Step7 is telling me that myjarfile.jar is not loaded by Tomcat6 or not available for use when compiling servlet. I want to use myjarfile.jar from within WEB-INF\lib\ folder but I can not. please help.
    ---Sujoy

  • Edit a class file in Eclipse

    I am new to Java and Eclipse and Weblogic.
    I was give a .war file and told to simply edit a parameter that they thought was in one of the .jsp pages in the war file.
    the only occurance of the parameter name "SearchProvider" is in the Search.class file located deep in folders under the WEB-INF folder.
    the only way i could even find the parameter "SearchProvider" was with the use of an Effective File Search trial software.
    I opened (barely) the Search.class file with windows notepad and its mostly jibberish but I can find the reference to "SearchProvider" in the class file.
    I need to change this parameter.
    When I import this into eclipse, I get the message there is no source file attached to the class file Search.class.
    I added the entire class folder into the library. I tried to change the class source but all I have are just the files in the .war package.
    I have tried changing the extension to .jar and this will let me add these files as a project, but I cannot edit this Search.class file no matter what I try.
    My basic question is, Am I missing files from the client? Do I need more than just a war file?

    Most likely you are searching the wrong place, on an web application the first place to start searching is the web.xml, it is the core configuration file it will tell everything about your application including which other tecnologies are being used, like struts, it is very likely that the answer to your question lies in the web.xml file.

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • How to get info from a .class file at run time? thanks for help

    I need to get methods and properties (variables) from a .class file at run time.
    as u know, javap.exe can do that in an independent way. but i need to get info at run time once the .class or packeges have been changed, javap is not suitable in the case.
    i try to read data directly from .class file but it's hard to know the file format.
    e.g. a class looks like (java file):
    class MyClass extends Frame
    int i0;
    String s0;
    public String getName()
    if the file is compiled to .class file, how to get properties (variables: i0,s0) and methods String getName() from the .class file by an applicaton at run time?
    Doclet is not suitable for speed reason, it is too slow to get right info in right format.
    Thanks for any help, please write a little bit more in detail if you know.

    Use the Java Reflection API. Have a look at the Reflection section of the Java Tutorial located at http://java.sun.com/docs/books/tutorial/reflect/index.html

  • How use class file in jsp(very urgent)

    i have class file called birds (birds is actually a xslt file transformed to java class file) now this class file i have to use in my jsp file. how can i use them. if possible can any one give me sample code please very urgent
    can any one help me

    java files
    import org.w3c.dom.*;
    import javax.servlet.http.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import java.io.*;
    public class XmlParser
         public String XmlParser()
              try
    String strXML= "employee.xml";
                   String xslFile = "employeeId.xsl";
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   StreamResult theTransformationResult = new StreamResult( new ByteArrayOutputStream() );
                   Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
                   transformer.transform(new StreamSource(new StringReader(strXML)), theTransformationResult);
                   String output = theTransformationResult.getOutputStream().toString()
              catch(Exception e)
                   System.out.println(" ***** XmlParser.XmlParser ERROR ***** " + e);
    return output;
    using class files in jsp
    <%@ page import="com.qqqq.aaaa.XmlParser"%>
    <%
         XmlParser xmlParser          =     new XmlParser();
    out.println(xmlParser.XmlParser());
    %>
    i think it will help you.

  • Could not find .java and .class files...

    I am working on Windows Vista operating system.
    I am able to access the .java which I created and also .class files from the command prompt.
    But I am not able to find those files in the bin folder in Windows Explorer.
    I want to delete some .java and .class files. When I use the delete command on the command prompt , I am getting ---- could not find the file.
    Can anyone help me...

    Hey everyone,
    I found the answer!
    If the command prompt application is run as administrator(since it is windows vista), the created .java files as well as .class files will be stored and can be seen in the bin folder.
    However, I could not locate the .java files (and also corresponding .class files) which I created previously.

  • Error wile importing class file

    hi,
    i am trying to import a class file(exp) in jsp, but it gives error mesg like unable to find the class file. the code is
    class file is plcaced in "C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes"
    <%@ page language="java" import="exp" %>
    <html>
    <body>
    <%! test t = new test(); %>
    Length of Sabarish is <%= t.strLength("Sabarish") %>
    </body>
    </html>kindly help

    hai,
    try placing ur class in a package and provide fully qualified class name in jsp import
    hope this will help
    regards,
    varma.

Maybe you are looking for

  • Cisco ASA 5505 Site to Site

    Hello, I am having some issues configuring two ASA's for Site to Site and am seeking some help. I greatly appreciate your times and efforts. When I do a L2Lsite2# show crypto isakmp sa There are no isakmp sas L2Lsite2# show crypto ipsec sa There are

  • How do I use one form field to enter data into another form field?

    Does anyone know how I can code a form so that when I select a name in one drop-down form field, I can ensure that the person's e-mail address will appear in another text field? Thanks.

  • 3.1EA1: proxy client used allows only BASIC authentication

    The proxy client used only use BASIC authentication. The problem the proxy we're using uses NTLM authentication, and the user/password are the domain user/password, thereby very dangerous to send using a non-secure authentication mode as BASIC (a sim

  • Where can I download Christmas generators / title cards compatible with Final Cut Pro X?

    I'm looking for title cards with holiday themes, snow, Christams trees, ornaments and the like. Where can I find these? A quick search online I found site that said they weren't compatible with Final Cut Pro X. I went to rippletraining.com and after

  • HOWTO: nikon nef thumbs in gnome 3 nautilus

    install gnome-raw-thumbnailer from the aur. as root create, then edit the file /usr/share/thumbnailers/nef-thumbnailer.thumbnailer to contain the following [Thumbnailer Entry] Exec=/usr/bin/gnome-raw-thumbnailer -s %s %i %o MimeType=image/x-nikon-nef