on 2012 Jun 11 7:35 AM
Hi,
I am having an application which is having MySQL as its database back end. I am trying to connect that database with Sybase Unwired Platform(SUP2.1).
How can i do that?
Do i need to make connection/synchronization through SQL Anywhere with MySQL as it is a default available database with SUP.
Please suggest.
Regards,
Shrikant.
Request clarification before answering.
hi shrikant,
I am facing the same issue did you find any solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello All,
I created a connection profile to connect MySQL server and able to connect successfully. But I'm unable to see the existing tables. Can some one help me on this issue.
Thanks
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys,
i have managed it to connect a MySQL database with SUP, including to create a MBO and i want to share the solution with the community:
First update the "data tools platform enablement" of your Designer (take care not to update EMF/GMF plugins, this will break your SUP workspace!).
I have only updated the following plugins and deselected everything else:
This will enable the MySQL driver selection in the connection profile dialog. Put the mysql-connector-java-<version>-bin.jar file somewhere in your sybase installation folder, e.g. Sybase\UnwiredPlatform\MobileSDK<version>\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins. Create your profile and connect to the database. The tables of your schema should now be visible (before the update, they were not showing up). Here is an example:
If you now try to drag and drop a table onto the Mobile Application Diagram canvas you will get a ClassNotFoundException, telling you that the driver class com.mysql.jdbc.Driver could not be found. I did a bit of research and found a post where someone has provided a hack for this issue.
Open the mysql jar file with an archiver and unpack the com folder that contains the driver classes (e.g. on your desktop).
Go to the directory Sybase\UnwiredPlatform\MobileSDK<version>\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.tooling.api_<version>\lib, open the sup-ds.jar file again with the archiver and package the com folder (of the mysql driver) into the sup-ds.jar (Actually a com folder already exists, so you only have to drag the mysql folder into the jar on the same level as the sybase folder)
After restarting the designer, SUP should now recognize the mysql driver and you can go on and create your MBO, but you have to do it manually (right click on the project and select New->Mobile Business Object in the context menu, since the SQL statement is generated wrong when creating the MBO via DnD. SUP appends the schema name to a table twice and the statement cannot be modified. In my example it would look like this:
SELECT isbn, title, name, author, price, year_published
FROM amazon.amazon.books
Hope this will help others.
Regards,
Bishara
Hi Bishara Jaser,
Thank you for your help in this SUP connecting to a MySQL database. I am now able to connect to a MySQL database, however, I followed your post steps and I’m still not able to create MBO’s (in the manual manner that you mentioned). What I did in this regard was:
In the end the “com” folder of “sup-ds.jar” consists of two folders, the copied “mysql folder” and the original “Sybase” folder.
After this I still get the “ClassNotFoundException”. Did I do something wrong or there’s something amiss?
Best regards,
Ricardo
Hi Ricardo,
it seems that you have followed the instructions correctly. Did you also update the plugins as suggested? You might also try to use another MySQL jar file version. The current version is 5.1, which is what i'm using as well. Do you use SUP WorkSpace 2.1.3? If so, i could send you the sup-ds.jar via email. I have meanwhile fixed also the drag'n'drop issue mentioned in the post through the modification of another jar file. Tell me your email address and i'll send you both files if you like. In this case you just need to replace the jar's in your installation folder. Maybe we can narrow down the problem this way.
Regards,
Bishara
Hi Bishara,
I also updated the plugins that you mentioned on your post, and yes i am using SUP Workspace 2.1.3. Hence, I would very much appreciate if you could send my email the following files that you are using:
- sup.ds.jar
- The jar file to fix the drag and drop issue (along with the directory where i have to put that jar file)
- mysql 5.1.jar driver
My email is ricardo.pinheiro.pires@novabase.pt.
Thank you very much again!
Best Regards,
Ricardo
Hi
i am tring to connect the MySql database as backend
i have connected successfully.
when i am deploying the project to unwired server, not able to give the 'Server Connection Mapping' correctly.
it says "the connection profile is doesn't match the server connection profile template"
Do i need to create a connection template in SCC .
Please suggest me a solution...
Regards
Siva Chandu
Hi Siva,
sorry for the late response. Yes, you have to create a new JDBC template in SCC under Domains->[your domain e.g.default]-->Connections. Then select the Template tab and enter the database properties similar to the following:
Note that you can choose DB as the database type. Then switch to the Connections tab and create a new connection by selecting the template you've just created.
Click on the Test Connection button to verify that the connection succeeds. Hope this helps.
Regards,
Bishara
Hi Shrikant,
If you want to access other database you will have to create database connection using enterprise explorer.
here i mention the way how we can create the connection. it is depends on the workspace version.
right click on Database Connections from Enterprise Explorer->from the list of connection profile types choose which one you want ( oracle, SQL Server)->provide name for the connection->click on the icon for new deiver definition->it will open new driver definition wizard -> here you select the type of database,jar list and properties(userid,password,connection url,drivername, driver class)->click ok->you can test here whether the connection is successful or not->next->finish.
finally you will see the database icon in the database connections.
Thansks&Regards
Murthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Satya for the reply.
But there used to be no driver definitions for MySQL database in the enterprise explorer.
It used to have the database connection types as Oracle, MS SQL Server, DB2 & SQL Anywhere.
How can i create the connection for MySQL Database. If i need to define the new driver for this, then which driver should i define for it?
Please suggest.
Regards,
Shrikant.
Yes Erhan, i am doing the same. But the where the problem i am facing is that i am unable to specify the MySQL driver file. I have downloaded a MySQL driver for JDBC connection from MYSQL site, but when i import it into the workspace as you mentioned in your previous reply, it does find the driver.class file into it.
I guess i am not having the correct MySQl driver/jar file for this. Please suggest me on this. If you have done this before then provide me the link from where i can download the correct drivers for MySQL.
Regards,
Shrikant
Hi,
Now as i have defined the driver files, i am able to connect to the MySQL db.
This is my configurations for MySQL\
But now when i am trying to create MBO using that i gets following error.
I guess i have to define few more properties/settings for the DB connection.
Is there something which i am missing?
Regards,
Shrikant
Hi Shrikanth,
did you resolve this issue or not.
if not please add the jar file into the below path, this path will be change according to your SDK version.
<SUP installation root>\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.com.sqlserver_<version>.<plugin version number>\lib
if it is 2.1.3
C:\Sybase\UnwiredPlatform\MobileSDK213\Unwired_WorkSpace\sybase_workspace\mobile\eclipse\plugins\com.sybase.upe.com.sqlserver_2.1.3.xxxxxxxx
after placing the jar file you should close your workspace and open it again.
Pls let me know whether the problem exactly the same or not.
Thanks&Regards
SatyaMurthy
Hi Nishan,
Please Check your your SQL Database is startup(mounted) or not.
i have installed oracle 11g successfully and i aam able to connect database, but while creating the mbo i got above error, after i did some workaround i got success.
though it is not showing tables then i mounted my databse.
now i am successfully created MBO's.
Thanks&Regards
SatyaMurthy
Hi SatyaMurthy,
Many thanks for your reply.
The connection is fine as I got the "ping" successful.
And MySQL server is startup too.
But still I don not get what you meant by "mount" here.
As you can see in my screen capture it still shows database too but missing is tables within it .
Many Thanks
Nishan
HI nishan,
i have read this blog and understood you are able to connect to you MySql from the SUP , so the connection job is done from SUP the only thing you are unable to access the table presents in your database, that is something to do with database,
i believe like in SAP until we will not set BAPI/RFC property as expose to the external world we will not be able to access them even though you are successfully connected the SAP.
check is there any access table property has been set in your database.
prem
Hi,
You can create conntection to your MySQL db under Sybase Unwired Workspace -> Enterprise Explorer -> Database Connections. I think you should check documents about SUP.
[Removed by Moderator]
Message was edited by: Michael Appleby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erhan,
I have gone through the docs for SUP 2.1. But i didn't find any specific information regarding MySQL connection. I am assuming that i need to import some drivers for the MySQL database in the SUP installation directories. Is that all needed. Can you suggest me what else i am missing?
If you can provide me any reference link that will be really helpful.
Regards,
Shrikant.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.