Referencing utility classes from a war file

How do you reference a utility class from a war file? I tried adding the class to the deployment plan descriptor, however I still get a ClassNotFoundException.
Thanks,
Will

To use the utility classes from a war you have to place them under the web-inf/classes directory.
webApplication(WAR directory)--->WEB-INF--> classes (put your utility classes in this directory)

Similar Messages

  • Can I create a JTA EntityManagerFactory in a utility class in a .jar file?

    I have utility classes in a .jar file inside of a .war file deployed in Glassfish 3.1. One of these utility classes, CredentialsUtil, needs to access a database. I can't inject an EntityManager into CredentialsUtil since it is not an EJB. (For security reasons I don't want to make CredentialsUtil an EJB. I want it to be a POJO.)
    In CredentialsUtil I need an EntityManagerFactory that is connected to a datasource defined in Glassfish. Here is the line from CredentialsUtil.java and from the persistence.xml both of which will be in the util.jar file:
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("Credpu");
    <persistence-unit name="Credpu" transaction-type="JTA">
    I can't use RESOURCE_LOCAL since any changes to the datasource configuration must be done in Glassfish rather than changing persistence.xml.
    (The transaction context is not important in CredentialsUtil. It will be called by a WS-Security handler which may not have a transaction context.)
    Can I put the persistence.xml and the CredentialsUtil class that creates the EntityManagerFactory from it inside of the util.jar file (which will be in a .war), or do I have to move the class and a copy of the persistence.xml file out to the .war file? (I'll have to leave persistence.xml in the .jar file too since there are some @Entity in the .jar file. I don't know why but there are @Entity pojos in the .jar file.)
    I'd like to use the existing persistence.xml, but if I can't is there is a way to create an EntityManagerFactory (or EntityManager) that gets its datasource directly from Glassfish, ignoring persistence.xml?
    Thanks.

    Styles in Pages are saved in the documents (or templates). There is no easy method for adding a style to a built-in template (and it is strongly recommended that you do not tamper with them). You can open a built- in template, add your style and save it as a user template so that your new style will be standard in documents created from that template.

  • ClassNotFoundException trying to load classes in a .war file inside an .ear file

    Hi. I've deployed an EJB2 enterprise app as an ear file on WebLogic 6
              without errors. The ear file contains web app and ejb components in war and
              jar files. The web component is set to be the default web app in the
              config.xml file. Everything deploys without error messages.
              My problem is that I get ClassNotFoundExceptions when I try to invoke a
              servlet (via its servlet-mapping) or do Class.forName() on any class file in
              the war file.
              I see in '.wl_temp_do_not_delete' that the ear file has been decomposed into
              the ejb jar and web war files. The war file is not 'exploded' into a
              directory structure, however (as the console.war is). Is this an error
              (should the class packages in the war file be 'exploded'?)
              I don't see a tag in the web.xml, config.xml, or application.xml that tells
              the server to explode the war file--is there one?
              Note that if I manually copy the exploded class folders into the
              '_tmp_war_myserver_myserver_<<webappname>>' directory (and not, curiously,
              into a WEB-INF/classes subdirectory of that directory), the servlets and
              other classes load correctly. Also, jsps and html files load just fine
              without exploding the war file.
              Note also that the server complains about not being able to find the
              classes, even though it reports that the decomposed war file is in the
              classpath. Is there a problem loading class files from a .war file (because
              the namespace is different, with root classes located in WEB-INF/classes
              rather than the .war file's root?)
              Also, in the application.xml file, what is the meaning of the
              <context-root></context-root> element? What should its value be? What if
              you leave it blank?
              Thanks for any help,
              Reid
              

    Is there a way to add jar libraries to the Oracle JVM CLASSPATH? Is this the same as the system's CLASSPATH env. variable?
    Thank you!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alex McClennan ([email protected]):
    The package prefix in the code extract was correct - i.e. "oracle.aurora.jndi". A value of "oracle.aurora.jndi.*" would be incorrect.
    The problem is that the context factory implementation specified (com.evermind.server.ApplicationClientInitialContextFactory
    ) can't be found, the mostly likely reason being that the library containing the class isn't on the classpath.
    Cheers,
    ax<HR></BLOCKQUOTE>
    null

  • Re: Using simple java class in an .war file.

    Hi All,
    I have a simple question,
    Can I access an simple java class from a jsp file that I have written by putting it in the "classes" folder?? What entry should go in the web.xml file?
    Here is my directory structure:
    sample.war
    |
    ----test.jsp <file>
    |
    ----WEB-INF <folder>
    | |
    | ----classes<folder>
    | | |
    | | ----simpleJavaClass.class<file>
    | |
    | ----lib<folder>
    | |
    | ----web.xml
    I want to access the simpleJavaClass.class from the jsp test.jsp.
    Please suggest.
    Thanks and regards
    Ayusman

    It is possible to access the class in u r classes folder from u r jsp file.
    For example
    <%@ page import="com.test.service.PricingSolution,
    com.test.core.PhoneNumber
    %>
    <% PricingSolution solution = (PricingSolution)session.getAttribute("solution"); %>
    This is a simple scriplet example. You do the same using jstl tags also.
    --Shinoy

  • Problems while creating a project from a war file...

    Hi there, I created a new project in jDev 10.1.3 from a war file that contains a web site that originally ran on TomCat. The problem is that my web.xml file does not contain any information about the servlets that I have in the war file. So when I try running a servlet, I always get an error.
    Is there a way to bypass the need to declare every single servlet I have in the web.xml file? If not, are there tools that exist that I could use to do this automatically?
    Thanks

    Hi,
       You can try the following:
    1. Give the fully qualified domain name of the DTR server host in NWDS Preferences->Development Configuration.
    2. Check if your WAS and JDI are on a higher SP level. If yes then use the corresponding NWDS.
    Regards,
    Satyajit.

  • Is it possible to load classes from a jar file

    Using ClassLoader is it possible to load the classes from a jar file?

    URL[] u = new URL[1] ;
    u[0] = new URL( "file://" + jarLocation + jarFileName + "/" );
    URLClassLoader jLoader = new URLClassLoader( u );
    Object clsName = jLoader.loadClass( clsList.elementAt(i).toString() ).newInstance();
    I get this error message.
    java.lang.ClassNotFoundException: ExceptionTestCase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    // "file://" + fileLocation + fileName + "/" This works fine from a browser.
    Is there anything I am missing? Thanks for the reply.

  • WLS 7.0 - util jars being accessed from the war file

    Some of classes in the warfile (servlets) need access to some of the util jars in my ear file. I really don't want to put them in the war file/WEB-INF/lib directory and in the ear file. Is there any way to do this without putting them in the classpath.
    Any info would be appreciated.
    Thanks,
    Ian

    Ian,
    Examine the following link on packaging utility classes and the Weblogic classloader
    architecture
    This link should provide (hopefully :-) ) the answer to your question
    http://e-docs.bea.com/wls/docs70/programming/classloading.html
    Chuck Nelson
    DRE
    BEA Technical Support

  • Pre-load servlets from a war-file

    Hello,
              is there a way to pre-load a servlet (or execute any other code)
              at server startup, when the application is deployed as a .war-file?
              I know how to use the weblogic.servlet.utils.ServletStartup and
              the weblogic.system.startupClass... property, but these two
              seem to require that the servlet (or application class, respectively)
              are found in the servlet classpath (or the weblogic.class.path,
              respectively), so these mechanisms cannot peek into war-files to find
              the class, am I right?
              The page http://www.weblogic.com/docs51/classdocs/webappguide.html#dtprops
              says:
              <load-on-startup>load_order</load-on-startup>
              (Optional) This property is not honored by WebLogic Server in this release.
              Is this still valid?
              Is there a workaround?
              When will this element be supported?
              Concerning a possible workaround, I have read:
              > Subject: Re: Pre-load
              > Date: Fri, 19 Nov 1999 14:38:41 -0500
              > From: Jeff Martin <[email protected]>
              > Newsgroups: weblogic.developer.interest.servlet
              > Tom Gerber wrote:
              > >
              > > How do you get your startup class to start? Do you have a
              > > script which calls your startup class via a URL? Or is
              > > there a setting in the weblogic properties file for it?
              > Starting WebLogic in unix is a shell script. Just add a line to run your
              > preload program (e.g. java Preload).
              > Some unixes have utilities to get a web page from the command line (to
              > do shell parsing on it); create a series of calls, one per page.
              That sounds like a possibility, but I do not understand exactly.
              1) Where do I have to put the line into the shell script?
              2) Which line is it?
              3) What is the UNIX utility?
              I am using WL 5.1 (evaluation) under Solaris.
              Any help appreciated,
                   Oliver Matz
              | _ \ / \ | __)( ) Oliver Matz, Engineer
              | _/( () )| __) | | fon: +49(0)40/60990-0
              |_| \__/ |___) |_| fax: +49(0)40/60990-113
              

    Yes you can load a java applet form a jar file.
    Here is the code for internet explorer.
    <body>
         <table align="center" border="1">
              <tr>
                   <td>
                        <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="10" height="10" codebase="/plugin/">
                        <param name="code" value="XXX.class">
                        <param name="archive" value="XXX.jar">
                        </object>
                   </td>
              </tr>
         </table>
    </body>
    </html>
    Just replace the XXX.class with the class containing the init() method and XXX.jar with the jar file.

  • Unable to load impl class error after WAR file rebuilt

    Hi
    I have the source code for a working WAR file. I wanted to make a small change to the code and rebuilt the WAR. Now the previous WAR version works but even when I rebuild the WAR from the unedited code I get the error "unable to load impl class"
    and ClassNotFoundException: Class bytes found but defineClass() failed for ...
    Does anyone know what kind of changes in my environment would cause this problem?
    Thanks
    J Armstrong

    This was caused by using jdk1.6.0_02 to compile the java files where jdk1.50_06 was required

  • Accessing utility classes from ebj

    I have a session bean trying to access a utility class in the lib directory (same
    directory as weblogic.jar). I have packaged it into a jar file and set the classpath
    pointing to the file in the startWeblogic.cmd file. I compiled and depolyed the session
    bean and it runs fine until it starts to access the class. I got NoClassFoundException.
    I have tried to shut down and restart the server without any success. Anyone can
    help me this this?
    I know I can package the utility into the same jar as my ejb. But I don't want to
    do it because it is going to be everywhere. What is the right way of doing it?
    Thanks in advance.
    L.W.Xu

    Rob,
    You are right.
    Thanks a lot.
    L.W.X.
    Rob Woollen <[email protected]> wrote:
    >
    >
    If it's in the server classpath, the ejb will have no problem finding it.
    Either you have a typo and the class is not in the classpath. You can prove
    this by running
    javap on the class using the same classpath as your startWebLogic script.
    Or, as I suggested in the last response, it's not really standalone. The
    jar probably has a
    dependence on some classes in the ejb.jar.
    -- Rob
    "L. W. Xu" wrote:
    Rob,
    It is a standalone generic jar which has some classes in it. The ejb justcan't find
    it.
    I have a simple java program which uses it and it runs fine.
    Thanks.
    L. W. Xu
    Rob Woollen <[email protected]> wrote:
    If your utility.jar is standalone, then your approach is fine. However,
    it sounds like it
    is referencing a class that's only
    available in your ejb.jar. That won't work.
    -- Rob
    "L. W. Xu" wrote:
    I have a session bean trying to access a utility class in the lib directory(same
    directory as weblogic.jar). I have packaged it into a jar file and
    set
    the classpath
    pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed
    the session
    bean and it runs fine until it starts to access the class. I got NoClassFoundException.
    I have tried to shut down and restart the server without any success.Anyone can
    help me this this?
    I know I can package the utility into the same jar as my ejb. But I
    don't
    want to
    do it because it is going to be everywhere. What is the right way of
    doing
    it?
    Thanks in advance.
    L.W.Xu--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    If your utility.jar is standalone, then your approach is fine. However,
    it sounds like it is referencing a class that's only
    <br>available in your ejb.jar. That won't work.
    <p>-- Rob
    <p>"L. W. Xu" wrote:
    <blockquote TYPE=CITE>I have a session bean trying to access a utility
    class in the lib directory (same
    <br>directory as weblogic.jar). I have packaged it into a jar file and
    set the classpath
    <br>pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed the session
    <br>bean and it runs fine until it starts to access the class. I gotNoClassFoundException.
    <br>I have tried to shut down and restart the server without any success.
    Anyone can
    <br>help me this this?
    <p>I know I can package the utility into the same jar as my ejb. ButI
    don't want to
    <br>do it because it is going to be everywhere. What is the right wayof
    doing it?
    <p>Thanks in advance.
    <p>L.W.Xu</blockquote>
    <pre>--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com</pre>
    </html>
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    If it's in the server classpath, the ejb will have no problem finding it.
    <p>Either you have a typo and the class is not in the classpath. 
    You can prove this by running javap on the class using the same classpath
    as your startWebLogic script.
    <p>Or, as I suggested in the last response, it's not really standalone.  
    The jar probably has a dependence on some classes in the ejb.jar.
    <p>-- Rob
    <br> 
    <p>"L. W. Xu" wrote:
    <blockquote TYPE=CITE>Rob,
    <p>It is a standalone generic jar which has some classes in it. The ejb
    just can't find
    <br>it.
    <p>I have a simple java program which uses it and it runs fine.
    <p>Thanks.
    <p>L. W. Xu
    <p>Rob Woollen <[email protected]> wrote:
    <br>>
    <br>>
    <br>>If your utility.jar is standalone, then your approach is fine. 
    However,
    <br>>it sounds like it
    <br>>is referencing a class that's only
    <br>>available in your ejb.jar.  That won't work.
    <br>>
    <br>>-- Rob
    <br>>
    <br>>"L. W. Xu" wrote:
    <br>>
    <br>>> I have a session bean trying to access a utility class in the lib
    directory
    <br>>(same
    <br>>> directory as weblogic.jar). I have packaged it into a jar file and
    set
    <br>>the classpath
    <br>>> pointing to the file in the startWeblogic.cmd file. I compiled and
    depolyed
    <br>>the session
    <br>>> bean and it runs fine until it starts to access the class. I got
    NoClassFoundException.
    <br>>> I have tried to shut down and restart the server without any success.
    <br>>Anyone can
    <br>>> help me this this?
    <br>>>
    <br>>> I know I can package the utility into the same jar as my ejb. But
    I don't
    <br>>want to
    <br>>> do it because it is going to be everywhere. What is the right way
    of doing
    <br>>it?
    <br>>>
    <br>>> Thanks in advance.
    <br>>>
    <br>>> L.W.Xu
    <br>>
    <br>>--
    <br>>
    <br>>----------------------------------------------------------------------
    <br>>
    <br>>AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    <br>>
    <br>>by Michael Girdley, Rob Woollen, and Sandra Emerson
    <br>>
    <br>>http://learnWebLogic.com
    <br>>
    <br>>
    <br>>
    <br>>
    <br>><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <br>><html>
    <br>>If your utility.jar is standalone, then your approach is fine. 
    However,
    <br>>it sounds like it is referencing a class that's only
    <br>><br>available in your ejb.jar.  That won't work.
    <br>><p>-- Rob
    <br>><p>"L. W. Xu" wrote:
    <br>><blockquote TYPE=CITE>I have a session bean trying to access a
    utility
    <br>>class in the lib directory (same
    <br>><br>directory as weblogic.jar). I have packaged it into a jar file
    and
    <br>>set the classpath
    <br>><br>pointing to the file in the startWeblogic.cmd file. I compiled
    and
    <br>>depolyed the session
    <br>><br>bean and it runs fine until it starts to access the class.
    I got NoClassFoundException.
    <br>><br>I have tried to shut down and restart the server without any
    success.
    <br>>Anyone can
    <br>><br>help me this this?
    <br>><p>I know I can package the utility into the same jar as my ejb.
    But I
    <br>>don't want to
    <br>><br>do it because it is going to be everywhere. What is the right
    way of
    <br>>doing it?
    <br>><p>Thanks in advance.
    <br>><p>L.W.Xu</blockquote>
    <br>>
    <br>><pre>--
    <br>>
    <br>>----------------------------------------------------------------------
    <br>>
    <br>>AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    <br>>
    <br>>by Michael Girdley, Rob Woollen, and Sandra Emerson
    <br>>
    <br>>http://learnWebLogic.com"><a
    href="http://learnWebLogic.com">http://learnWebLogic.com</a></A></pre>
    <br>> </html>
    <br>>
    <br>></blockquote>
    <pre>-- 
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    <A HREF="http://learnWebLogic.com">http://learnWebLogic.com</A></pre>
     </html>

  • EJB(EAR file) lookup from separate WAR file

    Hi
    I have 2 applications (EAR and WAR) deployed in an OC4J instance using Oracle 10g. All my EJB components are in my EAR file and all my front-end/servlet component are in the WAR file. My lookup in the servlet fails, like:
    05/01/21 13:47:05 javax.naming.NameNotFoundException: SessionEJB not found
    05/01/21 13:47:05 at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
    05/01/21 13:47:05 at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:248)
    05/01/21 13:47:05 at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:119)
    05/01/21 13:47:05 at javax.naming.InitialContext.lookup(InitialContext.java:347)
    05/01/21 13:47:05 at efdw.eap.servlet.SessionEJBAction.execute(SessionEJBAction.java:48)
    05/01/21 13:47:05 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    05/01/21 13:47:05 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    05/01/21 13:47:05 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    05/01/21 13:47:05 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    05/01/21 13:47:05 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    05/01/21 13:47:05 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    05/01/21 13:47:05 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    05/01/21 13:47:05 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    05/01/21 13:47:05 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    05/01/21 13:47:05 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    05/01/21 13:47:05 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    05/01/21 13:47:05 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    05/01/21 13:47:05 at java.lang.Thread.run(Thread.java:534)
    EJB reference in web.xml looks like:
    <ejb-ref>
    <ejb-ref-name>SessionEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.app.bean.SessionEJBHome</home>
    <remote>com.app.bean.SessionEJB</remote>
    </ejb-ref>
    I've added the "parent" attribute in server.xml, something like:
    <application name="myapp" path="../applications/myapp.ear" auto-start="true" />
    <application name="myweb" path="../applications/myweb.ear" auto-start="true" parent="myapp" />
    but the sever.xml file gets reset and there is no parent attribute in the file
    lookup in my servlet:
    Context ctx = new InitialContext();
    Object objref = ctx.lookup("SessionEJB");
    sessionEJBHome = (SessionEJBHome)PortableRemoteObject.narrow(objref, SessionEJBHome.class);
    beanRemote = sessionEJBHome.create();
    I also tried using the jndi.properties file and by specifying context attributes (PROVIDER_URL,INITIAL_CONTEXT_FACTORY,..) nothing worked.
    Is there a way I can configure the jndi tree like in weblogic? How do I need to configure the lookup?

    Hi Naga,
    You have to lookup the ejb as follows:
    Object objref = ctx.lookup("java:comp/env/ejb/SessionEJB");
    location tag in orion-ejb-jar.xml for the EJB determines where the JNDI-name to which this bean will be bound documented in EJB Guide at http://download-west.oracle.com/docs/cd/B14099_01/web.1012/b15505/dtdxml001.htm#sthref1130
    <ejb-ref-mapping ... > in orion-web.xml :
    This element creates a mapping between an EJB reference, defined in an <ejb-ref> element, and a JNDI location when deploying.
    The <ejb-ref> element can appear within the <web-app> element of orion-web.xml or web.xml and is used to declare a reference to an EJB.
    -Debu

  • How to combine the classes from 2 jar files into 1?

    Hi there
    I have got 2 jar files with the same name but the classes that they contain are different. So, I want to combine those 2 files into 1. Could anyone please tell me how to add the classes in a jar file to another jar file?
    Thanks for your help!
    From
    Edmund

    The jar utility allows you to extract files as well as put them into a jar. This is in the java docs.
    You might have to hand modify the manifest file if it was hand modified in the first place. All you should have to do is copy the text from one file to another. The manifest will have the same name so you will have to extract to different dirs so it isn't overwritten.
    Steps:
    -Create dir1 and dir2
    -Extract jar1 into dir1, Extract jar2 into dir2.
    -Manually examine manifests and combine if needed.
    -Copy files from one dir to another.
    -Use jar tool to create new jar.

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

  • How to include text file in classes directory of war file.

    I have a project that uses a text file called cache.ccf (JCS configuration file) when debugging the webservices, I have to dig into the inflated war file directory and manually place the cache.ccf file in the WEB-INF/classes/ directory/
    How can i have JDeveloper wrap the file up in the war file in the WEB-INF/classes directory. both for debugging and when the war file is actually built for deployment.
    Thanks,
    Bart

    Nevermind, I figured it out using the Project Properties->Deployment and include it in the WEB-INF/classes

  • Loading classes from another jar file

    I've set up my jnpl file so that it references a core jar file (contains main() function). The jnlp also references another jar file (app.jar) which contains class files that I load and instantiate dynamically (using ClassLoader). The core.jar file contains a manifest that includes a reference to app.jar.
    The app works fine when I use "java -jar core.jar" from the command line.
    However, when I wrap the jars using jnlp, I always get a null pointer exception because it cannot find any class that is in the app.jar file. I've tried different strategies, such as trying to load a class file that sits on the server (in a jar file and not in a jar file), but that also fails if I use jnlp (However, it works if I use "java -jar core.jar")
    Any ideas what is going on?

    This is the "OckCore.jar" manifest before signing:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Class-Path: . OckMaths.jar
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Name: com.Ock.OckCore.OckApp.class
    Java-Bean: FalseThis is the manifest after signing:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Class-Path: http://hazel/Ock/. http://hazel/Ock/OckMaths.jar
    Name: com/Ock/OckCore/OckApp.class
    SHA1-Digest: KRZmOryizx9o2L61nN+DbUYCgwo=I have removed a load of irrelevant stuff from the "after" manifest to keep it readable.
    note that :-
    The OckApp.class loads normally from webstart and tries to load a class from OckMaths.jar.
    I can prove that OckApp.class does load because it creates a log file when it does.
    The OckApp.class tries to load a class from the OckMaths.jar. This fails if webstart is used but works if OckCore is launched using "java -jar OckCore.jar".
    The jars do exist at the location specified by the manifest.
    The application launches normally if I use "java -Jar OckCore.jar"
    Here is the jnlp file
    <?xml version='1.0' encoding='UTF-8'?>
    <jnlp
         spec="1.0"
         codebase="http://hazel/Ock"
         href="OckMaths.jnlp">
         <information>
              <title>Ock Maths Demo</title>
              <vendor>Rodentware Inc</vendor>
              <description>Demo of a ported app running as a Java Webstart application</description>
              <description kind="short">An app running as a Java Webstart application"></description>
              <offline-allowed/>
         </information>
         <security>
              <all-permissions/>          
         </security>
         <resources>
              <j2se version="1.3"/>
              <jar href="OckCore.jar"/>
              <jar href="OckMaths.jar"/>
         </resources>
         <application-desc main-class="com.Ock.OckCore.OckApp">
    </jnlp> I have also signed the jars outside of a webdirectory. I get the following manifest file:
    Manifest-Version: 1.0
    Main-Class: com.Ock.OckCore.OckApp
    Created-By: 1.4.0-beta3 (Sun Microsystems Inc.)
    Class-Path: . OckMaths.jar
    Name: com/Ock/OckCore/OckApp.class
    SHA1-Digest: KRZmOryizx9o2L61nN+DbUYCgwo=
    note that :-
    The jars do exist at the location specified by the manifest.
    The application launches normally if I use "java -Jar OckCore.jar".
    The application doesn't launch from webstart.
    I've found that cache, but the jar files have been renamed.
    OckCore.jar is anOckCore.jar, etc... so I'm not sure if trying to write a cmdline will work anyway.

Maybe you are looking for

  • WLC4404 failover doesn't return properly

    I have the following scenario: WLC01 on 172.16.72.200 AP on 172.16.72.4 (DHCP) WLC02 on 172.16.32.200 (different subnet) I have DHCP servers on each subnet, and routing between them is operational. The two WLCs are on the same mobility group and they

  • Automated batch doesn't work in photoshop & from Bridge

    Hi all, Automated batch from  Bridge  tools>photoshop>batch  Photoshop cs5 stops working. Automated batch also doesn't work in photoshop. Automated actions work in Photoshop. All other Photoshop process work  from Bridge. I use a PC with windows. Thi

  • Is there any certification for oracle performance tuning..?

    Hi All, Do we have any certification for oracle performance tuning. Let me know if it is. Thanks, Ritesh

  • What's wrong with my KeyGenerator ?

    Hi, Here is a short source code that give me troubles when executed from a servlet. KeyGenerator keyGen = KeyGenerator.getInstance("DES"); When executed the main of an app, there is no problem. but when executed from a servlet, the servlet stop and g

  • How good is RAW photo editing in iPhoto '08?

    Can it compete in any way with Aperture? Is it worth it? I was settled on Aperture until this came out. It has some feaures that make it seem a little Aperture-ish, or Aperture-lite. I don't do much RAW editing, but I up the saturation, play a little