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

volley android client does not compile because of Responses.BooleanResponse #1901

Closed
kungfoo opened this issue Jan 15, 2016 · 7 comments
Closed

Comments

@kungfoo
Copy link
Contributor

kungfoo commented Jan 15, 2016

It seems there is an interface that is not generated in Responses:

public void isRunning (final Responses.BooleanResponse responseListener,
  final Response.ErrorListener errorListener) {}

This code is generated into one of the API classes, yet Responses.BooleanResponse does not exist. I think it is missing from the generator.

@wing328
Copy link
Contributor

wing328 commented Jan 16, 2016

@Shyri I wonder if you can take a look when you've time.

@Shyri
Copy link
Contributor

Shyri commented Jan 16, 2016

@kungfoo This should've been fixed in #1839 . I removed Reponses class and now it should generate methods using volley response listener, Response.Listener<Boolean> in this case.

Please make sure you have those changes in your local copy. If so, ¿could you please write an example of your json file specification for that method?

@kungfoo
Copy link
Contributor Author

kungfoo commented Jan 18, 2016

I used 2.1.5 from maven central. I can check if the problem persists if I
build from the master branch.

On Sun, 17 Jan 2016 at 00:03, Shyri Villar notifications@github.com wrote:

@kungfoo https://github.com/kungfoo This should've been fixed in #1839
#1839 . I removed
Reponses class and now it should generate methods using volley response
listener, Response.Listener in this case.

Please make sure you have those changes in your local copy. If so, ¿could
you please write an example of your json file specification for that method?


Reply to this email directly or view it on GitHub
#1901 (comment)
.

@kungfoo
Copy link
Contributor Author

kungfoo commented Jan 18, 2016

Hmm, I can't seem to build from source using mv package as quoted in the docs. I get the following error on swagger-codegen (core):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project swagger-codegen: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] java.lang.NoClassDefFoundError: org/scalatest/Matchers
[ERROR] at java.lang.ClassLoader.defineClass1(Native Method)
[ERROR] at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
[ERROR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[ERROR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[ERROR] at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
[ERROR] at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:222)
[ERROR] at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:107)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.ClassNotFoundException: org.scalatest.Matchers
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

@wing328
Copy link
Contributor

wing328 commented Jan 19, 2016

@kungfoo can you try mvn clean install -U to see if the error goes away?

@kungfoo
Copy link
Contributor Author

kungfoo commented Jan 19, 2016

The error actually went away after cleaning every thing. So far so good.
2.1.6-snapshot also work in the way that the Response interface is no
longer generated.
On 19 Jan 2016 08:36, "wing328" notifications@github.com wrote:

@kungfoo https://github.com/kungfoo can you try mvn clean install -U to
see if the error goes away?


Reply to this email directly or view it on GitHub
#1901 (comment)
.

@wing328
Copy link
Contributor

wing328 commented Jan 19, 2016

OK. Glad to hear the problem is resolved.

Issue closed.

@wing328 wing328 closed this as completed Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants