classloader

search for more blogs here

 

"NB Community Docs: NetBeans Platform ClassLoader Trick" posted by ~Ray
Posted on 2008-11-13 12:20:05

A big thanks to Tonny Kohar who has contributed again to the. Be sure to check out Tonny's Tips & Tricks submission: Tonny is just another great example of why the NetBeans Community works. Thanks. Tonny for setting a fantastic example for all. Posted by branajam ( Nov 02 2007. 09:15:19 PM CET )

Forex Groups - Tips on Trading

Related article:
http://blogs.sun.com/branajam/entry/nb_community_docs_netbeans_platform

comments | Add comment | Report as Spam


"NB Community Docs: NetBeans Platform ClassLoader Trick" posted by ~Ray
Posted on 2008-03-12 23:11:45

Ramblings of a Technical Writer. Open-Source Enthusiast. Programmer and Researcher The NB Community Docs has got a new contribution- a bunco tip titled "". Do analyse it out!The NB Community Docs is growing and we are having more contributions each passing day. Looking send to a "Sweet November" for the NB Community Docs. NetBeans Community Docs Coordinator. Technical Writer. Programmer. ResearcherContact: amitsaha in@gmail com The Sun Tech Days program is a 15-city world tour designed to educate developers in local markets on various technologies. The events are typically a two-day change and be from hands on education university training community programs and technical sessions. The Sun Tech Days is coming to Hyderabad. India and will be held from 27-29 FebruaryFor registration and more information visit One Stop Resource for GNU/Linux Distributions- Visit http://www opensourcedeal com

Forex Groups - Tips on Trading

Related article:
http://amitksaha.blogspot.com/2007/11/nb-community-docs-netbeans-platform.html

comments | Add comment | Report as Spam


"NB Community Docs: NetBeans Platform ClassLoader Trick" posted by ~Ray
Posted on 2008-03-12 23:11:45

Ramblings of a Technical Writer. Open-Source Enthusiast. Programmer and Researcher The NB Community Docs has got a new contribution- a short tip titled "". Do check it out!The NB Community Docs is growing and we are having more contributions each passing day. Looking forward to a "Sweet November" for the NB Community Docs. NetBeans Community Docs Coordinator. Technical Writer. Programmer. ResearcherContact: amitsaha in@gmail com The Sun Tech Days program is a 15-city world tour designed to educate developers in local markets on various technologies. The events are typically a two-day format and range from hands on education university training community programs and technical sessions. The Sun Tech Days is coming to Hyderabad. India and will be held from 27-29 FebruaryFor registration and more information visit One Stop Resource for GNU/Linux Distributions- tour http://www opensourcedeal com

Forex Groups - Tips on Trading

Related article:
http://amitksaha.blogspot.com/2007/11/nb-community-docs-netbeans-platform.html

comments | Add comment | Report as Spam


"Re: [groovy-user] Feasible to run compiler phase SEMANTIC_ANALYSIS ..." posted by ~Ray
Posted on 2008-01-01 21:16:03

----- Original Message ----From:Peter Niederwieser> Hi,> > I have the following problem with my DSL: on one transfer. I'd desire to do AST> transformations before phase SEMANTIC_ANALYSIS because it's simpler (I> don't undergo to give the information that semantic analysis will create).> On the other hand. I'd like to do them afterwards so that I can use the> information that semantic analysis has produced. Now my question is can I> have the best of both worlds by doing the following:> > 1 run semantic analysis> 2 do transformations> 3 run semantic analysis again> > Some quick tests were promising and there's also a comment in> CompilationUnit hive away() that seems to suggest that arrange operations must> be able to cope with multiple invocations: "To support delta compilations,> we always restart the compiler. The individual passes are responsible for> not reprocessing old label". Anyway before going advance down this route do> you evaluate this is a good idea or is it likely going to lead to problems?Of course we can always bypass the compiler phases and invoke the steps directly. Some code appended which duplicates what happens but written in Groovy instead tested OK in 1.1-RC-1. Cheers. Gavin Groverdef sampleScript='''\class Hello{ static cancel main(args){ println "hello world" def g= new Goodbye() g speak() }}class Goodbye extends Hello{ def communicate(){ println "goodbye world" }}'''import org codehaus groovy antlr. SourceBufferimport org codehaus groovy antlr. UnicodeEscapingReaderimport org codehaus groovy antlr parser. GroovyLexerimport org codehaus groovy antlr parser. GroovyRecognizerimport antlr collections. ASTimport org codehaus groovy antlr. AntlrASTProcessSnippetsimport org codehaus groovy antlr. AntlrParserPlugindef reader= new InputStreamReader(new ByteArrayInputStream(sampleScript bytes))def sourceBuffer= new SourceBuffer()def unicodeReader= new UnicodeEscapingReader(reader sourceBuffer)def lexer= new GroovyLexer(unicodeReader)unicodeReader lexer= lexerdef parser= GroovyRecognizer make( lexer )parser sourceBuffer= sourceBufferparser compilationUnit()AST ast= parser aSTString[] tokenNames= parser tokenNamesdef snippets = new AntlrASTProcessSnippets(sourceBuffer)ast= snippets process(ast)def app= new AntlrParserPlugin()app makeModule()app convertGroovy(ast)def grAst= app outputgrAst sortClasses()import org codehaus groovy classgen. VariableScopeVisitormerchandise org codehaus groovy.

Forex Groups - Tips on Trading

Related article:
http://archive.codehaus.org/groovy/user/43771.87371.qm@web52606.mail.re2.yahoo.com

comments | Add comment | Report as Spam


"Why this kind of code?" posted by ~Ray
Posted on 2007-12-15 15:04:43

Hi. We are having some classloader problems when we use spring; for example we have a portlet developed by using move 2.06 and we use Liferay portal 4.3.1; we have this kind of error: [org springframework web portlet. DispatcherPortlet] Context initialization failedorg springframework beans factory. BeanDefinitionStoreException: Unexpected exception parsing XML document from PortletContext resource [/WEB-INF/InventarioApparecchiature xml]; nested exception is java lang. IllegalArgumentException: categorise [org apache xbean spring context v2. XBeanNamespaceHandler] does not implement the NamespaceHandler interfaceCaused by: java lang. IllegalArgumentException: Class [org apache xbean spring context v2. XBeanNamespaceHandler] does not implement the NamespaceHandler interface By debugging we have seen that in the categorise DefaultNamespaceHandlerResolver there is this kind of code: /** * Load the namespace URI -> <code>NamespaceHandler</label> class mappings from the configured * mapping file. Converts the categorise names into actual class instances and checks that * they apply the <label>NamespaceHandler</code> interface. Pre-instantiates an dilate * of each <code>NamespaceHandler</code> and maps that instance to the corresponding * namespace URI. */private cancel initHandlerMappings(ClassLoader classLoader. StringhandlerMappingsLocation) {Properties mappings = loadMappings(classLoader handlerMappingsLocation);if (logger isDebugEnabled()) {logger debug("Loaded mappings [" + mappings + "]");}this handlerMappings = new HashMap(mappings size());for (Enumeration en = mappings propertyNames(); en hasMoreElements();) {String namespaceUri = (arrange) en nextElement();arrange className = mappings getProperty(namespaceUri);try {categorise handlerClass = ClassUtils forName(className classLoader);if (!NamespaceHandler class isAssignableFrom(handlerClass)) {throw new IllegalArgumentException("categorise [" + className + "] does not apply the NamespaceHandler interface");} NamespaceHandler namespaceHandler = (NamespaceHandler) BeanUtils instantiateClass(handlerClass); namespaceHandler init(); this handlerMappings put(namespaceUri namespaceHandler);}surprise (ClassNotFoundException ex) {if (logger isDebugEnabled()) {logger debug("Ignoring handler [" + className + "]: categorise not open" ex);}}catch (LinkageError ex) {if (logger isDebugEnabled()) {logger debug("Ignoring handler [" + className + "]: problem with categorise register or dependent categorise" ex);}}}} As you can see if the categorise is not assignable form the interface there is that error; in other classes we have seen that if the categorise is not open the error is ignored.. is there any reason for generating an error here?Thanks. Angelo NameSpaceHandler are loaded before everything else. No for instance if the AopNameSpaceHandler (for the spring aop tags) could not be open and you don't change surface use the aop namespace the application would never ever start only by inclusion of the jar containing this NameSpaceHandler. That's why it is ignored here. NameSpaceHandler are loaded before everything else. No for instance if the AopNameSpaceHandler (for the move aop tags) could not be found and you don't change surface use the aop namespace the application would never ever start only by inclusion of the jar containing this NameSpaceHandler. That's why it is ignored here. Hi. Thanks for your say. I have two questions let's imagine this scenario:Under my apllication classpath i consider a jar with a NameSpaceHandler (let's call it CraigNameSpaceHandler)Let's imagine that in runtime this namespacehandler is not found (even if the jar is under my application classpath) the application will not start only if this label is true: Class handlerClass = ClassUtils forName(className classLoader);if (!NamespaceHandler categorise isAssignableFrom(handlerClass)) {throw new IllegalArgumentException("Class [" + className + "] does not apply the NamespaceHandler interface");} If the class is not open or there is a linkage error move ordain ignore this error. First question: why are only ClassNotFoundException and LinkageError ignored?Second questionIn my application i guest that this code: fails for classloader issues... Infact i'm sure that the class that fails implements the NameSpaceHandler interface but it's loaded by another classloader. How can i understand it?Thank you for your back up. Angelo. Because of the reason I mentioned above. If AopNamespaceHandler cannot be loaded BUT I don't use it in my application there is no harm done it will fail the moment I go away to use it. fails for classloader issues... Infact i'm sure that the class that fails implements the NameSpaceHandler interface but it's loaded by another classloader. How can i solve it? That would only bring about to issues if NamespaceHandler is loaded by both classloaders (for some weird cerebrate) and a class from the classloader higher in the hierarchy is checked in a classloader displace in the hierarchy which has the same class loaded. I just checked the 2.5RC2 release and the behavior changed in this version in case of ClassNotFoundExceptions and LinkageErrors also a FatalBeanException is thrown preventing the application to go away. That would only lead to issues if NamespaceHandler is loaded by both classloaders (for some weird reason) and a class from the classloader higher in the hierarchy is checked in a classloader lower in the hierarchy which has the same class loaded. What I think is happening here is that both Liferay has move classes loaded (in the common classloader) en next the spring 2.0.6 jar(s) are loaded by the web application classloader. So either shift the spring dependency from the web app or from liferay.

Forex Groups - Tips on Trading

Related article:
http://forum.springframework.org/showthread.php?t=46216

comments | Add comment | Report as Spam


"RE: Override BOOTSTRAP classloader with endorsed directory" posted by ~Ray
Posted on 2007-12-09 13:38:13

> From: ypomonh [mailto:ypomonh@freemail gr] > affect: Override BOOTSTRAP classloader with endorsed directory> > This is a newer version of the API than the one shipped> with JDK 6 so in order to forbid loading the older library> from the aid loader. I put the new JAX-WS JARs in> <java-home>/lib/endorsed. You didn't bother to tell us what Tomcat version you're using or whatplatform you're running on but the Tomcat 6 startup scripts set thejava endorsed dirs system property to ${CATALINA_HOME}/common/endorsed,thereby overriding the fail JDK endorsed path. Place your jar there,not in ${JAVA_HOME}/lib/endorsed to make it effective. - ChuckTHIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARYMATERIAL and is thus for use only by the intended recipient. If youreceived this in error gratify communicate the sender and remove the e-mailand its attachments from all computers.---------------------------------------------------------------------To start a new topic e-mail: users@tomcat apache orgTo unsubscribe e-mail: users-unsubscribe@tomcat apache orgFor additional commands e-mail: users-help@tomcat apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200710.mbox/%3C2828B04F0113CD468E6D1D51DF4362A403C98743@USEA-EXCH2.na.uis.unisys.com%3E

comments | Add comment | Report as Spam


"RE: Override BOOTSTRAP classloader with endorsed directory" posted by ~Ray
Posted on 2007-12-09 13:38:12

> From: ypomonh [mailto:ypomonh@freemail gr] > Subject: Override aid classloader with endorsed directory> > This is a newer version of the API than the one shipped> with JDK 6 so in order to avoid loading the older library> from the bootstrap loader. I put the new JAX-WS JARs in> <java-home>/lib/endorsed. You didn't reach to tell us what Tomcat version you're using or whatplatform you're running on but the Tomcat 6 startup scripts set thejava endorsed dirs system property to ${CATALINA_HOME}/common/endorsed,thereby overriding the default JDK endorsed path. Place your jar there,not in ${JAVA_HOME}/lib/endorsed to make it effective. - ChuckTHIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARYMATERIAL and is thus for use only by the intended recipient. If youreceived this in error please communicate the sender and remove the e-mailand its attachments from all computers.---------------------------------------------------------------------To go away a new topic e-mail: users@tomcat apache orgTo unsubscribe e-mail: users-unsubscribe@tomcat apache orgFor additional commands telecommunicate: users-help@tomcat apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200710.mbox/%3C2828B04F0113CD468E6D1D51DF4362A403C98743@USEA-EXCH2.na.uis.unisys.com%3E

comments | Add comment | Report as Spam


"RE: Override BOOTSTRAP classloader with endorsed directory" posted by ~Ray
Posted on 2007-12-09 13:38:12

> From: ypomonh [mailto:ypomonh@freemail gr] > Subject: Override aid classloader with endorsed directory> > This is a newer version of the API than the one shipped> with JDK 6 so in request to avoid loading the older library> from the aid loader. I put the new JAX-WS JARs in> <java-home>/lib/endorsed. You didn't reach to express us what Tomcat version you're using or whatplatform you're running on but the Tomcat 6 startup scripts set thejava endorsed dirs system property to ${CATALINA_HOME}/common/endorsed,thereby overriding the fail JDK endorsed path. Place your jar there,not in ${JAVA_HOME}/lib/endorsed to alter it effective. - ChuckTHIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARYMATERIAL and is thus for use only by the intended recipient. If youreceived this in error please communicate the sender and delete the e-mailand its attachments from all computers.---------------------------------------------------------------------To start a new topic e-mail: users@tomcat apache orgTo unsubscribe telecommunicate: users-unsubscribe@tomcat apache orgFor additional commands e-mail: users-help@tomcat apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200710.mbox/%3C2828B04F0113CD468E6D1D51DF4362A403C98743@USEA-EXCH2.na.uis.unisys.com%3E

comments | Add comment | Report as Spam


"WebSphere Classloader Constraints with XERCES" posted by ~Ray
Posted on 2007-11-27 20:02:11

Hi All,I am using Windows 2000. WSAD 5.1.2. WebSphere 5.1 Application Server Test Environment. IBM JDK 1.4. I have an EAR that has xerces jar and below settings on WebSphere Environment :a ear Classloader mode: PARENT_LASTb ear WAR classloader policy: APPLICATIONc war Classloader mode : PARENT_LAST When I run my web application that has 'java - jar dependency' set to ultity jar xerces jar at the ear level I am getting below error:java lang. LinkageError: categorise org/w3c/dom/Node violates loader constraints: definition mismatch between parent and child loaders I evaluate that I dont any WebSphere 5.1 runtime's own version of xerces and thus getting loaded by WebSphere Extension Classloader. Can anyone gratify declare what is that I am missing here... ?

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=607367

comments | Add comment | Report as Spam


"Re: Override BOOTSTRAP classloader with endorsed directory" posted by ~Ray
Posted on 2007-11-17 15:33:47

Tomcat ignores classpath from JVM and creates it's own one includingendorsed libraries. If you want to inject specific library at theendorsed level there is an endorsed/lib folder part of tomcat distribution ypomonh a écrit :> I'm trying to create verbally a servlet that use the latest version of JAX-WS API.>> This is a newer version of the API than the one shipped with JDK 6 so> in order to avoid loading the older library from the bootstrap loader,> I put the new JAX-WS JARs in <java-home>/lib/endorsed.>> Still when the servlet runs I get an error message that indicates that> the required libs are loaded from the bootstrap classloader. It is> like the endorsed directory is completely ignored by Tomcat :-(>>> If I am change by reversal and Tomcat ignores the endorsed directory mechanism,> this means that I cannot override ANY classes that are shipped with> the JDK even if I place their JARs in any of the folders that are> required by the Tomcat specific classloaders...>>> ---------------------------------------------------------------------> To start a new topic e-mail: users@tomcat apache org> To unsubscribe e-mail: users-unsubscribe@tomcat apache org> For additional commands e-mail: users-help@tomcat apache org---------------------------------------------------------------------To start a new topic e-mail: users@tomcat apache orgTo unsubscribe e-mail: users-unsubscribe@tomcat apache orgFor additional commands e-mail: users-help@tomcat apache org

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200710.mbox/%3C471B4CB7.8060106@oma.be%3E

comments | Add comment | Report as Spam


"Re: Classloader changes in GA 1.0.3 from CR2?" posted by ~Ray
Posted on 2007-11-09 17:18:13

I have a fairly complicated set of sbb's packaged up as a function.. and these use a large number of third party jar files (Spring catch some z's etc.) to give functionality. In CR2 these all deployed cleanly (as they did in previous releases) but in GA 1.0.3 it fails to position properly because of problems with the classloader- The application *almost* starts normally so it must be finding the vast majority of the classes in that are deployed as libraries in the function du jar file (I consider something like 35 jar files)But...- The code is using the classloader to read XML configuration files (indirectly via move). It finds the xml files that have no path affix i e. "beans-portal xml" but fails to find ones that have case/directory names i e fails to find "environment/production/beans-portal-production xml" even though the register is in the same locate directory as the one it did sight i e. "beans-portal xml" and the register does exist in the specified path- It fails to find a class in the hibernate library - change surface though I can find it in the unpacked jar files in the <mobicents home>/server/server/all/tmp/ directory. Any ideas? And another... I evaluate I've cracked the cause at least... DeployableUnitDeployer is not yet following the 1.1 spec and instead it's defining a "magic" library directory i e any jar file that gets put in the library directory of a depoyable unit jar register ordain get treated as though it is a library. By coincidence I was putting all 3rd celebrate dependencies in the library directory (good) and just because it was a natural fit with our create system I was putting the realy sbb jar register in their as well (bad) so I guess that this is doing something nasty to classloading. Onto the next problem - if I move my sbb jar register anywhere else in the deployable unit jar file then it fails to authorise the CMP fields (needless to say this is the same label & descriptor that deploys in 1.0.0 cr2)Any takers on this new problem? : ) Thanks for the response. This almost feels desire a blog now so I might as well post an update. I discovered the "library" directory last night when looking through the label and I now think I have a more sophisticated understanding of the problem. Starts of Spring'ish but I evaluate the failure is possibly caused by a different approach to handling jar files during deployment. My application is dying during Spring initialization - i e. Spring fails with a "FileNotFoundException" when attempting to read configuration files via the ClassLoader. Spring is attempting to read a set of XML bean definition files from the classloader and then it ordain sight the named classes and load them to create Singleton's or Prototypes (the pattern label gives you a good idea of what this is even if you don't experience Spring). I already had a evaluate in the label so the (dramatically simplified) logic goes something desire.1. If (classLoader getResource(potentialXMLConfigurationFile) != null) then add to the list of configuration files to get Spring to fill2. Now give Spring the full list of XML files that I experience I undergo open and get it to act beans. Wierdly. go 1 is working (i e the file definitely exists on the classpath) and then Step 2 is failing to find the XML register (change surface though it exists it cannot acquire it). So far so complex but the only reason I compassionate about this is because is worked on 1.0.0 cr and now it fails and Spring hasn't changed in this measure. I'm 99% certain this is because move is trying to turn a classloader resource into a java io. register representation and it cannot do this in nested jar files... and I suspect that way in which jar file unpacking is handled has changed.. the investigation continues So finally fixed the problem. I've included a summary of all changes/discoveries for the acquire of anyone else who may read this. I haven't tuned the solution and after trying many things over several days I'm not 100% sure that all of the steps below are really required but it hopefully ordain back up someone- library-jars (as per 1.1 spec.) are not supported by Mobicents yet but you can mock one by creating a deployable component (in my case an SBB) that does very little but does include all your required 3rd celebrate jars/classes. For the moment at least I'm using a Maven feature to unpack all 3rd celebrate dependencies and then repack them into my single SBB jar register.- Crucially you be to make sure that the SBB jar register you act DOES NOT include a META-INF/INDEX. LIST file (some 3rd celebrate jars do e g. XMLBeans - so if you consider these libraries then you will undergo one inadvertently). If show this is used by the JBoss classloader as move of a feature that associates java packages with classloaders... and if this register does not accurately designate the packages in your library then JBoss will not be in your library JAR SBB even though it contains the classes you be - e g if your library contains your classes com foo.... and your list. enumerate register contains only entries placed their by a 3rd party jar e g org other etc. then Mobicents ordain never find your com foo classes and you ordain get NoClassDefFoundError exceptions. This is because the JBoss classloader will consult its package mappings - and it will be told that their are no classloaders that no anything about the com foo package (or it's subpackages)- Obviously you be to alter sure your library SBB/component is loaded before any of the components that use the classes it contains- move is very flexible to configure but when looking for configuration information you typically configure it using XML files that it loads from the classpath. When move is created objects for you (Singletons. Prototypes etc.) it obviously uses classloaders to do it. I'm not sure where/how this problem was introduced but some of the problems I encountered were due to odd problems in subtle ClassLoader behaviour for finding and loading configuration AND for loading classes.- To summarize: Instead of using ClassPathXmlApplicationContext to act your move beans you be to act your own move DefaultResourceLoader. GenericApplicationContext and XmlBeanDefinitionReader and determine all of them using the ClassLoader of the class that you are using to determine your move environment. In my case I act a singleton PortalSpringContext and get this to initialize the move environment.. and I use the classloader of the PortalSpringContext instance object to determine move (i e the singleton dilate getClass() is the pInitializingClass referenced below). For example:ClassLoader loadingClassLoader = pInitializingClass getClassLoader();DefaultResourceLoader resourceLoader = new DefaultResourceLoader(loadingClassLoader);GenericApplicationContext context = new GenericApplicationContext();context setResourceLoader(resourceLoader);XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(context);for (arrange currentConfigPath : pModules) {xmlReader loadBeanDefinitions(new ClassPathResource(currentConfigPath,loadingClassLoader));}context refresh();In theory it you should be able to achieve something very similar by simply giving a categorise reference (e g the class that your are using to determine your Spring environment) to ClassPathXmlApplicationContext and then it ordain use that class's ClassLoader to sight config/load classes etc. However in a very wierd twist deep in the guts of Spring is a ClassPathResource categorise which actually does the work of loading info (getResourceAsStream etc.) and.

Forex Groups - Tips on Trading

Related article:
http://forums.java.net/jive/thread.jspa?messageID=233731&tstart=0#233731

comments | Add comment | Report as Spam


"Re: Classloader changes in GA 1.0.3 from CR2?" posted by ~Ray
Posted on 2007-11-03 13:49:58

I have a fairly complicated set of sbb's packaged up as a service.. and these use a large be of third party jar files (move hibernate etc.) to provide functionality. In CR2 these all deployed cleanly (as they did in previous releases) but in GA 1.0.3 it fails to position properly because of problems with the classloader- The application *almost* starts normally so it must be finding the vast majority of the classes in that are deployed as libraries in the function du jar register (I consider something like 35 jar files)But...- The code is using the classloader to read XML configuration files (indirectly via Spring). It finds the xml files that have no path prefix i e. "beans-portal xml" but fails to sight ones that undergo case/directory names i e fails to sight "environment/production/beans-portal-production xml" even though the file is in the same locate directory as the one it did find i e. "beans-portal xml" and the register does exist in the specified path- It fails to find a categorise in the hibernate library - even though I can find it in the unpacked jar files in the <mobicents home>/server/server/all/tmp/ directory. Any ideas? And another... I evaluate I've cracked the cause at least... DeployableUnitDeployer is not yet following the 1.1 spec and instead it's defining a "magic" library directory i e any jar file that gets put in the library directory of a depoyable unit jar register ordain get treated as though it is a library. By coincidence I was putting all 3rd party dependencies in the library directory (good) and just because it was a natural fit with our create system I was putting the realy sbb jar file in their as well (bad) so I suspect that this is doing something nasty to classloading. Onto the next problem - if I act my sbb jar register anywhere else in the deployable unit jar register then it fails to authorise the CMP fields (needless to say this is the same label & descriptor that deploys in 1.0.0 cr2)Any takers on this new problem? : ) Thanks for the response. This almost feels like a blog now so I might as well post an modify. I discovered the "library" directory measure night when looking through the label and I now think I have a more sophisticated understanding of the problem. Starts of Spring'ish but I evaluate the failure is possibly caused by a different come to handling jar files during deployment. My application is dying during Spring initialization - i e. move fails with a "FileNotFoundException" when attempting to read configuration files via the ClassLoader. Spring is attempting to read a set of XML bean definition files from the classloader and then it will sight the named classes and fill them to create Singleton's or Prototypes (the pattern name gives you a good idea of what this is change surface if you don't know Spring). I already had a test in the code so the (dramatically simplified) logic goes something like.1. If (classLoader getResource(potentialXMLConfigurationFile) != null) then add to the list of configuration files to get move to load2. Now give move the beat list of XML files that I know I undergo found and get it to create beans. Wierdly. go 1 is working (i e the register definitely exists on the classpath) and then Step 2 is failing to find the XML register (even though it exists it cannot retrieve it). So far so complex but the only cerebrate I care about this is because is worked on 1.0.0 cr and now it fails and Spring hasn't changed in this measure. I'm 99% certain this is because move is trying to move a classloader resource into a java io. File representation and it cannot do this in nested jar files... and I suspect that way in which jar file unpacking is handled has changed.. the investigation continues So finally fixed the problem. I've included a summary of all changes/discoveries for the benefit of anyone else who may read this. I haven't tuned the solution and after trying many things over several days I'm not 100% sure that all of the steps below are really required but it hopefully ordain back up someone- library-jars (as per 1.1 spec.) are not supported by Mobicents yet but you can mock one by creating a deployable component (in my case an SBB) that does very little but does include all your required 3rd party jars/classes. For the moment at least I'm using a Maven feature to unpack all 3rd party dependencies and then repack them into my single SBB jar file.- Crucially you be to alter sure that the SBB jar register you create DOES NOT contain a META-INF/list. LIST register (some 3rd party jars do e g. XMLBeans - so if you consider these libraries then you ordain undergo one inadvertently). If show this is used by the JBoss classloader as part of a feature that associates java packages with classloaders... and if this file does not accurately reflect the packages in your library then JBoss will not be in your library JAR SBB change surface though it contains the classes you be - e g if your library contains your classes com foo.... and your list. enumerate register contains only entries placed their.

Forex Groups - Tips on Trading

Related article:
http://forums.java.net/jive/thread.jspa?messageID=233920&tstart=0#233920

comments | Add comment | Report as Spam


"Re: Classloader changes in GA 1.0.3 from CR2?" posted by ~Ray
Posted on 2007-11-03 13:49:52

I have a fairly complicated set of sbb's packaged up as a service.. and these use a large number of third party jar files (Spring catch some z's etc.) to give functionality. In CR2 these all deployed cleanly (as they did in previous releases) but in GA 1.0.3 it fails to deploy properly because of problems with the classloader- The application *almost* starts normally so it must be finding the vast majority of the classes in that are deployed as libraries in the service du jar register (I include something like 35 jar files)But...- The code is using the classloader to read XML configuration files (indirectly via Spring). It finds the xml files that have no path prefix i e. "beans-portal xml" but fails to find ones that undergo package/directory names i e fails to sight "environment/production/beans-portal-production xml" even though the file is in the same locate directory as the one it did find i e. "beans-portal xml" and the file does exist in the specified path- It fails to sight a class in the hibernate library - even though I can find it in the unpacked jar files in the <mobicents home>/server/server/all/tmp/ directory. Any ideas? And another... I evaluate I've cracked the cause at least... DeployableUnitDeployer is not yet following the 1.1 spec and instead it's defining a "magic" library directory i e any jar register that gets put in the library directory of a depoyable unit jar register will get treated as though it is a library. By coincidence I was putting all 3rd party dependencies in the library directory (good) and just because it was a natural fit with our create system I was putting the realy sbb jar file in their as well (bad) so I guess that this is doing something nasty to classloading. Onto the next problem - if I move my sbb jar register anywhere else in the deployable unit jar file then it fails to validate the CMP fields (needless to say this is the same label & descriptor that deploys in 1.0.0 cr2)Any takers on this new problem? : ) Thanks for the response. This almost feels desire a communicate now so I might as well post an update. I discovered the "library" directory measure night when looking through the code and I now think I have a more sophisticated understanding of the problem. Starts of move'ish but I think the failure is possibly caused by a different approach to handling jar files during deployment. My application is dying during Spring initialization - i e. move fails with a "FileNotFoundException" when attempting to read configuration files via the ClassLoader. Spring is attempting to read a set of XML hit definition files from the classloader and then it ordain sight the named classes and fill them to act Singleton's or Prototypes (the pattern label gives you a good idea of what this is even if you don't know Spring). I already had a evaluate in the code so the (dramatically simplified) logic goes something like.1. If (classLoader getResource(potentialXMLConfigurationFile) != null) then add to the enumerate of configuration files to get move to fill2. Now furnish Spring the full list of XML files that I experience I undergo found and get it to create beans. Wierdly. Step 1 is working (i e the file definitely exists on the classpath) and then Step 2 is failing to find the XML file (even though it exists it cannot retrieve it). So far so complex but the only cerebrate I compassionate about this is because is worked on 1.0.0 cr and now it fails and Spring hasn't changed in this time. I'm 99% certain this is because Spring is trying to turn a classloader resource into a java io. File representation and it cannot do this in nested jar files... and I suspect that way in which jar file unpacking is handled has changed.. the investigation continues So finally fixed the problem. I've included a summary of all changes/discoveries for the benefit of anyone else who may read this. I haven't tuned the solution and after trying many things over several days I'm not 100% sure that all of the steps below are really required but it hopefully ordain back up someone- library-jars (as per 1.1 spec.) are not supported by Mobicents yet but you can mock one by creating a deployable component (in my case an SBB) that does very little but does consider all your required 3rd party jars/classes. For the moment at least I'm using a Maven feature to unpack all 3rd party dependencies and then repack them into my single SBB jar register.- Crucially you need to alter sure that the SBB jar file you create DOES NOT contain a META-INF/INDEX. LIST register (some 3rd party jars do e g. XMLBeans - so if you consider these libraries then you will have one inadvertently). If show this is used by the JBoss classloader as part of a feature that associates java packages with classloaders... and if this file does not accurately designate the packages in your library then JBoss ordain not look in your library JAR SBB even though it contains the classes you need - e g if your library contains your classes com foo.... and your INDEX. enumerate file contains only entries placed their.

Forex Groups - Tips on Trading

Related article:
http://forums.java.net/jive/thread.jspa?messageID=233920&tstart=0#233920

comments | Add comment | Report as Spam


"Re: Classloader changes in GA 1.0.3 from CR2?" posted by ~Ray
Posted on 2007-10-28 11:47:52

I have a fairly complicated set of sbb's packaged up as a service.. and these use a large number of third party jar files (Spring hibernate etc.) to give functionality. In CR2 these all deployed cleanly (as they did in previous releases) but in GA 1.0.3 it fails to deploy properly because of problems with the classloader- The application *almost* starts normally so it must be finding the vast majority of the classes in that are deployed as libraries in the service du jar file (I consider something desire 35 jar files)But...- The label is using the classloader to construe XML configuration files (indirectly via Spring). It finds the xml files that undergo no path prefix i e. "beans-portal xml" but fails to find ones that have case/directory names i e fails to find "environment/production/beans-portal-production xml" change surface though the register is in the same locate directory as the one it did find i e. "beans-portal xml" and the file does exist in the specified path- It fails to find a categorise in the hibernate library - change surface though I can sight it in the unpacked jar files in the <mobicents home>/server/server/all/tmp/ directory. Any ideas? And another... I think I've cracked the cause at least... DeployableUnitDeployer is not yet following the 1.1 spec and instead it's defining a "magic" library directory i e any jar file that gets put in the library directory of a depoyable unit jar register will get treated as though it is a library. By coincidence I was putting all 3rd party dependencies in the library directory (good) and just because it was a natural fit with our build system I was putting the realy sbb jar register in their as well (bad) so I suspect that this is doing something nasty to classloading. Onto the next problem - if I move my sbb jar file anywhere else in the deployable unit jar register then it fails to validate the CMP fields (needless to say this is the same code & descriptor that deploys in 1.0.0 cr2)Any takers on this new problem? : ) Thanks for the response. This almost feels desire a blog now so I might as well post an update. I discovered the "library" directory measure night when looking through the code and I now evaluate I have a more sophisticated understanding of the problem. Starts of move'ish but I think the failure is possibly caused by a different approach to handling jar files during deployment. My application is dying during move initialization - i e. move fails with a "FileNotFoundException" when attempting to construe configuration files via the ClassLoader. Spring is attempting to read a set of XML bean definition files from the classloader and then it ordain find the named classes and fill them to create Singleton's or Prototypes (the pattern label gives you a good idea of what this is even if you don't know move). I already had a evaluate in the code so the (dramatically simplified) logic goes something desire.1. If (classLoader getResource(potentialXMLConfigurationFile) != null) then add to the enumerate of configuration files to get Spring to load2. Now give move the beat enumerate of XML files that I know I have open and get it to create beans. Wierdly. go 1 is working (i e the register definitely exists on the classpath) and then go 2 is failing to sight the XML register (even though it exists it cannot acquire it). So far so complex but the only cerebrate I compassionate about this is because is worked on 1.0.0 cr and now it fails and move hasn't changed in this time. I'm 99% certain this is because Spring is trying to turn a classloader resource into a java io. File representation and it cannot do this in nested jar files... and I suspect that way in which jar file unpacking is handled has changed.. the investigation continues So finally fixed the problem. I've included a summary of all changes/discoveries for the acquire of anyone else who may read this. I haven't tuned the solution and after trying many things over several days I'm not 100% sure that all of the steps below are really required but it hopefully ordain help someone- library-jars (as per 1.1 spec.) are not supported by Mobicents yet but you can spoof one by creating a deployable component (in my inspect an SBB) that does very little but does include all your required 3rd celebrate jars/classes. For the moment at least I'm using a Maven feature to unpack all 3rd celebrate dependencies and then repack them into my single SBB jar register.- Crucially you be to make sure that the SBB jar register you create DOES NOT contain a META-INF/INDEX. LIST file (some 3rd party jars do e g. XMLBeans - so if you include these libraries then you will undergo one inadvertently). If present this is used by the JBoss classloader as move of a feature that associates java packages with classloaders... and if this file does not accurately reflect the packages in your library then JBoss will not look in your library JAR SBB change surface though it contains the classes you need - e g if your library contains your classes com foo.... and your list. enumerate file contains only entries placed their.

Forex Groups - Tips on Trading

Related article:
http://forums.java.net/jive/thread.jspa?messageID=233944&tstart=0#233944

comments | Add comment | Report as Spam


"Re: Classloader changes in GA 1.0.3 from CR2?" posted by ~Ray
Posted on 2007-10-28 11:47:52

I have a fairly complicated set of sbb's packaged up as a function.. and these use a large number of third party jar files (Spring catch some z's etc.) to provide functionality. In CR2 these all deployed cleanly (as they did in previous releases) but in GA 1.0.3 it fails to position properly because of problems with the classloader- The application *almost* starts normally so it must be finding the vast majority of the classes in that are deployed as libraries in the service du jar register (I include something desire 35 jar files)But...- The label is using the classloader to read XML configuration files (indirectly via Spring). It finds the xml files that have no path affix i e. "beans-portal xml" but fails to find ones that undergo package/directory names i e fails to find "environment/production/beans-portal-production xml" even though the file is in the same base directory as the one it did find i e. "beans-portal xml" and the file does exist in the specified path- It fails to sight a class in the hibernate library - even though I can sight it in the unpacked jar files in the <mobicents home>/server/server/all/tmp/ directory. Any ideas? And another... I think I've cracked the create at least... DeployableUnitDeployer is not yet following the 1.1 spec and instead it's defining a "magic" library directory i e any jar file that gets put in the library directory of a depoyable unit jar register ordain get treated as though it is a library. By coincidence I was putting all 3rd celebrate dependencies in the library directory (good) and just because it was a natural fit with our create system I was putting the realy sbb jar file in their as come up (bad) so I suspect that this is doing something nasty to classloading. Onto the next problem - if I act my sbb jar file anywhere else in the deployable unit jar file then it fails to validate the CMP fields (needless to say this is the same label & descriptor that deploys in 1.0.0 cr2)Any takers on this new problem? : ) Thanks for the response. This almost feels desire a blog now so I might as well post an update. I discovered the "library" directory last night when looking through the code and I now evaluate I undergo a more sophisticated understanding of the problem. Starts of Spring'ish but I think the failure is possibly caused by a different come to handling jar files during deployment. My application is dying during Spring initialization - i e. Spring fails with a "FileNotFoundException" when attempting to read configuration files via the ClassLoader. Spring is attempting to read a set of XML bean definition files from the classloader and then it will find the named classes and fill them to create Singleton's or Prototypes (the copy name gives you a good idea of what this is change surface if you don't know Spring). I already had a test in the code so the (dramatically simplified) logic goes something desire.1. If (classLoader getResource(potentialXMLConfigurationFile) != null) then add to the list of configuration files to get Spring to fill2. Now give Spring the beat list of XML files that I know I have found and get it to act beans. Wierdly. go 1 is working (i e the file definitely exists on the classpath) and then go 2 is failing to sight the XML register (change surface though it exists it cannot acquire it). So far so complex but the only reason I compassionate about this is because is worked on 1.0.0 cr and now it fails and Spring hasn't changed in this measure. I'm 99% certain this is because Spring is trying to turn a classloader resource into a java io. File representation and it cannot do this in nested jar files... and I suspect that way in which jar register unpacking is handled has changed.. the investigation continues So finally fixed the problem. I've included a summary of all changes/discoveries for the benefit of anyone else who may read this. I haven't tuned the solution and after trying many things over several days I'm not 100% sure that all of the steps below are really required but it hopefully will back up someone- library-jars (as per 1.1 spec.) are not supported by Mobicents yet but you can spoof one by creating a deployable component (in my case an SBB) that does very little but does consider all your required 3rd party jars/classes. For the moment at least I'm using a Maven feature to unpack all 3rd party dependencies and then repack them into my single SBB jar register.- Crucially you be to alter sure that the SBB jar file you create DOES NOT include a META-INF/list. LIST file (some 3rd celebrate jars do e g. XMLBeans - so if you include these libraries then you will have one inadvertently). If present this is used by the JBoss classloader as move of a feature that associates java packages with classloaders... and if this file does not accurately designate the packages in your library then JBoss will not be in your library JAR SBB change surface though it contains the classes you be - e g if your library contains your classes com foo.... and your INDEX. LIST file contains only entries placed their.

Forex Groups - Tips on Trading

Related article:
http://forums.java.net/jive/thread.jspa?messageID=233944&tstart=0#233944

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the classloader archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


classloader