jdk 8 and setting JSP/JSTL variables crashing app

This topic contains 2 replies, has 3 voices, and was last updated by  trice001 1 year, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #513797 Reply

    mike nastav

    First, I searched thru the list of forum topics/posts and could not find this issue so I apologize in advance if this has already been covered. I am trying to upgrade a project from jdk 1.6 to jdk 1.8. I set the project level to 1.8 in the java compiler properties of the project. I then set the jboss 4 server to jdk 1.8. I know I need to upgrade jboss and it is next on our list but we are in a crunch because one of the interfaces we have to another app has forced us to 1.8 (ssl to tls version). For some reason now we get and error when hitting a c:set statement when setting a variable in our JSPs in JSTL. Ive looked all over for answers and most of the solutions seem to suggest that we need to roll back to 1.7 or earlier but that is not an option for us. Here is an example of the line that is being set as an error:

    <c:set var=”useChangeData” value=”1″ />

    Here is the error message on the screen via browser

    An error occurred at line: 75 in the jsp file: /jsp/createticket/CopyTicket.jsp
    Generated servlet error:
    The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files

    Here is what is in console and thus the log file:

    07:48:47,329 ERROR [Compiler] Compilation error
    at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:217)
    at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:211)
    at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:168)
    at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:75)
    at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:30)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:476)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.faultInReceiverType(Scope.java:155)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.java:1044)
    at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java:244)
    at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:215)
    at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:445)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:381)
    at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:137)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:359)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:921)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:970)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:273)…..

    Any help would be greatly appreciated. Like I said we are in a crunch and I can not understand what the issue may be regarding the classloader if I am using the same jdk for both the project and the server.

    #513934 Reply



    JBoss 4.x is an old version and might not work with the latest releases of Java, Java 8.
    Please refer to this thread : http://stackoverflow.com/questions/38399796/not-able-to-compile-jsp-files-in-jboss-5-1-with-java-1-8

    You can either upgrade to a recent version of JBoss server which is compatible with Java 8 or replace the jasper-jdt.jar with ecj-4.x.x.jar and check if it fixes the issue.

    Hope this helps. Please let us know how it works for you.

    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: jdk 8 and setting JSP/JSTL variables crashing app

You must be logged in to post in the forum log in