You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Jeremy Hughes (JIRA)" <ji...@apache.org> on 2013/04/30 23:34:15 UTC

[jira] [Commented] (ARIES-1060) Twitter sample compilation fails with Java 7 SDK

    [ https://issues.apache.org/jira/browse/ARIES-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646011#comment-13646011 ] 

Jeremy Hughes commented on ARIES-1060:
--------------------------------------

The first [ERROR] line is a maven-compiler-plugin error complaining it can't parse a Java compiler error. That compiler error is new for Java 7. Here's some detail on the Oracle site:

https://blogs.oracle.com/darcy/entry/bootclasspath_older_source

It's true that we haven't set the -Xbootclasspath for a Java 1.5 JDK so it's perfectly reasonable that it's complaining a that. What doesn't make sense to me at the moment is the incompatible types error.

I stumbled upon a fix though when I noticed that we were calling result.getTweets() twice:

{code}
Index: src/main/java/org/apache/aries/sample/twitter/TwitterQuery.java
===================================================================
--- src/main/java/org/apache/aries/sample/twitter/TwitterQuery.java     (revision 1465654)
+++ src/main/java/org/apache/aries/sample/twitter/TwitterQuery.java     (working copy)
@@ -42,7 +42,7 @@
                        QueryResult result = twitter.search(query);
                    List<Tweet> tweets = result.getTweets();
                    System.out.println("hits:" + tweets.size());
-                   for (Tweet tweet : result.getTweets()) {
+                   for (Tweet tweet : tweets) {
                        System.out.println(tweet.getFromUser() + ":" + StringEscapeUtils.unescapeXml(tweet.getText()));
                    }
                } catch (Exception e) {
{code}
                
> Twitter sample compilation fails with Java 7 SDK
> ------------------------------------------------
>
>                 Key: ARIES-1060
>                 URL: https://issues.apache.org/jira/browse/ARIES-1060
>             Project: Aries
>          Issue Type: Bug
>          Components: Samples
>            Reporter: Jeremy Hughes
>            Assignee: Jeremy Hughes
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project org.apache.aries.samples.twitter.bundle: Compilation failure
> [ERROR] could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.5
> [ERROR] C:\inst\cygwin\home\hughesj\oss\aries-trunk\samples\twitter\twitter-bundle\src\main\java\org\apache\aries\sample\twitter\TwitterQuery.java:45: error: incompatible types
> [ERROR] for (Tweet tweet : result.getTweets()) {
> [ERROR] ^
> [ERROR] -> [Help 1]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira