I am following a nice openArchitectureWare tutorial (It is about code generation with oAW from EMF models using Xpand).
At the final code generation step, when it is supposed to generate the code (when running workflow.oaw after defining the Root.xpt template), I get this error:
0 INFO WorkflowRunner - --------------------------------------------------------------------------------------
9 INFO WorkflowRunner - openArchitectureWare 4.3.1, Build 20090107-2000PRD
9 INFO WorkflowRunner - (c) 2005-2008 openarchitectureware.org and contributors
10 INFO WorkflowRunner - --------------------------------------------------------------------------------------
11 INFO WorkflowRunner - running workflow: workflow.oaw
11 INFO WorkflowRunner -
Exception in thread "main" java.lang.NoSuchFieldError: ruleMemo
at org.openarchitectureware.xpand2.parser.XpandParser.<init>(XpandParser.java:63)
at org.openarchitectureware.xpand2.parser.XpandParser.<init>(XpandParser.java:74)
at org.openarchitectureware.xpand2.parser.XpandLocationAddingParser.<init>(XpandLocationAddingParser.java:32)
at org.openarchitectureware.xpand2.parser.XpandParseFacade$2.<init>(XpandParseFacade.java:52)
at org.openarchitectureware.xpand2.parser.XpandParseFacade.getParser(XpandParseFacade.java:52)
at org.openarchitectureware.xpand2.parser.XpandParseFacade.file(XpandParseFacade.java:34)
at org.openarchitectureware.xpand2.parser.XpandParseFacade.file(XpandParseFacade.java:21)
at org.openarchitectureware.xpand2.Generator.getStatement(Generator.java:457)
at org.openarchitectureware.xpand2.Generator.checkConfigurationInternal(Generator.java:497)
at org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:42)
at org.openarchitectureware.workflow.container.CompositeComponent.checkConfiguration(CompositeComponent.java:169)
at org.openarchitectureware.workflow.WorkflowRunner.prepare(WorkflowRunner.java:310)
at org.openarchitectureware.workflow.WorkflowRunner.run(WorkflowRunner.java:258)
at org.openarchitectureware.workflow.WorkflowRunner.main(WorkflowRunner.java:213)
I searched a lot for the solution. Most of them say that it is an incompatibility issue, for example having several versions of a special jar file in the class path but I can`t find any duplicate jar files at eclipse plugins folder. Is it really the cause? If so, what are the duplicate jar files in my case? and if not, any other solution?
(I have installed oAW 4.3.1 and Xpand 1.4.0 on eclipse-java-kepler-R-win32-x86_64)
Xpand was originally developed as part of openArchitectureWare project. But now, it is an independent component under eclipse and there is no need to install oaw first. So, Changing the whole idea and using this newer tutorial
brought the satisfaction :)
Related
I'm looking for a bit of Java help here.
I am trying to run MapTool on a Raspberry Pi 4. No mean feat -- I've installed ubuntu server, so I could get a 64 bit operating system. Then I had to build OpenJDK-9 so I could build OpenJDK-10 (a weekend I won't be getting back -- Maptool requires JDK10). Then I was ready to follow the instructions posted here: https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/
Those steps said:
1- download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/
extract the zip and put the lib folder into the same folder where the MapTool jar is (here ~/MapTool/lib
)
to run MapTool, open a terminal there (~/MapTool/) and execute in a single line
java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions
That almost worked. I get this error:
21:54:03.013 (MapTool.java:1555) [main] INFO net.rptools.maptool.client.MapTool - AppHome System Property: /home/ubuntu/.maptool/logs
21:54:03.016 (MapTool.java:1556) [main] INFO net.rptools.maptool.client.MapTool - Logging to: /home/ubuntu/.maptool/logs/maptool.log
21:54:03.020 (MapTool.java:1563) [main] INFO net.rptools.maptool.client.MapTool - getting MapTool version from manifest: 1.7.0
21:54:03.026 (MapTool.java:1568) [main] INFO net.rptools.maptool.client.MapTool - getting MapTool vendor from manifest: rptools
21:54:03.403 (MapTool.java:1638) [main] INFO net.rptools.maptool.client.MapTool - MapTool version: 1.7.0
21:54:03.405 (MapTool.java:1641) [main] INFO net.rptools.maptool.client.MapTool - MapTool vendor: rptools
InteropFactory: cannot load com.sun.javafx.embed.swing.newimpl.InteropFactoryN
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:251)
at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:267)
at net.rptools.maptool.client.swing.SplashScreen.<init>(SplashScreen.java:36)
at net.rptools.maptool.client.MapTool.main(MapTool.java:1693)
at net.rptools.maptool.client.LaunchInstructions.main(LaunchInstructions.java:50)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:844)
I'm guessing I either need to add some argument to the launch command or I didn't build the image for JDK10 completely. Can anyone help?
So, in the end, as of this date (18 Jul 2020) it doesn't make sense to use Ubuntu server for the Pi 4 -- too much work for not enough speed payoff. A guy on reddit got it working using the 32 bit Raspian release. I'm reposting his guidelines below . They work. https://www.reddit.com/r/MapTool/comments/evua2p/maptool_on_the_raspberry_pi/
download the MapTool 1.7 .jar version and save it in a new folder (e.g. ~/MapTool/MapTool-1.7.0.jar)
remove any currently installed OpenJDK versions
sudo apt purge openjdk*
install OpenJDK version 10 (MapTool still uses SDK version 10 at least for compilation)
sudo apt install openjdk-10-jdk
download the JavaFX 11 Linux SDK (not armv6hf SDK) from here: https://gluonhq.com/products/javafx/
extract the zip and put the lib folder into the same folder where the MapTool jar is (here ~/MapTool/lib)
to run MapTool, open a terminal there (~/MapTool/) and execute in a single line
java -cp "MapTool-1.7.0.jar:lib/*" net.rptools.maptool.client.LaunchInstructions
(put spaces where there are linebreaks in this text)
to make launching more convenient, put the command in an executable bash file
Do you really need to build the JDK yourself? BellSoft, AdoptOpenJDK, Azul all provide different JDK's you can install on ARM. For some more info and install scripts for BellSoft LibericaJDK, check https://webtechie.be/post/2020-04-08-installing-java-and-javafx-on-raspberry-pi/
I have a java application in which I am using google cloud speech recognition. Everything works fine when I execute the runnable jar in Ubuntu, but when I execute the runnable jar in my raspberry pi 3 with OS Raspbian using the command java -jar JarFile.jar I get an error about a dependency with netty, which I have never used.
I have read this question
Failed to load libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
which is exactly the same as mine, but I don't know how to carry out the answer provided there. If someone could give me more information about how to do that I would be very pleased.
I have already tried:
Using netty in my maven dependencies although I don't need it.
Installing tomcat apache (I thought it could provide some SSL solution)
Adding latest netty .jar to my dependencies
These are the first lines of the error trace I get:
dic 30, 2018 11: 14: 39 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFORMACIÓN: netty - tcnative unavailable(this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java: 93)
at
Netty does not provide a netty-tcnative artifact for arm32 so you will need to either build it yourself or use another SSL implementation together with grpc. As far as I know they also support using the one which is provided as part of the JDK or allow to use conscrypt.
I'm using Backendless to handle data and push notifications for an iOS app. I am currently trying to write the server side code for a timer in Java.
I have followed the guide here to download the timer code, open it and build it in IntelliJ IDEA and then run CodeRunner through the terminal.
This is the only output I get from CodeRunner:
[INFO] JDK from "JAVA_HOME" - /Library/Java/Home
[INFO] CodeRunner(tm) Backendless Debugging Utility
[INFO] Copyright(C) 2018 Backendless Corp. All rights reserved.
[INFO] Version: 4.4.7 Build date: 2018-05-14T13:42:44Z
[INFO] CodeRunner session is running for 2 hours and will be terminated on 09:38:39.755[UTC]
It never seems to get to the registering step. There is a whole heap of output before the codeRunner version etc, stuff like
07:38:39,284 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
07:38:39,284 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
Not sure if that has anything to do with it.
Can anyone point me in the right direction to get CodeRunner up and running, no pun intended?
I had this problem since 2 hours. I tested it in a sample project 2 weeks ago and it worked fine. Now I'm using it in a real App, it can't register the CodeRunner.
The reason is the CodeRunner.jar build 2018-05-14 seems to have a bug. I replace the old CodeRunner.jar and weborb.jar from the sample project (build 2018-05-02) inside the bin directory and it works fine now. Here's the 2 JAR Files in my Google Drive. I replaced both cause I'm not sure where the bug is.
The blog post you linked is for the deprecated version 3 of Backendless (you should have noticed that the console now looks very different from the screenshots). Though the process is mostly the same as described in this blog post, this documentation for current version is much more relevant. There is a quick-start guide there for event handlers, the process for timers is analogous.
I was able to run my application previously but since today when i tried some experiments it gives me jar hell error out of sudden. Which I have no idea what this exception about, and now my project couldn't work anymore. This is the error causes:
44 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/annotations-api.jar
55 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-ant.jar
57 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-ha.jar
59 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-tribes.jar
62 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina.jar
Exception in thread "main" java.lang.IllegalStateException: failed to load bundle [] due to jar hell
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:338)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:109)
at org.elasticsearch.node.Node.<init>(Node.java:146)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at com.elastic.Main.main(Main.java:38)
Caused by: java.lang.IllegalStateException: jar hell!
class: org.apache.catalina.util.Base64
jar1: /usr/local/apache-tomcat-7.0.62/lib/catalina-ant.jar
jar2: /usr/local/apache-tomcat-7.0.62/lib/catalina.jar
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:280)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:186)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336)
... 5 more
Why is the jar hell occurring? I never seen this before in my developer life and my application was workable before today. Am I missing something important to implement elasticsearch? Here is my code snippet.
Settings.Builder settings = Settings.settingsBuilder();
settings.put("path.home", Paths.get("").toAbsolutePath().toString() + File.separator + "resource" + File.separator + "elasticsearch-2.1.2");
settings.put("cluster.name","mySearch");
Node node = NodeBuilder.nodeBuilder().settings(settings).build().start();
Client client = node.client();
Any helps or clues are welcome and greatly appreciate
EDIT 1:
I was not using VM argument to determine the ES home path as I need to take the project into different paths and platforms when I transferring project.
EDIT 2:
I tried to change my project with elastic home path in VM argument also won't work anymore because I did following the solution that mentioned with this link, but error still raise.
Try to use:
-Dtests.jarhell.check=false
Remark: It works with my Elasticsearch 2.4. I saw comments, that it is not available in all Elasticsearch versions (see Elasticsearch jar hell when writing integration tests)
I got the same error message with catalina.jar conflicting with catalina-ant.jar. So, the quick fix was to rename catalina-ant.jar to catalina-ant.jar.orig in the $TOMCAT/lib folder.
Tomcat is still running for me, even with the one library missing.
I was very excited to see that there is a check-style like plugin called CheckStyle-IDEA plugin for IntelliJ that i can enforce code style on the source.
I installed it using the IDE plugin repository, restarted it.
Unfortunately After pressing the check this file or check project I got the an exception (see log below).
I am using windows 7 pro,
IDEA 10.0.3 build #103.255 Build on April 2011
JDK 1.6.0_21
did anyone encountered this problem?
is there any other tool to do this job through the intelliJ IDE?
Thanks
2011-05-05 11:41:56,723 [1300492] INFO - ea.checkstyle.CheckStylePlugin - Scanning current file(s).
2011-05-05 11:41:56,727 [1300496] ERROR - style.checker.CheckFilesThread - An error occurred while scanning a file.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:409)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:72)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.charAt(String.java:686)
at java.util.regex.Matcher.appendReplacement(Matcher.java:703)
at java.util.regex.Matcher.replaceAll(Matcher.java:813)
at java.lang.String.replaceAll(String.java:2189)
at org.infernus.idea.checkstyle.util.ScannableFile.parentDirFor(ScannableFile.java:72)
at org.infernus.idea.checkstyle.util.ScannableFile.createTemporaryFileFor(ScannableFile.java:58)
at org.infernus.idea.checkstyle.util.ScannableFile.(ScannableFile.java:40)
at org.infernus.idea.checkstyle.checker.CreateScannableFileAction.run(CreateScannableFileAction.java:60)at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:757) at org.infernus.idea.checkstyle.checker.FileScanner.createTemporaryFile(FileScanner.java:228)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:167)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:80)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:770) at org.infernus.idea.checkstyle.checker.CheckFilesThread.runFileScanner(CheckFilesThread.java:39) at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:132)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:57)
Checkstyle-idea plugin is sadly rather buggy :(
You can post or view issues at http://code.google.com/p/checkstyle-idea/ and get much faster support than here.