Hello, I'm trying to run the following project: https://github.com/Ajaysinh1290/College-Management-System-In-Java
I managed to import the project but it doesn't connect to the database and gives the following error:
77 messages ยท Page 1 of 1 (latest)
Hello, I'm trying to run the following project: https://github.com/Ajaysinh1290/College-Management-System-In-Java
I managed to import the project but it doesn't connect to the database and gives the following error:
โ This post has been reserved for your question.
Hey @next hornet! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
@long fern if you can help, let me know ๐
I ran server.java and it gave me that:
But when I run loginframe.java it gives that:
It seems you are using SSL/TLS for the communication between the database and the application
check whether the certificates/algorithms match
how to
hey @long fern
I realized something
The author added connector j with the version 5
maybe that could be making it not work right?
I tried changing it to 8 but it didn't really accept it
I think that's for MySQL 5
if you use a MySQL 8 server, you would need to use 8
I know but when I tried to insert a connector j file with version 8
it didn't recognize it
let me show you
where exactly is the code for getting the connection?
Does that part here throw the exception? https://github.com/Ajaysinh1290/College-Management-System-In-Java/blob/master/src/collegeapplication/common/DataBaseConnection.java#L20-L41
public static Connection getConnection()
{
if(con!=null)
{
return con;
}
else
{
try
{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection(url,uname,password);
return con;
}
catch(Exception exp)
{
exp.printStackTrace();
return con;
}
}
}
remove the Class.forName("com.mysql.jdbc.Driver"); from the file I linked
Alright
But let me clarify couple of things
On mysql there is installation of connector j
Which I have done and it's installed
as connector j 8.0.33
and I took that same file
Did you add the MySQL Connector/J JAR?
And wrote it on "classpath"
yes
And added it to "jar files"
the Class.forName("com.mysql.jdbc.Driver"); was for older versions
alright, sec will remove it
it isn't really a thing any more
Class.forName("com.mysql.jdbc.Driver");
Remove only that line ?
or the entire code
like from 20 to 41 lines
@long fern
only that one line
still
Noting, I'm using java version 8 @long fern
like 1.8
Since I think I saw he is using that too
here @long fern
looks like the MySQL Connector/J JAR isn't on the classpath
check your project structure
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="jar files/mysql-connector-j-8.0.33.jar"/>
<classpathentry kind="lib" path="jar files/rs2xml.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
yea, it was like having it missing
one moment
finally
thank you mate ๐ ๐ ๐
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
closing doesn't remove it, it just makes the post less visible (i.e. lower down the list which would happen anyways when the post is inactive)
but it can still happen that we do restructuring at some point - we don't plan to do anything removing previous posts (we also still have an archive of the channels from the old help system) but I can't promise anything
yea, I will note it today, dw
do you know how I can know which file is responsible for each element? @long fern
like for example which file is responsible for changing the behavior of the button
well I guess FacultyMain and FacultyPanel are responsible for the faculties thing
๐ค Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.