Error while running openIE using scala - java

i am running openIE in scala. while running sbt run i got error. can any body explain?
Set current project to openie (in build file:/home/user_name/Videos/openie-master/)
[info] Running edu.knowitall.openie.OpenIECli
[error] Exception in thread "main" java.lang.NoSuchFieldError: MODULE$
[error] at scala.util.PropertiesTrait$class.scalaPropOrNone(Properties.scala:65)
[error] at scala.util.Properties$.scalaPropOrNone(Properties.scala:16)
[error] at scala.util.PropertiesTrait$class.$init$(Properties.scala:77)
[error] at scala.util.Properties$.<init>(Properties.scala:16)
[error] at scala.util.Properties$.<clinit>(Properties.scala)
[error] at scala.compat.Platform$.<init>(Platform.scala:112)
[error] at scala.compat.Platform$.<clinit>(Platform.scala)
[error] at scala.App$class.$init$(App.scala:42)
[error] at edu.knowitall.openie.OpenIECli$.<init>(OpenIECli.scala:29)
[error] at edu.knowitall.openie.OpenIECli$.<clinit>(OpenIECli.scala)
[error] at edu.knowitall.openie.OpenIECli.main(OpenIECli.scala)

Related

java.lang.UnsatisfiedLinkError when starting the play project

Im trying to start a project on play in IntelliJ IDEA Ultimate MacBook Pro on M1, I get the following error in the console:
[error] java.lang.UnsatisfiedLinkError:
/Users/username/Library/Caches/JNA/temp/jna2878211531869408345.tmp:
dlopen(/Users/username/Library/Caches/JNA/temp/jna2878211531869408345.tmp,
0x0001): tried:
'/Users/username/Library/Caches/JNA/temp/jna2878211531869408345.tmp'
(fat file, but missing compatible architecture (have 'i386,x86_64',
need 'arm64e')), '/usr/lib/jna2878211531869408345.tmp' (no such file)
I tried to reinstall the JDK on the arm architecture after deleting all the JDKs, it did not help
What needs to be tricked to fix this?
Full StackTrace:
[error] java.lang.UnsatisfiedLinkError: /Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp: dlopen(/Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp, 0x0001): tried: '/Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna2878211531869408345.tmp' (no such file)
[error] at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
[error] at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
[error] at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
[error] at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
[error] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
[error] at java.base/java.lang.Runtime.load0(Runtime.java:768)
[error] at java.base/java.lang.System.load(System.java:1837)
[error] at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
[error] at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
[error] at com.sun.jna.Native.<clinit>(Native.java:195)
[error] at io.methvin.watchservice.jna.CarbonAPI.<clinit>(CarbonAPI.java:19)
[error] at io.methvin.watchservice.jna.CFStringRef.toCFString(CFStringRef.java:23)
[error] at io.methvin.watchservice.MacOSXListeningWatchService.register(MacOSXListeningWatchService.java:101)
[error] at io.methvin.watchservice.WatchablePath.register(WatchablePath.java:50)
[error] at io.methvin.watcher.DirectoryWatcher.register(DirectoryWatcher.java:352)
[error] at io.methvin.watcher.DirectoryWatcher.registerAll(DirectoryWatcher.java:317)
[error] at io.methvin.watcher.DirectoryWatcher.<init>(DirectoryWatcher.java:167)
[error] at io.methvin.watcher.DirectoryWatcher$Builder.build(DirectoryWatcher.java:118)
[error] at play.dev.filewatch.DefaultFileWatchService.watch(DefaultFileWatchService.scala:38)
[error] at play.dev.filewatch.FileWatchService$$anon$1.watch(FileWatchService.scala:87)
[error] at play.runsupport.Reloader.<init>(Reloader.scala:414)
[error] at play.runsupport.Reloader$.reloader$lzycompute$1(Reloader.scala:259)
[error] at play.runsupport.Reloader$.play$runsupport$Reloader$$reloader$1(Reloader.scala:251)
[error] at play.runsupport.Reloader$.startDevMode(Reloader.scala:271)
[error] at play.sbt.run.PlayRun$.devModeServer$lzycompute$1(PlayRun.scala:99)
[error] at play.sbt.run.PlayRun$.devModeServer$1(PlayRun.scala:83)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3(PlayRun.scala:106)
[error] at play.sbt.run.PlayRun$.$anonfun$playRunTask$3$adapted(PlayRun.scala:68)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] stack trace is suppressed; run 'last Compile / run' for the full output
[error] (Compile / run) java.lang.UnsatisfiedLinkError: /Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp: dlopen(/Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp, 0x0001): tried: '/Users/romangoltsov/Library/Caches/JNA/temp/jna2878211531869408345.tmp' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/jna2878211531869408345.tmp' (no such file)
Found a solution:
Inside sbt 1.4.6 there is a JNA library version 5.5.0, which apparently does not have the necessary files for the arm64 architecture processor
Raising the sbt version to 1.6.2 helped

The type org.eclipse.swt.widgets.Control cannot be resolved. It is indirectly referenced from required .class files

I am compling dbeaver-7.2.2 on mips64el platform using the command "mvn package -DskipTests=true". it fails and displays error as follws:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.7.0:compile (default-compile) on project org.jkiss.dbeaver.ui: Compilation failure: Compilation failure:
[ERROR] /root/dbeaver-7.2.2/plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertyTreeViewer.java:
[ERROR] /*
[ERROR] ^
[ERROR] The type org.eclipse.swt.widgets.Control cannot be resolved. It is indirectly referenced from required .class files
[ERROR] /root/dbeaver-7.2.2/plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertyTreeViewer.java:[1101]
[ERROR] private class SortListener implements Listener {
[ERROR] ^^^^^^^^
[ERROR] Listener cannot be resolved to a type
[ERROR] /root/dbeaver-7.2.2/plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/properties/PropertyTreeViewer.java:[1173]
[ERROR] class PaintListener implements Listener {
[ERROR] ^^^^^^^^
[ERROR] Listener cannot be resolved to a type
[ERROR] 3 problems (3 errors)
[ERROR] -> [Help 1]
ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.jkiss.dbeaver.ui
the class PaintListener belogs to org.eclipse.swt.gtk.linux.mips64el which has been compiled successfully.i have set org.eclipse.swt.gtk.linux.mips64el classpath ,but it stills fail.
dbeaver-7.2.2 source code:https://github.com/dbeaver/dbeaver/releases/tag/7.2.2
[ERROR] The type org.eclipse.swt.widgets.Control cannot be resolved. It is indirectly referenced from required .class files
the class PaintListener belogs to org.eclipse.swt.gtk.linux.mips64el which has been compiled successfully.i have set org.eclipse.swt.gtk.linux.mips64el classpath ,but it stills fail.

Error while running maven command in gcp console unable to install common package error

unable to install apache maven packages in gcp console please let me know if any one resolves the issue. I'm trying to create dataflow pipeline following the below link
enter link description here
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.368 s
[INFO] Finished at: 2020-08-30T15:27:29Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project common: Compilation failure: Compilation failure:
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/utils/CacheUtils.java:[78,12] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.utils.CacheUtils.DataStreamPkCache
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/utils/CacheUtils.java:[80,30] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.utils.CacheUtils.DataStreamPkCache
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/cdc/mappers/MergeInfoMapper.java:[29,42] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: package com.google.cloud.teleport.v2.utils
[ERROR] /home/prasanna_kumar/DataflowTemplates/v2/common/src/main/java/com/google/cloud/teleport/v2/cdc/mappers/MergeInfoMapper.java:[59,11] cannot find symbol
[ERROR] symbol: class DataStreamClient
[ERROR] location: class com.google.cloud.teleport.v2.cdc.mappers.MergeInfoMapper
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :common
By now this is well known to developers bug, confirmed on my side, getting the same kafka-to-bigquery template compilation error around DataStreamClient class. Seems the new PR for CacheUtils.java is going to appear soon, more info here.

SBT <project name> project refresh failed

Whenever I try to enable auto-import in IntelliJ it always gives me this error:
SBT 'mobile-aggregator' project refresh failed
Error:Error while importing SBT project:[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:107)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:101)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:57)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:42)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:34)
[error] at sbt.StandardMain$.runManaged(Main.scala:113)
[error] at sbt.xMain.run(Main.scala:76)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[info] shutting down serverSee complete log in href="file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log">file:/C:/Users/Rahman/.IdeaIC2017.2/system/log/sbt.last.log
This happens quite a few times when your compiler / editor tries to use your cached project data.
To fix this, perform the following steps:
Exit IntelliJ & Delete .idea folder from the root project folder
Delete target folder from root_project_folder\target & root_project_folder\project\target
Make sure you have a valid name for your project name inside build.sbt. It should be in the following format: name := "projectname"
Again start your intelliJ and reinitialize your project.
Hopefully, that should have solved your problem

Run Test Play! Framework - DataSource user is null

Hello I am trying run a simple test in a web app using Play! Framework, but I got a error:
[info] RouteTest
[error] Test RouteTest.testRouteActivityIndex failed: DataSource user is null?
[error] at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.<init>(DataSourcePool.java:198)
[error] at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.getDataSource(DataSourceManager.java:210)
[error] at com.avaje.ebeaninternal.server.lib.sql.DataSourceGlobalManager.getDataSource(DataSourceGlobalManager.java:63)
[error] at com.avaje.ebeaninternal.server.core.DefaultServerFactory.getDataSourceFromConfig(DefaultServerFactory.java:427)
[error] at com.avaje.ebeaninternal.server.core.DefaultServerFactory.setDataSource(DefaultServerFactory.java:388)
[error] at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:168)
[error] at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:125)
[error] at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
[error] at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:64)
[error] at com.avaje.ebean.Ebean$ServerManager.getWithCreate(Ebean.java:237)
[error] at com.avaje.ebean.Ebean$ServerManager.get(Ebean.java:224)
[error] at com.avaje.ebean.Ebean$ServerManager.access$200(Ebean.java:159)
[error] at com.avaje.ebean.Ebean.getServer(Ebean.java:288)
[error] at play.db.ebean.Model$Finder.server(Model.java:216)
[error] at play.db.ebean.Model$Finder.all(Model.java:230)
[error] at models.Activity.all(Activity.java:29)
[error] at controllers.Application.activities(Application.java:18)
[error] at Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.apply(routes_routing.scala:60)
[error] at Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.apply(routes_routing.scala:60)
[error] at play.core.Router$HandlerInvoker$$anon$4$$anon$1.invocation(Router.scala:1086)
[error] at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:33)
[error] at play.core.j.JavaAction$class.apply(JavaAction.scala:74)
[error] at play.core.Router$HandlerInvoker$$anon$4$$anon$1.apply(Router.scala:1085)
[error] at play.test.Helpers.invokeHandler(Helpers.java:34)
[error] at play.test.Helpers.routeAndCall(Helpers.java:246)
[error] at play.test.Helpers.routeAndCall(Helpers.java:231)
[error] at RouteTest.testRouteActivityIndex(RouteTest.java:14)
[error] ...
[info] x RouteTest.testRouteActivityIndex
The code of test is:
#Test
public void testRouteActivityIndex(){
Result result = routeAndCall(fakeRequest(GET, "/activities"));
Assert.assertNotNull(result);
}
I tried researching the error, but did not find anything very useful for this case, even the site's play!. someone has gone through this?
Your /activities action probably make some calls to the DB.
So you should make your test in a running fake application as explained in the "Running in a fake application" section of this documentation: http://www.playframework.org/documentation/2.0.3/JavaTest
And don't forget to import the static Helper:
import static play.test.Helpers.*;

Categories