I am developing an application in Java using Maven and Vaadin 6 for some time now.
I've come to a point where I need to add an add-on (Vaadin calendar 1.3.0 - for Vaadin6).
I've added the maven dependency and repository in my pom.xml file as suggested on the link attached, Maven did download my dependency jar file and it is in the WEB-INF/lib directory.
However, when I try to load the page with the add-on I get the following error message (in browser):
Widgetset does not contain implementation for com.vaadin.addon.calendar.ui.Calendar. Check its #ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
From what I understood the widget set is not compiled. But I do not know how to do this...
I tried to install the Vaadin-plugin in Eclipse. It says on their website that when the vaadin plugin detects a widgetset in the path, it is automatically compiled.
I've also tried to follow the tutorial for using vaadin addons, but still no luck: http://vaadin.com/directory/help/using-vaadin-add-ons
Did you run into similar problems? What should I do? How do I compile the widget set?
Some useful tips please? :)
Your help is very appreciated.
UPDATE: I've tried to follow the steps from this tutorial: https://vaadin.com/book/vaadin6/-/page/addons.maven.html
now whenever I try to load the application I get the following error:
Failed to load the widgetset:
/myproj/VAADIN/widgetsets/...../TheNewFileCreatedAsInTutorial.nocache.js
If you already have installed the eclipse vaadin plugin, try compiling manually as described in section 16.2.2.
Related
I got a project from GitHub which is a Java spring boot application running with Maven dependencies.
I am so confused why I can't run the application successfully on STS.
There's no longer a problem on my old laptop. Because I just changed my laptop, this problem only occurred on this laptop.
The details / symptoms of the issue are:
When I typed "SpringToolSuite" on my start panel, no applications were being recognized. So I have to open STS manually from Downloads (ie. its original file location). But anyways, it is just a minor issue.
In STS, annotations such as the lombok log and most of the getter/setter methods were unrecognized.
Failed to perform "Run as Spring Boot App" from STS, but it is successful when I tried to perform "mvn clean install" to create a Maven build from command prompt.
Error message: "log cannot be resolved"
I tried finding results from other posts here but to no avail.
The steps that I import the project is:
Create another folder as the workspace.
Open STS by selecting the created folder as the workspace.
Click File > Import and import as existing Maven project (as it is a Maven-built application).
I also tried to create a Maven build from command prompt, which is successful eventually.
As the situation was so strange here, please advise further what I can do. Thanks.
Lombok has a plugin for Eclipse (and therefore STS as well) that enhances the IDE with direct support for Lombok: https://projectlombok.org/setup/eclipse
Without that extension the IDE is not really able to recognize and support Lombok.
Thanks so much for your suggestions.
First of all, I've made sure my STS the latest version. I installed it from the official site https://spring.io/tools.
I downloaded the Windows one. See image.
I executed the spring-tool-suite-4-4.16.1.RELEASE-e4.25.0-win32.win32.x86_64.self-extracting.jar file afterwards. A folder with STS application inside has been generated.
Referring to your second question, I am sure I have the lombok dependency.
This is part of my pom.xml. See image.
I also performed again the "mvn clean install". It is success and error-free.
Fyi, I also make sure every setup is right, such as:
It is pointing to the same java version as what Maven points to.
In STS, the Java compliance level is the same as the java version I defined in PATH environment variable.
Also in STS, the Installed JRE is pointing to the right folder.
But as the STS is still not recognizing Spring Boot annotations. That's why it seems weird here. For example, logs are underlined red with an error message on the IDE. Getters and Setters of #Data fields are not implicitly referenced with that spring boot annotation since they're also underlined with error.
I want to create a Spring Boot project from scratch in IntelliJ IDE. As there is also a way to use Spring Initializr to create a Spring Boot project and then download the zip and import to IDE.
As it is bit time consuming process to do that every-time, so I checked over the internet to see if there exists a plugin for the same which automatically loads Spring Initializr onto IntelliJ and found there is one named with Spring Assistant.
But this plugin is not visible in IntelliJ Plugins Marketplace. So I went over to JetBrains site for this plugin and landed on this page. This url is the download link for this plugin and is available for all versions. I am using the Community version.
https://plugins.jetbrains.com/plugin/10229-spring-assistant/versions
After downloading and importing the plugin, Spring Assistant option was visible under the File -> New Project section. But after specifying the project details, the dependency screen was not loading up (shown in last image) and I also get errors at the bottom of my IDE which says the plugin doesn't belongs to JetBrains. After this I also seem to feel IntelliJ IDE getting hanged. I have attached images for better understanding.
As anyone else faced a similar problem, because if this doesn't work then the only option is to go to Initializr every time.
Unfortunately, the plugin that served part of the idea/spring community, stopped maintaining. I took the liberty of creating a fork, we fixed bugs and added new features.
the same can be found directly in the search for Intellij or in the marketplace.
Spring Initializr and Assistant
You can use
https://github.com/eltonsandre/intellij-spring-assistant
Its a fork of the original plugin, according to the comments here, seems to work with 2020.3.1, 2021.1(those are the tested versions, check in the comment section).
Here the changelog of the forked plugin
I am getting below error while installing Findbugs into Netbeans 8.2:
"There were some problems while storing Establishing a connection …
Cause: Cannot resolve external reference to m2:/org:ow2:asm:asm-debug-all:5.0.2:jar"
I have tried uninstalling NetBeans 8.2 and removing anything associated with the installation to get a fresh install with no success there, and I have tried the latest version of NetBeans 11.3 which I found does not have Findbugs available. I need the plugin for a school project and no one there has been able to help me with this issue either. Any help would be greatly appreciated.
I am using a Windows 10 PC.
Thank you.
The reason of the error
The error happens because when you download the plugin, NetBeans also tries to download additional dependencies. The links where to download the jars from are written inside the nbm package.
For example, one of the dependencies is asm-debug-all-5.0.2.jar, and the link is:
http://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.2/asm-debug-all-5.0.2.jar.
The maven repository is no longer accessible using the HTTP link. You can read more about it here.
So basically, you could not install the plugin because the plugin is outdated and contains invalid links for downloading dependencies from maven repo.
Before solving the issue, consider using SpotBug instead because the FindBug is outdated and is no longer actively maintained, for more information, please, see here in another answer. Also, keep in mind that it works only with JDK8.
How to solve it?
To solve the issue, you need to fiddle around a bit with plugins.
You need two plugins FindBug Libs (org-netbeans-libs-findbugs.nbm) and FindBug Integration (org-netbeans-modules-findbugs.nbm). Download them using thees links:
https://updates.netbeans.org/netbeans/updates/8.2/uc/final/certified/82/extra/org-netbeans-modules-findbugs.nbm
https://updates.netbeans.org/netbeans/updates/8.2/uc/final/certified/82/extra/org-netbeans-libs-findbugs.nbm
Unzip org-netbeans-libs-findbugs.nbm manually as if it is a simple zip file.
Edit the files in org-netbeans-libs-findbugs\netbeans\modules\ext extracted folder. In every file, you need to change the link from http to https.
Edit manifest file org-netbeans-libs-findbugs\META-INF\MANIFEST.MF. You need to remove all lines that contain CRS checksum. After editing it should contains only these lines:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.8.0_45-b14 (Oracle Corporation)
Remover other two files in org-netbeans-libs-findbugs\META-INF (ORACLE_C.RSA and ORACLE_C.SF).
Zip it again.
After that, the file is ready for manually installing into Net Beans. Alternatively, you can download the file from here. I have already modified the plugin using the steps.
How to install and use it?
Got to Windows -> Plugins -> Downloaded -> Add Plugins
Manually add the modified org-netbeans-libs-findbugs.nbm file and click install.
Then add org-netbeans-modules-findbugs.nbm and click install.
When installing, it shows that it downloads the plugin, but actually, it downloads only dependencies. It can take some time.
After that, select your project in the project tree, make sure it was compiled before. Got to Source -> Inspect, choose FindBus in the Configuration.
After you click to inspect your report will be ready.
It works both on NetBeans 11.3 and 8.2. Make sure you are using JDK8 with NetBeans. I'm not sure it will work with the newest versions of JDK.
Here is an example with running it on 11.3 using JDK8 on some NetBeans module:
I have decided to try out Vaadin Touchkit for mobile application development, and am trying to get it installed and working on an example app. I have Windows 7 Pro, eclipse Luna, and maven. I'm happy to use something besides Maven, anything to make it work more easily.
The instructions say I can create a Vaadin project and then modify it to be a Vaadin Touchkit project. So I create a Vaadin project, using the Vaadin eclipse plug-in 3.0.0.
Step 1 in a list "After creating the project", says "Install the TouchKit library in the project by including it in the ivy.xml, as described in Installing as Ivy Dependency, and compile the widget set.
I think it odd that we're switching over to ivy from Maven, but ok. I go to the link indicated by the italics above, and find:
Include the following declaration inside the `dependencies` section in the `ivy.xml`.
But there is no ivy.xml file. I searched the whole directory tree. I know even less about ivy than I do Maven, so I dig around a little and find that ivy.xml is supposed to be in the WEB-INF/lib directory. But there is no such directory.
I suppose I could create an ivy.xml that contained nothing but the lines given in the instructions, but feel like trial-and-error in this kind of situation is not likely to be fruitful. Is there something else I was supposed to do to get ivy.xml in my eclipse Vaadin project? Is there some other way to get the TouchKit jar(s) on the classpath? Aren't I supposed to have a WEB-INF generated somewhere?
I presume others have gotten the TouchKit example to work in eclipse somehow -- if they can point me to a different way that does work, that'd be fine, I don't have to fix this one...
Hm, lacking of Ivy.xml is very very old bug known by vaadin team. No one knows why sometimes it wont create it.(Maybe after some n-times attempts of recreating it may fix this).
Unluckily, you have to deal with maven
I want to use the ehCache as 2nd level cache in my application.
I downloaded the latest version from the ehcache web site. Unfortunatly no jar file is provided, therefor I wanted to compile the code myself. I put it into a new Eclipse dynamic Web Project and added the necessary jars that came with the download to the Build Path. But now, there are still errors in my project..
e.g. this fails: import javax.transaction.TransactionManager;
Does anybody know why? Usually I have javax package available in a Eclipse Web project...
I somehow have not gotten the original javax package.
I answer my own question because an other reference was missing after adding the javaee package. This was the one to the sun. misc.Unsafe.
It does not have to be downloaded, but to be able to use it, the compiler settings have to be changed in Eclipse as described here: https://stackoverflow.com/a/5549580/1737854