Eclipse: An internal error occurred during: “Update Hierarchy” - google-cloud-dataflow

While trying to run the Google cloud dataflow Wordcount example in eclipse referenced here https://cloud.google.com/dataflow/docs/quickstarts/quickstart-java-eclipse
I am getting the following error:
An internal error occurred during: "Update Hierarchy".
Tried to create a TypeHierarchyPipelineOptionsHierarchy for a Java Project 'my project name' where no PipelineOptions type exists
This issue was also faced by somebody else as per the following stackoverflow link:
Eclipse: An internal error occurred during: "Update Hierarchy"
I tried the solution above, the project compiles but it does not run even after Force Update of Snapshots/Releases as explained above.
Based on my research of the problem it looks like google-cloud-dataflow-java-sdk-all-2.0.0-beta1.jar does not have the PipelineRunner class, which is causing the error. The 1.9.0 version of the same jar had those classes.
I cannot use 1.9.0 version of the jar directly because it causes other compilation errors e.g. package change to 'org.apache.beam' instead of 'com.google.cloud.dataflow'

Indeed, there's an issue in the older versions of the Google Cloud Dataflow plugin for Eclipse -- older versions are not forward-compatible with Dataflow SDKs 2.x series, but the project generation may still automatically create a project using the newest 2.x SDK.
To solve the problem, please upgrade to the newest version of the plugin.

Projects generated with versions 1.1.2 of the Dataflow Plugin for Eclipse and earlier will generate projects using the most recent archetype. With the release of Dataflow 2.0.0-beta1, the generated project will use the Apache Beam SDK as an underlying dependency. Modifying the project version to 1.9.0 or earlier will not modify the generated code, which causes the compilation failures you're experiencing.
Version 1.1.3 of the plugin will ensure that any generated project remains within the Dataflow namespace. Future versions will also work forwards-compatibly with Apache Beam. Version 1.1.3 should be available - in Eclipse, go to Help -> Check for Updates (possibly running Perform Setup Tasks to clear the cached current version) should make the updated plugin available.
We have published version 1.1.3 of the Dataflow Plugin for Eclipse; the quickstart example should now function. The project you've generated will not work until a future release of the Dataflow Plugin for Eclipse. Updating the plugin and re-running the quickstart should succeed.

Related

NetBeans-11 Can not setup for using Grails

Using NB-8.2 In the dialog - "Tools/Options/Miscellaneous/Groovy" You could enter the location of your Grails-installation" but know with NB11 that input field is missing.
I've read the question "Can not run Grails project from NetBeans" where you where suggested to remove all plugins regarding Gradle and Groovy and then reinstall them, which I tried but it didn't help.
I tried it on NB11.1 and uninstalled the following plugins:
Gradle, Gradle and Groovy and Pure Groovy Project.
Gradle and Grovy including "Gradle and Groovy" couldn't be uninstalled - only deactivated but the last one "Pure Groovy project" could be uninstalled. But afterwards I can not find that plugin to reinstall. So where can I find that?
Now I have installed NB11.2 but still the same problem.
So where to go now?
I got this working on a fresh installation of NetBeans 11.2 under Windows 10 using Grails 3.3.11. However, there are some significant limitations because the approach essentially only recreates the Grails environment that worked with NetBeans 8.2:
Initial Status
There are no Groovy, Grails or Gradle entries on the project wizard menu (File > New Project...).
Tools > Plugins > Installed Plugins shows version 1.38 of Groovy is active, and version 1.2 of Groovy and Gradle is inactive.
The Tools > Options > Miscellaneous > Groovy tab shows that there is no Grails Home field available, as mentioned in the OP.
NetBeans 11.2 Changes
First, note that you must set JDK 1.8 as the default platform for NetBeans 11.2. See this SO answer for details on how to do that. Of course you can still create projects using other JDK versions when the default platform is JDK 8.
Also note that taking the obvious step of activating Groovy and Gradle 1.2 does not help, and subsequently restarting NetBeans does not change anything, so discard that approach.
This is the initial version of the relevant plugins: Gradle 1.2, Groovy and Gradle 1.2 and Groovy 1.38.
Delete all three plugins. Netbeans will restart.
The Groovy tab is now missing from Tools > Options > Miscellaneous.
Select Tools > Plugins > Settings, and click the Add button, which will open the Update Center Customizer screen.
Enter Grails Plugins in the Name field (or any other descriptive value you prefer ), and http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz
in the URL field, and click OK.
Ensure that only the new entry for Grails Plugins is checked on the Settings tab, then go to the Available Plugins tab.
Select the entry for Groovy and Grails 1.34.1, and click Install. NetBeans
will restart.
After NetBeans restarts, select Tools > Options > Miscellaneous and click the Groovy tab. There is now a Grails Home field available, so set it to your Grails installation:
Creating a Grails Project
Select File > New Project > Groovy > Grails Application to create a Grails project.
You will get this error:
Warning |
Unrecognized flag: non-interactive.
Error |
Specify an application name or use --inplace to create an application in the current directory
One workaround for that is to create your Grails project from the command line using grails create-app..., then open that project in NetBeans. See this helpful SO answer for full details.
Once that is done, you can develop, build and run your Grails application in NetBeans 11.2:
Notes
After doing all the steps above, there is no Gradle entry under File > New Project..., and if you attempt to install the Gradle plugin to address that, you will get the following warning:
Don't proceed, because reinstalling Groovy 1.38 (which you deleted in step #6 above) will prevent Grails from working. So be aware that this solution for Grails prevents you from creating freestanding Gradle projects in NetBeans 11.2 using the Project Wizard. Also, to be clear, the only plugin you should have installed to get Grails working is Groovy and Grails version 1.34.1. You do not need any other plugins containing the words "Groovy" or "Gradle" installed.
I also tried creating a Grails project using Grails 4.0.1, but got the error "Could not instantiate global transform class org.spockframework.compiler.SpockTransform...". There are workarounds suggested for that error on SO. I didn't pursue them but since Grails 3.x does not work with any JDK > 8, and Grails 4.x supports JDKs > 8, you may want to pursue this issue yourself.
You can download and install the "Pure Groovy" plugin from here. Although it's old, it still seems to work fine, and it will add a "Groovy Project" entry in the Project Wizard:
Also see does netbeans 11 support grails?, although that question was for NetBeans 11.0 rather than 11.2.

withNamespace() is missing in the DatastoreIO class

I created a sample Cloud Dataflow Java project using dataflow Eclipse plugin, I wanted to create a pipeline for DatastoreIO with namespace support, but i couldn't find the withNamespace() in the DatastoreIO class.
UPDATE: DatastoreIO namespace support is available in Cloud Dataflow SDK for Java, version 1.2.0 released this week.
DatastoreIO namespace support is available if you build the development version of the SDK from GitHub, however this version has not yet been released on Maven.
If you would like to use the DatastoreIO namespace support before that release happens, you can install the development version of the SDK using following the Getting Started instructions. The Eclipse project should then automatically pick up the new version, and if it does not you can edit the project pom.xml to manually specify the desired 1.1.1-SNAPSHOT version with these changes.
See also: https://github.com/GoogleCloudPlatform/DataflowJavaSDK/issues/63 (You do not normally need to post both places :).

Migrating Grails 2.4 MultipleCompilationErrorsException

I'm going to migrate an existing Grails 2.0 plugin to 2.4.
According to the migration guide the following steps were done:
run set-grails-version 2.4.4
update to latest plugin versions (hibernate4, tomcat, release and etc)
In in Intellij I've changed plugin SDK version on 2.4.4. Now module->dependencies looks like
It looks good but when I do grails compile, I have MultipleCompilationErrorsException in SvnDeployer class of release:3.0.1 plugin with "unable to resolve" message: unable to resolve class org.apache.commons.io.FilenameUtils(it's strange, commons.io is included into grails library)
On SDK of 2.0 everything is fine, but when I change SDK version to 2.4, project can not be compiled.
From my experience, Grails upgrades are not really smooth especially between feature releases.
I recommend starting with the usual
grails clean
grails refresh-dependencies
grails compile
After that check if you still get the same kind of errors, see whether or not excluding the svn plugin helps (if you're not using it).

Issues with upgrade to Grails 2.2.0 using GGTS

I’m trying to upgrade Grails to version 2.2.0. I used gvm and installed Grails 2.2.0. After this I changed my project in GGTS to use Grails version 2.2.0 and Groovy version 2.0.0. But when I finally tried to run the project, I got the following error:
Error occurred during initialization of VMError opening zip file or JAR manifest
missing : null
agent library failed to init: instrument
What is the problem?
We had the same problem.
This is due to eclipse saving old run configuration for the previous grails version.
Just remove old launch configuration and retry.
To remove old launch configuration :
go to Run\RunConfiguration\Grails
select all nodes and remove them.
I had the same problem when I started using Grails 2.2.0 - The solution Ian mentioned works, here is the link to the issue and resolution that occurred in my project
Grails 2.2.0 error
Added on 1/15/2013 Other suggestions based on 2.2.0/ivy cache issues
I am running on windows, a couple of things to try.
Based on your error message seems like the issue might be related to the Ivy cached, I would suggest cleaning that out using the clean command.
I would also go ahead and delete the Icy cache folders on your machine at \ivy-cache(after backing it up just in case)
Read grails documentation at http://grails.org/doc/2.0.0/guide/gettingStarted.html, refer to section 2.3 regarding Ivy cache – there might be issues running 2.x and 1.x grails projects side by side.
When install, I do not have to install groovy explicitly - I just install grails and that take care of the groovy code implicitly. Is that possible for you to do? To rule out dependency issues?
On my version of grails I have the groovy version showing up as 2.0.5 – I assume you meant grails 2.2.0 – can you ensure that you have a groovy version installed with is compatible with grails 2.2.0?
If possible try your code on a fresh device where grails has not been installed before. This is to rule out interference due to other existing issues
It's a known issue to do with the fact that the version of the springloaded reloading agent used by 2.2 (and 2.1.3) has a different name from that used by previous versions of Grails. There's a workaround in the bug report, or you can upgrade to a nightly build of GGTS which knows about the new name (as described in this bug report).
I am using GGTS 3.2 with Groovy compiler 2.1.1 on Windows XP.
Had imported a project from GGTS 3.1, upgraded compiler to 2.1.1 and got in mess, so
deleted the project and removed it from .grails cache, then re-created project from scratch. When it came to running the project I got the ivy error.
Removing the old launch configuration via Run->RunConfiguration...Grails fixed problem without switching to a night build of GGTS.
(BTW Deleting ivy-cache didn't help at all)

How to implement form builder plugin in grails

What steps will reproduce the problem?
1.create grails project on STS: 2.9.2
2.Open plugin manager, install form builder plugin.
1.Create grails project on NetBeans IDE 7.0
2.Open Grails Plugins. install form builder plugin.
1.Create grails application using command grails create-app test
2.install form builder plugin.
What is the expected output? What do you see instead?
Each time i was expecting plugin should install and i can run application, but getting several dependencies. I tried with/without changes made in BuildConfig.groovy.
What version of the product are you using? On what operating system?
I am working on
Java: 1.6.0_29; Java HotSpot(TM) Client VM 20.4-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
with grails 2.0.4
I have installed STS 2.9.2, STS 2.5.1, Netbeans 7.0 with grails plugin
Please provide any additional information below.
Each time i tried to install plugin it is showing me some run-time dependencies for jquery, jquery ui and others, I tried to install all plugins before installing form builder plugin. Now it is showing me some class missing
net.sf.json-lib:json-lib:2.4.
some time it is showing me error about
C:\Documents and Settings\jitendrakarma.grails\2.0.4\projects\FormTest\plugins\form-builder-0.1\grails-app\controllers\org\grails\formbuilder\FormController.groovy: 18: unable to resolve class freemarker.template.Template
# line 18, column 1.
import freemarker.template.Template
Please let me know what is wrong with the process i am following.
You are doing everything totally right. The plugin itself does not manage its dependencies correctly. Also it is belonging to some classes that doesn't exists any more in Grails >= 2.x.x
If you add all missing external dependencies and add the following entries to the plugin closure of grails-app/conf/BuildConfig.groovy
compile ":form-builder:0.1"
compile ":jquery-ui:1.8.6"
compile ":dynamic-domain-class:0.2.1"
compile ":jquery-json:2.2"
compile ":freemarker-tags:0.5.8"
compile ":uni-form:1.5"
compile ":jquery-datatables:1.7.5"
compile ":jquery-validation-ui:1.2"
compile ":lang-selector:0.3"
compile ":quartz:0.4.2"
compile ":jquery-form-builder:0.1"
and add the following entry to the dependencies section of the same file
compile 'org.freemarker:freemarker:2.3.19'
you will still get four compile errors.
One of them is: "unable to resolve class org.codehaus.groovy.grails.web.metaclass.TagLibDynamicMethods"
If you look up this class in the grails api documentation you will see it inside the grails 1.3.7 version but it is missing in the 2.0.4 version.
So the best thing I could recommend you is to search for another plugin or doing some code by your own.
Validation for example could be done with a Command on the grails side and the JQuery Validation Plugin on the client side. The form itself can be created with the help of scaffolding. Even if you don't need a domain you could create one run scaffolding to get the resulting form and throw away the domain.

Resources