[teiid-issues] [JBoss JIRA] Resolved: (TEIID-590) Embedded has classloading issues with JBoss AS

Ramesh Reddy (JIRA) jira-events at lists.jboss.org
Thu May 14 15:32:46 EDT 2009


     [ https://jira.jboss.org/jira/browse/TEIID-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy resolved TEIID-590.
--------------------------------

    Resolution: Done


JBoss 4.2.2 uses JBoss Cache 1.4.1 & JGroups 2.4 
JBoss 5.0 uses JBoss Cache 2.0 & JGroups 2.5

not sure what version of the JBoss TS is being used.

The issue is Embedded uses JBoss Cache 2.2.1 & JGroups 2.6.5 and JBoss JTA 4.3. Going back to old versions is out of scope for Teiid. Teiid will align with 5.0.1 libraries when 6.1.1 releases, but until then we need a way to work in the JBoss AS.

Not only the JBoss Cache and JGroups libraries are clashing, the common libraries like log4j, jta-1.1.jar, connector-api.jar were in path to have clashes because Teiid was using post-delegation class loader, if for any reason these classes were already loaded by the container, and Teiid redefines them in its post-delegation class loader that is a problem with linkage error. Teiid needed to use the "delegation" model (hoping that the class loader above i.e container's have same versions of the libraries). However, when the "delegation" model used it is not possible to override the libraries like "JBoss Cache", for that you need post delegation.

Embedded Driver is modified such that it loads all the jar files in its "lib" directory using the "delegating" class loader, except for the jar files specified in a new URL property called "PostDelegationLibraries". "PostDelegationLibraries" defines a comma separated list of jar files that are in the "lib" directory of the "embedded" install folder, that need to be loaded with "post-delegation" class loader.  When this property is defined, then a "post-delegating" class loader will be created, with original "delegating" class loader as the parent for the rest of the jar in the "lib" directory. If this property is not defined then all the jar in "lib" are loaded with "delegation".

For Example: 
lib/
    a.jar
    b.jar
    c.jar

by default
delegation-loader loads ---> a.jar, b.jar, c.jar

if "PostDelegationLibraries = a.jar,c.jar"

(non-delegation-class-loader ----> loads a.jar, c.jar) and has parent class loader (delegation-class-loader ----> loads b.jar)


This way we can have fine grain control as to which libraries needs version protections, which ones does not. As per the JBoss AS 4.2.2 and JBoss AS 5.0.0, I could put following property in the data source definition with 6.1.0-SNAPSHOT and make it successfully make connections and issue queries. The transaction test is still pending.

PostDelegationLibraries=teiid-txn-jbossts-6.1.0-SNAPSHOT.jar,teiid-cache-jbosscache-6.1.0-SNAPSHOT.jar,teiid-embedded-6.1.0-SNAPSHOT.jar,jbosscache-core-2.2.1.GA.jar,jboss-common-core-2.2.8.GA.jar,jbossjta-4.3.0.GA.jar,jbossjta-integration-4.3.0.GA.jar,jboss-logging-spi-2.0.5.GA.jar,jbossts-common-4.3.0.GA.jar,jgroups-2.6.5.GA.jar

                                 




> Embedded has classloading issues with JBoss AS
> ----------------------------------------------
>
>                 Key: TEIID-590
>                 URL: https://jira.jboss.org/jira/browse/TEIID-590
>             Project: Teiid
>          Issue Type: Bug
>    Affects Versions: 6.0.0
>            Reporter: Ramesh Reddy
>            Assignee: Ramesh Reddy
>            Priority: Critical
>             Fix For: 6.1.0
>
>
> Since Teiid uses the same libraries as JBoss Cache, JBoss TS, and JGroups, there are version incompatibilities that needs to be dealt with. This JIRA should provide guidance as to how to deploy into 4.2.2 and 5.0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the teiid-issues mailing list