Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Java-Version of WAR product
Java-Version of WAR product [message #929099] Mon, 01 October 2012 08:10 Go to next message
S. SchulzFriend
Messages: 72
Registered: September 2011
Member
Hi everyone!

I've got a problem concerning the creation of a WAR. I created it using a warproduct-file, but when I deploy it, I get the following message:

java.lang.Error: Unresolved compilation problem: 
	'<>' operator is not allowed for source level below 1.7


I took a look at the class-file with the error, and instead of compiled code it just contains the stack trace of above exception. Then I checked the plug-in in question: Both the build path and the manifest state it's a Java 7 project.

So my question is: Why would the WAR product export wizard assume the project to be anything other than a Java 7 project? How do I change it? And is there a way to tell the export wizard to just show an error message and stop exporting when a error like this happens, instead of ignoring it?

Thanks in advance,

S. Schulz
Re: Java-Version of WAR product [message #931521 is a reply to message #929099] Wed, 03 October 2012 09:26 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
check your project properties - "Java Compiler" settings. What are your
"JDK Compliance" settings?
Best,
Ivan

On 10/1/2012 11:10 AM, S. Schulz wrote:
> Hi everyone!
>
> I've got a problem concerning the creation of a WAR. I created it
> using a warproduct-file, but when I deploy it, I get the following
> message:
>
> java.lang.Error: Unresolved compilation problem: '<>' operator is
> not allowed for source level below 1.7
>
> I took a look at the class-file with the error, and instead of
> compiled code it just contains the stack trace of above exception.
> Then I checked the plug-in in question: Both the build path and the
> manifest state it's a Java 7 project.
> So my question is: Why would the WAR product export wizard assume the
> project to be anything other than a Java 7 project? How do I change
> it? And is there a way to tell the export wizard to just show an error
> message and stop exporting when a error like this happens, instead of
> ignoring it?
>
> Thanks in advance,
>
> S. Schulz

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Java-Version of WAR product [message #932450 is a reply to message #931521] Thu, 04 October 2012 05:43 Go to previous messageGo to next message
S. SchulzFriend
Messages: 72
Registered: September 2011
Member
"Use compliance from execution environment on the 'Java Build Path'", so it's Java 7, too.
Re: Java-Version of WAR product [message #933643 is a reply to message #932450] Fri, 05 October 2012 07:43 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

One more thing to check: In the Package Explorer, your project has an
entry named "JRE System Library". Does this entry also show "JavaSE-1.7"?

When you export your project from the IDE (File > Export > Deployable
plug-ins and fragments), does this use the correct compiler level? I'm
not even sure if PDE/build supports Java 1.7, see [1].

[1]
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Java-Version of WAR product [message #933664 is a reply to message #933643] Fri, 05 October 2012 08:14 Go to previous messageGo to next message
S. SchulzFriend
Messages: 72
Registered: September 2011
Member
> Does this entry also show "JavaSE-1.7"?

Yes, it does.

> When you export your project from the IDE, does this use the correct compiler level?

No, it doesn't either.

> I'm not even sure if PDE/build supports Java 1.7

You're kidding, right? How could Eclipse itself not support the entire build process for its very own framework?

(And I read the link, but don't know what you think is relevant to the problem.)
Re: Java-Version of WAR product [message #934125 is a reply to message #933664] Fri, 05 October 2012 17:26 Go to previous messageGo to next message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

I verified that PDE and the WAR Product Tooling are able to build plugins using Java 7 source.

I think you are probably missing the OSGi Execution Environment. Open the plugin's manifest editor and verify that JavaSE-1.7 is listed under Execution Environments like this:
index.php/fa/11760/0/

With JavaSE-1.7 listed there it was able to build properly, but when I removed it the build failed with the same error you described.

Hope that helps,

Cole
Re: Java-Version of WAR product [message #936576 is a reply to message #934125] Mon, 08 October 2012 05:51 Go to previous messageGo to next message
S. SchulzFriend
Messages: 72
Registered: September 2011
Member
> I think you are probably missing the OSGi Execution Environment.

No, as I said above the manifest contains the right Java version. It's funny, even the MANIFEST.MF inside the plug-ins inside the WAR still says "JavaSE-1.7", but the classes using actual Java 7 code are not compiled correctly.
Re: Java-Version of WAR product [message #936674 is a reply to message #933664] Mon, 08 October 2012 08:03 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

>> When you export your project from the IDE, does this use the correct
>> compiler level?
>
> No, it doesn't either.

Then it's not a WAR products but a PDE issue. Maybe you should ask for
help in the PDE forum.

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Run RAP application on Websphere 8.5 (including workbench)
Next Topic:IE Job Queue Error with RAP 1.4.2
Goto Forum:
  


Current Time: Fri Mar 29 07:08:32 GMT 2024

Powered by FUDForum. Page generated in 0.04110 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top