-
1. Re: Teiid Under Tomcat
shawkins Nov 21, 2014 7:36 AM (in response to jchidiac)> can i deploy teiid under Apache/ Tomcat as standalone teiid (Not in Embedded mode)
No. There is no server package for Tomcat. Embedded is possible and there is OSGI bundling for other containers as well.
> and if yes, in this case, can Teiid Designer connect use this Teiid Instance ?
It's the same as the other thread. The admin functions of Designer are only available against Teiid deployed in JBoss EAP/AS. Any other scenario the best that you can do is just have a JDBC source.
-
2. Re: Teiid Under Tomcat
jayeshgarg Feb 22, 2016 7:26 AM (in response to shawkins)I am able to deploy teiid in Tomcat container. I have been able to expose a remote JDBC Connection as well. I need some help in configuring logging for teiid. What I need is to create a separate logging for teiid, So that all the teiid related logging in separate set of files. I wrote following lines of code to log my data in a Java servlet. However, it doesn't print anything either on the console or on the File System. Please guide.
package nl.ing.rtpe.teiid;
import org.teiid.logging.*;
import org.teiid.runtime.JBossLogger;
//Other imports
static {
LogManager.setLogListener(new JBossLogger());
System.setProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
}
static final String RTPE_TEIID = "nl.ing.rtpe.teiid";
public void init() throws ServletException
{
LogManager.log(MessageLevel.INFO, RTPE_TEIID, "Teiid Server initializing.");
}
My logging.properties is placed in WEB-INF/classes directory. Attached is the copy of the same.
-
logging.properties.zip 608 bytes
-
-
3. Re: Teiid Under Tomcat
rareddy Feb 22, 2016 7:36 AM (in response to jayeshgarg)Tomcat does not use "JBossLogger", it is log4j logger, so you should try using that.
-
4. Re: Teiid Under Tomcat
shawkins Feb 22, 2016 10:58 AM (in response to rareddy)It's fine to use the JBossLogger, it just expects to us the JBoss Logging framework (which has logging facades for Log4j, slf4j, etc.). But if all you need is default Java logging, then use the org.teiid.logging.JavaLogger instead.
-
5. Re: Teiid Under Tomcat
jayeshgarg Feb 26, 2016 9:41 AM (in response to shawkins)Thanks I am able to log now using log4j only.
I have implemented security using LDAP in my teiid instance now but getting the below error when I try to make the very first authorisation request.
INFO localhost-startStop-1 org.teiid.RUNTIME.VDBLifeCycleListener - TEIID40003 VDB grtc_monitor.1 is set to ACTIVE
DEBUG New I/O worker #1 org.teiid.TRANSPORT - processing message:MessageHolder: key=0 contents=Invoke interface org.teiid.client.security.ILogon.logon
DEBUG New I/O worker #1 org.teiid.AUDIT_LOG - [Configuration, null NPA_Spotfire USERPASSWORD lrv151jk.europe.intranet 10.192.28.18 00505680562A false] <session.logon-request>
DEBUG New I/O worker #1 org.teiid.SECURITY - authenticateUser NPA_Spotfire JDBC
ERROR New I/O worker #1 org.teiid.SECURITY - TEIID40017 Unexpected exception for session null
java.lang.VerifyError: (class: org/jboss/security/config/StandaloneConfiguration, method: getAppConfigurationEntry signature: (Ljava/lang/String;)[Ljavax/security/auth/login/AppConfigurationEntry;) Incompatible argument to function
at org.picketbox.factories.SecurityFactory.<clinit>(SecurityFactory.java:70)
for subsequent requests, it gives me the below error.
DEBUG New I/O worker #2 org.teiid.TRANSPORT - processing message:MessageHolder: key=1 contents=Invoke interface org.teiid.client.security.ILogon.logon
DEBUG New I/O worker #2 org.teiid.AUDIT_LOG - [Configuration, null NPA_Spotfire USERPASSWORD lrv151jk.europe.intranet 10.192.28.18 00505680562A false] <session.logon-request>
DEBUG New I/O worker #2 org.teiid.SECURITY - authenticateUser NPA_Spotfire JDBC
ERROR New I/O worker #2 org.teiid.SECURITY - TEIID40017 Unexpected exception for session null
java.lang.NoClassDefFoundError: Could not initialize class org.picketbox.factories.SecurityFactory
at nl.ing.rtpe.teiid.TeiidSecurityHelper.authenticate(TeiidSecurityHelper.java:86)
Any pointers?
Thanks,
Jayesh
-
6. Re: Teiid Under Tomcat
shawkins Feb 26, 2016 9:59 AM (in response to jayeshgarg)Seems like your runtime classpath does not include libraries you need for your security helper. Have you ensured that picketbox is in the classpath?
-
7. Re: Teiid Under Tomcat
rareddy Feb 26, 2016 9:59 AM (in response to jayeshgarg)java.lang.NoClassDefFoundError: Could not initialize class org.picketbox.factories.SecurityFactory at nl.ing.rtpe.teiid.TeiidSecurityHelper.authenticate(TeiidSecurityHelper.java:86)
Is telling that you do not have picketlink jar files in your kit.
-
8. Re: Teiid Under Tomcat
jayeshgarg Feb 26, 2016 11:01 AM (in response to shawkins)I have included picketbox-bare-3.0.0.Final.jar in my WEB-INF/lib directory. It has the class org.picketbox.factories.SecurityFactory as well.
Is that not good enough?
-
9. Re: Teiid Under Tomcat
shawkins Feb 29, 2016 1:31 PM (in response to jayeshgarg)Is Teiid embedded also being loaded from the WEB-INF/lib?
You may also need to ensure that you aren't seeing an exception in initializer or similar error that may eventually look like a class not found. Perhaps you need more than the bare dependency.
-
10. Re: Teiid Under Tomcat
jayeshgarg Mar 3, 2016 11:19 AM (in response to jchidiac)Thanks I could resolve the issue by placing the right version of the libraries.
I have another question related to performance of Embedded Teiid. I can see the performance is very poor in the Embedded version. For me, it doesn't stop completely but it hangs after I have made "jdbc" calls 4-5 times. Attached are the stats that I could capture at that time. Also, when I am querying in jdbc , I am specifying the below parameters disableLocalTxn=true;autoCommitTxn=OFF. I haven't done any cache configuration so everything is running with default mode.
Looking at the stats I don't see anything noteworthy. Its quite less memory footprint i.e. 405 KB only. Please give me some pointers.
-
stats.txt.zip 922 bytes
-
-
11. Re: Teiid Under Tomcat
shawkins Mar 3, 2016 12:00 PM (in response to jayeshgarg)> I can see the performance is very poor in the Embedded version.
What you are seeing may not be related to embedded directly. The configuration / environment may need to be altered, but you need to first start by assessing what you are trying to execute. Can you provide the query plan for the query you are executing?
> For me, it doesn't stop completely but it hangs after I have made "jdbc" calls 4-5 times
What doesn't stop? Hanging from a client perspective? A thread dump and a Teiid debug log would give you a full picture of the processing involved - what source queries are being issued, what threads may be waiting on etc.
> Looking at the stats I don't see anything noteworthy.
That is much too high level. Have a look at Diagnosing Issues | Teiid Documentation for a quick overview and pointers to additional docs.