Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: thread support

0 views
Skip to first unread message

Jason Helfman

unread,
Jun 19, 2013, 8:03:15 PM6/19/13
to
On Wed, Jun 19, 2013 at 5:02 PM, Jason Helfman <j...@freebsd.org> wrote:

> Hi,
>
> I have a new port that I am maintaining, and I wanted to try a feature of
> it, but get the following error:
>
> Exception in thread "main" java.lang.UnsupportedOperationException: Thread
> CPU Time Measurement is not supported.
>
> Any thoughts/ideas on this?
>
> Thanks!
> -jgh
>
> --
> Jason Helfman | FreeBSD Committer
> j...@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve
>

I am using openjdk6.

-jgh
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java...@freebsd.org"

Jason Helfman

unread,
Jun 19, 2013, 8:02:15 PM6/19/13
to
Hi,

I have a new port that I am maintaining, and I wanted to try a feature of
it, but get the following error:

Exception in thread "main" java.lang.UnsupportedOperationException: Thread
CPU Time Measurement is not supported.

Any thoughts/ideas on this?

Thanks!
-jgh

--
Jason Helfman | FreeBSD Committer
j...@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve

Ronald Klop

unread,
Jun 20, 2013, 3:25:34 AM6/20/13
to
On Thu, 20 Jun 2013 02:03:15 +0200, Jason Helfman <j...@freebsd.org> wrote:

> On Wed, Jun 19, 2013 at 5:02 PM, Jason Helfman <j...@freebsd.org> wrote:
>
>> Hi,
>>
>> I have a new port that I am maintaining, and I wanted to try a feature
>> of
>> it, but get the following error:
>>
>> Exception in thread "main" java.lang.UnsupportedOperationException:
>> Thread
>> CPU Time Measurement is not supported.
>>
>> Any thoughts/ideas on this?
>>
>> Thanks!
>> -jgh
>>
>> --
>> Jason Helfman | FreeBSD Committer
>> j...@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to
>> Serve
>>
>
> I am using openjdk6.
>
> -jgh


Do you have the complete stacktrace?

Ronald.

Jason Helfman

unread,
Jun 20, 2013, 4:06:25 AM6/20/13
to
On Thu, Jun 20, 2013 at 12:25 AM, Ronald Klop
<ronald-...@klop.yi.org>wrote:

> On Thu, 20 Jun 2013 02:03:15 +0200, Jason Helfman <j...@freebsd.org> wrote:
>
> On Wed, Jun 19, 2013 at 5:02 PM, Jason Helfman <j...@freebsd.org> wrote:
>>
>> Hi,
>>>
>>> I have a new port that I am maintaining, and I wanted to try a feature of
>>> it, but get the following error:
>>>
>>> Exception in thread "main" java.lang.**UnsupportedOperationException:
>>> Thread
>>> CPU Time Measurement is not supported.
>>>
>>> Any thoughts/ideas on this?
>>>
>>> Thanks!
>>> -jgh
>>>
>>> --
>>> Jason Helfman | FreeBSD Committer
>>> j...@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to
>>> Serve
>>>
>>>
>> I am using openjdk6.
>>
>> -jgh
>>
>
>
> Do you have the complete stacktrace?
>
> Ronald.
>
>
Exception in thread "main" java.lang.UnsupportedOperationException:
Thread CPU Time Measurement is not supported.
at sun.management.ThreadImpl.getThreadCpuTime(ThreadImpl.java:214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:180)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:114)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:51)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:226)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:251)
at javax.management.StandardMBean.invoke(StandardMBean.java:405)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1475)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1316)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:838)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:679)

-jgh

--
Jason Helfman | FreeBSD Committer
j...@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve

Ronald Klop

unread,
Jun 20, 2013, 4:18:51 AM6/20/13
to
I already expected JMX was in it. I'm not a developer of the jdk ports for
FreeBSD, but not all JMX interfaces are implemented. (They are not used
that often. I think mostly in development tools, like debuggers/profilers.)
You could try implementing sun.management.ThreadImpl.getThreadCpuTime.
Maybe first a dummy one which always returns the same value to get your
port going.
If it is implemented in openjdk7 it might be easy to copy to openjdk6.

Maybe other people on the list can help you more with the internals of
openjdk.

Regards,
Ronald.
0 new messages