Thanks for your immediate reply,
While Starting the Master Program I got the following Error Messages
In the Master:
===========
SQLException in -->java.sql.SQLException: The log files on the master and
slave are not in synch for replicated database 'APPSYS_DATA'. The master log
instant is 1:347927, whereas the slave log instant is 1:347711. This is
FATAL for replication - replication will be stopped.
java.sql.SQLException: The log files on the master and slave are not in
synch for replicated database 'APPSYS_DATA'. The master log instant is
1:347927, whereas the slave log instant is 1:347711. This is FATAL for
replication - replication will be stopped.
at
org.apache.derby.impl.jdbc.EmbedSQLException.wrapStandardException(Unknown
Source)
at
org.apache.derby.iapi.error.PublicAPI.wrapStandardException(Unknown Source)
at
org.apache.derby.impl.db.BasicDatabase.startReplicationMaster(Unknown
Source)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleStartReplicationMaster(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown
Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at deler.Main.getConnection(Main.java:2514)
at deler.cust.<init>(cust.java:40)
at deler.Main.CustFrame1(Main.java:412)
at deler.Main.actionPerformed(Main.java:355)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: ERROR XRE05: The log files on the master and slave are not in
synch for replicated database 'APPSYS_DATA'. The master log instant is
1:347927, whereas the slave log instant is 1:347711. This is FATAL for
replication - replication will be stopped.
at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at
org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit.verifyMessageType(Unknown
Source)
at
org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit.brokerConnection(Unknown
Source)
at
org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit.initConnection(Unknown
Source)
at
org.apache.derby.impl.store.replication.master.MasterController.setupConnection(Unknown
Source)
at
org.apache.derby.impl.store.replication.master.MasterController.startMaster(Unknown
Source)
at
org.apache.derby.impl.store.raw.RawStore.startReplicationMaster(Unknown
Source)
at
org.apache.derby.impl.store.access.RAMAccessManager.startReplicationMaster(Unknown
Source)
... 41 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at deler.cust.getCustomer(cust.java:634)
at deler.cust.<init>(cust.java:508)
at deler.Main.CustFrame1(Main.java:412)
at deler.Main.actionPerformed(Main.java:355)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
In the Slave:
==========
SQLException in -->java.sql.SQLException: Failed to start database
'APPSYS_DATA', see the next exception for details.
java.sql.SQLException: Failed to start database 'APPSYS_DATA', see the next
exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown
Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown
Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at deler.Main.getConnection(Main.java:2514)
at deler.Userguide.<init>(Userguide.java:42)
at deler.Main.userguideFrame(Main.java:2495)
at deler.Main.actionPerformed(Main.java:391)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: Failed to start database 'APPSYS_DATA',
see the next exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 43 more
Caused by: java.sql.SQLException: The log files on the master and slave are
not in synch for replicated database 'APPSYS_DATA'. The master log instant
is 1:347927, whereas the slave log instant is 1:347711. This is FATAL for
replication - replication will be stopped.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
... 40 more
Caused by: ERROR XRE05: The log files on the master and slave are not in
synch for replicated database 'APPSYS_DATA'. The master log instant is
1:347927, whereas the slave log instant is 1:347711. This is FATAL for
replication - replication will be stopped.
at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at
org.apache.derby.impl.store.replication.net.ReplicationMessageReceive.parseAndAckInstant(Unknown
Source)
at
org.apache.derby.impl.store.replication.net.ReplicationMessageReceive.initConnection(Unknown
Source)
at
org.apache.derby.impl.store.replication.slave.SlaveController.setupConnection(Unknown
Source)
at
org.apache.derby.impl.store.replication.slave.SlaveController.startSlave(Unknown
Source)
at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
Source)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
Source)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
Source)
at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
at org.apache.derby.impl.db.SlaveDatabase.bootBasicDatabase(Unknown
Source)
Ctlog is:1:
at org.apache.derby.impl.db.SlaveDatabase.access$000(Unknown Source)
at
org.apache.derby.impl.db.SlaveDatabase$SlaveDatabaseBootThread.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:619)
BUILD STOPPED (total time: 3 minutes 31 seconds)
So please help me out.
Regards
Suresh N.
Knut Anders Hatlen wrote:
>
> sureshnadaraj <[email protected]> writes:
>
>> I tried with replication feature in derby 10.4.2.0
>>
>> 1.I have freezed the DB
>>
>> 2.copied the Database to new location.
>>
>> 3.Started the slave mode by :
>> public String url =
>> "jdbc:derby:APPSYS_DATA;startSlave=true;slaveHost=localhost";
>> Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
>> con = DriverManager.getConnection(url, "sssv", "s123456");
>>
>> 4.And started the server by:
>> public String url =
>> "jdbc:derby:APPSYS_DATA;startMaster=true;slaveHost=localhost";
>> Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
>> con = DriverManager.getConnection(url, "sssv", "s123456");
>> But its not working properly.
>
> Hi Suresh,
>
> The steps you described above look correct to me. Could you give some
> more details about how it's not working properly?
>
> --
> Knut Anders
>
>
--
View this message in context:
http://www.nabble.com/Hai-to-All---need-a-help-tp23211230p23263929.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.