Java Database Authentication
Hi :
I work on web application depends on EJB 3.0 and ADF Faces.
I don't want to use basic form authentication and authorizations for users...!!??
I heard about Java Database authentication and authorization...??
How can I use it...?? somebody helps me please...!!!
Send me any tutorial or anything related with it..
Thanks
Hi,
and the database authentication uses JAAS LoginModules with basic or form based authentication. See the oC4J Security guide
Frank
Similar Messages
-
Java Client AUthentication to IIS 5 server throwing no IV for Cipher error
I have trying to do Java client authentication. Got the Certificate from CA and loaded it in server. When I run the JavaClient program I get the
error no IV for Cipher.
I am using JDK 1.5.0_06 and JSSE 1.0.3_03.
Any help is greatly appreciated.
Thanks
Here is the debug report
trustStore is: C:\JTEST\cacerts
trustStore type is : JKS
trustStore provider is :
init truststore
adding as trusted cert:
Subject: CN=devclient.test.com, OU=Mycompany, O=Second Data Corporation., L=San Francisco, ST=California, C=US
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Algorithm: RSA; Serial number: 0x5b0bf
Valid from Thu Feb 16 06:23:37 PST 2006 until Sat Feb 17 06:23:37 PST 2007
adding as trusted cert:
Subject: [email protected], CN=http://www.valicert.com/, OU=ValiCert Class 2 Policy Validation Authority, O="ValiCert, Inc.", L=ValiCert Validation Network
Issuer: [email protected], CN=http://www.valicert.com/, OU=ValiCert Class 2 Policy Validation Authority, O="ValiCert, Inc.", L=ValiCert Validation Network
Algorithm: RSA; Serial number: 0x1
Valid from Fri Jun 25 17:19:54 PDT 1999 until Tue Jun 25 17:19:54 PDT 2019
adding as trusted cert:
Subject: CN=Baltimore CyberTrust Code Signing Root, OU=CyberTrust, O=Baltimore, C=IE
Issuer: CN=Baltimore CyberTrust Code Signing Root, OU=CyberTrust, O=Baltimore, C=IE
Algorithm: RSA; Serial number: 0x20000bf
Valid from Wed May 17 07:01:00 PDT 2000 until Sat May 17 16:59:00 PDT 2025
adding as trusted cert:
Subject: CN=Entrust.net Secure Server Certification Authority, OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), O=Entrust.net, C=US
Issuer: CN=Entrust.net Secure Server Certification Authority, OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS incorp. by ref. (limits liab.), O=Entrust.net, C=US
Algorithm: RSA; Serial number: 0x374ad243
Valid from Tue May 25 09:09:40 PDT 1999 until Sat May 25 09:39:40 PDT 2019
adding as trusted cert:
Subject: CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Issuer: CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Algorithm: RSA; Serial number: 0x20000b9
Valid from Fri May 12 11:46:00 PDT 2000 until Mon May 12 16:59:00 PDT 2025
adding as trusted cert:
Subject: CN=devclient.paymap.com, OU=First Data Corp, O=Paymap Inc, L=San Francisco, ST=California, C=USA
Issuer: CN=Thawte Test CA Root, OU=TEST TEST TEST, O=Thawte Certification, ST=FOR TESTING PURPOSES ONLY, C=ZA
Algorithm: RSA; Serial number: 0xe2501de73ac37428
Valid from Mon Feb 20 15:51:25 PST 2006 until Mon Mar 13 15:51:25 PST 2006
adding as trusted cert:
Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x9b7e0649a33e62b9d5ee90487129ef57
Valid from Thu Sep 30 17:00:00 PDT 1999 until Wed Jul 16 16:59:59 PDT 2036
adding as trusted cert:
Subject: OU=Starfield Class 2 Certification Authority, O="Starfield Technologies, Inc.", C=US
Issuer: OU=Starfield Class 2 Certification Authority, O="Starfield Technologies, Inc.", C=US
Algorithm: RSA; Serial number: 0x0
Valid from Tue Jun 29 10:39:16 PDT 2004 until Thu Jun 29 10:39:16 PDT 2034
adding as trusted cert:
Subject: [email protected], CN=Thawte Personal Basic CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Issuer: [email protected], CN=Thawte Personal Basic CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Algorithm: RSA; Serial number: 0x0
Valid from Sun Dec 31 16:00:00 PST 1995 until Thu Dec 31 15:59:59 PST 2020
adding as trusted cert:
Subject: OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Issuer: OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x70bae41d10d92934b638ca7b03ccbabf
Valid from Sun Jan 28 16:00:00 PST 1996 until Tue Aug 01 16:59:59 PDT 2028
adding as trusted cert:
Subject: OU=Equifax Secure eBusiness CA-2, O=Equifax Secure, C=US
Issuer: OU=Equifax Secure eBusiness CA-2, O=Equifax Secure, C=US
Algorithm: RSA; Serial number: 0x3770cfb5
Valid from Wed Jun 23 05:14:45 PDT 1999 until Sun Jun 23 05:14:45 PDT 2019
adding as trusted cert:
Subject: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Algorithm: RSA; Serial number: 0x35def4cf
Valid from Sat Aug 22 09:41:51 PDT 1998 until Wed Aug 22 09:41:51 PDT 2018
adding as trusted cert:
Subject: [email protected], CN=Thawte Personal Freemail CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Issuer: [email protected], CN=Thawte Personal Freemail CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Algorithm: RSA; Serial number: 0x0
Valid from Sun Dec 31 16:00:00 PST 1995 until Thu Dec 31 15:59:59 PST 2020
adding as trusted cert:
Subject: CN=Equifax Secure eBusiness CA-1, O=Equifax Secure Inc., C=US
Issuer: CN=Equifax Secure eBusiness CA-1, O=Equifax Secure Inc., C=US
Algorithm: RSA; Serial number: 0x4
Valid from Sun Jun 20 21:00:00 PDT 1999 until Sat Jun 20 21:00:00 PDT 2020
adding as trusted cert:
Subject: [email protected], CN=Thawte Personal Premium CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Issuer: [email protected], CN=Thawte Personal Premium CA, OU=Certification Services Division, O=Thawte Consulting, L=Cape Town, ST=Western Cape, C=ZA
Algorithm: RSA; Serial number: 0x0
Valid from Sun Dec 31 16:00:00 PST 1995 until Thu Dec 31 15:59:59 PST 2020
adding as trusted cert:
Subject: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Issuer: CN=GTE CyberTrust Root 5, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Algorithm: RSA; Serial number: 0x1b6
Valid from Fri Aug 14 07:50:00 PDT 1998 until Wed Aug 14 16:59:00 PDT 2013
adding as trusted cert:
Subject: OU=Class 1 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Issuer: OU=Class 1 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0xcdba7f56f0dfe4bc54fe22acb372aa55
Valid from Sun Jan 28 16:00:00 PST 1996 until Tue Aug 01 16:59:59 PDT 2028
adding as trusted cert:
Subject: CN=GTE CyberTrust Root, O=GTE Corporation, C=US
Issuer: CN=GTE CyberTrust Root, O=GTE Corporation, C=US
Algorithm: RSA; Serial number: 0x1a3
Valid from Fri Feb 23 15:01:00 PST 1996 until Thu Feb 23 15:59:00 PST 2006
adding as trusted cert:
Subject: CN=Entrust.net Secure Server Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), O=Entrust.net
Issuer: CN=Entrust.net Secure Server Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), O=Entrust.net
Algorithm: RSA; Serial number: 0x389b113c
Valid from Fri Feb 04 09:20:00 PST 2000 until Tue Feb 04 09:50:00 PST 2020
adding as trusted cert:
Subject: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 3 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 3 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x7dd9fe07cfa81eb7107967fba78934c6
Valid from Sun May 17 17:00:00 PDT 1998 until Tue Aug 01 16:59:59 PDT 2028
adding as trusted cert:
Subject: [email protected], CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
Issuer: [email protected], CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
Algorithm: RSA; Serial number: 0x1
Valid from Wed Jul 31 17:00:00 PDT 1996 until Thu Dec 31 15:59:59 PST 2020
adding as trusted cert:
Subject: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
Issuer: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
Algorithm: RSA; Serial number: 0x2ad667e4e45fe5e576f3c98195eddc0
Valid from Tue Nov 08 16:00:00 PST 1994 until Thu Jan 07 15:59:59 PST 2010
adding as trusted cert:
Subject: CN=Entrust.net Client Certification Authority, OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., O=Entrust.net, C=US
Issuer: CN=Entrust.net Client Certification Authority, OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/Client_CA_Info/CPS incorp. by ref. limits liab., O=Entrust.net, C=US
Algorithm: RSA; Serial number: 0x380391ee
Valid from Tue Oct 12 12:24:30 PDT 1999 until Sat Oct 12 12:54:30 PDT 2019
adding as trusted cert:
Subject: CN=Entrust.net Client Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), O=Entrust.net
Issuer: CN=Entrust.net Client Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), O=Entrust.net
Algorithm: RSA; Serial number: 0x389ef6e4
Valid from Mon Feb 07 08:16:40 PST 2000 until Fri Feb 07 08:46:40 PST 2020
adding as trusted cert:
Subject: OU=Class 2 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Issuer: OU=Class 2 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x2d1bfc4a178da391ebe7fff58b45be0b
Valid from Sun Jan 28 16:00:00 PST 1996 until Tue Aug 01 16:59:59 PDT 2028
adding as trusted cert:
Subject: CN=VeriSign Class 2 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Class 2 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x6170cb498c5f984529e7b0a6d9505b7a
Valid from Thu Sep 30 17:00:00 PDT 1999 until Wed Jul 16 16:59:59 PDT 2036
adding as trusted cert:
Subject: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Issuer: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
Algorithm: RSA; Serial number: 0x1a5
Valid from Wed Aug 12 17:29:00 PDT 1998 until Mon Aug 13 16:59:00 PDT 2018
adding as trusted cert:
Subject: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
Issuer: [email protected], CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
Algorithm: RSA; Serial number: 0x1
Valid from Wed Jul 31 17:00:00 PDT 1996 until Thu Dec 31 15:59:59 PST 2020
adding as trusted cert:
Subject: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US
Issuer: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US
Algorithm: RSA; Serial number: 0x23456
Valid from Mon May 20 21:00:00 PDT 2002 until Fri May 20 21:00:00 PDT 2022
adding as trusted cert:
Subject: CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net
Issuer: CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net
Algorithm: RSA; Serial number: 0x3863b966
Valid from Fri Dec 24 09:50:51 PST 1999 until Tue Dec 24 10:20:51 PST 2019
adding as trusted cert:
Subject: CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
Issuer: CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
Algorithm: RSA; Serial number: 0x1
Valid from Sun Jun 20 21:00:00 PDT 1999 until Sat Jun 20 21:00:00 PDT 2020
adding as trusted cert:
Subject: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US
Issuer: OU=Go Daddy Class 2 Certification Authority, O="The Go Daddy Group, Inc.", C=US
Algorithm: RSA; Serial number: 0x0
Valid from Tue Jun 29 10:06:20 PDT 2004 until Thu Jun 29 10:06:20 PDT 2034
adding as trusted cert:
Subject: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x8b5b75568454850b00cfaf3848ceb1a4
Valid from Thu Sep 30 17:00:00 PDT 1999 until Wed Jul 16 16:59:59 PDT 2036
adding as trusted cert:
Subject: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 2 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 2 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0xb92f60cc889fa17a4609b85b706c8aaf
Valid from Sun May 17 17:00:00 PDT 1998 until Tue Aug 01 16:59:59 PDT 2028
adding as trusted cert:
Subject: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 1 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 1 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
Algorithm: RSA; Serial number: 0x4cc7eaaa983e71d39310f83d3a899192
Valid from Sun May 17 17:00:00 PDT 1998 until Tue Aug 01 16:59:59 PDT 2028
trigger seeding of SecureRandom
done seeding SecureRandom
main, setSoTimeout(50000) called
TIMEOUT=50000
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1123703368 bytes = { 11, 7, 242, 147, 134, 10, 57, 192, 137, 131, 191, 249, 253, 146, 232, 223, 146, 195, 53, 255, 121, 236, 182, 158, 191, 94, 156, 190 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
main, WRITE: TLSv1 Handshake, length = 73
main, WRITE: SSLv2 client hello message, length = 98
main, READ: TLSv1 Handshake, length = 873
*** ServerHello, TLSv1
RandomCookie: GMT: 1123703296 bytes = { 123, 165, 102, 102, 169, 196, 229, 241, 3, 49, 81, 239, 83, 155, 209, 243, 236, 229, 18, 193, 228, 104, 27, 152, 232, 193, 173, 11 }
Session ID: {147, 24, 0, 0, 22, 29, 124, 158, 177, 166, 96, 36, 217, 32, 191, 41, 36, 217, 54, 244, 11, 56, 214, 139, 133, 140, 38, 132, 157, 77, 87, 77}
Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
Compression Method: 0
%% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
*** Certificate chain
chain [0] = [
Version: V3
Subject: CN=www.just-in-time-eft-paymap.com, OU=Paymap, O=First Data Corporation., L=San Francisco, ST=California, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 115897801846480906504507305240934762652258285705294305856746227593079520228602278416768070978663757452626836382370415992468189745643687252249588163510925353035555192020212360325664657305599855674966873189987712512397233103225326014387972568754281141553272745093478026229567341632738641376167448499163118598699
public exponent: 65537
Validity: [From: Mon Sep 12 11:37:51 PDT 2005,
To: Sun Nov 12 11:37:51 PST 2006]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 057aa7]
Certificate Extensions: 5
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: FC 76 D2 8C C3 DE 0D 8F EA 32 26 60 83 C9 8B 9C .v.......2&`....
0010: C6 E6 BB 57 ...W
[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[3]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[URIName: http://crl.geotrust.com/crls/secureca.crl]
[4]: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
[1.3.6.1.5.5.7.3.1, 1.3.6.1.5.5.7.3.2]]
[5]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
DigitalSignature
Non_repudiation
Key_Encipherment
Data_Encipherment
Algorithm: [SHA1withRSA]
Signature:
0000: 44 D7 B0 69 BF B0 AA 4D 5A 17 70 9C 37 BA 61 A2 D..i...MZ.p.7.a.
0010: 57 B4 34 85 6D 59 1F 82 72 34 9B 92 7D BD DF 27 W.4.mY..r4.....'
0020: CE 97 E3 CA AE 23 5D 85 3C 1A C6 19 D1 49 C2 3F .....#].<....I.?
0030: C6 E2 7E 97 8D 63 94 1E 04 AC 9F 5F 37 08 2A 96 .....c....._7.*.
0040: 1A 47 D1 9D 69 0C 71 6A F3 74 1C FF 7D 20 E1 CA .G..i.qj.t... ..
0050: 75 D0 45 84 2E 11 3C DD D4 73 25 38 76 27 E0 73 u.E...<..s%8v'.s
0060: 70 AC 70 0F A5 E3 5B 9D 7E 0E AB 6A 79 07 18 38 p.p...[....jy..8
0070: 5B A1 63 A2 89 8C 96 A1 50 36 4C D2 C6 D5 27 25 [.c.....P6L...'%
Found trusted certificate:
Version: V3
Subject: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 135786214035069526348186531221551781468391756233528066061569654028671100866720352830303278016129003918213826297308054231261658522889438712013757624116391437358730449661353175673177742307421061340003741057138887918110217006515773038453829253517076741780039735595086881329494037450587568122088113584549069375417
public exponent: 65537
Validity: [From: Sat Aug 22 09:41:51 PDT 1998,
To: Wed Aug 22 09:41:51 PDT 2018]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 35def4cf]
Certificate Extensions: 7
[1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
Extension unknown: DER encoded OCTET string =
0000: 04 0D 30 0B 1B 05 56 33 2E 30 63 03 02 06 C0 ..0...V3.0c....
[2]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[3]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[4]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[CN=CRL1, OU=Equifax Secure Certificate Authority, O=Equifax, C=US]
[5]: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
Key_CertSign
Crl_Sign
[6]: ObjectId: 2.5.29.16 Criticality=false
PrivateKeyUsage: [
To: Wed Aug 22 09:41:51 PDT 2018]
[7]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
Algorithm: [SHA1withRSA]
Signature:
0000: 58 CE 29 EA FC F7 DE B5 CE 02 B9 17 B5 85 D1 B9 X.).............
0010: E3 E0 95 CC 25 31 0D 00 A6 92 6E 7F B6 92 63 9E ....%1....n...c.
0020: 50 95 D1 9A 6F E4 11 DE 63 85 6E 98 EE A8 FF 5A P...o...c.n....Z
0030: C8 D3 55 B2 66 71 57 DE C0 21 EB 3D 2A A7 23 49 ..U.fqW..!.=*.#I
0040: 01 04 86 42 7B FC EE 7F A2 16 52 B5 67 67 D3 40 ...B......R.gg.@
0050: DB 3B 26 58 B2 28 77 3D AE 14 77 61 D6 FA 2A 66 .;&X.(w=..wa..*f
0060: 27 A0 0D FA A7 73 5C EA 70 F1 94 21 65 44 5F FA '....s\.p..!eD_.
0070: FC EF 29 68 A9 A2 87 79 EF 79 EF 4F AC 07 77 38 ..)h...y.y.O..w8
*** ServerHelloDone
*** ClientKeyExchange, RSA PreMasterSecret, TLSv1
Random Secret: { 3, 1, 82, 2, 69, 241, 210, 36, 175, 168, 76, 86, 170, 3, 158, 52, 89, 146, 84, 210, 223, 113, 212, 231, 129, 100, 177, 125, 116, 31, 97, 233, 150, 162, 161, 51, 168, 189, 14, 47, 83, 27, 67, 252, 172, 191, 102, 39 }
main, WRITE: TLSv1 Handshake, length = 134
SESSION KEYGEN:
PreMaster Secret:
0000: 03 01 52 02 45 F1 D2 24 AF A8 4C 56 AA 03 9E 34 ..R.E..$..LV...4
0010: 59 92 54 D2 DF 71 D4 E7 81 64 B1 7D 74 1F 61 E9 Y.T..q...d..t.a.
0020: 96 A2 A1 33 A8 BD 0E 2F 53 1B 43 FC AC BF 66 27 ...3.../S.C...f'
CONNECTION KEYGEN:
Client Nonce:
0000: 43 FA 5A 48 0B 07 F2 93 86 0A 39 C0 89 83 BF F9 C.ZH......9.....
0010: FD 92 E8 DF 92 C3 35 FF 79 EC B6 9E BF 5E 9C BE ......5.y....^..
Server Nonce:
0000: 43 FA 5A 00 7B A5 66 66 A9 C4 E5 F1 03 31 51 EF C.Z...ff.....1Q.
0010: 53 9B D1 F3 EC E5 12 C1 E4 68 1B 98 E8 C1 AD 0B S........h......
Master Secret:
0000: 10 47 C2 16 13 58 4B 50 D3 D6 34 05 C8 C9 11 29 .G...XKP..4....)
0010: AD 90 0D 8F 9B BD C8 C1 FC CD BC 26 ED FB 26 84 ...........&..&.
0020: 04 0B 94 BC D2 4D 7D 71 E0 1E 08 10 59 38 B5 4E .....M.q....Y8.N
Client MAC write Secret:
0000: A5 66 C1 48 0E F1 18 2B 2B 7A F7 9B A4 6C D7 FA .f.H...++z...l..
Server MAC write Secret:
0000: 3B F5 04 FA AC 9C D7 ED 2E E7 36 44 80 FF 11 E2 ;.........6D....
Client write key:
0000: 7B 9F 56 A1 FC 3D BD 31 25 27 91 BB D0 66 66 0B ..V..=.1%'...ff.
Server write key:
0000: 2B 45 E2 19 E8 C8 61 5B 84 B8 94 76 A1 B4 9C 6E +E....a[...v...n
... no IV for cipher
main, WRITE: TLSv1 Change Cipher Spec, length = 1
*** Finished
verify_data: { 110, 253, 95, 109, 150, 89, 93, 140, 108, 186, 172, 188 }
main, WRITE: TLSv1 Handshake, length = 32
main, READ: TLSv1 Change Cipher Spec, length = 1
main, READ: TLSv1 Handshake, length = 32
*** Finished
verify_data: { 70, 219, 18, 202, 105, 203, 83, 220, 151, 174, 102, 125 }
%% Cached client session: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
main, setSoTimeout(50000) called
main, WRITE: TLSv1 Application Data, length = 96
main, setSoTimeout(50000) called
main, READ: TLSv1 Handshake, length = 20
*** HelloRequest (empty)
%% Client cached [Session-1, SSL_RSA_WITH_RC4_128_MD5]
%% Try resuming [Session-1, SSL_RSA_WITH_RC4_128_MD5] from port 1130
*** ClientHello, TLSv1
RandomCookie: GMT: 1123703368 bytes = { 242, 6, 117, 127, 243, 197, 134, 82, 139, 54, 241, 243, 132, 22, 63, 136, 4, 180, 225, 8, 159, 55, 182, 105, 133, 226, 213, 167 }
Session ID: {147, 24, 0, 0, 22, 29, 124, 158, 177, 166, 96, 36, 217, 32, 191, 41, 36, 217, 54, 244, 11, 56, 214, 139, 133, 140, 38, 132, 157, 77, 87, 77}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
main, WRITE: TLSv1 Handshake, length = 121
main, READ: TLSv1 Handshake, length = 11432
*** ServerHello, TLSv1
RandomCookie: GMT: 1123703296 bytes = { 168, 158, 224, 186, 230, 77, 9, 24, 237, 106, 203, 158, 176, 252, 249, 167, 73, 173, 69, 178, 115, 34, 96, 179, 191, 230, 178, 160 }
Session ID: {3, 27, 0, 0, 51, 252, 181, 131, 214, 28, 220, 247, 154, 175, 51, 237, 76, 111, 88, 78, 28, 105, 106, 114, 42, 51, 53, 144, 178, 93, 245, 127}
Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
Compression Method: 0
%% Created: [Session-2, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
*** Certificate chain
chain [0] = [
Version: V3
Subject: CN=www.just-in-time-eft-paymap.com, OU=Paymap, O=First Data Corporation., L=San Francisco, ST=California, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 115897801846480906504507305240934762652258285705294305856746227593079520228602278416768070978663757452626836382370415992468189745643687252249588163510925353035555192020212360325664657305599855674966873189987712512397233103225326014387972568754281141553272745093478026229567341632738641376167448499163118598699
public exponent: 65537
Validity: [From: Mon Sep 12 11:37:51 PDT 2005,
To: Sun Nov 12 11:37:51 PST 2006]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 057aa7]
Certificate Extensions: 5
[1]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: FC 76 D2 8C C3 DE 0D 8F EA 32 26 60 83 C9 8B 9C .v.......2&`....
0010: C6 E6 BB 57 ...W
[2]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[3]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[URIName: http://crl.geotrust.com/crls/secureca.crl]
[4]: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
[1.3.6.1.5.5.7.3.1, 1.3.6.1.5.5.7.3.2]]
[5]: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
DigitalSignature
Non_repudiation
Key_Encipherment
Data_Encipherment
Algorithm: [SHA1withRSA]
Signature:
0000: 44 D7 B0 69 BF B0 AA 4D 5A 17 70 9C 37 BA 61 A2 D..i...MZ.p.7.a.
0010: 57 B4 34 85 6D 59 1F 82 72 34 9B 92 7D BD DF 27 W.4.mY..r4.....'
0020: CE 97 E3 CA AE 23 5D 85 3C 1A C6 19 D1 49 C2 3F .....#].<....I.?
0030: C6 E2 7E 97 8D 63 94 1E 04 AC 9F 5F 37 08 2A 96 .....c....._7.*.
0040: 1A 47 D1 9D 69 0C 71 6A F3 74 1C FF 7D 20 E1 CA .G..i.qj.t... ..
0050: 75 D0 45 84 2E 11 3C DD D4 73 25 38 76 27 E0 73 u.E...<..s%8v'.s
0060: 70 AC 70 0F A5 E3 5B 9D 7E 0E AB 6A 79 07 18 38 p.p...[....jy..8
0070: 5B A1 63 A2 89 8C 96 A1 50 36 4C D2 C6 D5 27 25 [.c.....P6L...'%
Found trusted certificate:
Version: V3
Subject: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits
modulus: 135786214035069526348186531221551781468391756233528066061569654028671100866720352830303278016129003918213826297308054231261658522889438712013757624116391437358730449661353175673177742307421061340003741057138887918110217006515773038453829253517076741780039735595086881329494037450587568122088113584549069375417
public exponent: 65537
Validity: [From: Sat Aug 22 09:41:51 PDT 1998,
To: Wed Aug 22 09:41:51 PDT 2018]
Issuer: OU=Equifax Secure Certificate Authority, O=Equifax, C=US
SerialNumber: [ 35def4cf]
Certificate Extensions: 7
[1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
Extension unknown: DER encoded OCTET string =
0000: 04 0D 30 0B 1B 05 56 33 2E 30 63 03 02 06 C0 ..0...V3.0c....
[2]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[3]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 48 E6 68 F9 2B D2 B2 95 D7 47 D8 23 20 10 4F 33 H.h.+....G.# .O3
0010: 98 90 9F D4 ....
[4]: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
[DistributionPoint:
[CN=CRL1, OU=Equifax Secure Certificate Authority, O=Equifax, C=US]
[5]: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
Key_CertSign
Crl_Sign
[6]: ObjectId: 2.5.29.16 Criticality=false
PrivateKeyUsage: [
To: Wed Aug 22 09:41:51 PDT 2018]
[7]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
CA:true
PathLen:2147483647
Algorithm: [SHA1withRSA]
Signature:
0000: 58 CE 29 EA FC F7 DE B5 CE 02 B9 17 B5 85 D1 B9 X.).............
0010: E3 E0 95 CC 25 31 0D 00 A6 92 6E 7F B6 92 63 9E ....%1....n...c.
0020: 50 95 D1 9A 6F E4 11 DE 63 85 6E 98 EE A8 FF 5A P...o...c.n....Z
0030: C8 D3 55 B2 66 71 57 DE C0 21 EB 3D 2A A7 23 49 ..U.fqW..!.=*.#I
0040: 01 04 86 42 7B FC EE 7F A2 16 52 B5 67 67 D3 40 ...B......R.gg.@
0050: DB 3B 26 58 B2 28 77 3D AE 14 77 61 D6 FA 2A 66 .;&X.(w=..wa..*f
0060: 27 A0 0D FA A7 73 5C EA 70 F1 94 21 65 44 5F FA '....s\.p..!eD_.
0070: FC EF 29 68 A9 A2 87 79 EF 79 EF 4F AC 07 77 38 ..)h...y.y.O..w8
*** CertificateRequest
Cert Types: RSA,
Cert Authorities:
<OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 1 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US>
<CN=Sonera Class1 CA, O=Sonera, C=FI>
<OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 4 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US>
<CN=Staat der Nederlanden Root CA, O=Staat der Nederlanden, C=NL>
<CN=VeriSign Class 3I have the same problem. I�m turning crazy working with certificates in mutual athetication!!!
If someone has the solution to this problem, send a repy or at [email protected]
Thanks in advance -
Java DataBase in NetBeans!!
Hi there,
can you help guy,
I have the NetBeans IDE 4.1,
Oracle 9,
j2sdk1.4.0,
and win xp (on standalone machine)
I remember the old version of NetBeans, you can use Mounting FileSystem for jdbc\oracle\driver
to use the OracleDriver
but I get message error at compiler says that package jdbc.oracle.driver does not exist
please I need help in who to do Mounting FileSystem or other way
here is my code of java
// Database application using Oracle and Java programming Language
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import jdbc.sql.*
import java.awt.*;
public class OracleJavaCustomerWindow extends JFrame
private JLabel labelCId,labelCName,labelCCity,labelCPhone;
private JTextField textCId,textCName,textCCity,textCPhone;
private JPanel labelPanel,buttonPanel,textAreaPanel,labelTextAreaPanel;
private JTextArea outputArea;
private JScrollPane scrollPane;
private JButton buttonDisplay,buttonAdd,buttonModifyRecord,buttonUpdate,buttonDelete;
private JButton buttonClear;
private JTextField field1,field2,field3,field4;
private JLabel label1,label2,label3,label4;
private JPanel mixedPanel,mixedPanel2,fieldPanel1,fieldPanel2,fieldPanel3,fieldPanel4;
static Connection sqlconn = null;
// set up GUI with constrictor(IT IS A METHOD. EACHO CLASS AT LEST HAVE ONE)
public OracleJavaCustomerWindow ()
super("Display Oracle Data for Customers");
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
sqlconn= DriverManager.getConnection ("jdbc:oracle:oci:@Kawasaki", "scott", "tiger");
catch(SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
// add GUI components to container
Container container = getContentPane();
container.setLayout(new FlowLayout(FlowLayout.CENTER));
// Build labelPanel
labelCId = new JLabel(" Customer ID");
labelCName = new JLabel("Customer Name");
labelCCity = new JLabel("Customer City");
labelCPhone = new JLabel("Customer Phone");
labelPanel = new JPanel();
labelPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
labelPanel.add(labelCId);
labelPanel.add(labelCName);
labelPanel.add(labelCCity);
labelPanel.add(labelCPhone);
// Build textAreaPanel
outputArea = new JTextArea(10,30);
outputArea.setEditable(false);
scrollPane = new JScrollPane(outputArea);
textAreaPanel = new JPanel();
textAreaPanel.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
textAreaPanel.add(scrollPane);
// Build labelTextAreaPanel which contains labelPanel and textAreaPanel
// to be ready for adding to container
labelTextAreaPanel= new JPanel();
labelTextAreaPanel.setLayout(new BorderLayout());
labelTextAreaPanel.add(labelPanel,BorderLayout.NORTH);
labelTextAreaPanel.add(textAreaPanel,BorderLayout.SOUTH);
// Buld buttonPanel
buttonDisplay = new JButton ("Display Table");
buttonClear = new JButton ("Clear");
buttonAdd = new JButton("Add New Record");
buttonUpdate= new JButton("Display Record");
buttonModifyRecord = new JButton("Modify Record");
buttonDelete = new JButton("Delete Record");
buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(6,1,10,5));
buttonPanel.add(buttonAdd);
buttonPanel.add(buttonUpdate);
buttonPanel.add(buttonModifyRecord);
buttonPanel.add(buttonDisplay);
buttonPanel.add(buttonDelete);
buttonPanel.add(buttonClear);
// build fieldPanel1
label1 = new JLabel("Customer Number");
field1 = new JTextField(10);
fieldPanel1 = new JPanel();
fieldPanel1.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel1.add(label1);
fieldPanel1.add(field1);
// build fieldPanel2
fieldPanel2 = new JPanel();
label2 = new JLabel("Customer Name");
field2 = new JTextField(10);
fieldPanel2.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel2.add(label2);
fieldPanel2.add(field2);
// build fieldPanel3
fieldPanel3 = new JPanel();
label3 = new JLabel("Customer City");
field3 = new JTextField(10);
fieldPanel3.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel3.add(label3);
fieldPanel3.add(field3);
// build fieldPanel4
fieldPanel4 = new JPanel();
label4 = new JLabel("Customer Phone");
field4 = new JTextField(10);
fieldPanel4.setLayout(new FlowLayout(FlowLayout.CENTER,3,5));
fieldPanel4.add(label4);
fieldPanel4.add(field4);
// Build mixedPanel which contains fieldPanel1, fieldPanel2,fieldPanel3
// to be ready for adding to container
mixedPanel = new JPanel();
mixedPanel.setLayout(new BorderLayout());
mixedPanel.add(fieldPanel1,BorderLayout.NORTH);
mixedPanel.add(fieldPanel2,BorderLayout.CENTER);
mixedPanel.add(fieldPanel3,BorderLayout.SOUTH);
mixedPanel2 = new JPanel();
mixedPanel2.add(fieldPanel4,BorderLayout.SOUTH);
// add all panels to the container
container.add(mixedPanel);
container.add(mixedPanel2);
container.setBackground(Color.DARK_GRAY);
container.add(labelTextAreaPanel);
container.add(buttonPanel);
//--------- Messages to communicate with different objects
//----------- method to clear the outputarea
buttonClear.addActionListener(
// anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
outputArea.setText("");
}// actionPerformed
}// anonymous inner class
//--------- method to use button event--------------------
buttonDisplay.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlca = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
rset = sqlStatement.executeQuery ("select * from customers");
while (rset.next ()){
String CUSTOMERID=rset.getObject(1).toString();
String CUSTOMERNAME =rset.getObject(2).toString();
String CUSTOMERCITY =rset.getObject(3).toString();
String CUSTOMERPHONE =rset.getObject(4).toString();
//String map=rset.getObject(4).toString();
//String region=rset.getObject(5).toString();
//System.out.println (id + "\t" + name + "\t" + loc );
outputArea.append(CUSTOMERID + "\t" + CUSTOMERNAME + "\t" + CUSTOMERCITY + "\t" + CUSTOMERPHONE + "\n" );
} // end while
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// ------ method to add Customers to the database
buttonAdd.addActionListener(
// anonymous inner class
new ActionListener()
public void actionPerformed(ActionEvent event)
try{
Statement sqlStatement = null;
ResultSet rtbookset = null;
// create statement
sqlStatement = sqlconn.createStatement();
int CUSTOMERID = Integer.parseInt(field1.getText());
String CUSTOMERNAME = field2.getText();
String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
// create query
String insertquery = "INSERT INTO CUSTOMERS VALUES("
+ CUSTOMERID + "," + "'" + CUSTOMERNAME + "'," + "'" + CUSTOMERCITY + "'," + CUSTOMERPHONE + ")";
// execute the query
sqlStatement.executeQuery(insertquery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record added");
}// try
catch(SQLException ex)
System.out.println("Record exists :" + ex.getMessage() + "<BR>");
}// catch
}// actionPerformed
}// anonymous inner class
//--------- method to use buttonUpdate event--------------------
buttonUpdate.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlconn = null;
Statement sqlStatement = null;
ResultSet rset = null;
int CUSTOMER_ID = Integer.parseInt(field1.getText());
try{
//int CUSTOMER_ID = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
rset = sqlStatement.executeQuery ("select * from CUSTOMERS where CUSTOMER_ID =" + CUSTOMER_ID);
rset.next ();
//int id=rset.getInt("DEPTNO");
String CUSTOMERID = rset.getObject(1).toString();
String CUSTOMERNAME=rset.getString("CUSTOMER_NAME");
String CUSTOMERCITY=rset.getString("CUSTOMER_CITY");
String CUSTOMERPHONE=rset.getString("CUSTOMER_PHONE");
field1.setText(CUSTOMERID);
field2.setText(CUSTOMERNAME);
field3.setText(CUSTOMERCITY);
field4.setText(CUSTOMERPHONE);
//buttonUpdate.setEnabled(false);
//buttonModifyRecord.setEnabled(true);
//rset.close();
}// end try
catch (SQLException ex)
JOptionPane.showMessageDialog(null,"No Record found with CUSTOMER ID :" + CUSTOMER_ID );
//System.out.println("SQLException:No record found" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonModifyRecord.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlconn = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//int dept_no = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
String CUSTOMERNAME = field2.getText();
String CUSTOMERCITY = field3.getText();
int CUSTOMERPHONE = Integer.parseInt(field4.getText());
String updatequery = "UPDATE CUSTOMERS SET CUSTOMER_NAME = " + "'" + CUSTOMERNAME + "',"
+ " CUSTOMER_CITY = " + "'" + CUSTOMERCITY + "'," + " CUSTOMER_PHONE = " + CUSTOMERPHONE
+ " Where CUSTOMER_ID = " + CUSTOMERID;
// execute the query
sqlStatement.executeQuery(updatequery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record modified");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
//---------Method to modify record------------------------------------
buttonDelete.addActionListener(
//anonymous class
new ActionListener()
public void actionPerformed(ActionEvent event)
//Connection sqlca = null;
Statement sqlStatement = null;
ResultSet rset = null;
try{
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//sqlca= DriverManager.getConnection ("jdbc:oracle:thin:@dbserver:1521:infs", "manzur", "manzur");
sqlStatement = sqlconn.createStatement ();
int CUSTOMERID = Integer.parseInt(field1.getText());
//String d_name = field2.getText();
//String d_loc = field3.getText();
String deletequery = "DELETE from CUSTOMERS "
+ " Where CUSTOMER_ID = " + CUSTOMERID;
// execute the query
sqlStatement.executeQuery(deletequery);
// clear the textfields
field1.setText("");
field2.setText("");
field3.setText("");
field4.setText("");
JOptionPane.showMessageDialog(null,"Record Deleted");
//buttonUpdate.setEnabled(true);
//buttonModifyRecord.setEnabled(false);
}// end try
catch (SQLException ex)
System.out.println("SQLException:" + ex.getMessage() + "<BR>");
}// catch
}// action performed
} // anonymous inner class
);// end addActionListener
// specify the size of the window
setSize(800,500);
show();
}// constructor
public static void main(String args[]) throws IOException{
OracleJavaCustomerWindow application = new OracleJavaCustomerWindow();
application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}// main
} // class OracleJavaWindow
// exceptions classes
// inserFailedException is a general exception for
// SQL insert problems
/*class insertFailedException extends SQLException
public insertFailedException(String reason)
super(reason);
public insertFailedException(String reason)
super();
}*/Sorry guys here is the correction of details i have provided
the Error message tells me that
package oracle.jdbc.driver does not exist
and the folder I used to do Mounting SystemFile for was
C:\Oracle\jdbc\lib\classes12 -
What the Enviroment required for java databases programs?
Hi guys
What the enviroment required for java databases programs?
If I have oracle of version 9i and java 1.4.1 platform
do I need Jdeveloper platform ?What the enviroment required for java databases programs?What do you mean by "environment"?
f I have oracle of version 9i and java 1.4.1 platformYou just need to download Oracle's 9i JDBC driver (ojdbc14.jar) and put that in your CLASSPATH. Then write JDBC code to connect to Oracle and issue SQL commands.
do I need Jdeveloper platform ?No, JDeveloper is an IDE. Not required.
Why Java 1.4.1? We're up to Java 6 now. You're two major versions of the JDK behind.
% -
External database Authentication Issue
Hello Experts
I have omplemented external database authentication in my PC and somehow its not working
Do we have to configure the details in NQSconfig file in the security section for implementing External Database Authentication .Hello Thanks for your concern .
Steps i have followed
*1)* use that table. If not, create the following table in your database.
CREATE TABLE OBI_USER
USERNAME VARCHAR2(255 BYTE),
PASSWORD VARCHAR2(255 BYTE),
GROUPNAME VARCHAR2(255 BYTE),
DISPLAYNAME VARCHAR2(255 BYTE),
LOGLEVEL NUMBER,
CREATED_DT DATE sysdate,
**2)**Created New ODBC Connection to use Separate Connection pool for OBIEE Security .
*3)* Created New Session Initialization Block for Authentication and gave
(SELECT USERNAME, GROUPNAME, DISPLAYNAME, LOGLEVEL FROM CPR_OBI_USER WHERE UPPER( USERNAME) =UPPER(':USER') AND UPPER(PASSWORD) =UPPER(':PASSWORD') ) by selection the new BI Security connection pool
In the variable Traget i have defined 'USER', 'GROUP', 'LOGLEVEL','DISPLAYNAME'
*4)* Created another Session Initialization Block for Authorization and gave (SELECT 'GROUP', GROUPNAME FROM OBI_USER WHERE UPPER( USERNAME) =UPPER(':USER'))
And selected row wise initialization in variable target AND assigned Authentication Initialization block in the Execution Precedence .
*5)* Created Groups in Manage-> Security-> Groups with the same group names as given in OBI_USER Table
*6)* Added Groups in Manage Catalog and groups in Presentation Services .
*7)* When i log on with the user which is assigned to the group in the OBI_USER Table then its giving
(Unable to Log In
An invalid User Name or Password was entered.
Please enter your User ID and Password below, and then press the Log In button.)
Edited by: newbi on Sep 28, 2010 9:53 AM -
Hello,
I'll like some advice on the topic mentioned above. I'm a beginner of java programming and have elementry knowledge about java. I'll like to know how is it possible to input the list of data in Excel format into Java Database Connectivity and how am I able to extract out the info. that I'll need. Like say the columns/field on designation and name. How am I able to extract the data and change it like to delete or edit the info.??
Pls. explain it step-by-step your patience is really appreciated. Thanks and God Bless.You should search Javaworld for "Excel" - they've had a few articles about using JDBC to access Excel. As far as I recall, though, you can't alter data in Excel through JDBC, only read it.
http://www.javaworld.com
There are other ways of getting at Excel data through Java but they're not very good either (unless you want to use a Java-COM bridge). -
FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE
A very simple example for FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE.
http://vijaaay.limewebs.com/forum/viewthread.php?tid=26&extra=page%3D1
or
visit www . flexindia . tk >> Flex Examples
The attachment zip contains the source files[ FLEX and JAVA ] and Readme.txt which helps you to setup this example.
Regards,
VijayYeah i registered, but i couldn't find zip file. Could you please tell me where is that example
Thanks,
ApacheFlex. -
DAD and Database Authentication with db link
I have a report that access a table via dblink and displays the result set.
I am trying to implement the database authentication for this using DAD. I created the new DAD without the plsqlusername and password. When I run this application with the valid apex_public_user I get a
ORA-00942: table or view does not exist ORA-02063: preceding line from DB1
But I can run the same SQL from sqlplus for the same user. What am I doing wrong? Any help appreciated.
ThanksFound what was causing the problem. I had not given the workspace user the necessary permissions on the remote database.
-
Java Export hangs at 'Export Java Database Content' phase
Hi All -
As part of system refresh activities,we are doing Java Export from our Production system(PE1) & we will use that export to import it in our Qulaity system(QE1).So while doing Java Export,the export gets stucks/hangs at 'Export Java Database Content" phase which is the last phase in Java Export steps.We have been doing this task since many years & we did not encounter this kind of issue ever.There are no errors or at least warnings in the logs like sapinst_dev.log,jload.log,jload.java.log,sapinst.log etc.Our environment details are as below
EP -6.0
OS - AIX 5.3,64 BIT
DB - DB2 UDB
SAPINST version - 642
Java version is below
pe1adm> java -fullversion
java full version "J2RE 1.4.2 IBM AIX 5L for PowerPC (64 bit JVM) build caix64142ifx-20100918 (SR13 FP6)"
Please note with the SAPINST we are using currently, the exports of remaining systems in EP & other solutions like ECC,CR,SRM,XI,BI are successfull.We are having this issue only in PE1.Looks like some bug in code.So request the experts in this forum to please take a look at it & provide me with solution if any of you have faced the similar situation.
Thanks & regards,
Nagendra.Thank you for your reply Subhash.The below is the last entry in jload.log.It is at EP_ATTR_HEADERS.While doing the Java export,we asked our DBA to monitor to find out any errors at DB side.He monitored and said that no deadlocks or no infinite loops are found.Also he said that he cannot create index for that too because it is trying to do select *.In our first 2 or 3 attempts it used to hang at CA_PRODUCTS meta data exported,CA_PROPERTY meta data exported.Now here.Our DBA said that EP_ATTR_HEADERS has 1.4M rows.We tried to bounce the entire system also,but no luck.We have the same issue.Peculiar thing is we dont see any errors or warnings in the logs.
23.06.11 09:54:21 com.sap.inst.jload.Jload dbExport
INFO: EP_ATTR_DEFS exported (6 rows)
23.06.11 09:54:21 com.sap.inst.jload.Jload dbExport
INFO: EP_ATTR_HEADERS meta data exported
Please let me know if you need any further info in resolving this issue.
Thanks & regards,
Nagendra. -
I'm looking for a free Java database. A few recommended MySQL, but after going to their site, it looks they charge and aren't free.
The database would be used in my own commercial product that would be sold to stores. Perhaps MySQL is just free for development? Anyone know?
If anyone knows of other free Java databases that would be appreciated too.
Thanks,You can always check out Postgres. And I'm not sure if they bundle it anymore, but there used to be a pure-Java database called Cloudscape (I think).
- saish
"My karma ran over your dogma." - Anon -
Installation hangs at step 18-Load Java Database Content
Hi,
I am trying to install NW04s WAS. No matter, how many times I uninstall & reinstall(after properly clearing registry entries by running supplied cleaner.exe,stop the Xserver services if running), the installation just doesn't progress at step 18- 'Load Java Database Content'.
Here is what I did:
I read other threads and checked from the SAP Management Console if the DB is online. It is online and the DB is not full.But the log and Data states are shown as 0%.
Next, according to some threads I removed the JDK 1.4.2_15 and installed 1.4.2_12 version.No use.
I couldn't find any other threads with suggestions which could be of help to my issue.
I am using windows vista home premium.I get some errors during installation but not during step 18. so I am not sure whether to consider those errors for this issue.
<u>Following is the phase information:</u>
PHASE 2007-09-22 15:40:18
Prepare the installation program.
WARNING[E] 2007-09-22 15:43:05
Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
WARNING[E] 2007-09-22 15:44:47
Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
WARNING[E] 2007-09-22 15:45:50
Error converting from service name=sapmsJ2E/protocol=tcp to port number. SAPRETURN=12
ERROR 2007-09-22 15:50:42
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
ERROR 2007-09-22 15:51:12
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
ERROR 2007-09-22 15:51:12
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_01).
ERROR 2007-09-22 15:51:12
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
ERROR 2007-09-22 15:51:12
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPJ2E_00).
WARNING 2007-09-22 15:52:11
While copying files to 'C:\usr\sap\J2E\SCS01\exe': source file 'C:\usr\sap\J2E\SYS\exe\run/icudt26.dll' not found.
WARNING 2007-09-22 15:52:12
While copying files to 'C:\usr\sap\J2E\JC00\exe': source file 'C:\usr\sap\J2E\SYS\exe\run/icudt26.dll' not found.
ERROR 2007-09-22 15:52:31
FSL-06002 Error 1060 (The specified service does not exist as an installed service.
) in execution of a 'OpenService' function, line (255), with parameter (SAPOsCol).
WARNING 2007-09-22 15:54:12
Execution of the command "C:\usr\sap/J2E/JC00/igs/bin/igswd.exe 'C:\usr\sap\J2E\JC00\igs' '-c' '-tracelevel=1' '-mux=Karthik-PC,40000' '-listenerhttp=40080' '-portwatcher=40001' '-portwatcher=40002'" finished with return code 1. Output:
PHASE 2007-09-22 16:03:03
Deploying SDAs (using SDM and SAP J2EE Engine).
PHASE 2007-09-22 16:03:22
Deploying SDAs (using SDM and SAP J2EE Engine).
PHASE 2007-09-22 16:04:29
Deploying SDAs (using SDM and SAP J2EE Engine).
PHASE 2007-09-22 16:05:18
Deploying SDAs (using SDM and SAP J2EE Engine).
PHASE 2007-09-22 16:05:59
SAP J2EE Engine
PHASE 2007-09-22 16:06:09
JLoad Run
I have spent a lot of time to have this installed. Please somebody help.
Thanks
KarthikHi Raja and Anatoliy Misyura ,
Thanks a lot for taking time to reply to my issue.
1)I completely unistalled the previous version by running clearner.exe and stopping the services,removing sapdb folder etc.,
2)Then I disabled my antivirus,firewall etc.,
3)Installed jdk 1.4.2_11(after removed the previously tried version 1.4.2_12
4)Ran the SAPInst installer
But unfortunately still the installer stops at the same step!
Don't know what's going wrong.....
Raja- Can you tell me what is the windows OS version you have? Mine is home premium.
Thanks
Karthik
Can you guys let me know if you have any other suggestions -
JDBC is the Acronym of Java Database Connectivity - Yes / No?
Hi,
JDBC is the Acronym of Java Database Connectivity - Yes / No?
I am little bit confused. I got this question in an Inteview.
I support yes. But some of the compitiors say no.
What will the real answer?Really? Even Sun contradicts themselves here:
(2002) http://java.sun.com/javase/6/docs/technotes/guides/jdbc/
and (more importantly) here:
http://java.sun.com/docs/glossary.html#JDBC
although here:
(2001) http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/intro.html
I think it is simply silly for the latter to state that "JDBC is the trademarked name and is not an acronym" -- Oh really? JDBC doesn't stand for anything? It is all caps just because it is a trademark then? hmmm.
I'm certain the real answer of what it stands for may have been lost long ago. However, I doubt that the interviewer meant the question to be a trick and was looking for "Java DataBase Connectivity"
For every instance that you find that it doesn't stand for anything, I can show you 2 instances (from Sun or an employee) where they use "Java Database Connectivity (JDBC)".
P.S. Ryan Craig may be the final authority on this... -
How we build Java Database Connectivity for Oracle 8i Database
Can any one send me a sample code for Java Database Connectivity for Oracle 8i Database
it will be a grat help
Thanks & Regards
RasikaYou don't need a DSN if you use Oracle's JDBC driver.
You didn't read ANY of the previous replies. What makes you think this one willk help? Or any instruction, for that matter?
Sounds like you just want someone to give it to you. OK, I'll bite, but you have to figure out the rest:
import java.sql.*;
import java.util.*;
* Command line app that allows a user to connect with a database and
* execute any valid SQL against it
public class DataConnection
public static final String DEFAULT_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
public static final String DEFAULT_URL = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
public static final String DEFAULT_USERNAME = "admin";
public static final String DEFAULT_PASSWORD = "";
public static final String DEFAULT_DRIVER = "com.mysql.jdbc.Driver";
public static final String DEFAULT_URL = "jdbc:mysql://localhost:3306/hibernate";
public static final String DEFAULT_USERNAME = "admin";
public static final String DEFAULT_PASSWORD = "";
/** Database connection */
private Connection connection;
* Driver for the DataConnection
* @param command line arguments
* <ol start='0'>
* <li>SQL query string</li>
* <li>JDBC driver class</li>
* <li>database URL</li>
* <li>username</li>
* <li>password</li>
* </ol>
public static void main(String [] args)
DataConnection db = null;
try
if (args.length > 0)
String sql = args[0];
String driver = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
String url = ((args.length > 2) ? args[2] : DEFAULT_URL);
String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
System.out.println("sql : " + sql);
System.out.println("driver : " + driver);
System.out.println("url : " + url);
System.out.println("username: " + username);
System.out.println("password: " + password);
db = new DataConnection(driver, url, username, password);
System.out.println("Connection established");
Object result = db.executeSQL(sql);
System.out.println(result);
else
System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
catch (SQLException e)
System.err.println("SQL error: " + e.getErrorCode());
System.err.println("SQL state: " + e.getSQLState());
e.printStackTrace(System.err);
catch (Exception e)
e.printStackTrace(System.err);
finally
if (db != null)
db.close();
db = null;
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection() throws SQLException,ClassNotFoundException
this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection(final String driver,
final String url,
final String username,
final String password)
throws SQLException,ClassNotFoundException
Class.forName(driver);
this.connection = DriverManager.getConnection(url, username, password);
* Get Driver properties
* @param database URL
* @return list of driver properties
* @throws SQLException if the query fails
public List getDriverProperties(final String url)
throws SQLException
List driverProperties = new ArrayList();
Driver driver = DriverManager.getDriver(url);
if (driver != null)
DriverPropertyInfo[] info = driver.getPropertyInfo(url, null);
if (info != null)
driverProperties = Arrays.asList(info);
return driverProperties;
* Clean up the connection
public void close()
close(this.connection);
* Execute ANY SQL statement
* @param SQL statement to execute
* @returns list of row values if a ResultSet is returned,
* OR an altered row count object if not
* @throws SQLException if the query fails
public Object executeSQL(final String sql) throws SQLException
Object returnValue;
Statement statement = null;
ResultSet rs = null;
try
statement = this.connection.createStatement();
boolean hasResultSet = statement.execute(sql);
if (hasResultSet)
rs = statement.getResultSet();
ResultSetMetaData meta = rs.getMetaData();
int numColumns = meta.getColumnCount();
List rows = new ArrayList();
while (rs.next())
Map thisRow = new LinkedHashMap();
for (int i = 1; i <= numColumns; ++i)
String columnName = meta.getColumnName(i);
Object value = rs.getObject(columnName);
thisRow.put(columnName, value);
rows.add(thisRow);
returnValue = rows;
else
int updateCount = statement.getUpdateCount();
returnValue = new Integer(updateCount);
finally
close(rs);
close(statement);
return returnValue;
* Close a database connection
* @param connection to close
public static final void close(Connection connection)
try
if (connection != null)
connection.close();
connection = null;
catch (SQLException e)
e.printStackTrace();
* Close a statement
* @param statement to close
public static final void close(Statement statement)
try
if (statement != null)
statement.close();
statement = null;
catch (SQLException e)
e.printStackTrace();
* Close a result set
* @param rs to close
public static final void close(ResultSet rs)
try
if (rs != null)
rs.close();
rs = null;
catch (SQLException e)
e.printStackTrace();
* Close a database connection and statement
* @param connection to close
* @param statement to close
public static final void close(Connection connection, Statement statement)
close(statement);
close(connection);
* Close a database connection, statement, and result set
* @param connection to close
* @param statement to close
* @param rs to close
public static final void close(Connection connection,
Statement statement,
ResultSet rs)
close(rs);
close(statement);
close(connection);
}% -
Database Authentication Schema Setup
Hi, Page 13-17 in the User Guide talks about setting up DAD credentials verification. Text is copied below
About DAD Credentials Verification
DAD database authentication uses the Oracle database native authentication and user
mechanisms to authenticate users using a basic authentication scheme. To use DAD
credentials verification:
■ Each application user must have a user account in the Oracle database.
■ You must configure a PL/SQL DAD for basic authentication (without account
information).
how do i setup the dad without account information ?
- thanks
neeleshnevermind, i just removed the PlsqlDatabaseUsername and Password and it worked.
-
Login codes using java database (validates with Microsoft Access File)
hi all pro-programmer, can you show me the code to login with the username and password using java database. When the user enters the username and password in the login page then it will go to the requested page. may i know how to do it?
no one will give you complete code.
i'll lay out the pieces for you, though:
(1) start with a User object. give it username and password attributes.
(2) write a UserDAO interface with CRUD operations for a User object.
(3) write a UserDAOImpl for your Microsoft Access database
(4) write an AuthenticationService interface
(5) write an implementation of the AuthenicationService that works with the UserDAO to authorize a User.
Use a servlet to accept request from your login page and pass it off to the service. Voila.
PS - Here's skeleton to start with. UI, servlet, and controller are your responsibility:
package model;
public class User implements Serializable
private String username;
private String password;
public User(String u, String p)
this.username = u;
this.password = p;
public String getUsername() { return username; }
public String getPassword() { return password; }
public interface UserDAO
public User findByUsername(String username);
public void saveOrUpdate(User user);
public void delete(User user);
public class UserDAOImpl implements UserDAO
private Connection connection;
public UserDAOImpl(Connection connection)
this.connection = connection;
public User findByUsername(String username)
String password = "";
// logic for querying the database for a User
return new User(username, password);
public void saveOrUpdate(User user)
// save or update a User
public void delete(User user)
// delete a User
public interface AuthenticationService
public boolean isAuthorized(String username);
public class AuthenticationServiceImpl implements AuthenticationService
private UserDAO userDAO;
public AuthenticationServiceImpl()
// Create a database connection here and the UserDAO, too.
public boolean isAuthorized(String username)
boolean isAuthorized = false;
// Add logic to do the database query and decide if the username is authorized
return isAuthorized;
}
Maybe you are looking for
-
Any way to make markup on pdf file with optical pen
I am looking for some way to make markups on pdf files by using a optical pen to avoid printing and then making markup with normal pen or by making them onscreen using a regular mouse. there are optical pens in market which can make markups on new do
-
Mail and address book continue to crash upon opening - iPhone related???
Ever since I synced my iphone last night I cannot open my mail app or the address book app. Everytime I open them they crach before getting open. Any thoughts? I I delete my prefs will I loose my mail accounts and address book file? Also if I delete
-
Project wise Profit & Loss account.
Dear All, Our sales are routed through WBS Element and cost is booked against Cost Center. Our Management wants to see project wise Profit & Loss account. Any suggestions on deriving this?? Regards, Mike.
-
Connecting to an external blackberry mobile, to use its internet?
Hi, I'm really really thinking about getting a 32gb iPod touch (4th gen),.... but one pet peeve of mine from the one I currently have (ipod touch 3rd gen, 8gb) is that it doesn't let you connect to any other phone, to "hijack" the internet capabiliti
-
Error 823: I/O error (torn page) detected during read at offset in a file
Hi , We got an error 823 torn page in attaching database. Is there any solution to recover from this. We do not have the backup of database also. The database unable to attach and it has the same error in C:\programfiles....\m