Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

19 Nov 2009

Access restriction error on Eclipse - type resouce not accessible

Mounting an old project on a fresh install of Eclipse I got a few errors regarding access restriction to some methods and types from Sun's java 6 library.


Description Resource Path Location Type
Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 43 Java Problem

Description Resource Path Location Type
Access restriction: The method encode(BufferedImage) from the type JPEGImageEncoder is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 45 Java Problem

Description Resource Path Location Type
Access restriction: The type JPEGCodec is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 16 Java Problem

Description Resource Path Location Type
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 17 Java Problem




This situation can be solved as follows:

1 - Goto to the Java Compiler section of the Project Properties dialog and then Errors and Warnings.
2 - Check Enable project specific settings
3 - Inside Deprecated and restricted API change the Forbidden reference (acess rule) to Warning or Ignore
Enhanced by Zemanta

9 Jul 2008

Error running Java applications in Centos 5

When trying to run a Java application on my Centos VE I got this error message:


#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002aaaaaab4112, pid=3715, tid=1075882304
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# C [ld-linux-x86-64.so.2+0x9112]
#
# An error report file with more information is saved as hs_err_pid3715.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted


To solve this error, related with some libraries we use prelink.

If it is not already installed we can install it like this:
# yum install prelink

And then we run prelink:
# /usr/sbin/prelink -amR