Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

When running the Java Android code for synchronization, this error is generated: "com.ianywhere.ultralitejni12.implementation.JniException: UltraLiteJ Error[-280]: Publication 'Actions' not found"

A publication was made with the name Actions in the consolidated database SQL Anywhere. Inside the Actions publication there are two tables: action and actionparameter.

How come this error occurs?

asked 20 Dec '11, 17:28

Yanny's gravatar image

Yanny
1767917
accept rate: 75%


Publications should be defined in the remote database not the consolidated database for MobiLink synchronization. You need to create the publication 'Actions' in the UltraLiteJ database not the consolidated database.

permanent link

answered 20 Dec '11, 21:26

Chris%20Keating's gravatar image

Chris Keating
7.8k49128
accept rate: 32%

edited 20 Dec '11, 21:27

On the question of whether to have two separate databases, one with synchronizing tables, the other not synchronized: I think you are much better off with one database. I don't see any benefit to separate databases, and there are definitely multiple drawbacks.

For tables you don't want to synchronize, specify the SYNCHRONIZE OFF clause. For example,

CREATE TABLE t1 (pk INT NOT NULL PRIMARY KEY, SYNCHRONIZE OFF)
permanent link

answered 23 Dec '11, 13:37

Tim%20McClements's gravatar image

Tim McClements
2.0k1830
accept rate: 35%

Thank you for your feedback on using 1 database. I'm using one database now. :)

(23 Dec '11, 15:19) Yanny

Thank you for your answer.

Currently there is a remote database with the tables action and actionParameter inside it. Should I also use the connection to that remote database to create a publication? Actually I prefer to have two databases, one for normal tables and one for Mobilink synchronization tables. This separate design looks more "neat".

So I created a publication in the Mobilink remote database, but I get an error about the table action does not exists. That is true, because the action table resides in the first database. I don't want to have double tables in two databases, because it's not managable.

So what is your advice about this? Should I just use one database for everything or is there a better way?

permanent link

answered 21 Dec '11, 12:56

Yanny's gravatar image

Yanny
1767917
accept rate: 75%

The error that you are getting occurs when you attempt to synchronize referencing a publication 'Actions' and that publication is not defined in the remote database that you were attempting to sync. Perhaps you can explain the reasoning for the publication 'Actions' in more detail given that it is referencing tables that you do not plan to sync - and in a database that is not being synchronized.

For UltraLite, you can opt not to define a publication in the remote database which will sync all user defined tables are sync'd unless specifically marked with the prefix '_nosync' during a synchronization request.

If you are connected to the database that you want the tables to be synchronized, you should define one or more publications and sync those publications or rely on the default publication to sync all tables.

(21 Dec '11, 13:24) Chris Keating

Maybe I was not so clear. I don't get that error about the publications anymore after I have created it. I have called the name of the publication "ActionsPubs" instead of just "Actions".

So now the error I get is that the table "action" does not exists. This "action" is not the publication I referred to in the first post, but the table "action". The reason is because I have two databases, this I've explained in my second answer.

So my question now is, should I have two separate remote databases/connections for the synchronization, or one connection will do?

This is the connection for the remote database: Connection connection = DatabaseManager.getConnection(context); PreparedStatement ps = connection.prepareStatement(insertQuery(object)); ps.execute(); ps.close(); connection.commit();

This is the connection for the other remote database, specially made for the mobilink (ML):

Connection conn = DatabaseManager.getMLConnection(context); SyncParms syncParms = conn.createSyncParms(SyncParms.HTTPS_STREAM, config.getUsername(), "1.0" ); syncParms.setPassword(config.getPassword()); syncParms.setPublications(publications);

... ...
conn.synchronize( syncParms );

I don't know if this is right what I'm trying...

(21 Dec '11, 15:27) Yanny

What triggers the table not found error? Is it when you create the publication? Or when you sync? Or at some other point?

(21 Dec '11, 16:54) Chris Keating

When I sync I got that error. It is fixed by now, because now I use the connection to the database which has the tables.

(21 Dec '11, 17:04) Yanny
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×72
×19

question asked: 20 Dec '11, 17:28

question was seen: 2,900 times

last updated: 23 Dec '11, 15:19