Android - java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/JAXBContext; - java

When deploying an application on Android this issue comes up:
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/JAXBContext;
How do I resolve it?

Related

Android Studio CheckAarMetadataWorkAction problem

I am getting this error message while running an app on android studio
Caused by:
org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException:
A failure occurred while executing
com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
Expecting some solutions for the Problem

Can javafx run with DRM in ubuntu without desktop environment?

I am tring to run a javafx program on ubuntu with this DOC,i am using sdk:monocle-linux-x64_bin-sdk,and copy the library to lib path(include the libgluon_drm-1.1.7.so),and then i try to running it on my ubuntu,but it has this error:
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:283)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:253)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:266)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:278)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Thread.java:833)
This is my running command:
java -Dmonocle.platform=EGL -Dembedded=monocle -Dglass.platform=Monocle -Degl.displayid=/dev/dri/card1 -Dmonocle.egl.lib=lib/libgluon_drm-1.1.7.so -jar My.jar
They're doing well in xorg environment(not with embedded sdk).
Is DRM only supports Raspberry Pi? Or am I losing some necessary dependencies?Be deeply grateful for your help!

Android Studio installation error: java.lang.NoClassDefFoundError

I am trying to install Android Studio on lubuntu, but I get the following error:
Start Failed: Internal Error. Please report to https://code.google.com/p/android/issues
java.lang.NoClassDefFoundError: com.intellij.util.lang.ClassPath
at java.lang.Class.initializeClass(libgcj.so.14)
at com.intellij.util.lang.UrlClassLoader.createClassPath(UrlClassLoader.java:179)
at com.intellij.util.lang.UrlClassLoader.<init>(UrlClassLoader.java:173)
at com.intellij.util.lang.UrlClassLoader$Builder.get(UrlClassLoader.java:128)
at com.intellij.ide.BootstrapClassLoaderUtil.initClassLoader(BootstrapClassLoaderUtil.java:68)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:32)
at com.intellij.idea.Main.main(Main.java:92)
Caused by: java.lang.ClassNotFoundException: sun.misc.Resource not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./../lib/bootstrap.jar,file:./../lib/extensions.jar,file:./../lib/util.jar,file:./../lib/jdom.jar,file:./../lib/log4j.jar,file:./../lib/trove4j.jar,file:./../lib/jna.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.14)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.14)
at java.lang.ClassLoader.loadClass(libgcj.so.14)
at java.lang.ClassLoader.loadClass(libgcj.so.14)
at java.lang.Class.forName(libgcj.so.14)
at java.lang.Class.initializeClass(libgcj.so.14)
...6 more
Also, an UI exception occurred on attempt to show above message:
java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.14)
at com.intellij.util.containers.ConcurrentIntObjectHashMap.getUnsafe(ConcurrentIntObjectHashMap.java:2787)
at com.intellij.util.containers.ConcurrentIntObjectHashMap.<clinit>(ConcurrentIntObjectHashMap.java:2752)
at java.lang.Class.initializeClass(libgcj.so.14)
at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectMap(ContainerUtil.java:2334)
at com.intellij.util.containers.ConcurrentRefValueIntObjectHashMap.<init>(ConcurrentRefValueIntObjectHashMap.java:31)
at com.intellij.util.containers.ConcurrentWeakValueIntObjectHashMap.<init>(ConcurrentWeakValueIntObjectHashMap.java:31)
at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectWeakValueMap(ContainerUtil.java:2362)
at com.intellij.openapi.util.Key.<clinit>(Key.java:38)
at java.lang.Class.initializeClass(libgcj.so.14)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:202)
at java.lang.Class.initializeClass(libgcj.so.14)
at com.intellij.idea.Main.showMessage(Main.java:251)
at com.intellij.idea.Main.showMessage(Main.java:234)
at com.intellij.idea.Main.showMessage(Main.java:224)
at com.intellij.idea.Main.main(Main.java:95)
Caused by: java.lang.RuntimeException: Could not find 'theUnsafe' field in the class sun.misc.Unsafe
at com.intellij.util.concurrency.AtomicFieldUpdater.getUnsafe(AtomicFieldUpdater.java:44)
at com.intellij.util.concurrency.AtomicFieldUpdater.<clinit>(AtomicFieldUpdater.java:38)
at java.lang.Class.initializeClass(libgcj.so.14)
...15 more
I am using lubuntu, based on ubuntu 15.10. I have updated all the software, but it still doesn't work.
Right-click on your project and select -> Compile Module, and then re-start the project and it should work again.

Neo4j not starts

I'm trying to run Neo4j database with java but it gives me the following error :
java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/matteo/neo4j-community-2.2.2/data/graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:67)
at Getter.main(Getter.java:46)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions#2e9a2123' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:106)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330)
... 6 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.index.lucene.LuceneKernelExtension#1c3c1d18' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:74)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
... 9 more
Caused by: java.lang.NoSuchFieldError: LUCENE_36
at org.neo4j.index.impl.lucene.LuceneDataSource.<clinit>(LuceneDataSource.java:88)
at org.neo4j.index.lucene.LuceneKernelExtension.init(LuceneKernelExtension.java:52)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
... 12 more
Where is the problem??
Thank you very much!
Matteo
Since you're running embedded Neo4j this looks like you're missing lucene-core-3.6.2.jar on your classpath.
Best practice is to use a build system supporting transitive dependencies like gradle or maven. For those the most easy this is have a dependency on neo4j-community artifact, e.g. http://mvnrepository.com/artifact/org.neo4j/neo4j/2.2.5. This will pull in all other required jars.

ClassCastException on cargo running solr with a dataimport-handler

I'm having issues on getting Solr 4.3.1 to run using the cargo-maven2-plugin. After fixing all classpath issues, I've ended up with the following error:
ERROR org.apache.solr.core.CoreContainer - null:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
<...>
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
... 10 more
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:758)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:539)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 14 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler
at java.lang.Class.asSubclass(Class.java:3037)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)
... 16 more
I've tried with the tomcat7x and jetty7x containers. If this is a classloader problem, can I somehow force the container to use the same classloader as maven is using?
Going through the stack trace I did a Google search on
Error Instantiating Request Handler, \
org.apache.solr.handler.dataimport.DataImportHandler \
failed to instantiate org.apache.solr.request.SolrRequestHandl
And that brought up the following SO question.
Why can't I instantiate DataImportHandler in Solr on JBoss?
There are many answers that should help resolve the issue.

Categories