Questions tagged [contextclassloader]

Thread's classloader: Thread.getCurrentThread().getContextClassloader()

40 questions
0
votes
0 answers

Tomcat 7 - JAAS realm cannot access web app class files

I have been cracking my head for the past 3 weeks on this issue and I try my best to explain it in simplest term since I don't have the source code. Platform . Tomcat 7 . Window Server 2008 . JRE 7 Using Tomcat JAAS realm Defined in the web…
yapkm01
  • 3,590
  • 7
  • 37
  • 62
0
votes
2 answers

Instantiating a tomcat WEB-INF\class\myclass from tomcat lib using classloader

I am trying to load a class present in a war file in tomcat from a class in a jar in tomcat lib. I am doing this using Class.forname("myclass") but the application is throwing class not found exception. i guess this is because the webapp will have…
Subhomoy Sikdar
  • 526
  • 5
  • 19
0
votes
1 answer

Can Thread.setContextClassLoader set a different ClassLoader than returned by getCCL?

Background: Recently I implemented a piece of code that would set the appropratie ClassLoader for a specific operation, and finally restore the original ClassLoader once the operation was completed. For example: ClassLoader originalCL =…
Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
0
votes
1 answer

Parent-Child Classloader Class Resolution

The tasks and initial investigation I try to set up two Oracle Coherence near cache instances at one java swing application. The idea a solution could be found here. My case is a bit more complicated and this is where the game starts. Short…
Dmitry
  • 3,028
  • 6
  • 44
  • 66
0
votes
2 answers

getResourceAsStream returns null in one case but not another, with same classpaths

I have two derivatives of the same application, say versions (A) and (B). They each contain projects: (1) test-data-war, which has target/test-classes/log4j.properties, and (2) test-kernel, which has target/test-classes/log4j.properties and…
spooky655
  • 99
  • 2
  • 10
0
votes
1 answer

Liferay service builder JNDI lookup uses the wrong naming context

I have a servicebuilder portlet that is configured via JNDI: In my ext-spring.xml, I try to pull…
Lucas
  • 14,227
  • 9
  • 74
  • 124
0
votes
2 answers

ClassLoader.getResourceAsStream() confusion

I am new to Java. I have a requirement to load a configuration file (only one time, at app start up). What is the best way to do this? I have the following…
Ram Bavireddi
  • 1,139
  • 1
  • 19
  • 43
0
votes
0 answers

override third party class loader

I am using Drools 5.6.0.Final of knowledge-api drools code. It's using this CompositeClassLoader…
Tin Ng
  • 937
  • 2
  • 11
  • 25
0
votes
1 answer

How to use the method named bindThread in StandardContext class?

Because I found the method named bindThread() is invoked multiple times at class named StandardContext in Tomcat 7 source code, especially in the method named startInternal(). I do not understand why need to call this method multiple times. Actually…
tyrion
  • 13
  • 3
0
votes
1 answer

Which classloader will be used in this case?

I have the following problem. A HashMap is used to set properties and the key is a ClassLoader. The code that sets a property is the following (AxisProperties): public static void setProperty(String propertyName, String value, boolean isDefault){ …
Jim
  • 18,826
  • 34
  • 135
  • 254
1 2
3