i created a java project long back which requires connection to derby which is an inbuilt netbeans database. i always used to open netbeans, compile the files and run and it used to work just fine. then i learnt how to make a jar file out of it on netbeans and i did it.now when i run the jar file it does not connect to the database.when i login it just gets stuck up cause apparently is not connecting to db. could anyone plz help me out? Thanking you in advance.
P.S. Please be very simple in your explanation. I am good with coding but not in understanding a lot of programming jargon. try to explain me like a u would explain a layman if possible.
You are using the ClientDriver, which means your Java program is attempting to connect to the Derby Network Server running on your same machine ("localhost") at port 1527.
If that connection is not working, the simplest explanation is that the Derby Network Server is not running at the moment that you run your Java program.
The commands you are running in Netbeans ("Go To Services in Netbeans and Connect") may be automatically starting a Derby Network Server for you.
You can start a Derby Network Server on your own. It's just another Java program; the Derby binary distribution contains some scripts that you can run to start it. Go here to read about how to start up the Derby Network Server and configure it so that it knows where your Ayush database is: http://db.apache.org/derby/docs/10.10/getstart/twwdactivity4.html and also: http://db.apache.org/derby/docs/10.10/adminguide/cadminconfig86869.html#cadminconfig86869
Related
My local is Windows 10 and host is Linux (AWS EMR).
Using key based authentication.
I need to connect to linux machine for my dev work. Every time I connect to remote, it looks like it setups the VS Code Server everytime and it takes a lot of time each time I connect.
How can I prevent VS Code to setup itself each time I connect?
what it shows when connecting to remote
Thanks in advance!
I figured out something. It was a .ssh/config file issue on host system.
I reverted it to vanilla (bare minimum configs) and it was smooth after that.
I installed Oracle database 12c for the first time. I followed correctly all the steps and installed it on Windows 7 64 bits, but when I click on SQL Developer and try to create a new connection, I put in the informations like Username and password, and finnaly click on TEST button, I get this error message: "The Network Adapter could not establish the connection".
I dont know what to do anymore, I read tutorials and cant solve that error. Also, when I open SQL Developer, i get a message saying Im using a java version that is not supported by Oracle Database, Im using java 1.8 and it says I should use from 1.6 to 1.7 only. im not sure if that is causing something bad but it seems fine because I can go further using the SQL Dev. So, what should i do? Thank you very much!
Here are some things to check:
Ensure that the TNSNAMES.ORA file is properly configured to reference the database. Check for the SID, host name, and port number (typically 1521).
Check whether you can connect directly from the server, such as with SQL PLus. This should isolate whether it's a server or client problem.
Ensure that the Listener service on the server is running. Check that LISTENER.ORA is properly configured.
I encountered a situation in the past where client PCs could not connect. I found that by deleting (or renaming) the SQLNET.ORA file, the connection could be made.
Good luck.
Execute
tnsping <db_name>
from command prompt.
You will see, if listener is running and tnsnames.ora is configured properly.
Run with Windows PowerShell or Command Prompt (Admin) :
lsnrctl start
I have a Jenkins instance running on CentOS and would like the ability to connect to a Windows 2008 virtual server and have execute and write permissions.
Some threads have suggesting CYGWIN, installing on the windows machine and then using SSH to connect. There are also suggestions of telnet and RDP. I wanted to know if there is a recommended approach.
Thanks
You can connect a windows slave node into your main server
https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines
as mentioned earlier in a comment
I have to make Delphi builds on windows with my main jenkins installation is on a CentOS server.
You just need to configure the windows machine as jenkins slave. Java web start is a quick and easy solution (2 minutes) for that:
https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-LaunchslaveagentviaJavaWebStart
Or step-by-step here: https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines
Then on "Project setup" check the "Restrict where this project can be run" and write down the slave name. (There will be time later for more complicated expressions)
Finally istruct your project to exec windows commands adding one of those plugins
https:// wiki.jenkins-ci.org/display/JENKINS/PowerShell+Plugin
https:// wiki.jenkins-ci.org/display/JENKINS/Windows+Exe+Runner+Plugin
(sorry for the broken links but it doesn't let me post more than two)
If it's just a few times use netcat.
Otherwise use cygwin and ssh like you said.
I have made a program using visual basic 2010, which contains a database. When I copy my program across to another computer and attempt to debug it, I get the following error message:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Additional information: Login failed for user 'Aaron\Aaron'.
And the following line of code is highlighted within the form load sub:
Me.Table1TableAdapter.Fill(Me.Database1DataSet1.Table1)
When I publish the program it also fails to run on any computer other than the one I created it on.
Any help would be much appreciated as I'm still very new to programming, thank you.
If you're trying to access the database over the network, use:
server="HostMachineIP\Aaron" (e.g. "10.1.1.1\Aaron") and make sure firewall port 1433 is open.
If you're transferring the database to another system, set your connection string to: ".\Aaron" - the .\ references the local system.
There are lots of things that could be the issue, but for starters, you probably don't have the same user set up on your other computer that you had on your first one. That is probably why you are getting the error about Login failed for Aaron/Aaron.
Additionally, you may well have a database on the first computer that is not on the second. Transferring the program does not copy the database with it. So you should go into SQL Server on your first computer and compare it to SQL Server on your second one. Likely there are differences in users and databases that will cause problems.
From your description, it sounds like maybe you aren't using a "server" yet.
You won't have much luck if you are moving/copying the .mdf file. Your dev environment will allow this, but not other machines. It will work better if you install SQL Express on one of your machines and use it to host your .mdf (database file). That machine will be your "server".
Download SQL Server Express and install it
Download SQL Server Management Studio. Use it to attach your .mdf. Set permissions. Allow remote connections.
Check your windows firewall (on the server) to make sure port 1433 is open (SQL server communicates across a network on port 1433.
Each machine (except for the server) will need to authenticate to the server. I find this is easier when I map a drive to the server. On the server, make a folder on the hard drive called "temp", share it to the network. On each machine, explore the network, find your server, find the share (temp), map a drive to it.
Once you have done these things, then these other recommendations will work.
I'm running VS2008 on my client machine and I'm running SQL 2000 on the remote db server which is on a different domain. I am able to remote desktop to the remote computer and use query analyser to debug, however it doesn't work when I try it remotely. I don't get any errors and when I try and step into the sp it doesn't halt.
From the research I have done it looks like the client PC is trying to attach to a process on the remote machine. However since this is on an another domain the user that VS 2008 uses won't be able to authenticate with the remote machine.
I believe this possible but my question is what do I need to configure to make this work, or is there any additional software that I require for this. I've tried using the VS Remote debugging monitor on the db server, but not sure whether I'm barking up the wrong tree with this.
Thanks
The knowledgebase article INF: Transact-SQL Debugger Limitations and Troubleshooting Tips for SQL Server 2000 may still be relevant/helpful (although obviously, they've fixed the first mentioned limitation concerning terminal services/remote desktop)