-
1. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
rareddy May 10, 2012 1:57 PM (in response to skethire)Srini,
You defining the "admin" as dependency in your WAR file? I am trying to understand why this is occurring. I thought above mentioned should have brought in through implicit dependency on the "cli" module in the "admin" module.
Ramesh..
-
2. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
rareddy May 10, 2012 2:19 PM (in response to rareddy)Srini,
Ok, I see the issue. In maven when I added the dependency the other project it brings in all the implicit dependencies for build purposes. So I based module.xml on it. However, in AS7 module.xml class-loading, unless the "cli" module exposed the "org.jboss.as.controller-client" module as export = true in in its definition it will not be automatically exposed, thus the issue. Teiid should have direct dependeny on this module. When I tested, I always tested using the "adminshell" which brings in all the dependent jars (implicit and explicit) so it is not exposed there. Thank you for finding it. I will fix this for next release. I logged https://issues.jboss.org/browse/TEIID-2038
Thanks
Ramesh..
-
3. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
skethire May 10, 2012 3:02 PM (in response to rareddy)Ramesh,
Thanks a bunch for looking into this.
I am having similar dependency issues with a custom jdbc driver/ejb/ and JCA container. It will be a while before I completely understand the JBoss modules and dependency resolution.
Srini
-
4. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
rareddy May 10, 2012 3:05 PM (in response to skethire)Srini,
My suggestion is to deploy the JDBC jar as the module. When you deploy as JAR and try to use the module there is trick to name of the deployed module.
Ramesh..
-
5. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
skethire May 10, 2012 5:51 PM (in response to rareddy)Ramesh,
It is deployed as a module. JCA is able to load it and create connections to my database. However, I get ClassNotFoundExceptions at runtime while loading some class that is already part of the jdbc module. The only way I could work around this issue is to add a dependency on my jdbc driver module to teiid.main module. Here is what I did:
1. created a module com.lgc.ph.client (which includes all the jars it needs)
2. create a module com.lgc.ph.translator ( which has a dependency on com.lgc.ph.client exported="true")
3. added a <translator name="ph" module="com.lgc.ph.translator"/> to teiid subsystem
When I try to access my vdb, I get a ClassNotFoundException from module teiid.main for one of the classes in the custom jdbc driver. I thought ironjacamer (JCA) loads the driver and creates a connection, and Teiid is just using the connection.
Even when I tried to make my module a global module the exception did not go away. I finally added the dependency to teiid as a workaround (which I do not like).
Thanks
Srini
-
6. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
rareddy May 11, 2012 8:42 AM (in response to skethire)Srini,
Can you post the exception? The behavior seems wrong. Teiid looks up the connection through the JNDI, so the connection semantics are outside of Teiid. So you have a RAR file and translator? or your translator is directly using the JDBC connection inside it?
Ramesh..
-
7. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
skethire May 11, 2012 1:07 PM (in response to rareddy)Ramesh,
Here is the exception..
javax.naming.NamingException: Could not load ejb proxy class com.lgc.dam.phs.common.interfaces.PhServerFactory [Root exception is java.lang.ClassNotFoundException: com.lgc.dam.phs.common.interfaces.PhServerFactory from [Module "org.jboss.teiid:main" from local module loader @2b76e552 (roots: C:\jboss-as-7.1.1.Final\modules)]]
at com.lgc.dam.phs.client.jdbc.PhsJDBCConnection.connectToDictionary(PhsJDBCConnection.java:402)
at com.lgc.dam.phs.client.jdbc.PhsJDBCConnection.<init>(PhsJDBCConnection.java:157)
at com.lgc.dam.phs.client.jdbc.PhsJDBCDriver.connect(PhsJDBCDriver.java:140)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
... 18 more
So the flow is:
VDB->request connection from JCA->JCA creates connection using custom JDBC driver->JDBC Driver looks up an EJB->ejb proxy class loading fails.
As you can see from above, creating a connection to our datasource involves connecting to an EJB. But all of this happens inside the custom jdbc driver.
Thanks
srini
-
8. Re: Teiid 8.0 Final with JBoss 7.1.1 Final - AdminAPI - ClassNotFoundException
rareddy May 11, 2012 8:38 PM (in response to skethire)Srini,
Is com.lgc.dam.phs.common.interfaces.PhServerFactory class in the JDBC Driver's module?. Is EJB being looked up using JNDI?
Ramesh..