With the recent release of SQL Anywhere 11, one would expect Servoy 4.0 to be able to readily interface with it.
Question: Which of the ff. folders in Servoy 4.0, need to be updated in order to make this possible :
1.your_install_drive:\your_install_dir\application_server\sybase_runtime_db\windows|linux|macosx? or
2.your_install_drive:\your_install_dir\application_server\sybase_db? or
3. both 1. and 2.?
Hi Bob,
Since Sybase iAnywhere 11 isn’t bundled with Servoy (yet) this means you treat it as any other RDBMS. I.e. you install it in it’s own directory and add the current JDBC driver in the Drivers folder in the Servoy/Application_server/ directory. Make sure you only have 1 sybase (jconn3) driver in there.
Restart Servoy and you can connect to it (of course make sure Sybase iAnywhere 11 is running).
Also you might want to make sure Sybase iAnywhere 10 is not running.
Hope this helps.
Thnx Rob, for the promt reply.
Have already tried your suggestion. However, I did get an
"JZ0SJ: Metadata accessor information was not found on this database.
Please install the required tables as mentioned in the jConnect documentation."
error when I replaced the jconn3.jar that shipped with Servoy 4.0 with that which comes with the SQL Anywhere 11. The SQL Anywhere 10 jar that shipped with Servoy 4.0 connects to my db(in SQL Anywhere 10 version) without any problems.
Also you might want to make sure Sybase iAnywhere 10 is not running.
How would you achieve that?
Since Sybase iAnywhere 11 isn’t bundled with Servoy (yet) this means you treat it as any other RDBMS.
Can SQL Anywhere 11 and SQL Anywhere 10 both listen on port 2638 without any conflict?
Hope this helps.
Thanks, it helps
Hi Bob,
bobpee:
Also you might want to make sure Sybase iAnywhere 10 is not running.
How would you achieve that?
Servoy preferences > Servoy node > Startup node > Startup launcher field.
Just empty this field or put a # in front of it.
Of course after you close Servoy Sybase iAnywhere 10 will still keep running. So you need to stop the dbsrv10 process manually.
bobpee:
Since Sybase iAnywhere 11 isn’t bundled with Servoy (yet) this means you treat it as any other RDBMS.
Can SQL Anywhere 11 and SQL Anywhere 10 both listen on port 2638 without any conflict?
Only 1 process can listen to that port. So the answer is no.
Another thing to keep in mind is that you can’t simply use your iAnywhere 10 database with iAnywhere 11.
You need to unload them in v10 and reload that in a v11 created database. Check the Sybase iAnywhere documentation for this procedure. I believe it’s also explained in a few forum posts when users moved from 9 to 10.
Hope this helps.
Thanks for the feedback.
Another thing to keep in mind is that you can’t simply use your iAnywhere 10 database with iAnywhere 11.
You need to unload them in v10 and reload that in a v11 created database. Check the Sybase iAnywhere documentation for this procedure. I believe it’s also explained in a few forum posts when users moved from 9 to 10.
Maybe I should re-phrase my question.
I have 2 dbs:
- The original version was in SQL Anywhere 10 - Servoy 4.0 has no issue connecting to it.
- The 2nd, is in SQL Anywhere 11 format - the creation/conversion was done by first creating a new db in SQLA 11, and then using SQLA 11’s >Tools >SQL Anywhere 11> Unload Database function to unload my orig. db into it. Everything went fine.
- The last effort was an attempt to use Servoy 4.0 to connect to my 2nd db, which is now in SQLA 11 format. That is where I got stucked.
Would appreciate any further contributions
So your real question is how to run 2 different Sybase iAnywhere instances at the same time?
In the sybase.conf file you can assign the port number it listens to. You find it in the first line:
-ti 0-x tcpip{dobroadcast=no;port=2638) -qs -qw -o sybase_db/sybase_log.txt
Change that to, for example, port 9003.
Restart Sybase and it should be listening to your preferred port.
Now in Developer you need to use that new port number in your database connection as well.
jdbc:sybase:Tds:localhost:9003?ServiceName=myiAnywhere10DB&CHARSET=utf8
Hope this helps.
So your real question is how to run 2 different Sybase iAnywhere instances at the same time?
That’s right.
In the sybase.conf file you can assign the port number it listens to. You find it in the first line:
Code: Select all
-ti 0-x tcpip{dobroadcast=no;port=2638) -qs -qw -o sybase_db/sybase_log.txtChange that to, for example, port 9003.
Restart Sybase and it should be listening to your preferred port.
Now in Developer you need to use that new port number in your database connection as well.Code: Select all
jdbc:sybase:Tds:localhost:9003?ServiceName=myiAnywhere10DB&CHARSET=utf8
This will effectively kills one of my Sybase connections, which will be listening on port 2638.
I’d be attempting to use an existing connection on port 2638, which is running SA 10, to address a SA 11 db,
which is running listening on port, say 9003, if I were to apply your suggestion. Servoy 4.0 doesn’t appear to allow that.
My objective, is to use Servoy 4.0 to talk to 2 instances of SA, with at least one instance (or both) in SA 11.
I wish that there’s a way for Servoy 4.0 to easily interface with SA 11, I shall be glad if there is.
Hope this helps.
Thanks,
bobpee:
In the sybase.conf file you can assign the port number it listens to. You find it in the first line:
Code: Select all
-ti 0-x tcpip{dobroadcast=no;port=2638) -qs -qw -o sybase_db/sybase_log.txtChange that to, for example, port 9003.
Restart Sybase and it should be listening to your preferred port.
Now in Developer you need to use that new port number in your database connection as well.Code: Select all
jdbc:sybase:Tds:localhost:9003?ServiceName=myiAnywhere10DB&CHARSET=utf8This will effectively kills one of my Sybase connections, which will be listening on port 2638.
What it does is it makes the server listen to another port. You do need to change your database connection string accordingly.
bobpee:
I’d be attempting to use an existing connection on port 2638, which is running SA 10, to address a SA 11 db,
which is running listening on port, say 9003, if I were to apply your suggestion. Servoy 4.0 doesn’t appear to allow that.
You do need to change the port number in your existing connection to make it talk to Sybase 11 listening on port 9003.
You do need to change the port number in your existing connection to make it talk to Sybase 11 listening on port 9003.
I did that. I changed the strings
jdbc:sybase:Tds:localhost:2638?ServiceName=MyDatabase&CHARSET=utf8 to
jdbc:sybase:Tds:localhost:9003?ServiceName=MyDatabase&CHARSET=utf8 and
-ti 0 -x tcpip{dobroadcast=no;port=2638} -qs -qw -o sybase_db/sybase_log.txt to
-ti 0 -x tcpip{dobroadcast=no;port=9003} -qs -qw -o sybase_db/sybase_log.txt in sybase.config
and Servoy 4.0 throws a JZ006 error as a result of that :
java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseErrorCheckDead(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.login(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
at com.servoy.j2db.persistence.datasource.n.createConnection(Unknown Source)
at com.servoy.j2db.persistence.datasource.r.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
at com.servoy.j2db.persistence.datasource.i.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.a(Unknown Source)
at com.servoy.j2db.persistence.Server.goto(Unknown Source)
at com.servoy.j2db.persistence.Server.getTable(Unknown Source)
at com.servoy.j2db.persistence.Form.getTable(Unknown Source)
at com.servoy.eclipse.ui.property.PersistProperties.getPropertyDescriptor(PersistProperties.java:904)
at com.servoy.eclipse.ui.property.PersistProperties.createPropertyDescriptor(PersistProperties.java:411)
at com.servoy.eclipse.ui.property.PersistProperties.registerProperty(PersistProperties.java:292)
at com.servoy.eclipse.ui.property.PersistProperties.init(PersistProperties.java:266)
at com.servoy.eclipse.ui.property.PersistProperties.getPropertyDescriptors(PersistProperties.java:338)
at org.eclipse.ui.views.properties.PropertySheetEntry.computeMergedPropertyDescriptors(PropertySheetEntry.java:167)
at org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:530)
at org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:760)
at org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:974)
at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473)
at org.eclipse.ui.views.properties.PropertySheet.partActivated(PropertySheet.java:195)
at org.eclipse.ui.part.PageBookView.showBootstrapPart(PageBookView.java:907)
at org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:482)
at org.eclipse.ui.views.properties.PropertySheet.createPartControl(PropertySheet.java:96)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:370)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:299)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:531)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:179)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:400)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:668)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:564)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:270)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:931)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2515)
at org.eclipse.ui.internal.WorkbenchWindow$23.run(WorkbenchWindow.java:2837)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2818)
at org.eclipse.ui.internal.WorkbenchWindow$17.runWithException(WorkbenchWindow.java:2135)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:801)
at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Hi Bob,
Okay, so maybe port 9003 is actually used by another process then. Can you check the sybase_log.txt for any errors?
Do you see the Sybase iAnywhere 11 process running ?
Okay, so maybe port 9003 is actually used by another process then. Can you check the sybase_log.txt for any errors?
Do you see the Sybase iAnywhere 11 process running ?
No, developer can not start SQLA 11, see below for a fresh log output:
I. 08/18 13:14:30. Running Windows 2003 Build 3790 Service Pack 2 on X86 (X86_64)
I. 08/18 13:14:30. Server built for X86 processor architecture
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\user_data.db” consists of 5 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\bug_db.db” consists of 5 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\example.db” consists of 4 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\pdf_forms.db” consists of 4 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\servoy_repository.db” consists of 4 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\udm.db” consists of 7 disk fragments
I. 08/18 13:14:31. Performance warning: Database file “C:\Program Files\Servoy40\application_server\database\log_data.db” consists of 5 disk fragments
E. 08/18 13:14:36. Database cannot be started – server must be upgraded to start “C:\Data\MyData\MyDatabase.db” (capability 51 missing).
I. 08/18 13:14:36. Database server shutdown due to startup error
This is strange, MyDatabase.db , is a SQLA 11 db and Servoy 4.0 appears to be expecting a further upgraded version of it
bobpee:
E. 08/18 13:14:36. Database cannot be started – server must be upgraded to start “C:\Data\MyData\MyDatabase.db” (capability 51 missing).
I. 08/18 13:14:36. Database server shutdown due to startup errorThis is strange, MyDatabase.db , is a SQLA 11 db and Servoy 4.0 appears to be expecting a further upgraded version of it
Servoy 4 doesn’t expect anything of your databases (other than being able to connect to them ). It’s Sybase that is complaining.
And it looks like you are trying to open a ASA11 database with a ASA10 server. That won’t work, hence the ‘server must be upgraded’ remark in the sybase log.
Also when Sybase encounters an error it shuts down again.
Like I said earlier in this threat is that you need to treat Sybase iAnywhere 11 as any other not-bundled-with-servoy database. I.e. you need to install it in it’s own directory but you also need to start it yourself.
Servoy has a Startup launcher string in it’s preferences (see Preferences > Servoy > Startup) that will launch the bundled Sybase iAnywhere 10.
It doesn’t start any other database server for you so I think you have 2 options.
- launch Sybase iAnywhere yourself (like at startup)
- create a shellscript that launches both ASA 10 and 11 and let Servoy point to it in previously described prefs so it launches both when you launch Servoy.
And also don’t forget to change the sybase.conf so that ASA10 won’t try to open your MyDatabase.db.
Hope this helps.
Servoy 4 doesn’t expect anything of your databases (other than being able to connect to them
). It’s Sybase that is complaining.
And it looks like you are trying to open a ASA11 database with a ASA10 server. That won’t work, hence the ‘server must be upgraded’ remark in the sybase log.
Also when Sybase encounters an error it shuts down again.
I found out at ServoyWorld 2008 that SQLA 11 is not yet supported by Servoy 4.0 ( not even the latest 4.01) after all - probably this will be taken care of in the latter’s future upgrade.
create a shellscript that launches both ASA 10 and 11 and let Servoy point to it in previously described prefs so it launches both when you launch Servoy.
And also don’t forget to change the sybase.conf so that ASA10 won’t try to open your MyDatabase.db.
This wouldn’t help in the interim, bcos of the above reason - there could arise conflicting JDBCs etc. etc.
Cheers!