Creating a weblogic.jar file?

I am looking to minimize my client size java app, which makes use of EJBs.
I am using the verboseToZip utility that is described at:
http://www.weblogic.com/docs51/techdeploy/verbosetozip.html
It has reduced the size of the jar from 35MB to about 700K. The application
has problems starting up, however. I get the exception shown below. Any
idea what this means? I looked in the jar file, and sure enough there are
classes in a directory named: com/rsa/jsafe. The error occurs when getting
the EJB home object (at the start of the application).
Thanks,
Mike
------------------------------------------Exception-------------------------
Exception in thread "main" java.lang.NoClassDefFoundError:
COM/rsa/jsafe/JSAFE_InvalidUseException
at
weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:53)
at
weblogic.security.MD5RandomBitsSource.seed(MD5RandomBitsSource.java:56)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:108)
at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:85)
at weblogic.rjvm.RJVMManager.getLocalRJVM(RJVMManager.java:89)
at weblogic.rjvm.RJVMManager.initialize(RJVMManager.java:78)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:137)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:182)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:195)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:148)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:123)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at
com.ecocap.daemon2.dbthread.setupContextAndObjects(dbthread.java:1064)
at com.ecocap.daemon2.dbthread.<init>(dbthread.java:48)
at com.ecocap.daemon2.DaemonFrame.<init>(DaemonFrame.java:45)
at com.ecocap.daemon2.daemon.<init>(daemon.java:27)
at com.ecocap.daemon2.daemon.main(daemon.java:184)

Don,
Thanks for responding so quickly. You are correct - I am on Windows. I
didn't realize it was a case sensitivity problem. Anyway, I took your third
option, since it was the least painful for me and everything worked.
Thanks,
Mike
"Don Ferguson" <[email protected]> wrote in message
news:[email protected]...
Let me guess: this is on Windows. I bet the problem concernscase-insensitive
file names. When creating the client jar, a "com" directory was created.When
it came time for the COM directory, Windows just treated it as equivalentto
"com". However java does not. There are a variety of solutions:
a) use Unix to build the client jar
b) use ant to extract the appropriate subset of classes from weblogic.jarwhen
creating the client.jar (bypassing the filesystem).
c) move the COM stuff to a separate directory tree, and use somecombination of
jar -C or jar -u to create the client.jar.
Don
Michael DiChiappari wrote:
I am looking to minimize my client size java app, which makes use of
EJBs.
I am using the verboseToZip utility that is described at:
http://www.weblogic.com/docs51/techdeploy/verbosetozip.html
It has reduced the size of the jar from 35MB to about 700K. Theapplication
has problems starting up, however. I get the exception shown below.Any
idea what this means? I looked in the jar file, and sure enough thereare
classes in a directory named: com/rsa/jsafe. The error occurs whengetting
the EJB home object (at the start of the application).
Thanks,
Mike
------------------------------------------Exception-------------------------
Exception in thread "main" java.lang.NoClassDefFoundError:
COM/rsa/jsafe/JSAFE_InvalidUseException
at
weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:53)
at
weblogic.security.MD5RandomBitsSource.seed(MD5RandomBitsSource.java:56)
at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:108)
at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:85)
at weblogic.rjvm.RJVMManager.getLocalRJVM(RJVMManager.java:89)
at weblogic.rjvm.RJVMManager.initialize(RJVMManager.java:78)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:137)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:182)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:195)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:148)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:123)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at
com.ecocap.daemon2.dbthread.setupContextAndObjects(dbthread.java:1064)
at com.ecocap.daemon2.dbthread.<init>(dbthread.java:48)
at com.ecocap.daemon2.DaemonFrame.<init>(DaemonFrame.java:45)
at com.ecocap.daemon2.daemon.<init>(daemon.java:27)
at com.ecocap.daemon2.daemon.main(daemon.java:184)

Similar Messages

  • How to create a client jar file???

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

  • Weblogic.jar file location in  CC&B Media

    Hi Guys
    Can anyone let me know the weblogic.jar file location in CC&B 2.2 media.
    Thanks
    Aleem

    vinod hadlee wrote:
    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
    Gerald

  • Creating an exacutable jar file in netbeans

    Hey, how can i create an exacutable jar file in netbeans ?

    i guess you already have a project created, if you don't create a new java application project.
    Then you need to do the following:
    1. Set the main class. This is the class that will run first.
    for this you need to right click in the project node, select properties, then run and in the Main Class field put the main class.
    2. Set the classpath: you need to put all the libraries or resources you use in your project.
    to do that right click the libraries node, select properties, then add library and add all the libraries that your project needs
    by doing this steps netbeans will create your manifest file and the jar that will create will be executable.
    Hope this helps.
    Escobar5

  • Strip classes actually  used in a jar file to create a smaller jar file?

    I am creating a applet using java3d and the jar files add up to over 4meg ( j3dcore.jar j3dutils.jar vecmath.jar). Is there a way you can strip out only the classes your applet uses and create a smaller jar file so that the download isn't as big? Currently takes a long while for the applet to start because it downloads the Java 3D library in its entirety.

    Most likely those classes that you use also use other classes that you don't use ...

  • Creating a simple jar file

    I am trying to create a simple jar file for a swing application. I have used some third party api in the application.
    However when i create a jar of the application using JDeveloper it seems to add all the third party class files too into the jar which i definately dont want. How do i do the same.

    I presume you used a JAR deployment profile. Check the profile settings under "Dependency Analyzer". You might have checked there some jars you don't want to be included in the final package and the option "Include all of their contents..." is selected. Uncheck the ones you do not want to be included in the output archive.
    Florin

  • Unable to create an executable jar file

    Hi,
    I am unable to create an executable jar file,
    I am using the command as follows:
    C\> jar cvfm MyJarName.jar manifest.txt Demo.class
    where as Demo.class has appropriate main method; manifest.txt contains [ Main-Class: Demo ] and a new line
    Please help.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on Apr 30, 2009 5:15 AM

    Your jar is perfectly generated, but your machine has a problem with .jar file associations.
    You have two options:
    1. Play with the registry. Dangereous if you are not used to.
    2. Reinstall the jre.
    Just to verify my theory, open a command prompt and the command:
    reg query HKCR\jarfile\shell\open\command
    What does it say? I have executed your command , here is the output
    HKEY_CLASSES_ROOT\jarfile\shell\open\command
        (Default)    REG_SZ    "C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1" %*I am not getting anything from this command, can you please explain clearly.
    thanks & regards
    M K Rayapudi
    Edited by: R6i on May 3, 2009 10:18 PM

  • How do I create an executable JAR File ?

    Hi,
    Let's say I have several Class Files that perform a special task.
    How do I bundle them in a JAR file and make it executable, so that the user simply types "prog.jar" and is happy.
    I wonder how that works, as I have to tell the starting point for execution.
    Does anybody now ?
    cu
    Oliver

    Three importants things to do :
    - don't forget to indicate in your manifest.mf the main class and the pacckage
    ex:
    Manifest-Version: 1.0
    Main-Class: mypackage.MyMainClass
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    - don't forget to associate the .jar file with the application java.exe -jar -classpath %CLASSPATH%
    - don't forget to set the environment CLASSPATH correctly
    Hope this help
    Jean

  • How to create a running jar-file

    I created a "Java Class Library" project including 20 class files in several packages and some libraries.
    Because I would like to start the project from the console, I added the main-class property (right-click project, Properties, Run). Then I cleaned and built the project and tried to start it with the following command:
    java -jar PROJECTNAME.jarBut it won't work, because the archive is not complete: MANIFEST.MF lacks the main-class and all involved libraries.
    I managed to add the main-class attribute manually, but adding all library references seems to be very error-prone.
    So does anyone know if I did something wrong or if this is a bug of Creator?
    Regards,
    Felix

    The main intent of this project type is to provide a libraray which normally wouldn't run with a "main". I suggest you use NetBeans to create a "Java Application" project. Here's what is in the README.txt file produced with the jar. This looks like what you're looking to do. So you can create the Jar in NetBeans then if you want to use it in Java Studio Creator, you can add it to the Creator project. Also, if you caught the news at JavaOne, we are providing Creator features for a pack that will run in NetBeans so you won't have to switch back and forth between the tools. Keep an eye on the NetBeans and Creator web sites for more info.
    Thanks!
    -David
    README.txt
    ========================
    BUILD OUTPUT DESCRIPTION
    ========================
    When you build an Java application project that has a main class, the IDE
    automatically copies all of the JAR
    files on the projects classpath to your projects dist/lib folder. The IDE
    also adds each of the JAR files to the Class-Path element in the application
    JAR files manifest file (MANIFEST.MF).
    To run the project from the command line, go to the dist folder and
    type the following:
    java -jar "JavaApplication3.jar"
    To distribute this project, zip up the dist folder (including the lib folder)
    and distribute the ZIP file.
    Notes:
    * If two JAR files on the project classpath have the same name, only the first
    JAR file is copied to the lib folder.
    * If the classpath contains a folder of classes or resources, none of the
    classpath elements are copied to the dist folder.
    * If a library on the projects classpath also has a Class-Path element
    specified in the manifest,the content of the Class-Path element has to be on
    the projects runtime path.
    * To set a main class in a standard Java project, right-click the project node
    in the Projects window and choose Properties. Then click Run and enter the
    class name in the Main Class field. Alternatively, you can manually type the
    class name in the manifest Main-Class element.

  • Creating War , not Jar file.

    I am trying to create my EJB and i created my web project. The problem seems that my JBoss will not recognize and deploy my table perhaps due to the structure of the war file.
    My entities are working perfectly as they work, and have already been tested.
    ANyway, what i want is some help into getting my build.xml into making a jar file and sending that one instead of the the war file..
    Can someone please let me a link of where i should look ? Or what i should include in the xml file in order to create the file
    sTevoo.
    P.s - I am using netbeans 6
    Ps - I wasnt sure if i had to post here or in the Deploying - Java Archive (JAR) Files

      <property name="jboss.deploy.dir" value="/home/stevoo/jboss-4.2.2.GA/server/default/deploy"/>
        <property name="librarydir" value="${basedir}/lib"/>
        <property name="src.dir" value="src"/>
        <property name="build.dir" value="build"/>
        <property name="dist.dir" value="dist"/>
        <property name="bin.dir" value="bin"/>
        <target name="prepare">
            <delete dir="${bin.dir}"/>
            <mkdir dir="${bin.dir}"/> 
            <mkdir dir="${bin.dir}/META-INF"/>
        </target>
        <!--Set Libs-->
        <path id="libraries">
            <fileset dir="${librarydir}">
                <include name="*.jar"/>
                <include name="*.zip"/>
            </fileset>
        </path>
        <target name="compile1" depends="prepare">
            <javac srcdir="${src.dir}" destdir="${bin.dir}">
                <classpath refid="libraries"/>
            </javac>
            <echo message="Compile ...." />
        </target>
        <target name="compile" depends="compile1">
            <copy file="${src.dir}/conf/log4j.properties" todir="${bin.dir}/META-INF/"/>
            <copy file="${src.dir}/conf/MANIFEST.MF" todir="${bin.dir}/META-INF/"/> 
            <copy file="${src.dir}/conf/persistence.xml" todir="${bin.dir}/META-INF/"/>
            <jar basedir="${bin.dir}" destfile="${dist.dir}/test.jar"/>
            <echo message="Build...." />
        </target>
        <target name="run" depends="compile">
            <copy file="${dist.dir}/test.jar" todir="${jboss.deploy.dir}"/> 
            <echo message="Run ... ${jboss.deploy.dir}"/>
        </target>
        After a whole day of changing and tweaking and all .... this sort of works.
    Some more tweakong and done.
    Just in case any one else wants this,,,

  • Workshop missing WebLogic jar files

    Hello,
    I am new to WebLogic and Workshop (version 8.1.4). We are taking over a production code base from a vendor and have attempted to do a build of the .ear file. The build fails with errors. Looking into this, it appears the IDE does not know about the quoted portion of the following import lines:
    Package com.bea contains no member package or type of this name. “com.bea.wli”
    import com.bea.wli.control.dynamicProperties.DynamicPropertiesDocument.DynamicProperties;
    import com.bea.wli.control.dynamicProperties.EmailControlPropertiesDocument;
    import com.bea.wli.control.dynamicProperties.EmailControlPropertiesDocument.EmailControlProperties;
    import com.bea.wli.control.dynamicProperties.FileControlPropertiesDocument;
    Package com.bea contains no member package or type of this name. “com.bea.data”
    import com.bea.data.RawData;
    The vendor stated that the .jar files might be located on the actual licensed WebLogic server? To reduce the time of this effort, could someone tell me the specific .jar files to go after?
    Thank you very much
    Robert

    I should clarify further that the copy of Workshop we are using was pulled down from the archive of BEA downloads. We do not have access to a copy of Workshop as configured by the vendor. Additionally, looking at the *.work file for the Application and comparing the .jar files to my Weblogic (local) install the following are missing:
    ../../../../bea/weblogic81/server/lib/wli.jar;
    ../../../../bea/weblogic81/portal/lib/wps_system.jar;
    ../../../../bea/weblogic81/p13n/lib/p13n_system.jar;
    ../../../../bea/weblogic81/portal/lib/netuix/system/netuix_system.jar;
    My assumption is the issue has to do with the wli.jar above. Can someone tel me where a copy can be obtained?
    thank you,
    Robert

  • WEBLOGIC Jar Files

    Dear Friends,
    1) What all jar  files  required in XI Server to Connect  for  WEBLOGIC  Server  (  The Queue is in Weblogic Server..From SAP XI  we are connecting  with the help of JMS Adapter using  JNDI )
    2) Should  we deploy  any JAR file  in WEBLOGIC  server  side
    3) Should we deploy  any Jar files  related to JMS in our  XI Server.
    Thanks for your time and effort.
    Regards
    Agasthuri Doss

    Thanks Shabarish,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf4b1055-0d01-0010-32a3-b3848d77a6b9
    We have did  it  and crossed  checked twice.
    Any Comments  Shabarish
    Regards
    Agasthuri Doss

  • Creating an Executable jar file

    Hello ! I have a application that has been fully developed and all i want to do is to create an executable file using my own icon so that whenever it is double clicked it opens up the appliation.
    Please provide an example fro easy refrence.
    Thanks

    i have the procedure for creating executable jar file in a separate file.
    if u r interested then mail me at:
    [email protected]
    regards
    Md. Afroze

  • Creating an executable jar-file including a custom package

    I am trying to learn how to create executable jar-files. I have managed this with a single class. However having a class which is an extention of another class which in turn belongs to custom package, I can't make it work.Running the program normally is not a problem. I don't think the problem is the actual code, but I will include it here anyway. I create the jar-file using:
    jar -cmf Direkt2b.txt Direkt2b.jar *.class
    where Direkt2b.txt is just:
    Main-Class: Diriekt2b
    Only the main class-file is included this way. Copying the other file to the same directory before creation doesn't help either. There is no error messages, the jar-file just refuses to run no matter what.
    The main-class:
    import java.awt.*;
    import extra.*;
    class Direkt2b extends ExtendedFrame {
         Font f;
         Direkt2b() {
              f = new Font("SansSerif", Font.BOLD, 24);
              setBackground(Color.yellow);
              setSize(400,150);
         public void paint(Graphics g) {
              g.setFont(f);
              g.setColor(Color.blue);
              g.drawString("V?lkommen till Java Direkt", 45, 100);
         public static void main (String[] arg) {
              Direkt2b d2 = new Direkt2b();
              d2.setVisible(true);
    The help-class:
    package extra;
    import java.awt.*;
    import java.awt.event.*;
    public class ExtendedFrame extends Frame {
         private static boolean first = true;
         private boolean isFirst = first;
         public ExtendedFrame() {
              addWindowListener(theListener);
              first=false;
         WindowAdapter theListener = new WindowAdapter () {
              public void windowClosing(WindowEvent e) {
              dispose();
              if (isFirst)
                   System.exit(0);
    }

    My problem wasn't really getting more than one class in a jar-file,
    but rather that my jar-file with multiple classes wouldn't execute.
    Reading the original post I realized that maybe I was unclear about that.
    However I have solved the problem now so for anybody reading this
    thread in the future I will tell you how.
    The general setting is this: You have a bunch of self-made help-classes
    organized in some classdirectory somewhere in the filesystem. You use these
    in your programming from time to time. You have set a classpath-varible
    in your OS such that Java could find your help-classes.
    Now you want to create executable jar-files so that you could publish your work.
    My problem was that while I added all needed classes in a jar-file, the main-class
    couldn't find the others because they were referenced incorrectly. The solution I
    came up with may not be elegant, but it works. I copied the main-class and all directories
    (only one in my case) just as they appear in the classpath-directory, to the same temporary
    directory. Then I created the jar-file from there, using: jar -cmfv Direkt2b.txt Direkt2b.jar Direkt2b.class extra/*.class
    I suspected that incorrect referencing was the problem and I tried several variations on the theme above
    before giving up and writing the first post. Part the problem was that I didn't get any error messages,
    just an annoying error-sound double-clicking the jar-file. I learned later that you could run jar-files from
    the command -prompt using: java -jar myjarfile.jar. This way you get a more useful response.
    I guess there is a way to include the classpath instead somehow, but I will use my method for now.
    I hope this was helpful to somebody.

  • Create a complete jar file with jscreator

    Please provide all details for creating a jar file with jscreator for this 77 year old puzzle creator

    Hi,
    I would suggest switching to NetBeans IDE. It allows for the following:
    - Ability to run with latest JDK release
    - Enabled with the latest Java technologies
    - Support for a greater number of application servers
    The following will help with migration (if you already have a project setup in Creator)
    http://www.netbeans.org/kb/60/web/creator-migration.html
    Also, the following article describes how to create and Distribute Executable JAR Files in NetBeans
    http://www.netbeans.org/kb/articles/javase-deploy.html
    NetBeans website for downloads and other information;
    http://www.netbeans.org/index.html

Maybe you are looking for

  • How to install mod_perl in 9iAS and run perl ?

    i am running 9iAS on winnt 4 , i want to install perl module in 9iAS and run oraperl / perl ? any ideas? null

  • Silent Installation InDesign CS6 mit Retail Key

    Hallo Community, ich versuche schon seit etlichen Stunden, Adobe InDesign CS6 mit einem Retail Key im Hintergrund zu installieren. Der Adobe Application Manager Enterprise Edition ist für das Erstellen eines MSI Pakets leider nicht geeignet, da es si

  • UTorrent won't download ANYTHING after installing OS X Yosemite

         I decided to update my MacBook Pro, which at that time was running on Mavericks, to OS X Yosemite. Before updating my Mac's OS, I decided to reformat my computer's drive just because I felt that it had too much clutter which I could no longer ke

  • How do we anchor to top of page on page load?

    HI! I use iframes and when a user clicks a link in the middle of a page it loads the new child iframe in the iframe BUT the new page is at the same vertical spot as the previous page. I want the page to be loaded at the top so the user can see the se

  • Syncing songs to my new ipod

    My ipod touch was not working for I took it to the apple store and ultimately received a new ipod since they did not know what was wrong. Its the same iPod touch I originally had. 8 GB first gen one. Well for some reason when I tried connecting it to