iam trying to use MySQL Connection Pooling using c3p0.
I want to use c3p0 for a bukkit plugin.
The MANIFEST.MF looks as follow and is placed at Pooling.jar/META-INF/MANIFEST.MF
Manifest-Version: 1.0
class-path: ./Pooling/lib/c3p0.jar ./Pooling/lib/mchange.jar
I've placed the 2 files at
plugins/Pooling/lib/
However, it keeps printing this error:
2013-09-13 16:35:19 [SEVERE] Error occurred while enabling Pooling
v1.0.0 (Is it up to date?) java.lang.NoClassDefFoundError:
com/mchange/v2/c3p0/ComboPooledDataSource at
com.frostforce.Pooling.Database.setup(Database.java:11) at
com.frostforce.Pooling.Main.onEnable(Main.java:16) at
org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at
org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
at
org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
at
org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.java:282)
at
org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.java:264)
at
net.minecraft.server.v1_6_R2.MinecraftServer.l(MinecraftServer.java:313)
at
net.minecraft.server.v1_6_R2.MinecraftServer.f(MinecraftServer.java:290)
at
net.minecraft.server.v1_6_R2.MinecraftServer.a(MinecraftServer.java:250)
at
net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.java:151)
at
net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:391)
at
net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
Caused by: java.lang.ClassNotFoundException:
com.mchange.v2.c3p0.ComboPooledDataSource 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
org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
at
org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
at java.lang.ClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) ... 13 more
I have no idea at all what Iam doing wrong at the moment.
Thanks in advance!
Related
I am using the following code from AWS documentation:
http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpJava.html
And i have used the following jars :
And i am getting the following error :
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.amazonaws.AmazonWebServiceClient.(AmazonWebServiceClient.java:58)
at UploadObject.main(UploadObject.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
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 java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Any help would be appreciated for the same. I have tried adding the common logging jars but no luck.
Hi there are quite a few third-party library's required for AWS to work. The ones below are the extras packaged with the SDK download. I seem to remember there being one missing though so let me know if this doesn't work and i'll check my dependencys.
All of these can be found in '\aws-java-sdk-1.9.1\third-party'
aspectj-1.6
commons-codec-1.6
commons-logging-1.1.3
freemarker-2.3.1.8
httpcomponents-client-4.3
jackson-annotations-2.3.0
jackson-core-2.3.2
jackson-databind-2.3.2
javax-mail-1.4.6
joda-time-2.2
spring-3.0
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/conn/params/ConnPerRoute
at javaaplication1.JavaApplication11.main(JavaApplication11.java:32)
Caused by: java.lang.ClassNotFoundException: org.apache.http.conn.params.ConnPerRoute
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 java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Can you help me figure this out?
Thank you in advance.
You miss the httpclient.jar in your classpath. Download it and add it to your classpath.
While adding custom jar files in the project and executing some java code I am getting this error any idea how to solve this .There is no error in code ,it was running smoothly before this happen.
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
at com.util.DfExSession.connectToDocbase(DfExSession.java:18)## Heading ##
at com.console.TestConsole.main(TestConsole.java:17)
Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.Signature
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)
... 2 more
Look's like the aspectjrt.jar is missing in your classptah. Download & add it to your classpath.
Trying to run a program in Eclipse on Tomcat 7.0.12 and I'm getting this error:
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)
Exception in thread "main"
I have no clue what could be causing this.
You must install the troublesome program to a folder without spaces in the full name.
I've got an application, where I use a JDBC connection. When I run it from the Eclipse environment, there's no problem.
But, when I pack it into jar, the line
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
causes an exception:
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
I put a line into manifest file, but it didn't help:
Class-Path: sqljdbc4.jar
Can anyone help?
I finally solved the problem.
I installed the jdbc driver also on the remote server, and I packed the files to an executable jar (not only jar as before).