Why is WLS 7.0 trying to ejbc my jar file?

I have an application (server.ear) that contains four EJB jars
(entities.jar, managers.jar, services.jar, commands.jar). I'm using a
single ant (1.5.2) ejbjar task to generate the jar files and an ear
task to create the application. This has been working fine for some
time, but just yesterday WLS (7.0sp2) started giving me an exception
when I try to deploy -- the exception is appended to this post with
ellipsis added by me.
It appears that the EJBComplianceChecker is being run on this jar
file. I understand that this only happens when you try to deploy a
"raw" jar file that hasn't been ejbc'ed. It makes sense in this case
that the ServerVO.class would not be found since it doesn't appear in
WLS's system classpath. That class is actually in the jar file itself.
How does WLS determine that it needs to ejbc a jar file? Why would it
decide to ejbc this one? I've checked the jar file by hand and it
contains the ejbc-generated classes as well as a WLGENERATED entry.
I've also taken the ant-generated generic jar file and run ejbc on it
myself and I get the same results.
-- Les Walker
Unable to deploy EJB: SubmissionServiceMDBean from services.jar:
Class not found: com/.../common/data/ServerVO
java.lang.NoClassDefFoundError: Class not found:
com/.../common/data/ServerVO
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:283)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:228)
at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfo(EJBDeployer.java:992)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:232)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:1570)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:737)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1062)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:730)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)

That was it. I have some startup classes that are in a jar file in the
server's classpath. I bet that one of the EJB's was referencing a
class contained in that jar which in turn referenced ServerVO which
was not available outside the EJB's jar file. That's the only way I
can figure that it got picked up by the EJB verifier.
Thanks for the help,
-- Les Walker
Rob Woollen <[email protected]> wrote in message news:<[email protected]>...
WLS will ejbc on the server if you have not ejbc'd the jar or the WLS
version which compiled the jar doesn't match the server's version.
These have to be exact versions (ie if you compiled with SP1 and deploy
to SP2, it'll recompile on the server.)
As for the NoClassDefFoundError, I suspect something in the server's
$CLASSPATH references the ServerVO class. You can refer to classes in
your parent classloader, but cannot have parent--->child dependencies.
-- Rob
Les Walker wrote:
I have an application (server.ear) that contains four EJB jars
(entities.jar, managers.jar, services.jar, commands.jar). I'm using a
single ant (1.5.2) ejbjar task to generate the jar files and an ear
task to create the application. This has been working fine for some
time, but just yesterday WLS (7.0sp2) started giving me an exception
when I try to deploy -- the exception is appended to this post with
ellipsis added by me.
It appears that the EJBComplianceChecker is being run on this jar
file. I understand that this only happens when you try to deploy a
"raw" jar file that hasn't been ejbc'ed. It makes sense in this case
that the ServerVO.class would not be found since it doesn't appear in
WLS's system classpath. That class is actually in the jar file itself.
How does WLS determine that it needs to ejbc a jar file? Why would it
decide to ejbc this one? I've checked the jar file by hand and it
contains the ejbc-generated classes as well as a WLGENERATED entry.
I've also taken the ant-generated generic jar file and run ejbc on it
myself and I get the same results.
-- Les Walker
Unable to deploy EJB: SubmissionServiceMDBean from services.jar:
Class not found: com/.../common/data/ServerVO
java.lang.NoClassDefFoundError: Class not found:
com/.../common/data/ServerVO
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:283)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:228)
at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfo(EJBDeployer.java:992)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:232)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:1570)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:737)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1062)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:730)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)

Similar Messages

  • Why does adobe reader keep trying to open my XPI files?

    Recently when trying to download a .xpi file I accidentally clicked on adobe reader instead of the program I wanted to use to open it, and now it repeatedly tries to use adobe reader to open it no matter what I do, I've looked everywhere and I can't change this. Could you please inform me on how to change what I use to open a file?

    You can install such an locally saved extension in Firefox by dragging the file in a Firefox tab or use "Firefox/File > Open File" to install the extension.
    There is usually no need to open an xpi file directly.
    *http://kb.mozillazine.org/Installing_extensions

  • Run EJBC on jar file (in Weblogic)

    Hi all,
    Why do we have to use the following statement while creating a jar file for Entity Beans deploying in Weblogic App server.
    ==================================
    java -classpath d:/bea/wlserver6.0/lib/weblogic_sp.jar;d:/bea/wlserver6.0/lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb_trader.jar d:\ejb_trader.jar
    ===========================================
    Any help will be appreciated.
    Seetesh

    Hi Deepak,
    java -classpath d:/bea/wlserver6.0/lib/weblogic_sp.jar;d:/bea/wlserver6.0/lib/weblogic.jar weblogic.ejbc -compiler javac build\std_ejb_trader.jar d:\ejb_trader.jar
    The installer of Weblogic 6.0 is that it doesnt have this Weblogic_sp.jar while installing whereas Weblogic 6.1 has this jar file.
    Problem in this case using Weblogic 6.0 is that without Weblogic_sp.jar d:\ejb_trader.jar file doesnt get created at all.
    Thanks for ur reply,
    Seetesh

  • Problem trying to cataloge a jar file OBPM 10.3.1.0

    Hi,
    I´m having problems when i cataloge a jar file, in OBPM suite 10.3.1.0, it is an itext jar file. I´ve been trying to cataloge older and newer versions of the Itext jar file but there´s no difference in the outcome.
    I create the external resource, but when i try to cataloge the package it doesn´t work
    The message it returns is:
    [Error] Excepción de introspección: Internal Error: java.lang.VerifyError: (class: com/lowagie/text/RectangleReadOnly, method: <init> signature: (Lcom/lowagie/text/Rectangle;)V) Bad access to protected data..
    is there anything i can do to solve this problem?..
    Thanks for your time
    Alfredo Butrón
    Alkimia Consultores

    Hi Dan,
    I´ve done what you told me, i buid a helper class to invoke the iText classes ,and i just cataloge the helper class keeping all the jar files only in the external resource
    When i run my class out of OBPM it works fine, but when i try to invoke my class from OBPM with the same jar classes i use in a external way i get the following message:
         at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
    Caused by: java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfWriter.setRgbTransparencyBlending(Z)V
         at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:482)
         at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:381)
    i change the version of iText.jar many times and i get the same message..
    thanks in advance
    ALfredo

  • Trying to run a .jar file but CAN'T!!!!

    I have a .jar file. If I click on it, a Java Virtual Machine Launcher error box comes up that says "Could not find the main class. Program will exit."
    I've tried to run it from the DOS prompt two ways.
    If I type "java -jar Plist" (Plist is the .jar file name, the .java file name, and the class name), It says...
    Exception in thread "main" java.util.zip.ZipException: The system cannot find
    e file specified
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    at java.util.jar.JarFile.<init>(Unknown Source)
    If I type "java -jar Plist.jar", It says...
    Exception in thread "main" java.lang.NoClassDefFoundError: Plist
    Two questions...
    1. What am I doing wrong??
    2. Once I get this .jar deal to work, will I be able to run it on other computers? It seems to be tied in with some of the Java utilities and files on my computer. Is it independent like a .exe file or not?

    1. What am I doing wrong??
    You need a manifest. Open notepad and write these two lines:
    Main-Class: main
    [A blank line, just hit enter]
    For main specify the name of the class that has the Main(String[] args) method without the .class extension. If your using a package, then put the package name in there too like this:
    Main-Class: myPackage/main
    But since you not using a package, and you said the only class is Plist.class then use:
    Main-Class: Plist
    (remember a blank line here)
    Now save this file (call it manifest.txt if you like).
    Next, update your jar file with this command:
    jar umf [name of manifest file] [name of jar file]
    jar umf manifest.txt Plist.jarNow run with this command or double-click from Windoze:
    java -jar Plist.jar2. Once I get this .jar deal to work, will I be able to run it on other computers?
    The other computers must have at least the jre installed, available free from Sun as you know :)
    -Ron

  • Trying to create Executeable jar file.Exception in thread main NoClassDef

    Hi,
    I am trying to create an executeable jar file.While running i am getting exception.
    Exception in thread "main" java.lang.NoClassDefinitionFoundError: jartest
    my java file: jartest.java
    public class jartest
    public static void main(String args[])
    System.out.println("Weldone Phani");
    I created a jar file name jartest using following command
    jar cf jt.jar jartest.class
    and then i created an manifestfile m.txt the following is m.txt
    Manifest-Version: 1.0
    Main-Class: jartest
    Created-By: Me And My Family
    Name: jartest.class
    Java-Bean: False
    Then i updated the manifest file in the jt.jar using following command
    jar cmf m.txt jt.jar
    while i try to execute the jar (java -jar jt.jar ) i am getting the above said exception
    Where i went wrong. Thanks in advance.
    phani

    Please in the future do a search on the forum for your answer. If everyone asks the same question 10 times, then there is not one thread where a person can look, but 10 - each with a small piece. In fact, in this forum the second thread from the top answered your question/problem:
    http://forum.java.sun.com/thread.jsp?forum=22&thread=141944
    (You have a few problems, one of which is that the manifest MUST be named "MANIFEST.MF", and it MUST be in the folder "META-INF" from the jar's root. For the rest of the answers, look at the above thread)

  • WL tries to deploy utility jar file in .ear as an EJB

    I have an ear containing two ejb jars, one webapp war and a utility jar
    (common.jar). Deploying to
    WebLogic 6.1 sp2 results in deployment errors because WebLogic thinks
    the common.jar in a
    lib directory in the ear is an ejb jar:
    ==================================================================
    ><Apr 22, 2002 4:42:36 PM MDT> <Error> <J2EE> <Error deploying
    >application lib/common:
    >
    >Unable to deploy EJB: lib/common.jar from lib/common.jar:
    >
    >An error occurred while reading the deployment descriptor. The error was:
    > java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    > at weblogic.ejb20.dd.xml.DDUtils.getEntry(DDUtils.java:332)
    > at weblogic.ejb20.dd.xml.DDUtils.getEjbJarXml(DDUtils.java:236)
    >.........
    >===================================================================
    Why does it think common.jar contains an EJB? My application.xml is:
    >
    ><application>
    > <display-name>TestUnit</display-name>
    > <module>
    > <ejb>TestUnit1.jar</ejb>
    > </module>
    > <module>
    > <ejb>TestUnit2.jar</ejb>
    > </module>
    > <module>
    > <web>
    > <web-uri>WebApp1.war</web-uri>
    > <context-root>WebApp1</context-root>
    > </web>
    > </module>
    ></application>

    Hi.
    Please open a case with support.
    Regards,
    Michael
    Rick Holland wrote:
    I have an ear containing two ejb jars, one webapp war and a utility jar
    (common.jar). Deploying to
    WebLogic 6.1 sp2 results in deployment errors because WebLogic thinks
    the common.jar in a
    lib directory in the ear is an ejb jar:
    ==================================================================
    <Apr 22, 2002 4:42:36 PM MDT> <Error> <J2EE> <Error deploying
    application lib/common:
    Unable to deploy EJB: lib/common.jar from lib/common.jar:
    An error occurred while reading the deployment descriptor. The error was:
    java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    at weblogic.ejb20.dd.xml.DDUtils.getEntry(DDUtils.java:332)
    at weblogic.ejb20.dd.xml.DDUtils.getEjbJarXml(DDUtils.java:236)
    ===================================================================Why does it think common.jar contains an EJB? My application.xml is:
    <application>
    <display-name>TestUnit</display-name>
    <module>
    <ejb>TestUnit1.jar</ejb>
    </module>
    <module>
    <ejb>TestUnit2.jar</ejb>
    </module>
    <module>
    <web>
    <web-uri>WebApp1.war</web-uri>
    <context-root>WebApp1</context-root>
    </web>
    </module>
    </application>
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Very new to Java, trying to make a jar file run on WM6

    Ok so i downloaded this java progam that is supposed to work on "java-enabled" phones. So i have windows mobile 6, which is able to run java but i think its limited to the browser. when i try to run it on a virtual java machine i recieve the following error.
    java.lang.Exception: No Main-Class attribute in \My Documents\TrafficPilot.jar
    at java.lang.VMMainThread$1.run(VMMainThread.java)
    at java.lang.VMThread.run(VMThread.java:120)
    JVM exit
    what is needed to make this work? or is it even possible?

    Hi, welcome to the Sun Java forums.
    Pester the person who gave you the JAR, s/he did something wrong.
    Pass this information on to them:
    Add a MANIFEST.MF file in the JAR's META-INF directory (all names case-sensitive) and put this line in it, with two Enters after it:
    Main-Class: mypackage.MainClassName
    Though if the JAR contains an applet (which would explain why it only works in a browser), it might not have a main class.

  • Why do we need to have  a war or jar file

    Can someone please explain me what is the need of creating these 2 archives

    Why do we have doc, xls, exe, com, bat, sh, odt? Lets all just work with a plaintext flat file! It would make life so much simpler! :)

  • Fatal Exception occurred when trying to execute a JAR file

    Hi,
    I have compiled my project in a jar file with the purpose of having an 'almost' executable file that would run with a simple double click.
    When running this file from the netbeans directory, it works fine, but if I move this jar file to, say, my desktop, then I get an error:
    Fatal Exception occurred. Program will exit.
    Is this normal?
    basically, I would like to create a stand-alon file that I can send to other people who can run it on their machines
    Am I doing the right thing, or missing something?
    P.S I should add that my application needs to read contente from some txt files which are stored in my PC, but that is clearly speficied in the code
    thanks

    I found that if I copy the whole of the dist directory and subdirectories, it works fine. I guess that's what could not be found.
    just for my learning, is that the correct solution: basically send over the whole dist+subdirectories and have the program run from there?
    thanks

  • Why does WLS 9.2 installer say "Insufficient disk space!" on OS X w/122GB?

    hi all,
    i just installed mac os x 10.4.0 about 4 days ago onto a brand new 160 GB internal hdd. apart from some upgrades (10.4.9, java 1.5, xcode docs, etc.) the only other apps i've installed are eclipse 3.2 development ide & mozilla. that left me with 122 GB available on my hdd (as reported by "Get Info").
    today, i tried to install BEA WebLogic Server 9.2 MP1 (the ibm aix generic installer). the installer for wls 9.2 comes as an executable jar file that must be executed from the shell. i executed the following command in the shell:
    $ java -jar server921_generic.jar -log=/Users/myhome/logs/wls92_mp1_install_02_05_07.logthe installer gui loads, prompts me for the license agreement, some install folder locations (i told it to install to "/Users/myhome/development/bea"), etc. then, it reports:
    <blockquote>
    "Insufficient disk space! The installer requires: 5MB for the BEA Home at /Users/myhome/development/bea and 270 MB temporary work space at /tmp/bea30536.tmp. There is only 271MB available at /."
    </blockquote>
    ONLY 271MB AVAILABLE!!? how can that be?
    so, i tried directing it to install to "/Applications/bea". i also started the installer with an option to use "/Applications/tmp" (which i created with mkdir) as an alternate tmp directory. this time with "sudo" - just in case:
    $ sudo java -Djava.io.tmpdir=/Applications/tmp  -jar server921_generic.jar -log=/Users/myhome/logs/wls92_mp1_install_02_05_07.logthis time its:
    <blockquote>
    "Insufficient disk space! The installer requires: 5MB for the BEA Home at /Applications/bea and 270 MB temporary work space at /Applications/tmp/bea30537.tmp. There is only 271MB available at /."
    </blockquote>
    what gives? on my solaris box, i can do "growfs" to expand the space available to a filesystem. is there some way i can do something similar on os x? or is there ANYTHING else to give "/" access to more of the 122 GB hdd space that is obviously available?
    thanks in advance for your help.

    hi,
    please take a look at "[url http://forums.bea.com/bea//thread.jspa?threadID=400003593&tstart=15&mod=1178464358368]HELP: Which command line args to launch Workshop 9.2 on Mac OS X 10.4?"
    to summarize that thread: the generic installer does not come with workshop 9.2 or portal 9.2 because they are not supported on aix, hp or mac os x. weblogic server is not supported on max os x at all.
    that thread also explains how i was able to get workshop 9.2 installed and running on os x:
    "...i happen to have a working installation of wls & wlw
    on my sun microsystem's sunblade 100 with solaris 9
    (installed using bea's solaris_sparc-specific .bin
    installer; which _does_ come bundled with the wlw ide).
    so, i copied the wlw-related stuff (everything in
    $bea_home/workshop92 & everything in
    $bea_home/common/eclipse) from my solaris box to the
    appropriate folders on my mac..."if you have (or can get access to) a working installation
    of workshop that has already been installed on another
    supported os, then you'll need to copy the
    workshop-related stuff from the supported os to your mac;
    like i described in the above thread. you'll need to keep
    in mind that there are some os-specific plugins that come
    with the supported versions of workshop; you will need to
    replace those with their mac-specific equivalents.
    if you click on my username in the top left-hand corner of
    this post, you will get a list of posts i've made recently
    that detail my experiences getting weblogic server 9.2 and
    workshop 9.2 installed on mac os x. if you can
    follow along with the info in those threads, you will
    learn everything that i know about the subject. good luck.
    let us know how you get on?

  • Why might WLS 9.2 installer say "Insufficient disk space!" on OS X w/122GB?

    hi all,
    i just installed tiger about a week ago onto a brand new 128 GB internal hdd. apart from some upgrades (10.4.9, java 1.5, xcode docs, etc.) the only other apps i've installed are eclipse 3.2 development ide & mozilla. that left me with 122 GB available on my hdd (as reported by "Get Info").
    today, i tried to install BEA WebLogic Server 9.2 (a j2ee application server). the installer for wls 9.2 comes as an executable jar file that must be executed from the shell. i executed the following command in the shell:
    $ java -jar server921_generic.jar -log=/myhome/logs/wls92mp1_install_02_0507.log
    the installer gui loads, prompts me for the license agreement, some install folder locations (i told it to install to "/Users/myhome/development/bea"), etc. then, it reports:
    "Insufficient disk space! The installer requires: 5MB for the BEA Home at /Users/myhome/development/bea and 270 MB temporary work space at /tmp/bea30536.tmp. There is only 271MB available at /."
    ONLY 271MB AVAILABLE!!? how can that be?
    so, i tried directing it to install to "/Applications/bea". i also started the installer with an option to use "/Applications/tmp" (which i created with mkdir) as an alternate tmp directory. this time with "sudo" - just in case:
    $ sudo java -Djava.io.tmpdir=/Applications/tmp -jar server921_generic.jar -log=/myhome/logs/wls92mp1_install_02_0507.log
    this time its:
    "Insufficient disk space! The installer requires: 5MB for the BEA Home at /Applications/bea and 270 MB temporary work space at /Applications/tmp/bea30537.tmp. There is only 271MB available at /."
    what gives? on my solaris box, i can do "growfs" to expand the space available to a filesystem. is there some way i can do something similar on os x? or is there ANYTHING else to give "/" access to more of the 122 GB hdd space that is obviously available?
    thanks in advance for your help.
    p.s. there are no disk quotas or anything like that:
    $ sudo quota
    Disk quotas for user root (uid 0): none
    $ quota
    Disk quotas for user me (uid 501): none
    i also ran repair permissions, just in case. same difference.
    Message was edited by: l'il john l'concharoo

    found my answer!: java -Dos.name=unix ...

  • How to deploy jar file in WLS using ant script

    Hi,
    Im trying to deploy a jar file in weblogic 10.3 using ant script and am running into the below error.
    +[wldeploy] weblogic.management.DeploymentException: [J2EE:160177]The application at "/u01//RSJBObjects.jar" was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with ".war". RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with "-jms.xml". A JDBC deployment should be an XML file whose name ends with "-jdbc.xml". For other application types, please consult the WebLogic Server documentation.+
    When i try to deploy the same manually from the console, i get a warning stating that WLS thought this as a library and hence proceeding to deploy as a library. After this warning the deployment continues and completes.
    Problem is when i try to deploy using ant, it breaks at this point.
    Is there any means that we can deploy a jar to WLS using ant script. This has to be deployed as a library as other apps would be using this jar.
    Im unable to create a ear file for this single jar file.
    If there is any suggestion on can this be done, please share.
    Thanks,
    Vijay.

    Hi Sunil,
    Thanks for the reply, it worked.
    Another doubt on the same lines. Now that the jar has been deployed as a library in WLS, when i try to deploy a WAR which refers to this deployed jar library, im unable to. I run into and error stating that the library is inaccessible.
    I have to bounce the server and before doing that, i have to manually copy the library.jar from <WLS_domain>/servers/AdminServer/upload/ directory to <WLS_domain>/lib/ directory, once copied i then try to deploy the WAR, then the deployment goes fine.
    Is there any means that this deployed library jar be made available soon after deployment and also to avoid copying the file.
    Thanks,
    Vijay.

  • Trying to load jar file dynamically

    I'm trying to load the jar file dynamically and making the new instance of an objet present in it.
    mu source code -
    import java.net.*;
    import java.util.*;
    import java.io.*;
    import java.lang.reflect.Method;
    class A
    /** The class loader to use for loading JMeter classes. */
    private static URLClassLoader loader;
         static {
              System.out.println("classpath : " + System.getProperty("java.class.path"));
    URL[] urls = new URL[1];
    StringBuffer classpath = new StringBuffer();
    File f = new File("E:\\try\\lib\\dom4j.jar");
              String s = f.getPath();
    try
                   urls[0] = new URL("file", "", s);
              catch (MalformedURLException e)
                   e.printStackTrace();
    System.setProperty(
    "java.class.path",
    System.getProperty("java.class.path") + System.getProperty("path.separator") + s);
    loader = new URLClassLoader(urls);
    * Prevent instantiation.
    private A()
    * The main program which actually runs JMeter.
    * @param args the command line arguments
    public static void main(String[] args) throws Exception
              System.out.println("java,class.path : " + System.getProperty("java.class.path"));
    Thread.currentThread().setContextClassLoader(loader);
              System.out.println("loader : " + loader);
              System.out.println("java.class.path : " + System.getProperty("java.class.path"));
              System.out.println("classpath : " + System.getenv("classpath"));
    try
    Class B = loader.loadClass("B");
    Object instance = B.newInstance();
    Method startup =
    B.getMethod("print");
    startup.invoke(instance);
    catch (Exception e)
    e.printStackTrace();
    import org.dom4j.*;
    import org.dom4j.dom.*;
    import java.lang.reflect.*;
    class B
         public void print () throws Exception
              //Element e = DocumentHelper.createElement("hello");     
              //e.addText("sachin");     
              //System.out.println(e.asXML());
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
              System.out.println("loader : " + loader);
    Class c = loader.loadClass("org.dom4j.dom.DOMElement");
              //Class c = Class.forName("org.dom4j.dom.DOMElement");
              Constructor con = c.getConstructor(new String().getClass());
              DOMElement el = (DOMElement)con.newInstance(new String("asd"));
              //DOMElement dm = new DOMElement("ADD");
              System.out.println(el);
    the class org.dom4j.dom.DOMElement is present in the jar file .
    basically i'm getting an exception, given below--
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at A.main(A.java:59)
    Caused by: java.lang.NoClassDefFoundError: org/dom4j/dom/DOMElement
    at B.print(B.java:18)
    ... 5 more
    thanks alot..
    Regards,
    Sachin

    Alright let me tell you guys what I am doing. I am using reflection to load the class from a jar file. Then, I am accessing a method defined in the class.
    This piece of code will load and start the class;
    Class c = loadClass(name);
    System.out.println("name:" + name);
    System.out.println("c:" + c);
    Method m = c.getMethod("ServiceStarted", new Class[0]);
    d1 = c.newInstance();
    System.out.println("d1:" + d1);
    m.setAccessible(true);
    try {
    m.invoke(d1, new Object[0] );
    } catch (IllegalAccessException e) {
    This piece of code will invoke a preloaded class;
    String s = d1.getClass().getName();
    Class c = Class.forName(s);
    System.out.println(c);
    Object ret = null;
    Method m = c.getMethod("Hello", new Class[] { String.class });
    Object d = c.newInstance();
    m.setAccessible(true);
    try {
    ret = m.invoke(d, new Object[] { smsg });
    } catch (IllegalAccessException e) {
    and I have define d1 as;
    private static Object d1 = new Object();
    Any ideas why I am getting the exception.
    Thanks,
    MS

  • Java error while trying download jar file into SYS Schema

    Hi,
    I am trying to use UTL_DBWS package for Consuming Web Services in Oracle 10.2.0.4
    I donwloaded latest copy of the dbwsclient.jar file from the below link.
    http://www.oracle.com/technology/sample_code/tech/java/jsp/dbwebservices.html
    I chose the below option for downloading the jar file since i use 10.2.0.4 oracle version.
    10.1.3.1 Callout Utility for 10g and 11g RDBMS (ZIP, ~13MB)
    I tried to download the jar file into SYS schema using the below command.
    loadjava -u sys/password -r -v -f -genmissing -s -grant public D:\oracle\Product\10.2.0\DB_1\sqlj\lib\dbwsclientws.jar D:\oracle\Product\10.2.0\DB_1\sqlj\lib\dbwsclientdb102.jar
    But i keep getting the below error.
    class oracle/security/wss/interceptors/ClientSecurityDescriptor: resolution
    existing : Failures occurred during processing
    Can you please advice how do i resolve this error.
    Regards,
    MSP

    I suspect that there is more to the error message than what you are reporting.
    If so please post the entire message.

Maybe you are looking for

  • Downloadable installer of 11.5.10.2

    Hi, Can you please let me know from where can I download 11.5.10.2 software, am not able to find either in edelivery.oracle.com or otn.oracle.com Cheers, Patel

  • Ways to scan for viruses on macs?

    I want to scan and check for viruses.

  • Transfering files from ipod to my computer

    I have had to reinstall my itunes programme onto my computer (Windows system). As a result, my library is now empty but all my tunes are still on my ipod. Can I transfer these back onto my computer and how do I do this/ I will be grateful for any hel

  • Unable to enable OpenCL in Photoshop CS6

    I have a Radeon HD 5670 card (640sp version) and I'm unable to activate the "OpenCL" option in Advanced Graphics Processor settings. My GPU driver version is Catalyst 13.3 beta 3 for windows 7. The problem occurs in Catalyst 13.2, too.  GPU-z report:

  • IMovie 09 versus FCE 4 for editing Canon 25f HDV footage

    I have two Canon HDV cams. I film 25f (I'm in PAL land). I have used iMovie 06 with no problems for DV editing via this old PowerBook, but for HDV I need more guts so am about to buy an iMac. I have just purchased Steve Mullen's excellent "The Ins An