Derby Error while calling subscribe()

Nils
2005-03-26
2013-04-22
  • Nils
    Nils
    2005-03-26

    Hey Guys,

    I ran into trouble, while getting it work with derby.

    I set up Publication in Postgresql 8.1 and try to create a subscription in a derby database. I use the jdbc url string that you recommend in your developer guide. I use 1.7 beta.

    Driver: com.ibm.db2.jcc.DB2Driver
    URL: jdbc:derby:net://localhost:1527/testsub;retrieveMessagesFromServerOnGetMessage=true;deferPrepares=true;create=true
    Derby: incubating-derby-10.0.2.1
    IBM: latest jdbc-driver

    When my programm calls the synchronize() Method I get the following Exception:

    Caused by: com.daffodilwoods.replication.RepException:
        Error subscribing subscription 'DB2 SQL error: SQLCODE: -1, SQLSTATE: 42X01, SQLERRMC: Encountered "public" at line 1, column 1442X01' : {1}.
        at com.daffodilwoods.replication.Subscription.subscribe(Subscription.java:206)
        at ReplicationSubscriber.createSubscription(ReplicationSubscriber.java:61)
        ... 2 more

    So the method Subcriber.subscribe() throws the Exception "REP025".
    For me it looks like, that there is problem while setting up the schema. In my Publication there exists the schema 'public'. but there is no such a schema in derby yet. I have expected dr to create it.

    Do you have any advice for me, where the problem is located and a solution or hint?

    Thanks in advance
    Nils

     
    • subesingh
      subesingh
      2005-04-07

      Hi

         When Postgre SQL is used as a Publisher and Derby is used as Subscriber, there must be a user/schema in the Derby Database whose name is same as that of the schema in Postgre SQL database.

      Thanks and Regards

      Sube Singh