Wl6.1, war files and 2 letter jar files....

Hi,I have finally found why my WAR file isn't loading with weblogic 6.1. It seems that it doesn't like two letter class libraries (eg ab.jar) and will through a vague error message at deployment (Prefix string too short). I don't know what has changed between 6.0.2 and 6.1 in this area, but its worth making it apparent to developers in general.Regards,Mark BarryHewlett-Packard Consulting

Are you saying that this error doesn't occur in 6.0?
I think i knew what's the problem is, but it would be helpful if you could post the stack trace?
Mark Barry wrote:
Hi,I have finally found why my WAR file isn't loading with weblogic 6.1. It seems that it doesn't like two letter class libraries (eg ab.jar) and will through a vague error message at deployment (Prefix string too short). I don't know what has changed between 6.0.2 and 6.1 in this area, but its worth making it apparent to developers in general.Regards,Mark BarryHewlett-Packard Consulting

Similar Messages

  • Want to package a class file and a jar file in main jar file

    hello folks,
    i have a class named launch.class
    and a jar file named First_Sample2.jar
    First_Sample2 is an application that i have made which requires more memory than is generally allocated by the JRE. so, launch.java file just contains code to execute the command:
    javaw -Xms128M -Xmx256M -jar " + path + "First_Sample2.jar"
    where path variable refers to a directory which contains First_Sample2.jar
    problem is that the only way i can use this code is by keeping two separate JAR files, one is launch.jar, the other is First_Sample2.jar and then execute launch.jar, which will in turn call First_Sample2.jar (which means I have to provide anyone with 2 separate files if they want to use my application)
    is there any way in which i can combine both these jar files into one?

    Well there is a couple ways you can achieve this, but I am telling you that packaging a JAR within a JAR will not work because classes within the internal JAR will not be recognized on the classpath.
    The easiest way to get the user to run your program with a simple double click would be to hide the two JAR files from them completely, having them reside in a folder somewhere on the user's computer. I would use a batch file (Windows environment) or an .sh file (Unix) that would set up your classpath variable and then call java to execute the main class in your main JAR.
    For instance:
    cd [Where java.exe resides]
    set CLASSPATH=[semi-colon delimited absolute file paths pointing to your two JAR files and any other JAR files that they reference]
    java -cp %CLASSPATH% [main class]
    The user would have access to this batch file, perhaps on their desktop, where they can double click to execute teh program just as if it were an EXE file. This is the best way because it hides the JAR files from the user.
    If you would like to combine the two JAR files however, you would need to extract the contents of the secondary JAR file and then include them in with the contents of the main JAR file. That is the only other way that all classes are visible on the classpath.

  • Including a .jad and a .jar file in presentations

    Hi:
    I did an application using the last version of the Sun Java Wirelless Toolkit 2.5. And now I have a .jad file and a .jar file. I need to include both in a power point presentation to be able to show the application. I dont want to do a link because I'm not gonna use my computer to do the presentation. Do I need to do something special in the deployment step to be able to do this ?
    I have tried to include the program this;
    Insert --> Object
    But it doesn't work.

    Hey listen what you want to do is possible but not in the way you want to do...
    if you want to demonstrate the functionality of your application or how it works then you can use use
    any screen recording software such as: Screen Recorder Gold, Qarbon's Viewlet Builder or ViewletCam
    such software help you to record the activity of screen then you can export the recorded screen shots to multiple formats and include them to your PP presentation...

  • Browse and handle jar files?

    I´m going to make a little app to help some morons I know. Pretty much what I want it to do is to make you able to browse files on your HDD and then move them into a .jar file. I know terminal commands for this but is there a way to make it really easy for my friends.
    I dunno if this helps but when I do it thought terminal I first unarchive the .jar, change content and then compress it and move it back.
    Is this possible?

    I still don't think it's good for morons to create .jar files...
    set javrfile to quoted form of (POSIX path of (choose file with prompt ".jar file:" of type {"jar"}))
    set filestoadd to choose file with prompt "files to add:" with multiple selections allowed
    set filestoadd_unixpaths to {}
    repeat with filetoadd in filestoadd
    set filetoadd to quoted form of (POSIX path of filetoadd)
    set filestoadd_unixpaths to filestoadd_unixpaths & filetoadd
    end repeat
    set AppleScript's text item delimiters to " "
    set filestoadd_unixpaths to filestoadd_unixpaths as text
    set AppleScript's text item delimiters to ""
    display dialog (do shell script "jar vuf " & filestoadd_unixpaths)

  • Where can i download the util.jar and base.jar File?

    Hi all,
    in some SAP-Notes are describe where i can download these Files.
    For Example:
    http://service.sap.com/netweaver
    SAP NetWeaver
    -> SAP Netweaver in Detail
        -> Application Platform
           -> DB and OS abstraction
              -> Platforms
                 -> Platform specific information
                    -> Microsoft      
    x SQL Server
    ZIP-File: "JDBC Driver for MS SQL Server"
    But there are no ZIP-File !!!
    Can anyone tell me where i can find the base.jar and util.jar File?

    Hi Christian,
    when using a vendor's JDBC drivers, you must go to the vendor to get them. For Microsoft here is a good place to start: http://www.microsoft.com/sql/downloads/
    These JDBC files should also be included with you SQL Server CDs...
    Hope this helps!
    Cheers,
    Jeff

  • Can you recommend an app to run excel documents off line and let the files be saved to the ipad not over a network connection

    Can anyone recommend and app for ipad mini to run excel documents offline and let the files be saved ot the ipad hard drive. I am frequently out of network range and need to be able to run the sheets.

    All of the "Office" document editing applications on the iPad have limitations.  Best try them out to see if they meet your needs.
    iWork by Apple
    Keynote
    Numbers
    Pages
    DocsToGo
    • VIEW/EDIT/CREATE Word & Excel files(Office 2007/2008/2010)
    • VIEW PowerPoint, PDF, iWork, Text, .RTF, and more!
    • Send & receive attached supported documents using the built-in Mail app
    • FREE desktop application with your purchase! Compatible on Win & Mac allows you 2-way file sync with a WIFI connection.
    • Open & Edit files within DocsToGo from any 3rd party app that supports the “Open In” feature
    • Supports iTunes File Sharing via USB cable for manually moving files
    https://itunes.apple.com/us/app/documents-to-go-office-suite/id317117961?mt=8
    Office² HD
    "Office² HD, the most intuitive and straightforward office document editor available on the iPad, makes it easy to open, view, create and edit Word (DOC & DOCX), Excel (XLS & XLSX), and PowerPoint (PPT & PPTX) files right from your iPad!"
    https://itunes.apple.com/us/app/office2-hd/id364361728?mt=8
    Quickoffice Pro HD
    Create and edit ALL Microsoft® Office -- document, spreadsheet, and presentation formats, as well as view PDF files, on the go. Our advanced file manager lets you manage local files, access Google Drive or other cloud accounts, and works with your iPad email attachments so you can work anywhere, anytime - online and offline.
    https://itunes.apple.com/us/app/quickoffice-pro-hd-edit-office/id376212724?mt=8
    nsdjoey presents ways to edit office documents in this web page:
    https://discussions.apple.com/message/21953221#21953221

  • Beginner: Can't convert a hello.class file into a jar file. Please Help!!!

    Hi, I created a hello.java file, converted into a hello.class file by using the java 2SDk compiler. The problem is that the hello.class file is in a directory I created: C:\JavaBuilder\hello.class
    I have a problem converting the hello class file into a jar file. I don't know which approach to take. I've looked at tutorials...but I keep getting more confused each time I view the tutorials on creating jar files. Please can someone help..by taking me through a step by step process. Please be explicit and do not leave or assume that I know any details because I'm a new born beginner. Thank you very much, I seriously appreciate it.

    Hi!
    first of all, you should use an upper-case character for the first letter of your classes...
    To answer your question :
    1) you must create a directory named "meta-inf" in your directory "C:\JavaBuilder"
    2) then,you must create a file named "manifest.mf" in this directory
    it's like a property file and it must contain this :
    Main-Class: hello
    (don't forget to type <enter> after "hello")
    3) in the directory "C:\JavaBuilder", you can enter the following command :
    "jar cvfM hello.jar meta-inf\manifest.mf hello.class"
    (check jar.exe is in your path)
    4) you can run your jar by the command :
    "java -jar hello.jar"

  • Can Netbeans put a jar file In a jar file?

    I just went through the process of getting Eclipse to create a jar file that would execute from a command prompt using a plugin called fatjar :
    http://fjep.sourceforge.net/
    Details from other thread :http://forum.java.sun.com/thread.jspa?threadID=5219638&tstart=0
    I really would like to use netbeans but i now have the exact same problem trying to make a jar file in netbeans 5.5.1
    I am using a package from icaste.com It has a
    .dll file to put in the windows directory
    JCommSerial_3_0.jar file that contains all the classes
    I can compile and run a file in the IDE and it works fine
    The Jar file does not contain the classes so i get errors when running from command line.
    Here is the layout of my screen and result of run command in IDE
    http://www.acousticlights.com/netbeans.png
    What do I need to try?

    georgemc wrote:
    Why is everyone so obsessed with doing this? The gains are minimal and the problems numerousBecause we are new and don't understand how the java VM actually runs code and the error messages sent by the java machine are cryptic.
    My first attempt at using an external jar in a java program lead me to believe that all of the code for a java program would be in a jar file including external jar files, after all the JDK standard library has tons of jars in it so I assumed the external jar file would be linked (as most other programming compiler/linkers I have worked with in my top down programming life).
    I find out the answer is so simple that the external jar file could not be found by the VM running my jar file. Like I said, if the VM would have just gave me an error that it could not find a file on a specific directory i never would have perused the idea of jar in a jar (fatjar plugin for Eclipse for example)
    Really this is like getting into a race car and not knowing at what RPM to shift gears, sure you can press the pedal and make it go but if you don't understand how it works under the hood you are going to blow the engine if you keep it in first gear.
    I have read many posts on these errors, the reason is the error message is just not very descriptive of the original problem. If I try and open a database called xyz.dbf that has one field defined as lastname, in C for example, I would not give the error message "Lastname could not be found) when indeed the lastname could not be found but the reason it could not be found was because the database xyz.dbf could not be found. Further , adding to the error message that the system is looking for xyz.dbf on drive X- subdirectory -mydatabases would complete the error message and allow the user to fix the error. Just what is a non java programmer that is using my java program suppose to do with an Ecception Error in (main) bla bla bla... I know now I need to check for library files myself within my own java programs and give a better error message to the user before the java VM sends out it's cryptic message.
    Edited by: metron9 on Sep 25, 2007 11:00 AM

  • How can  I access my java class file in a .jar file ...PLz Help anyone!!

    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program.
    Plz help ...I have tried all I know in vain.
    Thanks.

    temba wrote:
    Hi Folks,
    I am new in Java programming, have a .jar file that contains .java files that I want no access and use from another .java file. These files in the .jar file basically form a library thus have no main-method. However I can not declare an instance of the library (in the .jar file) and use it within my program. You are making little sense. You can't instantiate .java files.
    Plz help ...I have tried all I know in vain.
    Thanks.Could you post WHAT you have tried and also post what error messages you received?

  • Reading an xml file from a jar file

    Short question:
    Is it possible to read an xml file from a jar file when the dtd is
    placed inside the jar file? I am using jdom (SAXBuilder) and the default
    sax parser which comes with it.
    Long Question:
    I am trying to create an enterprise archive file on Weblogic 6.1. We
    have a framework that is similar to the struts framework which uses it's
    own configuration files
    I could place the dtd files outside the jar ear file and specify the
    absolute path in an environment variable in web.xml which is
    configurable through the admin console.
    But I want to avoid this step and specify a relative path within the jar
    file.
    I have tried to use a class which implements the entityresolver as well
    as try to extend the saxparser and set the entity resolver within this
    class explicitly, but I always seem to sun into problems like:
    The setEntityresolver method does not get called or there is a
    classloader problem. i.e. JDOM complains that it cannot load My custom
    parser which is part of the application
    Vijay

    Please contact the main BEA Support team [email protected]
    They will need to check with product support to determine
    the interoperatablity of Weblogic Server with these other
    products.

  • PDF file and Microsoft Word files

    I love all the big improvements apple is making to their product lines. But I am a practical person who needs to open pdf. files and Microsoft Word files on the go. That is why I will still pick a Treo, Dash, and any other pda over the Iphone. When is apple going to make a real war against PDA's and produce these kinds of software? This would make the Iphone the ultimate phone.

    Actually you CAN store them on your phone -- you need to download the free program FileMarkMaker (Its in versiontracker for mac, don't know if it is available for PC users)
    It allows you to attach any PDF within a URL address and save it as a bookmark, and sync it to your iPhone. You can then read it anytime (you don't need an internet connection) by going to the name of the link you created for the file in Safari. Works perfectly -- I have everything from Maps of the subway stations for the cities I visit to manuals and documents on it.
    Just one caveat -- you can't search or use other features from within that Safari page - it will just crash the safari application -- you need to change to a blank safari page before you can use google or other safari features.

  • Problems converting PDF to MS Word document.  I successfuly converted 4 files and now subsequent files generate a "conversion failure" error when attempting to convert the file.  I have a large manuscript and I separated each chapter to assist with the co

    Problems converting PDF to MS Word document.  I successfully converted 4 files and now subsequent files generate a "conversion failure" error when attempting to convert the file.  I have a large manuscript and I separated each chapter to assist with the conversion; like I said, first 4 parts no problem, then conversion failure.  I attempted to convert the entire document and same result.  I specifically purchased the export to Word feature.  Please assist.  I initially had to export the Word Perfect document into PDF and attempting to go from PDF to MS Word.

    Hi sdr2014,
    I'm sorry to hear your conversion process has stalled. It sounds as though the problem isn't specific to one file, as you've been unable to convert anything since the first four chapters converted successfully.
    So, let's try this:
    If you're converting via the ExportPDF website, please log out, clear the browser cache, and then log back in. If you're using Reader, please choose Help > Check for Updates to make sure that you have the most current version installed.
    Please let us know how it goes.
    Best,
    Sara

  • Problem in include library files into my jar file

    i am new to this jar archiving...I have created a GUI with java swings..and i also use mysql driver to connect my database now i want to make an executable jar file for my GUI..with coonector i have done the following
    I have compiled my program and placed all the .java and .class files in
    c:\ java\ bin\ jarexample
    next i created a manifest file called mainClass.txt which contains
    Main-Class: AppletMain (where AppletMain is my mainclass).. I placed this txt file also in c:\ java\ bin\ jarexample
    i m also set Class-path in manifest file Class-Path: mysql-connector-java-3.1.10-bin.jar
    next i ran jar cmf mainClass.txt example.jar *.class mysql-connector-java-3.1.10-bin
    With this line, I told jar to create a JAR file (option c) with modifications to the manifest file (option m) as specified within mainClass.txt, naming the JAR file (option f) as example.jar and including everything that matches the pattern *Class and mysql connector
    now my problem is ...my MYSQL connection need some Library files from a package called org and class Driver.class to generate connection I include this library files also in my example.jar....
    But when i execute this jar file using :java -jar example.jar
    this is executed BCOZ tha example.jar file use mysql-connector-java-3.1.10-bin.jar file from system.
    If i m this mysql-connector-java-3.1.10-bin.jar file from system from system then it is not run.
    Can anyone please tell me how can i include this library file to my jar file( ie example.jar)
    Thankyou

    Double post. Please post replies on the other thread.
    http://forum.java.sun.com/thread.jspa?threadID=656781&tstart=0

  • Java Files inside the jar file cannot be read or accessed through Eclpse

    The Java File inside the jar file of the eclipse cannot be accessed through the Eclipse . It shows error for the modules in the jar file .
    But when compiled with adding the jar files to the class path the compilation is successful .
    How can i browse through the files in the jar like going into the function definition .
    TIA ,
    Imran

    Open MPlayer OSX and show the playlist (command-shift-p) then drag the file into the playlist. Click the file in the playlist and click the "i"nfo button. What does it list for file, video and audio format?
    Not all of the codecs used in avi and wmv files are available for OS X so I'm guessing your file happens to be using one that isn't...

  • Problem loading image from jar file referenced by jar file

    First, I searched this one and no, I didn't find an answer. Loading images from jar files has been pretty much done to death but my problem is different. Please read on.
    I have my application, a straight up executable running from Eclipse. It uses a jar file, call it JarA. JarA launches a GUI that is located in another jar file. Call it JarB. To recap:
    My application calls JarA -> JarA loads classes from JarB -> JarB looks for images to place in a GUI it wants to show on the screen
    When JarB goes to load an image the following happens:
    java.lang.NullPointerException
         at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
         at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
         at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
         at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
         at java.lang.ClassLoader.getResource(ClassLoader.java:977)
         at org.cubrc.gmshell.gui.MainWin.preInit(MainWin.java:152)
         at org.cubrc.gmshell.gui.MainWin.<init>(MainWin.java:135)
    The code from JarB that loads the image looks like this:
              URL[] oSearch = {Main.class.getResource("images/")};
              URLClassLoader oLoader = new URLClassLoader(oSearch);
              imgIcon = new ImageIcon(oLoader.getResource("icon.gif"));
              imgMatchRunning = new ImageIcon(oLoader.getResource("gears.gif"));
              imgMatchStill = new ImageIcon(oLoader.getResource("gears-still.gif"));
              imgMagnify = new ImageIcon(oLoader.getResource("magnify.gif"));This looks right to me and JarB certainly has an images directory with those files. But I'm in hell right now because I don't know where to place the images to make this work or if you can even attempt to load images with a dependency chain like this.
    Any help very appreciated!

    Have you tried to move your image-files out of the jar file and place them in the sam folder as the jar-file? I think that would help.
    When you try to load the image-file you get the NullPointerException because the program tries to read a file it can't find. Remember that a jar file IS a file and not a directory.
    If you want to read somthing inside the jar-file you need to encode it first.
    Have you tried to read the jar-file with winRar. It makes it easy to add and remove files in your jar-file.

  • How to read a file inside the JAR file

    Hi All,
    I want to save some preferences in a file called "preferences". I kept the preferences file under my java package.
    If i am running the code inside the NetBeans 6.9 IDE it's working file. But once i have created a JAR and try to run the application, it couldn't find the path.
    Please help me that how to resolve this issue. I don't want to save this preferences file outside of my JAR (i.e) within my java package.
    Here is the code,
    package mypackage;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.PrintWriter;
    public class ReadFile
        private void writeFile()
            try
                OutputStream out = new FileOutputStream(getClass().getClassLoader().getResource("mypackage/preferences").getPath().replace("%20", " "));
                PrintWriter writer = new PrintWriter(out);
                writer.println("Hello Java!");
                writer.close();
                out.close();
            catch (Exception ex)
                System.out.println(ex.getMessage());
        private void readFile()
            try
                FileInputStream fi = new FileInputStream(getClass().getClassLoader().getResource("mypackage/preferences").getPath().replace("%20", " "));
                BufferedReader br = new BufferedReader(new InputStreamReader(fi));
                System.out.println(br.readLine().trim());
                br.close();
                fi.close();
            catch (Exception ex)
                System.out.println(ex.getMessage());
        public static void main(String[] args)
            ReadFile read = new ReadFile();
            read.writeFile();
            read.readFile();
    }If i run the JAR, i get the following error message,
    {color:#ff0000}*file:\my jar path\jarname.jar!\mypackage\preferences (The filename, directoryname, or volume label syntax is incorrect)*{color}

    Thanks sabre150,
    sabre150 wrote:
    You cannot update a running jar file. I am sorry. I didn't know about it. Thanks to point out.
    There are two ways I approach this depending on my exact requirements -
    1) use the java.util.prefs.Preferences APII will try this one
    >
    2) if not already present I copy the preferences file from the jar to a known place. I use a directory in the user's home directory and normally make the directory name the program with a '.' prefix.
    One cannot access files in a jar file using the File API. One needs to use the getResource() or getResourceAsStream() methods on Class or ClassLoader.

Maybe you are looking for

  • New Ipod Not Responding To Computer

    First of all, this is one of the original Nanos. 2 GB White. The computer, nor the ipod is responding when I plug it into the USB port on the lap-top. The Ipod won't even turn on at all but the black apple logo was on for a few minutes. Please Help!

  • How do I transfer camcorder recordings to IMac

    I have a Panasonic HD60 camcorder with a SDHC card that is filling up. I wanted to transfer it to my IMac with IM 09 but I understand that this version does not keep the recording as pure as it was in the camcorder. I don't know enough about formats

  • Gridify peculiarity!

    Drawing some frames in a grid. Select the rectangle frame tool. Draw a rectangle top left of the page margin to bottom right. Press the up arrow to make more frames in a grid Results are normal Now Select the rectangle frame tool. Draw a rectangle bo

  • Sales 5.0

    Hi All, I had attended a training on SAP CRM 4.0. Now as there has been an upgrade to 5.0, I see few additions to it. Can anyone please elaborate on what is this thing called  "Visit Planning" and "Rebate Management" and where is it used?? Are there

  • X-Fi Fatal1ty IS IT POSSIBLE TO BUY WITH OUT BEING BRANDE

    Is it Possible to get an X-Fi Fatalty? with out it being branded by (EDITED) Fatalty? Its not fair being stuck with an Sound Blaster X-Fi Platinum ( with out the 64 RAM ) A Complete product Series Should not be Singled out just because of a bad gamme