After doing the configuraton on Putty for X11. When I am running dbca I am getting the following error:
[oracle#XYZ bin]$ dbca
Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class sun.awt.X11.XToolkit
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
From command promt i have already run the command for Xming:
"C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -multiwindow -ac
run this, export DISPLAY=localhost:10.0
after that, run dbca
Related
I'm trying to Dockerize my (otherwise running nice) very small akka-http webapp. I'm using the buildfile indicated here. For convenience added:
FROM alpine:latest as packager
RUN apk --no-cache add openjdk11-jdk openjdk11-jmods
ENV JAVA_MINIMAL="/opt/java-minimal"
# build minimal JRE
RUN /usr/lib/jvm/java-11-openjdk/bin/jlink \
--verbose \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
--compress 2 --strip-debug --no-header-files --no-man-pages \
--release-info="add:IMPLEMENTOR=radistao:IMPLEMENTOR_VERSION=radistao_JRE" \
--output "$JAVA_MINIMAL"
FROM alpine:latest
ENV JAVA_HOME=/opt/java-minimal
ENV PATH="$PATH:$JAVA_HOME/bin"
COPY --from=packager "$JAVA_HOME" "$JAVA_HOME"
COPY build/libs/application.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
However it fails to start with error below. Because I'm using a minimalistic setup for jre11 I think I might be missing some modules. But I'm not sure, and I don't know which java modules are mandatory for an akka-http scala-12 application. Hopefully somebody knows??
Exception in thread "main" java.lang.ExceptionInInitializerError
at akka.dispatch.AbstractNodeQueue.<clinit>(AbstractNodeQueue.java:181)
at akka.actor.LightArrayRevolverScheduler.<init>(LightArrayRevolverScheduler.scala:157)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$1(ReflectiveDynamicAccess.scala:33)
at scala.util.Try$.apply(Try.scala:209)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:28)
at akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$5(ReflectiveDynamicAccess.scala:39)
at scala.util.Success.flatMap(Try.scala:247)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:39)
at akka.actor.ActorSystemImpl.createScheduler(ActorSystem.scala:925)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:786)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:246)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:289)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:234)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:225)
at nl.d8r.stretchsketch.WebServer$.main(Server.scala:37)
at nl.d8r.stretchsketch.WebServer.main(Server.scala)
Caused by: java.lang.ExceptionInInitializerError
at akka.util.Unsafe.<clinit>(Unsafe.java:42)
at akka.dispatch.AbstractNodeQueue.<clinit>(AbstractNodeQueue.java:179)
... 19 more
Caused by: java.lang.NoClassDefFoundError: sun/misc/Unsafe
at akka.util.Unsafe.<clinit>(Unsafe.java:22)
... 20 more
Caused by: java.lang.ClassNotFoundException: sun.misc.Unsafe
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 21 more
You need to add a jvm argument to your ENTRYPOINT clause:
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
and should look like the following:
ENTRYPOINT ["java", "--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED", "-jar","/app.jar"]
I am getting the following exception while trying to run the ssoadm .setup script. This is with openam13 snapshot version i got on 01/04/2016. It worked before that. Can anyone point me to what might be the issue?
Executing command "/Users/sso-config/target/ssoadmintools/setup --path /apps/openam/server --log /apps/openam/log --acceptLicense --debug /apps/openam/debug" in working directory target/ssoadmintools/
Exception in thread "main" java.lang.NoClassDefFoundError: org/forgerock/services/TransactionId
at org.forgerock.openam.audit.context.AuditRequestContext$1.initialValue(AuditRequestContext.java:35)
at org.forgerock.openam.audit.context.AuditRequestContext$1.initialValue(AuditRequestContext.java:32)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:160)
at java.lang.ThreadLocal.get(ThreadLocal.java:150)
at org.forgerock.openam.audit.context.AuditRequestContext.get(AuditRequestContext.java:124)
at org.forgerock.openam.audit.context.AuditRequestContext.createSubTransactionIdValue(AuditRequestContext.java:160)
at org.forgerock.openam.ldap.LDAPRequests.newSimpleBindRequest(LDAPRequests.java:54)
at org.forgerock.openam.ldap.LDAPUtils.newConnectionFactory(LDAPUtils.java:249)
at org.forgerock.openam.ldap.LDAPUtils.newFailoverConnectionFactory(LDAPUtils.java:200)
at com.iplanet.services.ldap.DSConfigMgr.getNewFailoverConnectionFactory(DSConfigMgr.java:324)
at com.iplanet.services.ldap.DSConfigMgr.getNewConnectionFactory(DSConfigMgr.java:289)
at com.sun.identity.setup.Bootstrap.getConfiguration(Bootstrap.java:190)
at com.sun.identity.setup.Bootstrap.load(Bootstrap.java:136)
at com.sun.identity.tools.bundles.Main.main(Main.java:143)
Caused by: java.lang.ClassNotFoundException: org.forgerock.services.TransactionId
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 14 more
Command process exited with value 1
Can you try running the setup command from the directory where the script is located instead of using the absolute path to the script?
Try this:
./setup --path /apps/openam/server --log /apps/openam/log --acceptLicense --debug /apps/openam/debug
Instead of this:
/Users/sso-config/target/ssoadmintools/setup --path /apps/openam/server --log /apps/openam/log --acceptLicense --debug /apps/openam/debug
My guess is that java cannot find some libraries in the classpath when you use the absolute path.
I'm trying to setup ritz-nrepl to use emacs as a clojure debugger.
I have lein 2. I got emacs 24.2.1 (fresh install) and clojure-mode. Then I did what the readme says here https://github.com/pallet/ritz/tree/develop/nrepl under nREPL debugger installation (putting stuff in init.el and .lein/profiles.clj) and then did M-x nrepl-ritz-jack-in. I got the output below. Am I doing something wrong? I have only done what I said, nothing more. Maybe I'm missing a step?
Could not find artifact robert:hooke:jar:1.1.2 in central (http://repo1.maven.org/maven2)
Retrieving robert/hooke/1.1.2/hooke-1.1.2.jar (3k)from https://clojars.org/repo/
Retrieving leiningen/leiningen/2.0.0-preview10/leiningen-2.0.0-preview10.jar (165k)
from https://clojars.org/repo/
Retrieving leiningen-core/leiningen-core/2.0.0-preview10/leiningen-core-2.0.0-preview10.jar (21k)
from https://clojars.org/repo/
Exception in thread "main" java.lang.ClassNotFoundException: com.sun.jdi.VirtualMachine
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at ritz.jpda.jdi$eval1039$loading__4784__auto____1040.invoke(jdi.clj:1)
at ritz.jpda.jdi$eval1039.invoke(jdi.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.load(Compiler.java:6952)
at clojure.lang.RT.loadResourceScript(RT.java:359)
at clojure.lang.RT.loadResourceScript(RT.java:350)
at clojure.lang.RT.load(RT.java:429)
at clojure.lang.RT.load(RT.java:400)
at clojure.core$load$fn__4890.invoke(core.clj:5415)
at clojure.core$load.doInvoke(core.clj:5414)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5227)
at clojure.core$load_lib.doInvoke(core.clj:5264)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$load_libs.doInvoke(core.clj:5298)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$require.doInvoke(core.clj:5381)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at ritz.jpda.debug$eval888$loading__4784__auto____889.invoke(debug.clj:1)
at ritz.jpda.debug$eval888.invoke(debug.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.load(Compiler.java:6952)
at clojure.lang.RT.loadResourceScript(RT.java:359)
at clojure.lang.RT.loadResourceScript(RT.java:350)
at clojure.lang.RT.load(RT.java:429)
at clojure.lang.RT.load(RT.java:400)
at clojure.core$load$fn__4890.invoke(core.clj:5415)
at clojure.core$load.doInvoke(core.clj:5414)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5227)
at clojure.core$load_lib.doInvoke(core.clj:5264)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$load_libs.doInvoke(core.clj:5298)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:605)
at clojure.core$use.doInvoke(core.clj:5392)
at clojure.lang.RestFn.invoke(RestFn.java:3659)
at ritz.nrepl$eval5$loading__4784__auto____6.invoke(nrepl.clj:1)
at ritz.nrepl$eval5.invoke(nrepl.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.load(Compiler.java:6952)
at clojure.lang.RT.loadResourceScript(RT.java:359)
at clojure.lang.RT.loadResourceScript(RT.java:350)
at clojure.lang.RT.load(RT.java:429)
at clojure.lang.RT.load(RT.java:400)
at clojure.core$load$fn__4890.invoke(core.clj:5415)
at clojure.core$load.doInvoke(core.clj:5414)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5227)
at clojure.core$load_lib.doInvoke(core.clj:5264)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$load_libs.doInvoke(core.clj:5298)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:603)
at clojure.core$require.doInvoke(core.clj:5381)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval1.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.eval(Compiler.java:6500)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$eval_opt.invoke(main.clj:297)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Subprocess failed
I think you're missing tools.jar from the classpath, you'll find it in the lib directory of your JDK (not JRE).
If anyone else has this problem this is how I solved it
(it was a little more complicated than just installing the JDK)
Install the JDK. I put it in C:\jdk1.7.0
Use lein-localrepo to install it as a local jar as follows:
Add :plugins [[lein-localrepo "0.4.0"]] to your user profile in .lein\profiles.clj
lein deps
lein localrepo install "C:/jdk1.7.0/lib/tools.jar" "com.sun.jdi.VirtualMachine" 1.7.0
Make sure lein-localrepo can find the jar. lein localrepo list | grep jdi should show: com.sun.jdi.VirtualMachine (1.7.0)
Add :dependencies [[com.sun.jdi.VirtualMachine "1.7.0"]] to your user profile
lein deps
In emacs, nrepl-ritz-jack-in should now work correctly
I copied TriggerSample.java to this directory. Then:
javac -cp h2-1.3.168.jar TriggerSample.java
creates
TriggerSample$MyTrigger.class ... and ... TriggerSample.class
Then:
java TriggerSample
says:
Exception in thread "main" java.lang.NoClassDefFoundError: TriggerSample (wrong name: org/h2/samples/TriggerSample)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
also no go with:
java org.h2.samples.TriggerSample
java org/h2/samples/TriggerSample
How exactly to run that example from the command line?
This is a regular Java problem. The package name of class TriggerSample is org.h2.samples. You should use the directory name org/h2/samples.
Create a directory org/h2/samples
mkdir org/h2/samples
Move the file TriggerSample.java to that directory
Run
javac -cp h2-1.3.168.jar org/h2/samples/TriggerSample.java
Then run
java -cp h2-1.3.168.jar:. org.h2.samples.TriggerSample
Or: remove the package declaration of the file TriggerSample.java.
when I run: java %JAVA_OPTS% -cp %JARS%(jar_files) com.android.cts.TestHost %CONFIG%(xml path) %* %DDCONFIG%
in cmd promt im getting following error, please anybody suggest solution for this error
Exception in thread "main" java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: and. Program will exit.
Package com.android.cts.TestHost is exists in Jar file.which
I had the same issue by using cygwin
I found the solution on this blog
You just have to do the modification of those two line in the script startcts :
JARS=`cygpath -w -p ${CTS_LIB}:${DDM_LIB}:${JUNIT_LIB}:${HOSTTEST_LIB}`
java ${JAVA_OPTS} -cp ${JARS} com.android.cts.TestHost `cygpath -w ${CONFIG}` "$#" ${DDCONFIG}
Then I was able to have the CTS prompt