Developing Bugs
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Developing Bugs
by friarsol » 21 Jun 2013, 17:17
I just had this on my desktop machine this morning. It was because the wrong version of Java was being used by Eclipse. I forget where I ended up tracking it down, but there should be a preference somewhere that needs to be flipped from 1.6 to 1.7.Chris H. wrote:I updated to the head version 22193 and Forge will not build as there are three errors:
- Code: Select all
Cannot instantiate the type ArrayList<?> ChangeTargetsEffect.java /ForgeSVN/src/main/java/forge/card/ability/effects line 54 Java Problem
Syntax error on token "<", ? expected after this token ChangeTargetsEffect.java /ForgeSVN/src/main/java/forge/card/ability/effects line 54 Java Problem
Type mismatch: cannot convert from ArrayList<?> to List<Pair<SpellAbilityStackInstance,ITargetable>> ChangeTargetsEffect.java /ForgeSVN/src/main/java/forge/card/ability/effects line 54 Java Problem
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Developing Bugs
by Chris H. » 21 Jun 2013, 18:01
friarsol wrote:I just had this on my desktop machine this morning. It was because the wrong version of Java was being used by Eclipse. I forget where I ended up tracking it down, but there should be a preference somewhere that needs to be flipped from 1.6 to 1.7.
Hmm.
Project -> Properties -> Java Compiler shows
Use compliance from execution environment 'JavaSE-1.7' on the 'Java Build Path'
Preferences -> Java -> Compiler still shows
'JavaSE-1.6'
and I am unable to change this to show 'JavaSE-1.7'
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Developing Bugs
by Max mtg » 21 Jun 2013, 18:50
Sol, the switch you mean is about there:
Chris, Window - preferences - Java - Installed JREs.
Can you add your 1.7 installation there?
- Code: Select all
Index: A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs (revision 22193)
+++ A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs (working copy)
@@ -1,16 +1,101 @@
-#Wed Jul 27 18:40:11 EDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
Chris, Window - preferences - Java - Installed JREs.
Can you add your 1.7 installation there?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Chris H. » 21 Jun 2013, 19:53
Max mtg wrote:Sol, the switch you mean is about there:(I have removed lots of other irrelevant lines added by my eclipse)
- Code: Select all
Index: A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs (revision 22193)
+++ A:/mtg/forge/trunk/.settings/org.eclipse.jdt.core.prefs (working copy)
@@ -1,16 +1,101 @@
-#Wed Jul 27 18:40:11 EDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
Chris, Window - preferences - Java - Installed JREs.
Can you add your 1.7 installation there?
The first thing that I did was to add the java 7 to my installed JREs and watched as the list populated.
Your settings edits took care of the three errors that I noticed. Thank you.
I think that the only other thing that I need to figure out is how to update my old version of Eclipse to the newest as that will probably add Java 7 Prefs -> Complier Compliance level listing ...
Wow, wait a minute. the changes that I made to the settings has now added the Java 1.7 to the list.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Developing Bugs
by Chris H. » 21 Jun 2013, 19:58
Eclipse now has two files that are different from our SVN and wants to merge my changes.
org.eclipse.jdt.core.prefs
.classpath
Should these two files be changed on our SVN to reflect that we all are now using Java 7?
org.eclipse.jdt.core.prefs
.classpath
Should these two files be changed on our SVN to reflect that we all are now using Java 7?
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Developing Bugs
by Max mtg » 21 Jun 2013, 20:58
Yes, they need be updated in SVN.
I suspect you won't need to update Eclipse
Although the UI of 4.2 looks somewhat better to me.
Like Java, Eclipse is also updated only with minor patches. New major version is to be installed into a different folder.
I suspect you won't need to update Eclipse

Like Java, Eclipse is also updated only with minor patches. New major version is to be installed into a different folder.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Max mtg » 22 Jun 2013, 07:08
Chris, will you publish windows snapshots today?
Your development environment seems to work properly now.
Your development environment seems to work properly now.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Chris H. » 22 Jun 2013, 12:48
I merged the two updated files into the SVN.
I may download and install the newest version of Eclipse. I think that the necessary project settings are all located in the project folder in my workspace so it should not be too difficult to direct a new version of Eclipse to my workspace.
A windows snapshot was successfully deployed this morning.
I may download and install the newest version of Eclipse. I think that the necessary project settings are all located in the project folder in my workspace so it should not be too difficult to direct a new version of Eclipse to my workspace.
A windows snapshot was successfully deployed this morning.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Developing Bugs
by Agetian » 25 Jun 2013, 03:43
I'm getting this compilation error as of this morning (SVN r22274). Does anyone know why this is happening? I wasn't able to find anything definite via an online search, there are many similar errors but the exact cause is always different. Compiling in NetBeans 7.3 against JDK 1.7, a build yesterday evening compiled without errors (I believe it was r22272). I think this is actually caused by something external as opposed to some change in the code base, I believe the Maven compiler plugin may have updated itself upon this compilation. Not sure what to do, really. Thanks in advance for any help.
- Code: Select all
[compiler:compile]
Changes detected - recompiling the module!
Using Groovy-Eclipse compiler to compile both Java and Groovy files
java.lang.ExceptionInInitializerError
at org.codehaus.jdt.groovy.integration.internal.MultiplexingParser.dietParse(MultiplexingParser.java:43)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:775)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:395)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:485)
at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4130)
at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1689)
at org.codehaus.groovy.eclipse.compiler.GroovyEclipseCompiler.compile(GroovyEclipseCompiler.java:243)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:688)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.groovy.core.util.ContentTypeUtils.<clinit>(ContentTypeUtils.java:45)
... 30 more
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 15.096s
Finished at: Tue Jun 25 07:36:19 GMT+04:00 2013
Final Memory: 33M/375M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project forge: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-compiler-plugin:3.0:compile: java.lang.ExceptionInInitializerError: null
-----------------------------------------------------
realm = plugin>org.apache.maven.plugins:maven-compiler-plugin:3.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/Agetian/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
urls[1] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/groovy/groovy-eclipse-compiler/2.7.0-01/groovy-eclipse-compiler-2.7.0-01.jar
urls[2] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/groovy/groovy-eclipse-batch/2.1.5-02/groovy-eclipse-batch-2.1.5-02.jar
urls[3] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
urls[4] = file:/C:/Users/Agetian/.m2/repository/org/apache/maven/shared/maven-shared-utils/0.1/maven-shared-utils-0.1.jar
urls[5] = file:/C:/Users/Agetian/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
urls[6] = file:/C:/Users/Agetian/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.0/maven-shared-incremental-1.0.jar
urls[7] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[8] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.0/plexus-compiler-api-2.0.jar
urls[9] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.0/plexus-compiler-manager-2.0.jar
urls[10] = file:/C:/Users/Agetian/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.0/plexus-compiler-javac-2.0.jar
urls[11] = file:/C:/Users/Agetian/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
urls[12] = file:/C:/Users/Agetian/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
urls[13] = file:/C:/Users/Agetian/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
urls[14] = file:/C:/Users/Agetian/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
urls[15] = file:/C:/Users/Agetian/.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------: NullPointerException
-> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by jsv » 25 Jun 2013, 06:34
Same problem here on both linux and win7 machines. I have no idea what happened (unless you count "it seems someone has broken something somewhere in the toolchain" as an idea), but you are not alone.Agetian wrote:I'm getting this compilation error as of this morning (SVN r22274)

Re: Developing Bugs
by Max mtg » 25 Jun 2013, 07:05
Don't know why the newest groovy would not compile. Reverted compiler to default (javac must be) - r22276
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Agetian » 25 Jun 2013, 08:13
That fixed it. Thanks, Max!Max mtg wrote:Don't know why the newest groovy would not compile. Reverted compiler to default (javac must be) - r22276
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by swordshine » 02 Aug 2013, 06:22
I think I broke RepeatEffect last week. I changed do~while loop to while loop to script Frankensten's Monster experimently but forgot to change it back. Could someone revert the RepeatEffect and script changes for Grindstone?
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Developing Bugs
by Agetian » 02 Dec 2013, 11:02
SVN r23859 fails to compile with the following error:
- Agetian
- Code: Select all
COMPILATION ERROR :
-------------------------------------------------------------
forge/gamesimulationtests/util/PlayerControllerForTests.java:[63,8] forge.gamesimulationtests.util.PlayerControllerForTests is not abstract and does not override abstract method runAsAi(java.lang.Runnable) in forge.game.player.PlayerController
1 error
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by Max mtg » 03 Dec 2013, 06:35
I fixed this by removing the named method from PlayerController.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Who is online
Users browsing this forum: No registered users and 32 guests