You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Liangzhao Zeng <li...@gmail.com> on 2010/04/16 15:14:14 UTC

compiling error in GCInpector.java, cassandra 0.6

Hi,

I am using OS X 10.6.3 and Eclipse to compile the cassandra 0.6 code.
Everything is fine but GCInpector.java and it says:

Description    Resource    Path    Location    Type
Access restriction: The method getDuration() from the type GcInfo is not
accessible due to restriction on required library
/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/classes.jar    GCInspector.java
/cassandra-0.6/src/java/org/apache/cassandra/service    line 108    Java
Problem


Any idea?

Liangzhao

RE: compiling error in GCInpector.java, cassandra 0.6

Posted by Roger Schildmeijer <ro...@mashmobile.com>.
Right click on your project (alt-enter), pick properties. Expand "Java Compiler" -> "Errors/Warnings" and find "Forbidden reference (access rules):" under section "Deprecated and restricted API". Current value is probably "Error", edit that and choose an appropriate level

/Roger Schildmeijer

-----Original Message-----
From: Liangzhao Zeng [mailto:liangzhao.zeng@gmail.com] 
Sent: den 16 april 2010 15:14
To: CASSANDRA-DEVELOPER
Subject: compiling error in GCInpector.java, cassandra 0.6

Hi,

I am using OS X 10.6.3 and Eclipse to compile the cassandra 0.6 code.
Everything is fine but GCInpector.java and it says:

Description    Resource    Path    Location    Type
Access restriction: The method getDuration() from the type GcInfo is not
accessible due to restriction on required library
/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Classes/classes.jar    GCInspector.java
/cassandra-0.6/src/java/org/apache/cassandra/service    line 108    Java
Problem


Any idea?

Liangzhao

Re: compiling error in GCInpector.java, cassandra 0.6

Posted by Liangzhao Zeng <li...@gmail.com>.
Hi, Todd

It works. Thanks

Liangzhao

On Fri, Apr 16, 2010 at 11:37 AM, Todd Blose <th...@gmail.com>wrote:

> Hi Liangzhao,
>
> For some reason, Eclipse believes there are access restrictions imposed on
> that class. After doing some googling, it seems the most common solution is
> to simply reload the standard Java APIs. To do this:
>
> 1) go to your build path settings for your cassandra project in Eclipse,
> and
> under the libraries tab, select "JRE System Library" and click the "Remove"
> button 2) re-add the JRE System Library using "Add Library"
>
> If you refresh the project after doing that, the problem should go away.
>
> -- Todd
>
> On Fri, Apr 16, 2010 at 6:14 AM, Liangzhao Zeng <liangzhao.zeng@gmail.com
> >wrote:
>
> > Hi,
> >
> > I am using OS X 10.6.3 and Eclipse to compile the cassandra 0.6 code.
> > Everything is fine but GCInpector.java and it says:
> >
> > Description    Resource    Path    Location    Type
> > Access restriction: The method getDuration() from the type GcInfo is not
> > accessible due to restriction on required library
> > /System/Library/Frameworks/
> > JavaVM.framework/Versions/1.6.0/Classes/classes.jar    GCInspector.java
> > /cassandra-0.6/src/java/org/apache/cassandra/service    line 108    Java
> > Problem
> >
> >
> > Any idea?
> >
> > Liangzhao
> >
>

Re: compiling error in GCInpector.java, cassandra 0.6

Posted by Todd Blose <th...@gmail.com>.
Hi Liangzhao,

For some reason, Eclipse believes there are access restrictions imposed on
that class. After doing some googling, it seems the most common solution is
to simply reload the standard Java APIs. To do this:

1) go to your build path settings for your cassandra project in Eclipse, and
under the libraries tab, select "JRE System Library" and click the "Remove"
button 2) re-add the JRE System Library using "Add Library"

If you refresh the project after doing that, the problem should go away.

-- Todd

On Fri, Apr 16, 2010 at 6:14 AM, Liangzhao Zeng <li...@gmail.com>wrote:

> Hi,
>
> I am using OS X 10.6.3 and Eclipse to compile the cassandra 0.6 code.
> Everything is fine but GCInpector.java and it says:
>
> Description    Resource    Path    Location    Type
> Access restriction: The method getDuration() from the type GcInfo is not
> accessible due to restriction on required library
> /System/Library/Frameworks/
> JavaVM.framework/Versions/1.6.0/Classes/classes.jar    GCInspector.java
> /cassandra-0.6/src/java/org/apache/cassandra/service    line 108    Java
> Problem
>
>
> Any idea?
>
> Liangzhao
>