Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TOS 5.1 MySql Connection Error

Hi guys! I just installed TOS 5.1 over Linux Ubuntu and it run with no problem, but once i try to execute the Connection Job sample i am facing an error that follow below:

Starting job Connection at 23:28 20/05/2012.
connecting to socket on port 3538
connected
Exception in component tMysqlConnection_1
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at demojava.connection_0_1.Connection.tMysqlConnection_1Process(Connection.java:339)
at demojava.connection_0_1.Connection.runJobInTOS(Connection.java:1199)
at demojava.connection_0_1.Connection.main(Connection.java:1067)
disconnected
Job Connection ended at 23:28 20/05/2012.

For org.gjt.mm.mysql.Driver, i already did the download from www.jarfinder.com and put it over classpath variables.. but no way to works, may could someone give some hint how to solve this issue?

Note: My first install was under /opt/ directory and for testing i change it to /home/user/

Best regards,

Sandro Regis
Labels (2)
19 Replies
Anonymous
Not applicable
Author

Hi
Add jar file as the following image.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi friends, please someone knows how to use ignoreCase() native from Java?

For example i have a snipet of code like this under my expression filter row1.City.equals("Ohio") and i need to implement the ignore case, please could someone give a hint?

Best regards,

Sandro Regis
Anonymous
Not applicable
Author

Hi Sandro
You might use the expression as seen below.
row1.City.equalsIgnoreCase("Ohio")
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro!!! Thank you so much once again!

For I am facing one more newbie problem, the question is I have created a var Address composed by metadatas:
row3.TP_LOGR+ row3.LOGRADOURO+ row3.NUMERO+ row3.COMPLEMENTO

Which generates to me lines like that:
nullSTREET SHINE410 null

I would like your hint to apply a condition for null values became '' and how to implement `, ` between Street and Numbering. This the output will produce for us STREET SHINE, 410

I already try a lot of kinds of code lines like this:

if(row3.TP_LOGR.equals(null)) {
row3.TP_LOGR = "";
}
if(row3.COMPLEMENTO.equals(null)) {
row3.COMPLEMENTO = "";
}
row3.TP_LOGR+ row3.LOGRADOURO+ row3.NUMERO+ row3.COMPLEMENTO

But nothing works properly, may could help-me, supply some link or material... I really need your help once again.

Kind regards,

Sandro Regis
Anonymous
Not applicable
Author

Hi Sandro
Try this.
if(row3.TP_LOGR==null) {
row3.TP_LOGR = "";
}
if(row3.COMPLEMENTO==null) {
row3.COMPLEMENTO = "";
}
row3.TP_LOGR+ row3.LOGRADOURO+ row3.NUMERO+ row3.COMPLEMENTO
Regards,
Pedro
Anonymous
Not applicable
Author

Pedro, I did what you said and now we are facing one Syntax Error concerning + over last line

row3.TP_LOGR + row3.LOGRADOURO + row3.NUMERO + row3.COMPLEMENTO

I will try to upload an image.



Best regards,

Sandro Regis
Anonymous
Not applicable
Author

Hi
Try this expression.
row3.TP_LOGR==null?"":row3.TP_LOGR+ row3.LOGRADOURO+ row3.NUMERO+ row3.COMPLEMENTO==null?"":row3.COMPLEMENTO
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro, this last one works to remove just the first one null value, for the last parameter it remains there... I try to treat it as a string comparison, but have a mismatch of types String to Boolean..

Kind regards over your friendship and guidance!

Sandro Regis
Anonymous
Not applicable
Author

Pedro, I forgot to share the result with... I means for some single reason, once i reload the IDE the data filter works fine.

Thank you so much friend!

By the way I was thinking in contribute creating one video of all my tasks solved with your guidance, have we some place to post here in forum?

Tks again! God bless you!
Anonymous
Not applicable
Author

Hi Sandro
Great! Thanks for your feedback.
You might upload your Talend jobs into Talend Exchange(Category:JOB) .
Regards,
Pedro