Can't load any classes from infobus.jar (WL 6.0 SP1)

Hi,
I am deploying an .ear file, which has one .war file in it. The war file, has
infobus.jar, inside it under \WEB-INF\lib. Whenever in my servlet code I try to
load a class from infobus.jar, I get the following exception :
About to load class javax.infobus.InfoBusDataConsumer<<<<<<<<<<java.lang.ClassNotFoundException: InfoBusDataConsumer
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:178)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:45)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at XDILoginForm.init(XDILoginForm.java:99)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.deploy(Application.java:175)
at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:173)
at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:217)
at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:187)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1136)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:773)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:750)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:256)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:318)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:259)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:291)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:173)
at $Proxy7.setDeployed(Unknown Source)
at weblogic.management.console.pages._panels._mbean._application._jspService(_application.java:303)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
But if I put the infobus.jar on system classpath , everything works out fine.
Can somebody tell me, what is going on

Gseel is right: you try to instantiate an EJB with the BDK.
Enterprise Java Beans are totally different from graphical/GUI beans. EJBs are thought for dealing with business logic like accessing a database, ldap directory and so on. They run on a application server (simply speaking - a java enabled webserver) and do some processing to handle user requests. Enterprise Java Beans usually don't interact directly with the user, they only do the work in the background and forward their results, which are then rendered for the user. Typically they are employed for handling web requests (a user with a browser), but they can also be used for awt/swing applications. Though - let me repeat - they don't appear visually on the screen.
The only similarities between those two bean types are the following: they have getter/setter methods for their properties, they implement Serializeable (or a sub-interface like Externalizable, Remote) and they have a default no-argument constructor.
If you want to run your been you need an application server (your bean is pre-packaged for the Bea Weblogic app-server). If you want to do something graphical, you'll need to search for GUI beans.
dani3l

Similar Messages

  • How to load a class from a jar not in the classpath

    I have a gazillion jars of class files that I want to access dynamically in an application. I don't want to list every jar. The jars also contain images. With images you can explicitly point to the jar with and load the image with createImage....
    "jar:file:/C:/myjarlocation/myjar.jar!/pathtoimage/image.gif"
    Is there a similar string you can use when creating classes on the fly in a classloader with getClass().forName("classname") ??

    Hm, if you are not in an EJB container or some other environment that won't let you create a classloader, you might create a new URLClassLoader with a path pointing to those JARs. You will probably want to use your normal application class loader as the parent loader, so any referenced common class definitions are found during the load.
    Note that - in order to make use of the classes - you will normally need to know that they implement some interface (or inherit from a common base class) to which you can cast their instances. These Interfaces/base classes will have to be packaged for normal loading by your application class loader; else the cast will trigger an error during compile time. After this, loading them dynamically during runtime is no longer an option since they are referenced directly in the sourcecode.
    Alternatively you might do away with interfaces/base classes and call methods of dynamically loaded classes also dynamically: via reflection. But I guess this is too cumbersome for what you might have in mind. Also it has more invocation overhead, less type safety and handling all these exceptions wrapped in InvocationTargetExceptions can quickly become a nightmare too...

  • Can't load sql file from inside jar file?

    hi all
    i have a sql file inside my jar file
    and i want to get the path of the sql file to use it in runtime command to restore a sql dump file
    i used the following but it doesn't work:
    the path contains invalid characters such %20% instead of and?
    URL url2=getClass().getResource("backup.sql");
    String str1=url2.toString().substring(10);
    String command="cmd.exe /c  c:\\wamp\\mysql\\bin\\mysql -u root --password=anasa library < "+str1;       
    Runtime.getRuntime().exec(command);is this way is wrong?
    or there's an alternative way?

    How is the system to pull the data out of the jarfile?
    That redirection symbol means to take the information from the file, or here document, or command output that comes after it, but you don't have any of those. It will read that String as if it is a file name, but a file under that name doesn't exist. And, after you've changed it like you have, it doesn't even reference anything inside of a jar file anymore (not that the command could have used that anyway).
    If you insist on doing something like this, then you are going to need to read it with getInputStream and write it out somewhere (probably to a temp file) then use that tempfile and delete it when you're done.

  • 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.

  • 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.

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • Problem in loading a class from server

    hello,
    Please help me ,i m using this code to load a class from server and this code load this successfully but i don't how to make object of class that is just loaded.
    i want to load the class and use its method in my program please help me i m in very critical position.
    pelase help me give me hint
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    public class MyLoader
    public static void main (String argv[]) throws Exception
    URLClassLoader loader = new URLClassLoader(new URL[] { new URL("url") });
    // Load class from class loader. argv[0] is the name of the class to be loaded
    String str = "FinalMyConnection";
         Class c = loader.loadClass (str);
    System.out.println(c.getClass().getName());
    // Create an instance of the class just loaded
    Object o = c.newInstance();
         System.out.println(o.getClass());
         FinalMyConnection mycon = new FinalMyConnection();
         String query1 = " select * from game_master order by game_id;";
         mycon.connect();
              ResultSet rs1=mycon.executequery(query1);
              while (rs1.next())
              String s1=rs1.getString(1);
                   String s2=rs1.getString(2);
                   System.out.println("game_id"+s1);
                   System.out.println("game_name"+s2);
    }

    also load all required parser and sax classes into oracle,i.e.,
    you can load the '.jar' file containg all the parser and sax classes and then load you ContentHandler class.

  • Is there a restriction on loading "javax" classes from WEB-INF/lib?

    I'm having trouble with a webapp in WL 10MP1 that is having trouble loading classes from the "jsr311-api-1.0.jar" in my WEB-INF/lib. Even though I have no trouble with it in Eclipse (no compile errors), classes from that jar fail with "NoClassDefFound" exceptions. I have a feeling it might be the fact that the packages in that jar start with "javax". Assuming that's the case, is there anything I can do to fix this?
    What's even stranger is that the errors I get are when I try to load them directly from the Spring context. However, if I remove the test references to those classes, there's other code that loads those classes later in the application startup (after the Spring context finishes loading), and they load perfectly fine (I turned on verbose class loading to verify this).

    Note that I've tried two other strategies that both result in the same failed state.
    I tried putting the "jsr311-api-1.0.jar" in $JDK_HOME/jre/lib/ext, but that causes a failure to find Spring classes. I then copied the "spring.jar" into $DOMAIN_HOME/lib, and then it fails to find CXF classes. After doing the same with "cxf-2.2.3.jar", it then fails to find "javax.servlet.ServletContextListener", which clearly tells me there's no benefit to this approach.
    Similarly, I tried copying the jars into $DOMAIN_HOME/lib, and that fails to find "org.apache.commons.logging.LogFactory". I could continue down this path, but it doesn't seem likely to succeed. Eventually, I'll get to a point where it just can't find the classes specific to my application, which I certainly can't copy into $DOMAIN_HOME/lib.
    The first basic problem is that I can't put anything into a higher-level classloader that will eventually reference classes in a lower-level classloader, because references can only go up the chain, and the second problem is that WebLogic appears to ignore classes in WEB-INF/lib in the "javax.*" packages. I think there might be an exception for "javax.xml.*", but not for other subpackages. I tried adding a "prefer-application-packages" clause to my weblogic-application.xml file, but that had no effect.

  • How can i load a VI from LABVIEW ver 6.0.1b3 to LABVIEW ver 6.1

    How can i load a VI from LABVIEW ver 6.0.1b3 to LABVIEW ver 6.1......I want to load a vi but i'm getting this error:
    LabVIEW load error code 9:VI version (6.1) is newer than LabVIEW version (6.0.1b3)
    My LabVIEW ver is 6.1
    Please help ......it's important
    Thanks

    I am having similar issues with a *.exe from LV6.1.  I have the runtime engine for 6.1 and recently upgraded to 8.2 from 7.1.  I've never had 6.1 on my machine.  I am able to install this executible and runtime engine on a machine with 7.1 and can run the *.exe fine. 
    I get a load error and am not sure why.  I have had similar issues with old VI's that I have written in 7.1 executing on this machine w/ 8.2
    any suggestions.
    Attachments:
    error.zip ‏14 KB

  • I can't load some content from my external hard drive to itunes,

    I can't load some content from 1 of my external hard drive to itunes, it can see it and try to load the folder / files but it doesn't appear, these files worked recently as some of them are currently on my ipod touch - I had to factory restore my laptop this week (virus) so have been trying to put everything back on to sync ipod - any ideas???

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • When i put firefox in offline mode, and then click on pages saved in history , it can't load any pages or any images. i put cach size to 250mb but the problem is the same, it saves history for two months, but can't load pages.

    when i put firefox in offline mode, and then click on pages saved in history , it can't load any pages or any images. i put cach size to 250mb but the problem is the same, it saves history for two months, but can't load pages.

    Hi there,
    When I inspect your site in browser tools, I'm getting 404 errors from your page:
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery-2.0.3.min.map, line 0)
    [Error] Failed to load resource: the server responded with a status of 404 (Not Found) (edge.4.0.0.min.map, line 0)
    BarnardosIreland wrote:
    I would have thought that publishing should give a complete package that doesn't need any further edits to the code and can just be directly ftp'ed to the web - is this correct?
    In general, you are correct - but also your server does need to be properly configured (and those errors above lead me to think it may not be) to serve the file types that your uploading - but it could be something else entirely. Can you zip up your composition folder, upload it to your Creative Cloud files, set it to share, and then post a link here so I can download it? If you'd rather not share it publicly, can you PM me with a link to your composition files?
    Thanks,
    Joe

  • ANT: Include classes from another jar

    Hi all.
    Can I add classes from another jar to be added into my jar-file?
    Other words, may I write something like this:
    <target name="jar" depends="compile">
    <jar destfile="deploy/my.jar"
    basedir="${compile.dir}"
    includes="another.jar" >
    </jar>
    </target>
    in my build.xml?
    Thanx a lot for Your tips.
    Regards, Volodymyr Shram.

    I've found some resolve:
    <target name="jar" depends="compile">
    <unjar src="another.jar" dest="another_dir"/>
    <jar jarfile="deploy/my.jar">
    <fileset dir="${compile.outdir}" includes="**" />
    <fileset dir="another_dir" includes="**" />
    </jar>
    </target>
    But is it only way? Can I add classes from another.jar to my.jar without extracting?
    Regards, Volodymyr Shram.

  • Can't load any files

    Hi there,
    I just got Logic and Mainstage and installed them on my MacBook. Loading up Logic works fine but when Mainstage loaded it picked up the Halion Orchestral plugin (Cubase 5 is also installed on the MacBook) and as I didn't have the copy protection dongle in at the time it came up with an error message. I cancelled the dongle error and Mainstage loaded up regardless - but I can't do anything. If I go to File > New, absolutely nothing happens and I don't have any files to load up.
    Does anyone have any idea why it would do it and what to do to sort it out? Is a reinstall necessary?
    Thanks very much,
    Rich

    Yes, you should get a window offering a choice of templates to load.
    From what you say, you can't load a template from the menu bar either. I take it that you have tried plugging in the dongle & restarting MainStage.
    If that is the case, it sounds as though a re-install is called for.
    Before doing that, you could try repairing permissions; that often cures irritating problems like this.
    The other thing you could try is to remove the MainStage plist & try running MainStage again. If neither of these options work, then re-install.
    Good luck.

  • Hi, i can't hear any sounds from my pad when i'm recording video what seems to happen? but it has sounds in songs from downloaded files.i just can't record sounds..

    hi, i can't hear any sounds from my pad when i'm recording video what seems to happen? but it has sounds in songs from downloaded files.i just can't record sounds..

    Hey ErikSimon, I kept troubleshooting my problem last night and when I loaded my samples an alternate way, actually the longer way, it worked. I think I have gremlins in the system or something, but I got it working again. I was having the issue when I tried loading the samples via these instructions that were mentioned in SFLogicninja's Youtube video @ 3:07
    http://www.youtube.com/user/SFLogicNinja#p/u/8/7YjgKLZ2jpY
    They are good instructions, but the Logic gods weren't smiling on me last night. Really weird and frustrating at the same time. Thanks anyways.

Maybe you are looking for

  • AddCommand Help

    Hi Everybody, Am writing a J2ME application which requires users to log into the application. A snippet of the code is mentioned here public LoginScreen(midlet) { super("Login"); this.midlet = midlet; _user = new TextField("Code", "", 10, TextField.N

  • How to empty the clipboard

    I am doing some cut & paste and for a reason I dont understand, the clipboard is accumulating all my cuts. So when I do a paste, I have all what I cut before one after the other. How can I clean my clipboard? Thanks

  • Help! iPhoto troubles - non responsive/potential loss of photos

    Hi, my iPhoto crashed a few months ago and after an automatic repair option, it's no longer working properly. Amongst the problems that I have been experiencing include: - preview icons for each event or album do not display properly (i.e. the same p

  • I want to  add sound to pictures, please help.

    Hi i would like to add some sound to a widget, so when i get the right answer, it play the sound. Thanks

  • No Email After AOL Outage Today!

    After AOL email outage today I'm unable to send/receive email. "User account is in INVALID mode. Setup ---> Email Accounts icon won't allow me access. I click on it and it won't open. I would love to be able to reset password if that's what it takes