Skip to content

Update OSGi example project #166

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

Merged
merged 5 commits into from
May 21, 2019

Conversation

sergehuber
Copy link
Contributor

Hello,

I have updated the OSGi example project to make it work properly.

Let me know if you have any questions.

Regards,
Serge...

@jeujai
Copy link

jeujai commented Apr 19, 2019

Hello,

I have updated the OSGi example project to make it work properly.

Let me know if you have any questions.

Regards,
Serge...


Hi Serge,

When I execute ./gradlew publishToMavenLocal, I get...
File '/home/peter/osgi/graphql-java-servlet-master/bnd.bnd' specified for property '$1' does not exist.

Could I be missing something? There was a comment next to gradlew.bat in the Github file listing that said "Problem: compileOnly doesn't work on older Gradle" so I upgraded to Gradle 5.4 but it doesn't seem to help.

Thanks,

Peter

Stacktrace:

peter@peter-VirtualBox:~/osgi/graphql-java-servlet-master$ ./gradlew publishToMavenLocal --stacktrace

Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Task :jar FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem was found with the configuration of task ':jar'.

File '/home/peter/osgi/graphql-java-servlet-master/bnd.bnd' specified for property '$1' does not exist.

  • Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.tasks.TaskValidationException: A problem was found with the configuration of task ':jar'.
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.report(ValidatingTaskExecuter.java:72)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
    at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
    at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:73)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    Caused by: org.gradle.api.InvalidUserDataException: File '/home/peter/osgi/graphql-java-servlet-master/bnd.bnd' specified for property '$1' does not exist.
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.report(ValidatingTaskExecuter.java:69)
    ... 34 more

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 7s
4 actionable tasks: 4 executed

@sergehuber
Copy link
Contributor Author

I can't reproduce this problem. Here's what a build looks like on my machine :

Enterprise:graphql-java-servlet loom$ ./gradlew publishToMavenLocal
:generatePomFileForMavenPublication
:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:compileGroovy NO-SOURCE
:processResources NO-SOURCE
:classes
:jar
:javadoc
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/AbstractGraphQLHttpServlet.java:62: warning: no @return
    protected abstract GraphQLQueryInvoker getQueryInvoker();
                                           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/AbstractGraphQLHttpServlet.java:68: warning: no @return
    protected abstract GraphQLInvocationInputFactory getInvocationInputFactory();
                                                     ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/AbstractGraphQLHttpServlet.java:74: warning: no @return
    protected abstract GraphQLObjectMapper getGraphQLObjectMapper();
                                           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/AbstractGraphQLHttpServlet.java:80: warning: no @return
    protected abstract boolean isAsyncServletMode();
                               ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:23: warning: no @param for invocationInputFactory
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:23: warning: no @param for queryInvoker
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:23: warning: no @param for graphQLObjectMapper
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:23: warning: no @param for listeners
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:23: warning: no @param for asyncServletMode
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for invocationInputFactory
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for queryInvoker
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for graphQLObjectMapper
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for listeners
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for asyncServletMode
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
/Users/loom/java/technologies/github.com/sergehuber/graphql-java-servlet/src/main/java/graphql/servlet/SimpleGraphQLHttpServlet.java:37: warning: no @param for subscriptionTimeout
    public SimpleGraphQLHttpServlet(GraphQLInvocationInputFactory invocationInputFactory, GraphQLQueryInvoker queryInvoker, GraphQLObjectMapper graphQLObjectMapper, List<GraphQLServletListener> listeners, boolean asyncServletMode, long subscriptionTimeout) {
           ^
15 warnings
:javadocJar
:sourcesJar
:publishMavenPublicationToMavenLocal
:publishToMavenLocal

BUILD SUCCESSFUL

Total time: 3.927 secs

- Add description to hello field.
@sergehuber
Copy link
Contributor Author

Also I'm not sure what you mean by you upgraded to Gradle 5.6. By default the wrapper downloads version 3.5 which is the version the project uses, this has nothing to do with the OSGi example anyway.

How are you changing this version and why? Are you modifying the gradle-wrapper.properties ?

I think that this should then be reported as an issue with the global project, not the OSGi example.

@jeujai
Copy link

jeujai commented Apr 20, 2019

Hi Serge,

I haven't modified the gradle-wrapper.properties yet at all. I just want to get the basic example working and then iterate from there especially since I'm not a gradle or bndtools expert. I upgraded to gradle 5.4.0 only because I keep getting the error below and thought that would fix it. Which version of Java are you using? The main project said that it's compatible with Java 11 but maybe not the example?

Thanks for helping me. I really appreciate it. I'm trying to build a GraphQL endpoint for a back-end data source that undergoes continual change. Nothing but a dynamic schema will work for my particular application.

Peter

Error:

**C:\osgi-serge>gradlew publishToMavenLocal

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '11.0.2'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.**

@jeujai
Copy link

jeujai commented Apr 20, 2019

Hi Serge,

In reference to the post that I made prior to this one, I did remove gradle 5.4 and let the wrapper download gradle 3.5 but it still doesn't like Java 11. Guess the thing to do is to restore to a prior version of Java?

Thanks,

Peter

@sergehuber
Copy link
Contributor Author

Ok thanks for giving me the context, but again this has nothing to do with the OSGi example this is a main project (graphql-java-servlet) issue. I see that you have opened issues there so let's continue over there.

I would prefer we stay on topic for this PR that is only there to improve the example and modernize it.

@jeujai
Copy link

jeujai commented Apr 20, 2019

Understood. I'll switch over to the main project to continue our conversation. Since you got the OSGi example working, the problem can't be the example.

@sergehuber
Copy link
Contributor Author

To my knowledge there are no issues reported (above conversation was about issues with Java 11 that are not related to this commit). Can this PR be merged now ?

@oliemansm oliemansm merged commit afdeb14 into graphql-java-kickstart:master May 21, 2019
@oliemansm
Copy link
Member

@sergehuber Thanks for the contribution!

@oliemansm oliemansm added this to the 7.5.0 milestone May 21, 2019
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

Successfully merging this pull request may close these issues.

3 participants