classloader


Basic question complicated solution - Tomcat to JBoss

◇◆丶佛笑我妖孽 提交于 2020-01-25 12:38:58
问题 Why can't the JSTL jars having tld files present in my web-inf/lib directory be read nicely by tomcat but not when i move to jBoss 5? Is it a classloader issue? I tried researching but there exists no clear answer. I read a huge classloader related article but not sure how that applies practically to my application. Any help would be appreciated. Thanks in advance Asif 回答1: Tomcat is a simple JSP/Servlet container which ships with JSP and Servlet APIs only. JBoss is a more full fledged Java

Using JavaCompiler with Classpath referencing jars within ear

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-25 00:12:09
问题 I am working on a project in which an enterprise archive (ear) deployed on a JBoss server needs to compile (and run) a class dynamically. I am using the JavaCompiler class to do this - the complication comes from the fact that the class being compiled has references to some of the classes contained within the ejb jar within the ear. This is not a problem when the deployed ear is 'exploded' on deployment, so it is just a directory rather than an archive - in this case I am able to specify the

Java applet behind proxy experiences temporary freezes when instantiating new classes

故事扮演 提交于 2020-01-24 10:07:34
问题 Introduction We have some problems with our Java applet at our customer's office. The applet is intended for recording the screen by taking screenshots at regular intervals. It's signed and it should run with elevated privileges. The problems we encounter are: The Java applet may sometimes not start at all. If the Java console shows up, it may disappear soon. It feels as if the whole JVM just crashes. If the Java applet starts, it sometimes crashes something like 10 seconds after startup. If

Java applet behind proxy experiences temporary freezes when instantiating new classes

时光毁灭记忆、已成空白 提交于 2020-01-24 10:07:20
问题 Introduction We have some problems with our Java applet at our customer's office. The applet is intended for recording the screen by taking screenshots at regular intervals. It's signed and it should run with elevated privileges. The problems we encounter are: The Java applet may sometimes not start at all. If the Java console shows up, it may disappear soon. It feels as if the whole JVM just crashes. If the Java applet starts, it sometimes crashes something like 10 seconds after startup. If

Is it possible to force someone else's java ClassLoader to load an external byte array containing the bytecode of a valid Java class?

大兔子大兔子 提交于 2020-01-23 03:12:05
问题 I'm trying to force the System java classloader (i.e. ClassLoader.getSystemClassLoader() ) to load an external class defined by a byte array with valid bytecode so that other classes subsequently loaded by this classloader can know about and instantiate the external class without getting a NoClassDefFoundError . This surely does not work as it only defines the class on the classloader created, not in the System classloader: URLClassLoader child = new URLClassLoader(new URL[] { myJar.toURI()

cannot find symbol, java, classloader

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-22 02:46:08
问题 Currently doing a typestate project and I am having problems with importing the List class. When I try to compile the class it throws an error in command line saying cannot find symbol and points to the List symbol. I was wondering how you fix this. It seems to work for String and Integer but not for List. The java file is automatically create via another program that translates .scr files. In the scr file I use the following line : type <java> "java.lang.List" from "rt.jar" as List; Java

Load my own Xalan implementation where an older Xalan is loaded to the parent classloader

别等时光非礼了梦想. 提交于 2020-01-22 02:24:07
问题 I'm writing a plugin for a framework that loads my code as a child classloader The problem is that that framework uses a certain Xerces version, that is not compatible with my code, I want to use my "own" jar for xerces, but it seems since the old one was already loaded, I can't seem to make my code use mine. I'm looking for some classloader seperation, I know it's a know problem, but can't seem to solve it Is there any framework, library, or code sample to user locally a newer jar in such a

Loading a JAR dynamically from memory

邮差的信 提交于 2020-01-21 04:51:25
问题 I want to load a JAR dynamically, straight for memory. Say, I have a buffer that contains a JAR, and I want to load all the classes inside the JAR, or at least list all of the files that exist inside the JAR. (classes, images, etc...). What do I do if the first class that I load depends on the second class, for example? Does java know how to handle this? Or I have take care of this by myself? 回答1: Since you said “at least list all of the files that exist inside the JAR”, let’s begin with that

JBoss 7 Classloader — Exclude Module Implementation

我怕爱的太早我们不能终老 提交于 2020-01-16 18:05:43
问题 I have a simple piece of code instantiating a JBoss Hot Rod client and this is deployed in an .ear file on Jboss 7 System.out.println("Attempting to RemoteCacheManager at: "+ipAddress); Configuration conf = new ConfigurationBuilder().addServer().host(ipAddress).port(11222).build(); RemoteCacheManager manager = new RemoteCacheManager(conf); RemoteCache defaultCache = manager.getCache(); System.out.println("SUCCESS OUT: Connected to RemoteCacheManager at: "+ipAddress); logger.info("SUCCESS:

How to get a bundle-object returned by a service out of the Equinox framework - java.lang.LinkageError

巧了我就是萌 提交于 2020-01-16 16:47:09
问题 I have a class which runs an Equinox framework. Now I would like to get an Object (defined in one of the bundles) that is returned by a service out of the framework. Unfortunately, I get a LinkageError and have no idea how to get rid of it. Is it even possible to let a service return a proper object to non-bundle code? Here is the full story: ParserDTOBundle is a bundle that defines the class ParserDTO and exports the corresponding package. In another bundle, ParserServiceBundle, I define a

工具导航Map