[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Slider Demo  XML
Forum Index -> Terracotta Platform
Author Message
Admin

master

Joined: 05/24/2006 12:45:08
Messages: 71
Offline

just started to look into TC-DSO and is trying to build and run the slider demo. I did follow the steps given in eclipse plugin DSO tutorial. But, when I try to run the demo, I get an exception when I run the second client as TC-DSO application. Not sure where exactly I went wrong...

Exception and config file details are as below and the code is same as the one in the DSO tutorial:

Exception in thread "main" java.lang.NullPointerException
at javax.swing.DefaultBoundedRangeModel.addChangeListener(Unknown Source)
at javax.swing.JSlider.setModel(Unknown Source)
at javax.swing.JSlider.<init>(Unknown Source)
at demo.Slider.<init>(Slider.java:18)
at demo.Slider.main(Slider.java:11)

<con:tc-config xmlns:con="http://www.terracottatech.com/config-v1">
<system>
<configuration-model>development</configuration-model>
<dso-enabled>true</dso-enabled>
<jdbc-enabled>false</jdbc-enabled>
</system>
<servers>
<server name="localhost">
<dso-port>9510</dso-port>
<jmx-port>9520</jmx-port>
<http-port>9515</http-port>
<data>terracotta/server-data</data>
<logs>terracotta/server-logs</logs>
</server>
</servers>
<clients>
<logs>terracotta/client-logs</logs>
</clients>
<application>
<dso>
<instrumented-classes>
<include>
<class-expression>demo.Slider</class-expression>
<honor-transient>false</honor-transient>
</include>
<include>
<class-expression>javax.swing.DefaultBoundedRangeModel</class-expression>
<honor-transient>false</honor-transient>
</include>
</instrumented-classes>
<additional-boot-jar-classes>
<include>javax.swing.DefaultBoundedRangeModel</include>
</additional-boot-jar-classes>
<roots>
<root>
<field-name>demo.Slider.rangeModel</field-name>
</root>
</roots>
<locks>
<named-lock>
<method-expression>void javax.swing.DefaultBoundedRangeModel.setRangeProperties(int, int, int, int, boolean)</method-expression>
<lock-name>NewLock</lock-name>
<lock-level>write</lock-level>
</named-lock>
</locks>
<distributed-methods>
<method-expression>void javax.swing.DefaultBoundedRangeModel.fireStateChanged()</method-expression>
</distributed-methods>
<transient-fields>
<field-name>javax.swing.DefaultBoundedRangeModel.listenerList</field-name>
</transient-fields>
</dso>
</application>
</con:tc-config>

Thanks in advance for any help!!!
Admin

master

Joined: 05/24/2006 12:45:08
Messages: 71
Offline

Hi. Very sorry about that - the tutorial is actually missing a critical step. We're working on getting a new version of it posted soon.

In the meantime, you can workaround it by simply editing this part of the configuration:

<include>
<class-expression>javax.swing.DefaultBoundedRangeModel</class-expression>
<honor-transient>false</honor-transient>
</include>

to be like this:

<include>
<class-expression>javax.swing.DefaultBoundedRangeModel</class-expression>
<honor-transient>true</honor-transient>
<call-constructor-on-load>true</call-constructor-on-load>
</include>

The short explanation that there are some listeners in the range model that are getting shared which should not be - setting <hone-transient> to true ensures that this happens.

As I say, we're fixing the tutorial to add the step that tells you to configure this. Sorry for confusion, and let me know if there's anything else I can do to help.

Cheers,
-p

_________________
Patrick Calahan
Director, Product Management
Terracotta, Inc.
Admin

master

Joined: 05/24/2006 12:45:08
Messages: 71
Offline

Hi Patrick,

Thank you for the update. I thought that I tried setting <honor-transient> to true before. Well, I did this again and it works now.

Thank You!!!
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team