Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: couldn't construct type reference for type null #6

Open
BAVhel opened this issue Feb 26, 2015 · 1 comment

Comments

@BAVhel
Copy link

BAVhel commented Feb 26, 2015

package test

import de.itemis.xtend.auto.gwt.OverlayTypeByExample

@OverlayTypeByExample('
{
    "AppConfig": {
        "Service": {
            "serviceUrl": "http://localhost:8080/test"
        }
    }
}
')
class JsonTest {
}

throw errors:
Description Resource Path Location Type
Error during annotation processing:
java.lang.IllegalArgumentException: couldn't construct type reference for type null
at org.eclipse.xtend.core.macro.declaration.TypeReferenceProviderImpl.newTypeReference(TypeReferenceProviderImpl.java:261)
at org.eclipse.xtend.core.macro.TransformationContextImpl.newTypeReference(TransformationContextImpl.java:204)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util.getJavaType(OverlayTypeByExampleProcessor.java:157)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util$2.apply(OverlayTypeByExampleProcessor.java:91)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util$2.apply(OverlayTypeByExampleProcessor.java:85)
at org.eclipse.xtend.core.macro.declaration.JvmTypeDeclarationImpl.addMethod(JvmTypeDeclarationImpl.java:158)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util.doTransform(OverlayTypeByExampleProcessor.java:95)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util$3.apply(OverlayTypeByExampleProcessor.java:112)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util$3.apply(OverlayTypeByExampleProcessor.java:100)
at de.itemis.xtend.auto.gwt.StaticUtils.processObject(StaticUtils.java:47)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor$Util.doTransform(OverlayTypeByExampleProcessor.java:116)
at de.itemis.xtend.auto.gwt.OverlayTypeByExampleProcessor.doTransform(OverlayTypeByExampleProcessor.java:283)
at org.eclipse.xtend.lib.macro.AbstractClassProcessor.doTransform(AbstractClassProcessor.java:42)
JsonTest.xtend /test/src/test line: 5 /test/src/test/JsonTest.xtend Xtend Problem

The package test.JsonTest.AppConfig collides with a type Service.java /test/target/generated-sources/xtend/test/JsonTest/AppConfig line 1 Java Problem

in generated-sources:

package test;

import com.google.gwt.core.client.JavaScriptObject;
import de.itemis.xtend.auto.gwt.OverlayTypeByExample;

/* @OverlayTypeByExample("\r\n{\r\n    \"AppConfig\": {\r\n        \"Service\": {\r\n            \"serviceUrl\": \"http://localhost:8080/test\"\r\n        }\r\n    }\r\n}\r\n")
 */@SuppressWarnings("all")
public class JsonTest extends JavaScriptObject {
  public static class AppConfig extends JavaScriptObject {
    protected AppConfig() {

    }

    public final native void getService() /*-{ return this.Service; }-*/;
  }

  protected JsonTest() {

  }

  public final native JsonTest.AppConfig getAppConfig() /*-{ return this.AppConfig; }-*/;
}

why public final native void getService() ?

Also if enabled Build Automatically project rebuilds constantly - probably it's different issue

@BAVhel
Copy link
Author

BAVhel commented Mar 11, 2015

The same error with xtend 2.8 but project doesn't rebuilds constantly as with xtend 2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant