Connection class showing error
Hi All,
I am developing a class which is used to get the database connection using JDBC and MySQL, i am using eclipse for
the development.
below is the code i have written for testing purpose:
package test;
import java.sql.*;
public class MysqlConnect {
public static void main(String[] args) {
Connection conn = null;
String url = "jdbc:mysql://localhost:3306/";
String dbName = "connectiontest";
String driver = "com.mysql.jdbc.Driver";
String userName = "root";
String password = "root";
try {
Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url+dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
it is fine till now, but if i will remove the main method (As we are not going to use main method here) the problems starts pouring in.after removing the main method it is giving the following errors in the error console:
any pointer in this regard is much appriciated.
--aum
1) Syntax error on token ";", { expected after this token conection/src/test MysqlConnect.java line 13
2)Syntax error, insert "}" to complete ClassBody conection/src/test MysqlConnect.java line 23
hi all,
i have find out the cause of my problem...
[:)]
Similar Messages
-
Cache connectivity test showing errors in RWB
Hi,
cacheconnectivity test shows error as below in RWB.
MSG_REPOSITORY_ERRORConnection to system null using application null lost. Detailed information: Error accessing "http://<host>:<port>/rep/conntest/int?" with user "PIRWBUSER". Response code is 401, response message is "Unauthorized"
regards,
bobbyHi Prakasu,
thanks for your quick reply,
i have Checked the user name(PIRWBUSER) and password in exchange profile(RuntimeWorkbench) and also the host name ,port,instance number all are fine. still i am getting the problem.
regards,
bobby -
'mass storage' connection option showing error mes...
Up until a yesterday , my phone was working fine . Then , yesterday , when I tried to connect it to my PC via the nokia-provided USB cable , things went kaput.
The phone began by working normally, asking me to select a connectivity option, while my computer gave me the message that it had detected a new MTP device , and then asked me to insert the disc that might have come with this device. I cancelled this , as always, and selected the 'mass storage' option on my phone. At this point , the phone gave me this error message :-
"Memory card in use by another application. Please wait."
and the computer , instead of treating the phone like an external storage device , began going through the same sequence of " found MTP device . Please insert disc " over and over . This is happening even after I reset my phone to factory settings. What do I do now ?
Can anyone please help ?Are you sure you selected Mass Storage mode on your phone in the connection prompt, and not Nokia Suite / Ovi Suite / PC Suite? If you have restored your phone to factory settings and are stil having problems, then you will need to take your phone to your local Nokia Care point for them to inspect.
to locate Nokia Care: http://nokia.com/support -
Show error when connect Company Database by DI API in 2004B
Hi
I use the DI API to connect company database in 2004B. I can get the company lists by SAPbobsCOM.CompanyClass.GetCompanyList().
I write a program to testing the connection that show two different result in client and server side.
- It show the error -2147221164 (Class not registered), when connect company database in client PC.
- The same program run in server, it connected.
I already checked my config as below
- SAP 2004B is installed 7.20.145 SP:00 PL:25
- SAPbobsCOM67.dll is 6.70.188.0 version, and "Special Build Description" is 21.
The client and server side are same config.
Any ideas how I should handle this?
Thanks
Winsonsorry! it is wrong posted in here!!
-
Dear Cisco Expert,
We are facing problem terminating PPPoE users on Cisco 7206VXR NPE-G2 router where in user connects to router but policy-map is not applying on user interface.
Below mentioned message is logged on router.
%SW_MGR-3-CM_ERROR_FEATURE_CLASS: Connection Manager Feature Error: Class SSS: (QoS) - install error, ignore.
Below is the "show version" output.
Cisco IOS Software, 7200 Software (C7200P-ADVIPSERVICESK9-M), Version 12.2(33)SRC, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 11-Jan-08 02:44 by prod_rel_team
ROM: System Bootstrap, Version 12.4(12.2r)T, RELEASE SOFTWARE (fc1)
aggr03 uptime is 1 day, 6 hours, 4 minutes
System returned to ROM by reload at 05:45:18 IST Wed Sep 3 2014
System restarted at 05:46:53 IST Wed Sep 3 2014
System image file is "disk2:c7200p-advipservicesk9-mz.122-33.SRC.bin"
Last reload reason: Reload command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
Cisco 7206VXR (NPE-G2) processor (revision A) with 1966080K/65536K bytes of memory.
Processor board ID 31782123
MPC7448 CPU at 1666Mhz, Implementation 0, Rev 2.2
6 slot VXR midplane, Version 2.7
Last reset from power-on
PCI bus mb1 (Slots 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb1 has a total of 0 bandwidth points.
This configuration is within the PCI bus capacity and is supported.
PCI bus mb2 (Slots 2, 4 and 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 0 bandwidth points.
This configuration is within the PCI bus capacity and is supported.
Please refer to the following document "Cisco 7200 Series Port Adaptor
Hardware Configuration Guidelines" on Cisco.com <http://www.cisco.com>
for c7200 bandwidth points oversubscription and usage guidelines.
1 FastEthernet interface
3 Gigabit Ethernet interfaces
2045K bytes of NVRAM.
500472K bytes of ATA PCMCIA card at slot 2 (Sector size 512 bytes).
65536K bytes of Flash internal SIMM (Sector size 512K).
Configuration register is 0x2102
Can somebody help please?
Thanks,
Nilesh.Hi Inayath,
We are applying policy-map on user virtual-interface via radius attributes.
Cisco-Avpair+="lcp:interface-config#1=service-policy input 256k"
Cisco-Avpair+="lcp:interface-config#2=service-policy output 256k"
Below is the relevant configuration for cisco router.
aggri03#sh policy-map 256k
Policy Map 256k
Class 256k
police cir 520000 bc 32000
conform-action transmit
exceed-action drop
aggri03#sh run int virtual-te1
Building configuration...
Current configuration : 398 bytes
interface Virtual-Template1
mtu 1492
ip unnumbered Loopback100
no ip redirects
no ip unreachables
no ip proxy-arp
no logging event link-status
peer default ip address pool poolname
no snmp trap link-status
keepalive 60
ppp authentication pap callin
ppp ipcp dns 203.187.x.y 203.187.x.y
ppp timeout ncp 30
ppp timeout authentication 20
ppp timeout idle 480
end
Below is the complete log line on router.
Sep 3 16:41:31: %SW_MGR-3-CM_ERROR_FEATURE_CLASS: Connection Manager Feature Error: Class SSS: (QoS) - install error, ignore.
-Traceback= 4A9C88 4AAC20 4AB350 12B6040 12C8B38 2C2F24C 2C2F2FC 12C8E0C 12C9000 12C94D0 12B4788 12B4D40 12B4E84 12AFEB0 12B02FC
Please let me know if you want further information & thanks for your inputs.
Thanks,
Nilesh. -
i have an internet connection but when i open app store it shows error message "cannot connect to app store".when i try to sign in with my valid apple ID and password it says "connection failed".i tried keychain access settings but it did not help.please help me!!
Open Sysem Preferences from your Apple () menu top left in your screen then select the Firewall tab.
Make sure the Firewall is turned off. -
Hi everyone! I tried to install the new iOs 7 on my iphone 4, but it wasn't completed (showing error 4005). Now, my iphone is stuck on the itunes' logo with the usb cord, and I can't use my phone. And itunes doesn't detect my iphone when I connect it on my computer, so I can't put it in recovery mode or someting like that... What can I do?? I tried everything they tell me to do in the apple support but nothing seems to work. Thank you!
No problem, glad to help!
Update: my PC USB hub was connected to a USB 3 port, I connected the 30 pin cable directly to my PC, And the restore worked just fine. Restored phone from iCloud backup and seems to be working fine. -
my ipod touch is showing the "connect to itunes" screen.. and on connecting to itunes and clicking on "restore" it shows error 3014.. what do i do?
Errors 3000-3999 (3004, 3013, 3014, 3018, 3164, 3194, and so on): Error codes in the 3000 range generally mean that iTunes cannot contact the update server (gs.apple.com) on ports 80 or 443.
Update to the latest version of iTunes.
Verify the computer's date and time are accurate.
Check that your security or firewall software is not interfering with ports 80 or 443, or with the server gs.apple.com.
Follow Troubleshooting security software. Often, uninstalling third-party security software will resolve these errors.
An entry in your hosts file may be redirecting requests to gs.apple.com (see "Unable to contact the iOS software update server gs.apple.com" above).
Internet proxy settings can cause this issue. If you are using a proxy, try without using one.
Test restoring while connected to a known-good network. -
EPM 10 NW Report showing error - No Current connection
Hi Team,
We are using EPM NW 10 Version SP 15 Patch 1.NET 4
When we Open the report from offline , The report is showing Error : " Error - No Current Connection"
And also some reports showing Value error , While opening the report in the offline . In this report we used EPM retrieve formula
This issue facing for one user machine
Please suggest whether we need to change settings in the user machineHi Andy,
No Offline Mode.
After refresh the EPM report , We saved the report locally in the desktop
The problem is User send this report to another user
So receiving user , When ever he opening that report , Its showing this Value error
He using the Excel 2010 Version
Please suggest -
Am trying to upgrade iPad 2 to 6.1.2 and it shows error like "Unable to verify Update" you are no longer connected to the internet. But am connect to my wi-fi. Can somebody throw some light on this.
============================================================
Throws error saying
"Unable to Verify Update"
iOS 6.1.2 failed verification because you are no longer connected to the internet
============================================================
Can anybody please respondTry this and see if it resolves the issue.
Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
Then try again. -
I am from the states and am in Greece on vacation. I have a good wifi connection yet keep getting a connection timed out error when I try to access the itunes store. It is funny because pending downloads show up in the cue, and they download no problem. I can also open my account. When I try to go the the movies or music section of the stor though it just times out. I tried updating to the latest itunes software and restarting, also I checked all the proxy boxes in the network section of the settings then unchecked them all and restarted and it keeps doing the same thing. Any help would be appreciated.
ThanksWelcome to AD!
There's been plenty of posts about Norton & the removal tool here. Unfortunately many folks seem to not even know it comes pre-installed on most PCs! Even a trial version, never used or long since expired can cause problems - and not just with iTunes.
Anyone with a Dell, HP, Gateway EEE PC, Asus ..... what Windows PC manufacturer does NOT have this junk software pre-installed?
Almost all of them have made deals with Symantec to pre-install it.
Horrible, horrible software.
Anyway, glad you finally solved your problem. -
i tried to upgrade to ios 7 but it shows error 4005...it took more then 45 mins to download but after it just shows an image on my iphone that connect ur phone with i tunes i tried it but there's nothing happening and now i cant even use my iphone....pls help me what to do????
I have tried the steps to fix it but no solution! Please someone tell me what to do!
-
"There was a problem downloading the software fot the iphone. The network connection timed out."
there's no pblm with my connection but this error keeps on showing,
what to do? please help....Stop with the silly and pointless fonts.
A simple search of the forums for the actual error would have revealed the resolution.
Temporarily disable all security software on the computer. -
I think this should be easily resolved, but I need some guidance.
I have a client with 2 Server 2003 R2 x64 DCs: BORIS & NATASHA. Last year I upgraded both of them from x86 to x64 one at a time, allowing replication to occur between the upgrades. BORIS is the FSMO roles holder as it is currently the production server,
while NATASHA is a backup DC. One thing that puzzles me though is that if I look at the NS record in DNS on the SOA tab, it says NATASHA is the Primary server.
While doing some routine maintenance I noticed an error in the File Replication Service events about a 'Tombstone' situation (Event ID 2042). I looked at article cc757610 in the Technet Library and opted for remedy #3 as I did not want to demote NATASHA
and I got confused looking at the help about using "repadmin /removelingeringobjects". I have no idea how to determine which DC has the good copy of the directory.
Now, in running "repadmin /showrepl" I get
"DC=CPA,DC=local
Default-First-Site-Name\BORIS via RPC
DC object GUID: 0267a090-1890-40e2-9a15-ea928cabd425
Last attempt @ 2012-12-27 08:28:55 failed, result -2146893022 (0x80090322):
The target principal name is incorrect.
1179 consecutive failure(s). Last success @ 2012-12-21 23:30:15." <-- THIS IS WEIRD SINCE THIS IS THE DATE THAT I DISCOVERED THE TOMBSTONE EVENT AND MADE THE REGISTRY CHANGE
(I THINK).
When I try to look at the FSMO roles on NATASHA, it shows ERROR for RID, PDC & Infrastructure and says "The current Operations Master is offline. The role cannot be transferred." The other issue I'm having is that client PCs are intermittently having
trouble reconnecting to necessary server shares.
TIA
Wayne S. CompTIA A+ CompTIA Network+ Microsoft MCPHello Sandesh,
I spent a lot of time trying to understand using NETDOM to reset machine account passwords (don't understand it yet), but I see that you're saying that won't work anyway.
I'm not really sure how to tell which DC is the broken one, but I'm assuming it's BORIS since that's the one users are unable to connect to. Since it is the FSMO role holder and GC I want to make sure I understand the steps correctly:
1.Use dcpromo to forcefully demote BORIS
2.Do metadata cleanup on NATASHA (using ntdsutil?)
3.Promote BORIS again to DC
Should I leave NATASHA as the FSMO role holder and GC? BORIS is the better (more resources/faster processor) machine and it's the file server. Or should the better machine be the FSMO role holder and GC as well as the file server. NATASHA is meant to be
a backup in case BORIS dies.
Thanks,
Wayne S. CompTIA A+ CompTIA Network+ Microsoft MCP www.InfoTek831.com
Hi,
The step you are performing is correct but you also need to seize the FSMO role on other DC if BORIS is FSMO role holder and configure authorative time server role.You can later move the famo role to BORIS server the choice is your however if you are
moveing the role then you need configure authorative time server on BORIS server.
Configuring the time service on the PDC Emulator FSMO role holder
http://msmvps.com/blogs/acefekay/archive/2009/09/18/configuring-the-windows-time-service-for-windows-server.aspx
Domain Replication has exceeded the tombstone lifetime
http://pmeijden.wordpress.com/2011/01/12/domain-replication-has-exceeded-the-tombstone-lifetime/
Forcefull removal of DC:
http://support.microsoft.com/kb/332199
How to transfer or seize FSMO roles
http://sandeshdubey.wordpress.com/2011/10/07/how-to-transfer-or-seize-fsmo-roles/
Metadata Cleanup of a Domain controller
http://sandeshdubey.wordpress.com/2011/10/12/metadata-cleanup-of-a-domain-controller/
Once both server is online check the health of DC by running dcdiag /q and repadmin /replsum.Ensure that DNS/GC role is configured on both DC's
Hope this helps
Best Regards,
Sandesh Dubey.
MCSE|MCSA:Messaging|MCTS|MCITP:Enterprise Adminitrator |
My Blog
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
i have updated my ios 5 to 6 but when the updating aur dowloading has comleted and i turned on the phone it showed a sign to connect to the itunes and then i connecte to itunes but i.tunes showed error that the server could not be contacted....now what i can do to resolve the problem????
has your phone been jailbroken?
Maybe you are looking for
-
Problem to retrieve a Quantity Total using PLD in a Sales Order
Hi, I'm working with PLD, and I'm managing a Sales Order. I have three line, the first one is a Bill Of Material with two 'sons', and the other two are their sons. I have 1 qty for all the lines, and when I print the preview with PLD, the sum of the
-
I need help to find my photo's please (2500) on my backup drive.Lost them after doing a clean install of Mountan Lion I have tried to find them but had no luck. I use Time Machine with a 1TB Western Digital usb drive. Thanking anyone in anticipation
-
Media Encoder gets stuck!!
I'm getting frustrated. I have a 1hr long project that i'm trying to export and been fighting with it for a week. Media encoder starts its work, it goes on for hours and eventually, at some random point it just stops encoding. It doesn't freeze, it
-
Using BAPI_TRANSACTION_COMMIT in a workflow
I notice that the BUS2032 method Salesorder->CreateFromDat2 is actually calling BAPI_SALESORDER_CREATEFROMDAT2. This must be explicitly committed to the database with COMMIT WORK, the recommended way being a call to BAPI_TRANSACTION_COMMIT. If I want
-
How do I copy Aperture app from iMac to Macbookwith different ID
how do I copy Aperture app from iMac to Macbookwith different ID ?