Error after migrating vaadin 7 to 8 - vaadin7

I just used https://vaadin.com/docs/framework/v8/migration/migrating-to-vaadin8.html to migrate my application from vaadin 7 to vaadin 8.1.4. I was able to compile the widgetset file, but when I am trying to run the application on tomcat 8, I am getting following error
java.lang.NoSuchMethodError: com.vaadin.ui.Button.addClickListener(Lcom/vaadin/ui/Button$ClickListener;)Lcom/vaadin/shared/Registration;
....
....
....
SEVERE: Servlet.service() for servlet [vaadin-servlet] in context with path [/activescreener] threw exception [com.vaadin.server.ServiceException: java.lang.NoSuchMethodError: com.vaadin.ui.Button.addClickListener(Lcom/vaadin/ui/Button$ClickListener;)Lcom/vaadin/shared/Registration;] with root cause
java.lang.NoSuchMethodError: com.vaadin.ui.Button.addClickListener(Lcom/vaadin/ui/Button$ClickListener;)Lcom/vaadin/shared/Registration;
Is something wrong with my migration. I can see in my classes, not every import is migrated to *.v7
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CustomComponent;
import com.vaadin.v7.ui.HorizontalLayout;
import com.vaadin.ui.Layout;
import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.MenuItem;
import com.vaadin.v7.ui.OptionGroup;
import com.vaadin.ui.UI;
import com.vaadin.v7.ui.VerticalLayout;
Example, I still have com.vaadin.ui.Button;, Should it be com.vaadin.v7.ui.Button?

Related

Missing Jar Files for HelloGlobe (JogAmp)

I am trying to run the following example.
I get errors for the following lines
import framework.Semantic;
import glm.mat.Mat4x4;
import glm.vec._2.Vec2;
import glm.vec._3.Vec3;
import uno.debug.GlDebugOutput;
import uno.glsl.Program;
...
import static glm.GlmKt.glm;
import static uno.buffer.UtilKt.destroyBuffer;
import static uno.buffer.UtilKt.destroyBuffers;
It seems that I am missing some more jar files even though I successfully imported jogl-all.jar and gluegen-rt.jar
I tried searching mvnrepository but did not find the jars I was looking for. I am not using maven.

Vue 3 - Bootstrap Rollup Failure

I'm new Vue, I don't understand this error from installing bootstrap-vue-3
Install commands:
npm i --save bootstrap bootstrap-vue-3
Configuration [main.js]:
import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
import BootstrapVue3 from 'bootstrap-vue-3'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'
createApp(App)
.use(BootstrapVue3)
.mount('#app')
Errors:
Rollup failed to resolve import "bootstrap/js/dist/carousel" from "node_modules/bootstrap-vue-3/dist/bootstrap-vue-3.es.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to rollupInputOptions.external
This is a new project -- nothing added aside from default stuff and bootstrap.

javafx - MediaException: PLAYBACK_HALTED : DirectSoundCreate: (NULL)

I wanto to play a mp4 video inside of my java application. The software is running fine on my main PC where a sound card is installed. But on another PC with no sound device at all, this is the content of the player.getError:
MediaException: PLAYBACK_HALTED : DirectSoundCreate: (NULL)
This is a part of the code:
import java.awt.BorderLayout;
import java.io.File;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Mixer.Info;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.media.MediaView;
Media m = new Media(file.toURI().toString());
MediaPlayer player = new MediaPlayer(m);
MediaView viewer = new MediaView(player);
player.setAutoPlay(true);
player.setCycleCount(MediaPlayer.INDEFINITE);
player.setOnError(()->Logging.getLogger().log("MediaPlayer setOnError: " + player.getError().toString(),Message.MESSAGE));
I can provide more code, if necessary. Once before I provided too much code and got bad comments about that.
My questions, how can I configure javaFX media player or one of it's components to run the video without a sound device. There must be something to configure. But I do not know.
Edit:
I was checking the versions of javafx on both PCs:
System.out.print(com.sun.javafx.runtime.VersionInfo.getRuntimeVersion());
8.0.311-b11 (Office PC where the code is working)
8.0.201-b08 (Shopfloor PC where the code is not working)
Edit:
I have installed a virtual sound card on the shopfloor PC. The error message disappeared. But no video is playing. No error message is showing. No exception is showing.
I need to get in contact with out MES supplier, because my java code on the shopfloor PC is running inside of a MES system.
(MES = Manufacturing Execution System)

The browser tells "failed to compile"

i import the bootstrap vue like this:
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
i already tried consulting all forums with similar questions but nothing
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Failed to compile.
/home/fabry/node_modules/bootstrap-vue/dist/bootstrap-vue.css (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??ref--6-oneOf-3-2!/home/fabry/node_modules/bootstrap-vue/dist/bootstrap-vue.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: No PostCSS Config found in: /home/fabry/node_modules/bootstrap-vue/dist
at config.search.then (/home/fabry/Scrivania/programmazione/web/Vue/realVueFool/quiz/node_modules/postcss-load-config/src/index.js:91:15)
Did you follow the instructions here?
It sounds like you either didn't install all the dependencies or failed to register components in your Vue app.

The import org.springframework.web.servlet cannot be resolved

I am learning SpringMVC, started a tutorial, I put all the jars in the library, but I got :
The import org.springframework.web.servlet cannot be resolved for :
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

Resources