• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

only available if source level is 5.0

 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got this error deploying a JSP that has a for:each loop in it to the WebSphere 6.1 test environment using IRAD.

Syntax error, 'for each' statements are only available if source level is 5.0

The JSP compiles fine in the development environment, so I'm guessing it's a WebSphere 6.1 Applicatoin Server problem, not an IRAD issue, even if it is the test environment.

I googled and got a few suggestions to change the Compiler Preferences of the Java project to 5.0, but I've done that. It seems to apply to the project inside of IRAD, but not the deployed server environment. How do I cange the WebSphere Server to recognize the 5.0 syntax features.

Darn thing works just fine on Tomcat 5.5 installed on the same machine. Sheesh. IBM - making easy things difficult! I'm sure this will all be fixed when WebSphere 7 comes out.

-Cameron
 
author & internet detective
Posts: 42103
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Cameron McKenzie:
How do I change the WebSphere Server to recognize the 5.0 syntax features.


You don't. As far as I know, there isn't any supported way of changing the server version of Java.
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanna, I'm so ashamed that you've taken me for someone asking how to yank out one JVM and replace it with another on a given WebSphere Application Server.

My curiosity was the fact that it was my understanding that WebSphere 6.1 DID run Java 1.5. I mean, wasn't that the whole idea of coming out with WebSphere 6.1? To hep bridge between 6.0, and WebSphere 7.0, which will likely never actually be released?

Here are the system requirements for the WebSphere Application Server 6.1, which I found here:

WebSphere Application Server 6.1 System Requirments - Java Runtime JVM Version

And it states:


Java�
The WebSphere-supplied Java 2 SDK is required for both the run time and any remote Java clients

* (+) IBM 32-bit SDK for Windows, Java 2 Technology Edition, V5.0 SR2 - that means JVM 1.5, right?



Of course, I have IRAD 7 installed, and I am using the WebSphere 6.1 runtime environment, as the WebSphere 7.0 runtime environment wasn't an installation options . When I start up my server, here's the output I get, indicating that indeed, the server is using Java 5:


************ Start Display Current Environment ************
WebSphere Platform 6.1 [BASE 6.1.0.2 cf20633.22] running with process name Node01Cell\Node01\server1 and process id 3340
Host Operating System is Windows XP, version 5.1 build 2600 Service Pack 2
Java version = J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20060504 (JIT enabled)
J9VM - 20060501_06428_lHdSMR
JIT - 20060428_1800_r8
GC - 20060501_AA, Java Compiler = j9jit23, Java VM name = IBM J9 VM
was.install.root = D:\Program Files\IBM\SDP70\runtimes\base_v61
user.install.root = D:\Program Files\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01
Java Home = D:\Program Files\IBM\SDP70\runtimes\base_v61\java\jre
Java Library path =
D:\Program Files\IBM\SDP70\runtimes\base_v61\java\jre\bin;




See, it looks an awful lot like I'm actually using a 1.5 JVM for my runtime, wouldn't you think?

So, still, when I deploy my JSPs that have a for:each loop in them, I get this crazy error that says Syntax error, 'for each' statements are only available if source level is 5.0? And what does that mean anyways?

SOURCE LEVEL?


What is a source level? That's not the JVM level? The compiler level (as it's in a JSP, which must be compiled). Did I not use a JSP editor that was up to the standards of the deployment environment? Seriously, what the heck are they talking about when they talk about the source level?

So, I'm really thinking that maybe a WAR file or an EAR file, or even worse, an IBM extension file, states a certain version to use, and somehow cripples the JVM if it's actually running at a higher version.

Anyways, there's alot to digest here. More than anything, I'm trying to rant out my thoughts and make sure I'm not thinking crazy like.

-Cameron

[ November 26, 2007: Message edited by: Cameron McKenzie ]
[ November 26, 2007: Message edited by: Cameron McKenzie ]
 
Jeanne Boyarsky
author & internet detective
Posts: 42103
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cameron,
You actually knew more than me on this front. I hadn't realized 6.1 supported Java 5.
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, there's a few things I'm doing that are quite interesting, and they might be helping me through some of my problems.

In IRAD, you can set a JDK compliance level, up to Java 6! Man, does that ever stir the pot. So, before creating any war files in RSA, I'm setting the complicance level to 1.5

Windows --> Preferences

+Java
++Compiler Compiler Compliance Level: 5.0

Then, when I create a J2EE project, or more specifically, a web project, I edit the project facets at creation time. The change doesn't seem to apply if you make the change after you have created the project. But in Project Facets, where you can add things like Faces or Struts support, you can set the Java level. The default is 1.4, but if you click on the number, a hidden drop down box appears that allows you to set it to 1.3 or 1.5. I set mine to 1.5.

From there, it seems some of my troubles have disappeared. I haven't made any changes to the server configuration in RSA/IRAD, but the code seems to compile.

I will continue to test and see.

Happy WebSphere!

-Cameron McKenzie
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According IBM's documentation, the JSP's engine in
was 6.1 works with java 1.5 if you setting the
parameter jdkSourceLevel to 15 in the file: Web-INF/ibm-Web-ext.xmi

All the details in:

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rweb_jspengine.html
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tweb_jspengine.html

I hope that this information was enougth.

Quito - Ecuador
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

To hep bridge between 6.0, and WebSphere 7.0, which will likely never actually be released?


That's actually good news never any WS upgrade projects anymore! Are you sure?
 
jeroen dijkmeijer
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

To hep bridge between 6.0, and WebSphere 7.0, which will likely never actually be released?


That's actually good news never any WS upgrade projects anymore! Are you sure?
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic