Exception problem in application with Deuce

84 views
Skip to first unread message

Carmelo Polito

unread,
Apr 27, 2011, 8:17:57 AM4/27/11
to Deuce-STM developers
Hi,
I'm developing an application with Deuce-1.3 for Transactional
Mechanisms,
When i try to run it, it throws to me the following Exceptions:

Exception in thread "Thread-4" java.lang.NoSuchMethodError:
javax.swing.JTextArea.getText(Lorg/deuce/transaction/Context;)Ljava/
lang/String;
at ResMapMonitor.print(ResMapMonitor.java:25)
at
TransactionalMonitoring.TMonitoring(TransactionalMonitoring.java:24)
at
TransactionalMonitoring.TMonitoring(TransactionalMonitoring.java)
at RMonitoring.run(RMonitoring.java:29)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-7" java.lang.NoSuchMethodError:
javax.swing.JTextArea.getText(Lorg/deuce/transaction/Context;)Ljava/
lang/String;
at Monitor.setDisplay(Monitor.java:27)
at User.setDisplay(User.java:29)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java:
21)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java)
at GetAndRelease.GetAndRelease(GetAndRelease.java:25)
at UserHandler.run(UserHandler.java:31)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-5" java.lang.NoSuchMethodError:
javax.swing.JTextArea.getText(Lorg/deuce/transaction/Context;)Ljava/
lang/String;
at Monitor.setDisplay(Monitor.java:27)
at User.setDisplay(User.java:29)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java:
21)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java)
at GetAndRelease.GetAndRelease(GetAndRelease.java:25)
at UserHandler.run(UserHandler.java:31)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-6" java.lang.NoSuchMethodError:
javax.swing.JTextArea.getText(Lorg/deuce/transaction/Context;)Ljava/
lang/String;
at Monitor.setDisplay(Monitor.java:27)
at User.setDisplay(User.java:29)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java:
21)
at
TransactionalReleaseR.TransactionalReleaseR(TransactionalReleaseR.java)
at GetAndRelease.GetAndRelease(GetAndRelease.java:25)
at UserHandler.run(UserHandler.java:31)
at java.lang.Thread.run(Thread.java:619)


Can you tell me what am i doing wrong?Seems that cannot found getText
method in javax.swing library.
Sorry for my poor English.
Thanks for your attention.

Guy Korland

unread,
Apr 27, 2011, 3:50:51 PM4/27/11
to deuce-stm-...@googlegroups.com
It seems like your transaction spans over  JTextArea which is part of the JDK.
You should run offline instrumentation on the JDK jar (e.g. rt.jar)
See: http://www.deucestm.org/documentation/getting-started


Regards,
Guy Korland



--
You received this message because you are subscribed to the Google Groups "Deuce-STM developers" group.
To post to this group, send email to deuce-stm-...@googlegroups.com.
To unsubscribe from this group, send email to deuce-stm-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/deuce-stm-developers?hl=en.


Carmelo Polito

unread,
Apr 27, 2011, 4:50:34 PM4/27/11
to Deuce-STM developers
I've build an instrumented rt.jar by launching :

java -jar deuceAgent-1.3.0.jar rt.jar rtinstrumented.jar


So how can i use the instrumented rt?

Thanks

On 27 Apr, 21:50, Guy Korland <gkorl...@gmail.com> wrote:
> It seems like your transaction spans over  JTextArea which is part of the
> JDK.
> You should run offline instrumentation on the JDK jar (e.g. rt.jar)
> See:http://www.deucestm.org/documentation/getting-started
>
> Regards,
> Guy Korland
>

Guy Korland

unread,
Apr 27, 2011, 5:12:04 PM4/27/11
to deuce-stm-...@googlegroups.com
You need to set the new jar in your bootclasspath.

Guy

Carmelo Polito

unread,
Apr 27, 2011, 5:45:10 PM4/27/11
to Deuce-STM developers
It is still not working,
I've obtained the same exceptions by launching

java -Xbootclasspath/a:rt_deuce.jar -javaagent:deuceAgent.jar Main

is there something wrong with this?


On 27 Apr, 23:12, Guy Korland <gkorl...@gmail.com> wrote:
> You need to set the new jar in your bootclasspath.
>
> Guy
>
> On Wed, Apr 27, 2011 at 11:50 PM, Carmelo Polito
> <polito.carm...@libero.it>wrote:

Guy Korland

unread,
Apr 28, 2011, 12:50:38 AM4/28/11
to deuce-stm-...@googlegroups.com
You should use: -Xbootclasspath/p:rt_deuce.jar

Carmelo Polito

unread,
Apr 28, 2011, 2:52:05 AM4/28/11
to Deuce-STM developers
it throws to me this exception now:

-Xbootclasspath/p:rt_deuce.jar -javaagent:deuceAgent.jar Main

Exception in thread "main" java.lang.NoClassDefFoundError: org/deuce/
transaction/Context
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getMethod0(Class.java:2670)
at java.lang.Class.getMethod(Class.java:1603)
at javax.swing.UIDefaults.getUI(UIDefaults.java:749)
at javax.swing.UIManager.getUI(UIManager.java:989)
at javax.swing.JOptionPane.updateUI(JOptionPane.java:1859)
at javax.swing.JOptionPane.<init>(JOptionPane.java:1822)
at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:552)
at javax.swing.JOptionPane.showInputDialog(JOptionPane.java:508)
at UserHandler.<init>(UserHandler.java:19)
at Main.main(Main.java:18)

Seem that JOption component is the problem now.

On 28 Apr, 06:50, Guy Korland <gkorl...@gmail.com> wrote:
> You should use: -Xbootclasspath/p:rt_deuce.jar
>
> On Thu, Apr 28, 2011 at 12:45 AM, Carmelo Polito
> <polito.carm...@libero.it>wrote:
> > To post to this group, send email to deuce-stm-...@googlegroups.com

Carmelo Polito

unread,
Apr 28, 2011, 3:01:40 AM4/28/11
to Deuce-STM developers
If i remove the JOptionPane component in my application, It gives to
me the same exception on another JFrame component:


java -Xbootclasspath/p:rt_deuce.jar -javaagent:deuceAgent.jar Main


Exception in thread "main" java.lang.NoClassDefFoundError: org/deuce/
transaction/Context
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getMethod0(Class.java:2670)
at java.lang.Class.getMethod(Class.java:1603)
at javax.swing.UIDefaults.getUI(UIDefaults.java:749)
at javax.swing.UIManager.getUI(UIManager.java:989)
at javax.swing.JPanel.updateUI(JPanel.java:109)
at javax.swing.JPanel.<init>(JPanel.java:69)
at javax.swing.JPanel.<init>(JPanel.java:92)
at javax.swing.JPanel.<init>(JPanel.java:100)
at javax.swing.JRootPane.createGlassPane(JRootPane.java:528)
at javax.swing.JRootPane.<init>(JRootPane.java:348)
at javax.swing.JFrame.createRootPane(JFrame.java:255)
at javax.swing.JFrame.frameInit(JFrame.java:236)
at javax.swing.JFrame.<init>(JFrame.java:159)
at Monitor.<init>(Monitor.java:21)
at User.<init>(User.java:23)
at UserHandler.<init>(UserHandler.java:22)
at Main.main(Main.java:18)

Carmelo Polito

unread,
Apr 28, 2011, 9:41:41 AM4/28/11
to Deuce-STM developers
i found a solution and it works now,
i've just extracted the deuceAgent in my project main folder and then
i run it by the command:

java -Xbootclasspath/p:. -javaagent:deuceAgent.jar Main

Thank you for helping.

Regards

Guy Korland

unread,
Apr 28, 2011, 10:39:09 AM4/28/11
to deuce-stm-...@googlegroups.com
Try add "deuceAgent.jar" also to the bootclasspath.

Trevor Brown

unread,
Aug 14, 2013, 4:06:42 AM8/14/13
to deuce-stm-...@googlegroups.com
Thanks for this last suggestion.  It helped me get a working offline-instrumented jar.  The "solution" Carmelo settled for is still an online instrumentation, which is worthless for benchmarking.

> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/deuce-stm-developers?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Deuce-STM developers" group.
> > > > To post to this group, send email to
> > deuce-stm-...@googlegroups.com
> > > > .
> > > > To unsubscribe from this group, send email to

> > > > For more options, visit this group at
> > > >http://groups.google.com/group/deuce-stm-developers?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Deuce-STM developers" group.
> > To post to this group, send email to deuce-stm-...@googlegroups.com
> > .
> > To unsubscribe from this group, send email to

> > For more options, visit this group at
> >http://groups.google.com/group/deuce-stm-developers?hl=en.

--
You received this message because you are subscribed to the Google Groups "Deuce-STM developers" group.
To post to this group, send email to deuce-stm-...@googlegroups.com.
To unsubscribe from this group, send email to deuce-stm-developers+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages