NoClassDefFoundError for OkHttpClient

The latest version of Piccasso use an older version of Okhttp, you need to use a new dependency compile ‘com.squareup.okhttp3:okhttp:3.2.0’ compile ‘com.squareup.picasso:picasso:2.5.2’ compile ‘com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2’ Example: File httpCacheDirectory = new File(getCacheDir(), “picasso-cache”); Cache cache = new Cache(httpCacheDirectory, 10 * 1024 * 1024); OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder().cache(cache); Picasso.Builder picassoBuilder = new Picasso.Builder(getApplicationContext()); picassoBuilder.downloader(new OkHttp3Downloader(clientBuilder.build())); Picasso picasso … Read more

ClassNotFoundException StrutsPrepareAndExecuteFilter in struts2 [duplicate]

The following minimum jars should be on your classpath: asm-3.3.jar asm-commons-3.3.jar asm-tree-3.3.jar commons-fileupload-1.3.jar commons-io-2.2.jar commons-lang3-3.1.jar commons-logging-1.1.3.jar freemarker-2.3.19.jar javassist-3.11.0.GA.jar log4j-1.2.17.jar ognl-3.0.6.jar struts2-core-2.3.16.jar xwork-core-2.3.16.jar You can also follow How To Create A Struts 2 Web Application.

runtime error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

You need to add a connector library to the Runtime classpath: java -cp .;mysql-connector-java-5.1.25-bin.jar ClientBase My example uses Windows classpath separator “;”, on other systems it may be different (“:” on Linux/Mac). It also assumes, that mysql-connector-java-5.1.25-bin.jar is located on the same folder. If it’s not the case, then put a path to the library … Read more

Android E/Parcelīš• Class not found when unmarshalling (only on Samsung Tab3)

For some strange reason it looks like the class loader isn’t set up properly. Try one of the following in TestActivity.onCreate(): TestParcel cfgOptions = getIntent().getParcelableExtra(“cfgOptions”); Intent intent = getIntent(); intent.setExtrasClassLoader(TestParcel.class.getClassLoader()); TestParcel cfgOptions = intent.getParcelableExtra(“cfgOptions”); Bundle extras = getIntent().getExtras(); extras.setClassLoader(TestParcel.class.getClassLoader()); TestParcel cfgOptions = extras.getParcelable(“cfgOptions”); Alternatively, wrap the parcelable into a bundle: Bundle b = new Bundle(); … Read more