New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Access Static Fields of Interfaces #110

Closed
fribeiro1 opened this Issue Mar 24, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@fribeiro1

fribeiro1 commented Mar 24, 2014

When I try to access the AUTO_ACKNOWLEDGE static field of the javax.jms.Session interface, for example, I get the following error:

java.lang.IllegalArgumentException: not invocable, no method type

@lance

This comment has been minimized.

Show comment
Hide comment
@lance

lance Mar 25, 2014

Member

Hi @fribeiro1

You need to set the classpath so that javax.jms.Session is available. You can now do this from within JS by pushing onto the dynjs classpath. Example:

$ ./bin/dynjs --console
dynjs console.
Type exit and press ENTER to leave.
dynjs> dynjs.classpath
[]
dynjs> dynjs.classpath.push('/some/path/lib.jar')
undefined
dynjs> dynjs.classpath
[file:/some/path/lib.jar]
dynjs> ^D

I'm going to close this, as it's not a bug. Accessing static fields of interfaces works just fine.

Thanks,
Lance

Member

lance commented Mar 25, 2014

Hi @fribeiro1

You need to set the classpath so that javax.jms.Session is available. You can now do this from within JS by pushing onto the dynjs classpath. Example:

$ ./bin/dynjs --console
dynjs console.
Type exit and press ENTER to leave.
dynjs> dynjs.classpath
[]
dynjs> dynjs.classpath.push('/some/path/lib.jar')
undefined
dynjs> dynjs.classpath
[file:/some/path/lib.jar]
dynjs> ^D

I'm going to close this, as it's not a bug. Accessing static fields of interfaces works just fine.

Thanks,
Lance

@lance lance closed this Mar 25, 2014

@fribeiro1

This comment has been minimized.

Show comment
Hide comment
@fribeiro1

fribeiro1 Mar 26, 2014

Actually I have re-verified the issue on CentOS and OpenJDK 7, and found that upgrading to Oracle JDK 8 fixes it - good enough at this time.

fribeiro1 commented Mar 26, 2014

Actually I have re-verified the issue on CentOS and OpenJDK 7, and found that upgrading to Oracle JDK 8 fixes it - good enough at this time.

@lance

This comment has been minimized.

Show comment
Hide comment
@lance

lance Mar 26, 2014

Member

Ah yes, that makes sense. I should have also asked what JDK you were using. Can you give me the specific Java 7 version you were using?

On Mar 26, 2014, at 10:48 AM, Fernando Ribeiro notifications@github.com wrote:

Actually I have re-verified the issue on CentOS and OpenJDK 7, and found that upgrading to Oracle JDK 8 fixes it - good enough at this time.


Reply to this email directly or view it on GitHub.

Member

lance commented Mar 26, 2014

Ah yes, that makes sense. I should have also asked what JDK you were using. Can you give me the specific Java 7 version you were using?

On Mar 26, 2014, at 10:48 AM, Fernando Ribeiro notifications@github.com wrote:

Actually I have re-verified the issue on CentOS and OpenJDK 7, and found that upgrading to Oracle JDK 8 fixes it - good enough at this time.


Reply to this email directly or view it on GitHub.

@fribeiro1

This comment has been minimized.

Show comment
Hide comment
@fribeiro1

fribeiro1 Mar 26, 2014

Sure, here it goes:

[root@localhost ~]# java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

fribeiro1 commented Mar 26, 2014

Sure, here it goes:

[root@localhost ~]# java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

@lance lance added this to the 0.2.3 milestone Mar 26, 2014

@lance lance added Bug labels Mar 26, 2014

@lance

This comment has been minimized.

Show comment
Hide comment
@lance

lance Mar 26, 2014

Member

I'm going to reopen this since we are still seeing this problem on Java 7 (and our builds are now failing).

Member

lance commented Mar 26, 2014

I'm going to reopen this since we are still seeing this problem on Java 7 (and our builds are now failing).

@lance lance reopened this Mar 26, 2014

@qmx

This comment has been minimized.

Show comment
Hide comment
@qmx

qmx Mar 26, 2014

Member

fixed at afd389c

Member

qmx commented Mar 26, 2014

fixed at afd389c

@qmx qmx closed this Mar 26, 2014

@fribeiro1

This comment has been minimized.

Show comment
Hide comment
@fribeiro1

fribeiro1 commented Mar 27, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment