Migrate from Vaadin 7.6.7 to 7.7.3 problem

Hello!
I have tried to switch from Vaadin 7.6.7 to 7.7.3 but meet the compile problem:

[ERROR]
 Failed to execute goal org.ops4j:maven-pax-plugin:1.5:compile (default-compile) on project rwp-widgetset: Compilation failure: Compilation failure:
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinSession.java):[45,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinRequest.java):[29,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinRequest.java):[30,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinResponse.java):[24,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinResponse.java):[25,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinResponse.java):[26,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/WrappedSession.java):[22,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinService.java):[45,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/VaadinService.java):[46,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/BootstrapListener.java):[22,20]
 error: package javax.portlet does not exist
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/ui/JavaScript.java):[40,7]
 error: duplicate class: com.vaadin.ui.JavaScript
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/BootstrapHandler.java):[42,29]
 error: cannot access JavaScript
[ERROR]
 
[ERROR]
 could not parse error message:   bad source file: F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/annotations/JavaScript.java)
[ERROR]
 file does not contain class com.vaadin.annotations.JavaScript
[ERROR]
 Please remove or make sure it appears in the correct subdirectory of the sourcepath.
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/BootstrapHandler.java):466: error: cannot find symbol
[ERROR]
 Class<? extends UI> uiClass, String resource) {

What is wrong?

Thanks in advance!

Looks like some .jar files your maven repository are broken. Easiest way to fix is to rename or delete the repo(or it’s broken part) and try over.
The repository is usually located in /.m2/repository
For windows, that usually is c:\users<username>.m2\repository

Thank you, Ilia. I have deleted the repository, but it does not help:

[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time: 20.726 s
[INFO]
 Finished at: 2016-10-18T11:07:07+03:00
[INFO]
 Final Memory: 29M/304M
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 Failed to execute goal org.ops4j:maven-pax-plugin:1.6.0:compile (default-compile) on project rwp-widgetset: Compilation failure: Compilation failure:
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/ui/JavaScript.java):[40,7]
 error: duplicate class: com.vaadin.ui.JavaScript
[ERROR]
 
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):[42,29]
 error: cannot access JavaScript
[ERROR]
 
[ERROR]
 could not parse error message:   bad source file: F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/annotations/JavaScript.java)
[ERROR]
 file does not contain class com.vaadin.annotations.JavaScript
[ERROR]
 Please remove or make sure it appears in the correct subdirectory of the sourcepath.
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):466: error: cannot find symbol
[ERROR]
 Class<? extends UI> uiClass, String resource) {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class UI
[ERROR]
 location: class BootstrapHandler
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):611: error: cannot find symbol
[ERROR]
 JsonObject jsonObject, boolean isDebug) {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class JsonObject
[ERROR]
 location: class BootstrapHandler
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):619: error: cannot find symbol
[ERROR]
 protected JsonObject getApplicationParameters(BootstrapContext context) {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class JsonObject
[ERROR]
 location: class BootstrapHandler
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):785: error: cannot find symbol
[ERROR]
 private void putValueOrNull(JsonObject object, String key, String value) {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class JsonObject
[ERROR]
 location: class BootstrapHandler
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):82: error: cannot find symbol
[ERROR]
 private PushMode pushMode;
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class PushMode
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):83: error: cannot find symbol
[ERROR]
 private JsonObject applicationParameters;
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class JsonObject
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):84: error: cannot find symbol
[ERROR]
 private VaadinUriResolver uriResolver;
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class VaadinUriResolver
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):105: error: cannot find symbol
[ERROR]
 public Class<? extends UI> getUIClass() {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class UI
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):132: error: cannot find symbol
[ERROR]
 public PushMode getPushMode() {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class PushMode
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):168: error: cannot find symbol
[ERROR]
 public JsonObject getApplicationParameters() {
[ERROR]
 ^
[ERROR]
 
[ERROR]
 could not parse error message:   symbol:   class JsonObject
[ERROR]
 location: class BootstrapHandler.BootstrapContext
[ERROR]
 F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.2\vaadin-server-7.7.2.jar(com/vaadin/server/BootstrapHandler.java):177: error: cannot find symbol
[ERROR]
 public VaadinUriResolver getUriResolver() {
[ERROR]
 ^

Looks quirte strange.Please check again your dependencies

error: duplicate class: com.vaadin.ui.JavaScript

Looks like you have duplicates in your dependencies.

I have attached my actual pom.xml I cannot see duplicate dependencies there. Also I found that compile-widgetset produces the generated file (see generated.JPG):

[code]

<?xml version="1.0" encoding="UTF-8"?>

I got the verbose output:

[code]
[ERROR]
[loading ZipFileIndexFileObject[F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/annotations/JavaScript.java)]
]
[ERROR]
[parsing started ZipFileIndexFileObject[F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/annotations/JavaScript.java)]
]
[ERROR]
[parsing completed 0ms]

[ERROR]
F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/ui/JavaScript.java):40: error: duplicate class: com.vaadin.ui.JavaScript
[ERROR]
public class JavaScript extends AbstractExtension {
[ERROR]
^
[ERROR]

[ERROR]
F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/server/BootstrapHandler.java):[42,29]
error: cannot access JavaScript
[ERROR]

[ERROR]
could not parse error message: bad source file: F:\Tools\apache-maven\repository\com\vaadin\vaadin-server\7.7.3\vaadin-server-7.7.3.jar(com/vaadin/annotations/JavaScript.java)
[ERROR]
file does not contain class com.vaadin.annotations.JavaScript
[ERROR]
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
[/code]I cannot see the difference from Vaadin 7.6.8 and Vaadin 7.7.0 in file organization. But I have not problem with 7.6.8, but have with 7.7.3. Any hints?

Vaadin has changed its build system to maven in 7.7, so your problem is probably caused by this.

Have you tried to update maven to the latest version? I think we had a similar problem with an old gradle version.

Thank you, C Bosch. I have maven 3.3.9 and the latest version of plugins.

Can you, please, share your project?

have the exact problem, when updated to 7.7.x version, with recursion in the widget module…

Exactly same problem with javac for me :frowning:

I forced the -sourcepath to javac and it works now… Vaadin jars contain java files

Found it :slight_smile: in fact java and class files have exactly the same date in the jar so javac use java files and not classes

Have a look at “SEARCHING FOR TYPES” in the man of javac. Little extract :

If newer is given, the compiler will use the newer of the two files. If source is given, it will use the source file. The default is newer.

I have in my widget set project several patched files in the com.vaadin package. Now I have moved these source files into separate project and now my widgetset project is compiled very well.

Could someone explain how to solve this problem?
I have the same issue.

Here are two problems. The first is compile error, the second is update widget problem. Which one do you have?

I have same problem with compilation of project

project test: Compilation failure: Compilation failure:
[ERROR]
 /data/jenkins/.m2/repository/com/vaadin/vaadin-server/7.7.5/vaadin-server-7.7.5.jar(com/vaadin/server/BootstrapHandler.java):[42,29]
 error: cannot access JavaScript
[ERROR]

[ERROR]
 could not parse error message: bad source file: /data/jenkins/.m2/repository/com/vaadin/vaadin-server/7.7.5/vaadin-server-7.7.5.jar(com/vaadin/annotations/JavaScript.java)
[ERROR]
 file does not contain class com.vaadin.annotations.JavaScript
[ERROR]
 Please remove or make sure it appears in the correct subdirectory of the sourcepath.

How to fix that error?

As I wrote I have move all sources from my widget project to another project and compile error disappeared.

As I see, I have a compile error.

Hi guys ! I don’t know how, but figured out how to solve this problem.
I’ve mavinized vaadin demo application, put widgetset in a separate module and it works fine.
App is running on a Tomcat in https mode, so first create self-signed digital certificate.
Git project is here :
https://github.com/dobrivoje/vaadingeneric

Happy coding !