Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java and OPC Problem  RSS feed

 
Akhilesh Sharma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,

i m creating a Desktop Application using the Javafish API which connects to the OPC Server and reads data from it.
i stuck in a problem.
The problem is as follows:
i added the functionality to delete and add groups and items. For reading successfully from the server it is necessary that the groups and items should be registered. without deleting any thing if i start reading it works fine. But if i delete the group and re add the group by the same name it throws an exception that Unable to add group to the OPC Server.
the code is as follows please help me out



The code for the registering groups is like this:-



the exceptions is thrown at the line indicated by line marked bold....

the exception is as follows

javafish.clients.opc.exception.UnableAddGroupException: Unable to register group to server: g1
at javafish.clients.opc.JOpc.registerGroup(JOpc.java:247)
at core.register.RegisterGroupAndItems.registerClientGroups(RegisterGroupAndItems.java:73)
at core.register.RegisterGroupAndItems.<init>(RegisterGroupAndItems.java:43)
at application.componentsdisplay.toolbar.ToolBar.startButtonActionPerformed(ToolBar.java:195)
at application.componentsdisplay.toolbar.ToolBar$3.actionPerformed(ToolBar.java:103)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Can any one help me out of this problem.

[ Edited to use code tags - Paul Sturrock ]

[ September 15, 2008: Message edited by: Paul Sturrock ]
[ September 15, 2008: Message edited by: Bear Bibeault ]
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Codemaster Gabriel" please read the important administrative private message I have just sent you.

CR
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!