Error List

Error List for the ‘Java’ Category

JNI_CreateJavaVM always returns -1

Applies to:
JNI

Description:
Occurs while using JNI.

Cause:
Usually, the problem is that you moved or copied the jvm.dll file. The location of jvm.dll is important, it has to be in the directory /bin/classic. This jvm.dll finds the location of other DLLs relative to its current location. So if you move it, or Windows uses some other copy of jvm.dll, the JVM will not be able to find java.dll, for instance.

admin JAVA-JNI

Symbol makeJavaString not found

Applies to:
JNI

Description:
You have used a third party library (a JDBC driver, actually) that contained native code. When running Your application with this library, I’ve got an “UnsatisfiedLinkError: symbol makeJavaString not found.”

Cause:
The problem is that the native code in that third party library uses the old NMI.

admin JAVA-JNI

libthread loaded into green threads

Applies to:
Solaris, JNI

Description:
This error is produced if you
a. are running the green threads VM
b. did a System.loadLibrary(“foo”), and
c. libfoo.so was linked -lthread.

Cause:
Green threads and native threads don’t mix well and hence the check in the VM.

admin JAVA-JNI

You must install a Solaris patch to run the native threads version of the Java runtime. The green threads version will work without this patch. Please check the native threads release notes for more information. If you are embedding the VM in a native application, please make sure that the native application is linked with libthread.so (-lthread)." Exiting.

Applies to:
Solaris, JNI

Description:
Occurs when your application embedding the native threads VM is not linked against -lthread

Cause:
Your application embedding the native threads VM is not linked against -lthread

admin JAVA-JNI

Compiler can't find jni_md.h

Applies to:
JNI

Description:
Occurs while trying to compile an application

Cause:
You have not added all necessary folders to the include path of the compiler.

admin JAVA-JNI

IllegalStateException while using JSP

Applies to:
NA

Description:
Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.

Cause:
a. The most common cause of this exception is a servlet or JSP attempting to write to the output stream after the response has been committed.
b. Another way this can happen is by attempting to redirect from within the middle of a JSP page:

hello world

<%
if ("not logged in")
response.sendRedirect("login.jsp");
%>

more stuff

c. Another common place where an IllegalStateException is likely to occur is in a JSP that attempts to stream binary data. JSPs are primarily designed to format output as HTML. With HTML, white space characters are ignored. It is not uncommon for JSP compilers to inject their own white space charaters to the beginning and/or end of the output stream. Line breaks in the developer’s code can also be interpreted as white space in the output stream. These white space characters can interfer with the generated servlet’s ability to create and stream the binary outputdata, resulting in the IllegalStateException.

admin JAVA-JSP

Java Bean not found

Applies to:
NA

Description:
A common problem which occurs when the class loader cannot find beans that the pages reference.That usually results in an error message like “Class xxx cannot be resolved to a type”

Cause:
The class loader could not find beans that the pages referenced.

admin JAVA-JSP

EL Or JSTL Not Working As Expected

Applies to:
NA

Description:
Occurs while using EL or JSTL in JSP.

Cause:
Configuration mismatch between the version of JSP that you are using, the version of the JSTL that you employ, and how you have declared your web application in the deployment descriptor (web.xml).

admin JAVA-JSP

Resource Url Problems

Applies to:
NA

Description:
A common issue is the problem where the external resources for a page, to include images, style sheets and script files, do not load.

Cause:
his problem is frequently caused by using page-relative URLs to these resources.
Within a static web site, the URL to HTML files is formed from the file path to that page. Within a dynamic web application, this is no longer the case; the URLs are usually formed from mappings within the deployment descriptor (web.xml).

Thus, a URL such as

http://some.server.com/command/doSomething

does not reference any particular folder on the file system. Rather, it is referencing a servlet mapped within the deployment descriptor.
When you forward to a JSP from this servlet, the URL remains the same and the browser has no way of knowing that the URL does not reference a folder. And it certainly has no way of knowing in which folder the JSP resides.
Thus, if you use page-relative URLs in the JSP, the browser tries to use the servlet mapping to resolve the path to the file, and of course, that fails.

admin JAVA-JSP

does not work: the files never get deleted

Applies to:
Ant

Description:
Occurs while using Apache Ant.

Cause:
You have used a task to delete unwanted SourceSafe control files (CVS files, editor backup files, etc.)

admin JAVA-Tools