im new to aws and i have succssefully deployed war file but im still getting a JDBC connection error before i generated the war. Cant figure out what im doing wrong. any help?
heres my application.properties file
heres the error
To learn how to build a Java web app that stores app data in an Amazon RDS MySQL instance and then how to deploy the web app to the cloud, see this doc. It walks you through the process. Make sure you set your inbound rules properly and you specify your database connection string. If you can connect from your local machine but not Elastic Beanstalk - looks like you did not setup the inbound rule to allow a connection.
Creating the Amazon Relational Database Service item tracker
Related
I have an MSAccess database in my local windows. and I need to connect it with java code using Kubernetes.
I tried to use the below:
jdbc:ucanaccess:///run/desktop/mnt/host/c/Users/Public/fdb/F_B_1_2.mdb;jackcessOpener=com.sms-manager.mobile_app.mobileapp.manage.CryptCodecOpener
But it's not working with me.
it's giving java error database not existing.
Is your java application running in container and trying to connect to ms access db which is in another machine? if yes then you can create Kubernetes service and endpoint of your db server or external name of db server. Choose suitable JDBC and ODBC driver to connect to MS Access Database
We have a HdInsight cluster in Azure which is inside a VNet with NSG attached to it. I am trying to connect to Hive DB from DBeaver App. I am getting "Connection reset" error.
Also when I tried connecting from Java application, getting the same exception.
We are able to establish connectivity from a web application hosted inside Azure. So added a Inbound & outbound rule to the NSG to allow connection from outside cloud. But still we are facing the same issue.
For testing purpose, I have added source as "Any". Let me know if I am missing anything.
Any help would be really appreciated. Thanks.
So I created a MySQL DB on amazon running on the same account as my tomcat server, it built and is running correctly but can't connect to the database.
I can access the remote database running the site using tomcat on my computer, and I can access the db through MySQL workbench, but when I deploy and run it I get a 500 whenever the site tries to access the database.
I opened up my security on this database to accept any connection and port(lol), and I checked if the mysql java connector.jar in the WEB-INF/libs file is the latest version. I even tried setting the JDBC connection string to localhost to see if it would pick it up, but no luck.
I think I'm missing something, can anyone think of any reason my website's JDBC can access the remote database server from my machine but not from the amazon tomcat server?
Also, this is a student project I'm building.
Hope this description makes sense, maybe someone can think of something I haven't tried:)
I have an EC2 instance on AWS configured with Apache tomcat 8 and java.
Following some tutorials from here, I can create one .war of my Web Service in eclipse and put it inside webapps folder of tomcat in my EC2 instance.
I am able to access this services from the IP address of EC2 with the specific port and .war file name.
For example:
IPADDRESS:8080/MyApplication.
And everything seems to work fine, I can open the services and see the wsdl files. My Web Service (in .war file) is configured for make a connection with a RDS instance from amazon.
The connection itself is ok, I tested in localhost a direct connection with RDS from Android.
But, when I try to connect with services that I put in EC2 (from there
the connection with my RDS is created) from Android, no data returns and I get a Null Pointer.
The link that I used to make a connection with EC2 from Android is the Public IP of EC2 and the port (8080), followed by the specific path of wsdl file.
For example:
http://99.999.999.99:8080/MyApplication/services/SomeServiceName?wsdl
I am using the KSOAP library to consume web service on Android side and I
have no idea of the reason that I don't get data from EC2 instance.
All methods in the web service and the comsumption in Android works fine, I tested all in local host.
I tested all my methods of web service using SOAP UI, and all of them is working
For test the RDS instance that contains my DB, I run the web service in localhost with tomcat 8 and the communication Android -> My PC (localhost) -> RDS instance (My DB) is working.
The problem are when I try to change the communication line from:
*Android -> My PC (localhost) -> RDS instance (My DB)*
TO:
*Android -> EC2 instance -> RDS instance (My DB)*
Again, in EC2 I make the deploy of my web service.
I use the same security group for RDS and EC2:
Inbound rules:
http://i.stack.imgur.com/RUdyl.png
Outbound rules:
http://i.stack.imgur.com/W4gLc.png
I finally solved the problem.
I did the following:
I connected to my ECB2 instance and open the tomcat 8 log, so I saw that the error was ClassNotFoundException, related to Postgres (my engine DB).
I opened my web service eclipse project and saw this (stupid) error:
The .jar postgres driver was in that lib folder:
Instead of that folder:
So, basically, when I did the deploy of my Web service in EC2 instance the postgres driver does not go together.
Thanks for the help, I hope that helps someone else.
I have made a Netbeans application that is reliant on the DB Network Server in order to retrieve data. In Netbeans the code works fine and runs well. Outside of Netbeans everything but the database information is working. I have made a batch file for connecting to the localhost server that seems to connect on the port I assigned: 1527. Even after connecting to the localhost, it won't display the database information.
My code in the batch file:
PATH C:\Program Files\Java\jdk1.8.0_25\db\bin;%PATH%
startNetworkServer
When I run this I get the result:
Security manager installed using the Basic server security policy.
Apache Derby Network Server - 10.10.1.8 - (1557168) started and ready to accept connections on port 1527connect
Is there more code that I need to add in order to connect to the actual database itself from the server? Or is this not the right way to do this at all? I have tried using the Embedded DB but that didn't work and only caused more problems. I would prefer greatly to stay away from it and stick to the Network DB.