Exception in thread "main" dropbox application with java - java

I'm trying to make a simple application with Java, using Eclipse that could upload a file from my computer to Dropbox but whenever I compile, I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpGet
at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:164)
at com.dropbox.client2.session.WebAuthSession.setUpToken(WebAuthSession.java:218)
at com.dropbox.client2.session.WebAuthSession.getAuthInfo(WebAuthSession.java:158)
at com.dropbox.client2.session.WebAuthSession.getAuthInfo(WebAuthSession.java:128)
at DropboxAuthTest.main(DropboxAuthTest.java:47)
Can you help me figure this out?
Thank you in advance.

You're missing a library. Looks like Apache HttpClient.

Related

Unable to Connect to PowerDesigner through java

I have a requirement to automate the process of connecting to PowerDesigner through java to extract the models from repository. I have used the OLE Automation JavaProxy document to configure the process.
when trying to run, I'm getting this error:
Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.swt.internal.ole.win32.COM.CoCreateInstance(Lorg/eclipse/swt/internal/ole/win32/GUID;IILorg/eclipse/swt/internal/ole/win32/GUID;[I)I
at
com.sybase.stf.powerdesigner.PdCommon.Application.start(Application.java:57)
at
com.sybase.stf.powerdesigner.PdCommon.Application.(Application.java:31)
at
com.sybase.stf.powerdesigner.PdCommon.Application.getInstance(Application.java:42)
at OOM.src.createOOM.CreateOOM.CreateAndDisplayOOM(CreateOOM.java:37)
at OOM.src.createOOM.CreateOOM.main(CreateOOM.java:28)
Versions:
PowerDesigner - 16.5.5.0
Eclipse 4.18
Supporting Jars:
pdj2com_16.5.5.jar
org.eclipse.swt.win32.win32.x86_64_3.115.100.v20201202-1103.jar
The above issue is resolved Thanks!
Now i'm facing trouble connecting again with the below issue.
org.eclipse.swt.SWTException: Action can not be performed. result = -2137456383 (com.sybase.stf.powerdesigner.com.COMException: COM Failure [HRESULT: 0x80990101])
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:345)
at com.sybase.stf.powerdesigner.com.COMException.raiseOnFail(COMException.java:83)
at com.sybase.stf.powerdesigner.com.IDispatchEx.raisingInvoke(IDispatchEx.java:231)
at com.sybase.stf.powerdesigner.PdCommon.IApplication.CreateModel(IApplication.java:84)
at OOM.src.createOOM.CreateOOM.createOOM(CreateOOM.java:68)
at OOM.src.createOOM.CreateOOM.CreateAndDisplayOOM(CreateOOM.java:42)
at OOM.src.createOOM.CreateOOM.main(CreateOOM.java:28)
Caused by: com.sybase.stf.powerdesigner.com.COMException: COM Failure [HRESULT: 0x80990101]
at com.sybase.stf.powerdesigner.com.COMException.raiseOnFail(COMException.java:88)
... 5 more
Is there anything else to add to the code to connect?
I am not able to find any solution online. Kindly help me figure this out. Thanks in advance.
The swt.win.win32.x86_64 jar is for 64-bit, so I assume you're using a 64-bit Java.
In my case, the pdj2com jar is named something like pdj2com_16.N.Nx64.jar for the 64-bit version. pdj2com_16.N.N.jar is the name of the 32-bit version.

.jar throwing UnsatisfiedLinkError only outside of IDE

I am using Netbeans to create a java application. The program works fine when I hit run in Netbeans. The problem is when I build the app and run it from the dist folder it throws the UnsatisfiedLinkError. I know this is caused by the libraries.
The error message is:
"Exception in thread "main" java.lang.UnsatisfiedLinkError:
jssc.SerialNativeInterface.openPort(Ljava/lang/String;Z)J"
Thank you for your help.

Java Exception has occurred when opening .JAR file

I am trying to run a jar file that came with a program designed by BOSCH called EsiTronic. I receive the following error message "A java exception has occurred" I made some research and looked in the other threds of this forum but it did not help me. My gues is that the version I am using is not supporting the version the program was compiled on. I tried running it from CMD to see the detailed error message. If someone can tell me more from this message I will apreciate. I want to point out I am not a programer so my knoledge is limited here.
Thanks!
Exception in thread "main" java.lang.ClassFormatError: Truncated class file
Exception in thread "main" java.lang.ClassFormatError: Truncated class file
Theres nothing much that you can do here except re-download the jar file. The jar file probably got curropted during download or even at the time of packaging from the source

Redisson: WRITE_BIGDECIMAL_AS_PLAIN

I just downloaded Redisson but I am continuously getting the following exception
Exception in thread "main" java.lang.NoSuchFieldError: WRITE_BIGDECIMAL_AS_PLAIN
at org.redisson.codec.JsonJacksonCodec.<init>(JsonJacksonCodec.java:48)
at org.redisson.Config.<init>(Config.java:44)
at org.redisson.Redisson.create(Redisson.java:85)
It is probably something trivial but I did not find anything online.
Thanks.
Use latest version of Jackson in classpath.

Eclipse << Exception in thread "main" java.lang.UnsatisfiedLinkError: no BioCpp in java.library.path >> HELP!

Hi guys
I've some problems with my project compilation and run.
My Java project (called BioTesi) tries to load a library called BioCpp.dll, ma it doesn't succeed. I am usin' Eclipse.
What could it be?
Sounds like the DLL is not on the PATH if you're using Windows.
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html

Categories