Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!

sonali jha

Greenhorn
+ Follow
since May 10, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sonali jha

While installing the Ear file on Websphere I m getting the below error i.e.. SaveFailureException..file not foundException:-
Kindly suggest the solution.

Error importing: Error importing EAR file..
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] >com.ibm.etools.ejbdeploy.EJBDeploymentException (Error importing: Error importing EAR file..)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] >com.ibm.etools.wft.util.WFTWrappedException (Error importing EAR file.)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] com.ibm.etools.archive.exception.SaveFailureException: InsulationLayerEJB.jar
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] Stack trace of nested exception:
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] com.ibm.etools.wft.util.WFTWrappedException: Error importing Module File
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] IWAE0009E Stack trace of nested exception:
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] com.ibm.etools.archive.exception.SaveFailureException: Error occured saving the File..PubServReqHeaderTypeImpl$PubServReqFailDiagnosticsTypeImpl$Unmarshaller.class
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] Stack trace of nested exception:
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] org.eclipse.core.internal.resources.ResourceException(C:/Documents and Settings/tulika.WIPRO-AVIVA1/Local Settings/Temp/app_103c9f4cfc0/dpl/df6f3e8a/InsulationLayerEJB/imported_classes/com/aviva/il/testframework/vo/error_classification/impl/PubServReqHeaderTypeImpl$PubServReqFailDiagnosticsTypeImpl$Unmarshaller.class)[272]: java.io.FileNotFoundException: C:\Documents and Settings\tulika.WIPRO-AVIVA1\Local Settings\Temp\app_103c9f4cfc0\dpl\df6f3e8a\InsulationLayerEJB\imported_classes\com\aviva\il\testframework\vo\error_classification\impl\PubServReqHeaderTypeImpl$PubServReqFailDiagnosticsTypeImpl$Unmarshaller.class (The system cannot find the path specified)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at java.io.FileOutputStream.open(Native Method)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at java.io.FileOutputStream.<init>(FileOutputStream.java:196)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at java.io.FileOutputStream.<init>(FileOutputStream.java:122)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.localstore.FileSystemStore.createStream(FileSystemStore.java:99)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.localstore.FileSystemStore.write(FileSystemStore.java:367)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:656)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.File.internalSetContents(File.java:238)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.File.create(File.java:155)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.File.create(File.java:183)
[5/11/05 9:43:50:861 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.emf.ecore.resource.impl.URIConverterImpl$PlatformResourceOutputStream.close(URIConverterImpl.java:120)
[5/11/05 9:43:50:876 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.emf.workbench.WorkbenchByteArrayOutputStream.close(WorkbenchByteArrayOutputStream.java:37)
[5/11/05 9:43:50:876 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.util.ArchiveUtil.copy(ArchiveUtil.java(Compiled Code))
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.j2ee.operations.J2EESaveStrategyImpl.save(J2EESaveStrategyImpl.java:143)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.impl.SaveStrategyImpl.save(SaveStrategyImpl.java:116)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.impl.SaveStrategyImpl.saveFiles(SaveStrategyImpl.java:126)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.j2ee.operations.J2EESaveStrategyImpl.saveFiles(J2EESaveStrategyImpl.java:317)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.impl.SaveStrategyImpl.save(SaveStrategyImpl.java:84)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.commonarchive.impl.ArchiveImpl.save(ArchiveImpl.java:1051)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.commonarchive.impl.ModuleFileImpl.save(ModuleFileImpl.java:360)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.save(EJBJarImportOperation.java:306)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.importModuleFile(J2EEImportOperation.java:235)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.j2ee.operations.J2EEImportOperation.execute(J2EEImportOperation.java:156)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ejb.operations.EJBJarImportOperation.execute(EJBJarImportOperation.java:113)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation$1.run(HeadlessJ2EEOperation.java:81)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation.run(HeadlessJ2EEOperation.java:95)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARProjectSaveStrategyImpl.executeOperation(EARProjectSaveStrategyImpl.java:479)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARProjectSaveStrategyImpl.saveEJBJarFile(EARProjectSaveStrategyImpl.java:415)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARProjectSaveStrategyImpl.save(EARProjectSaveStrategyImpl.java:262)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.impl.SaveStrategyImpl.save(SaveStrategyImpl.java:106)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.impl.SaveStrategyImpl.saveFiles(SaveStrategyImpl.java:126)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARProjectSaveStrategyImpl.save(EARProjectSaveStrategyImpl.java:230)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.commonarchive.impl.ArchiveImpl.save(ArchiveImpl.java:1051)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.commonarchive.impl.ModuleFileImpl.save(ModuleFileImpl.java:360)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARImportOperation.importEARProject(EARImportOperation.java:153)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.archive.ear.operations.EARImportOperation.execute(EARImportOperation.java:102)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation$1.run(HeadlessJ2EEOperation.java:81)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.j2ee.operations.HeadlessJ2EEOperation.run(HeadlessJ2EEOperation.java:95)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.importEar(BatchExtension.java:1008)
[5/11/05 9:43:50:954 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.runEarDeploy(BatchExtension.java:273)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.access$0(BatchExtension.java:255)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.run(BatchExtension.java:238)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension$RunDeploy.execute(BatchExtension.java:222)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.run(BatchExtension.java:185)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at java.lang.reflect.Method.invoke(Method.java:386)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.run(BootLoaderLoader.java:255)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.execute(BatchDeploy.java:133)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:80)
[5/11/05 9:43:50:970 IST] 3d3dead0 SystemOut O [EJBDeploy] at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:307)
[5/11/05 9:43:50:986 IST] 3d3dead0 SystemOut O [EJBDeploy] EJBDeploy level: 20031007_1915-WB212-AD-V511D-W5
[5/11/05 9:43:51:158 IST] 1de86ad0 SystemOut O Exception in EJBDeploy : com.ibm.websphere.management.exception.AdminException: ADMA0063E: Error in EJB deploy - [An unexpected exception was thrown. Halting execution.]
[5/11/05 9:43:51:267 IST] 1de86ad0 SystemOut O ADMA6012I: Exception in run com.ibm.websphere.management.exception.AdminException: ADMA0063E: Error in EJB deploy - [An unexpected exception was thrown. Halting execution.]
[5/11/05 9:43:51:267 IST] 1de86ad0 SystemOut O Exception: com.ibm.websphere.management.exception.AdminException: ADMA0063E: Error in EJB deploy - [An unexpected exception was thrown. Halting execution.]
16 years ago
I m trying to generate a POC using HTTPS.For that I have written server and cllient program which are mentioned below.I have generated keystore with CSR using inbuilt websphere's IBM KeyManagement toolkit.Also through websphere console i have made entry of the keystore(deployed)in SSL.
Still my program is giving handshake exception.Do I need to generate kdb files also bcoz when i m generating the kdb file s its giving me error while generating file and i m not able to generate it.Kindly give some suggestion on how to make it work as i m very new to this topic.thanks..

the server program:-
import java.io.*;
import java.security.*;
import javax.net.ssl.*;

public class HTTPSServer {
public static void main(String[] args)
{
String ksName = "D:\\sampleHTTPSCode\\httpssampleKey.jks";
char ksPass[] = "tulika".toCharArray();
char ctPass[] = "tulika".toCharArray();
try
{
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(new FileInputStream(ksName), ksPass);
ks.load(null , null);
KeyManagerFactory kmf =
KeyManagerFactory.getInstance("SunX509");

kmf.init(ks, ctPass);
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(kmf.getKeyManagers(), null, null);
SSLServerSocketFactory ssf = sc.getServerSocketFactory();
SSLServerSocket s
= (SSLServerSocket) ssf.createServerSocket(8080);
System.out.println("Server started:");
s.setEnabledCipherSuites(s.getSupportedCipherSuites());
printServerSocketInfo(s);
// Listening to the port
System.out.println("before accepting port:");
SSLSocket socket = (SSLSocket)s.accept();
printSocketInfo(socket);
BufferedWriter w = new BufferedWriter(
new OutputStreamWriter(socket.getOutputStream()));
BufferedReader r = new BufferedReader(
new InputStreamReader(socket.getInputStream()));
String m = r.readLine();
w.write("HTTP/1.0 200 OK");
w.newLine();
w.write("Content-Type: text/html");
w.newLine();
w.newLine();
w.write("<html><body>Hello world!</body></html>");
w.newLine();
w.flush();
w.close();
r.close();
socket.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
private static void printSocketInfo(SSLSocket s)
{
System.out.println("Socket class: "+s.getClass());
System.out.println(" Remote address = "
+s.getInetAddress().toString());
System.out.println(" Remote port = "+s.getPort());
System.out.println(" Local socket address = "
+s.getLocalSocketAddress().toString());
System.out.println(" Local address = "
+s.getLocalAddress().toString());
System.out.println(" Local port = "+s.getLocalPort());
System.out.println(" Need client authentication = "
+s.getNeedClientAuth());
SSLSession ss = s.getSession();
System.out.println(" Cipher suite = "+ss.getCipherSuite());
System.out.println(" Protocol = "+ss.getProtocol());
}

private static void printServerSocketInfo(SSLServerSocket s) {
System.out.println("Server socket class: "+s.getClass());
System.out.println(" Socker address = "
+s.getInetAddress().toString());
System.out.println(" Socker port = "
+s.getLocalPort());
System.out.println(" Need client authentication = "
+s.getNeedClientAuth());
System.out.println(" Want client authentication = "
+s.getWantClientAuth());
System.out.println(" Use client mode = "
+s.getUseClientMode());
}
}

the client program:-
/**
* HttpsClient.java
*
*/
import java.io.*;
import java.net.*;
import javax.net.ssl.*;

public class HTTPSClient {
public static void main(String[] args) {
PrintStream out = System.out;

// Getting the default SSL socket factory
SSLSocketFactory f =
(SSLSocketFactory) SSLSocketFactory.getDefault();
out.println("The default SSL socket factory class: "
+f.getClass());
try {
// Getting the default SSL socket factory
SSLSocket c =
(SSLSocket) f.createSocket("localhost", 8080);
c.setEnabledCipherSuites(c.getSupportedCipherSuites());
printSocketInfo(c);
c.startHandshake();
BufferedWriter w = new BufferedWriter(new OutputStreamWriter(
c.getOutputStream()));
BufferedReader r = new BufferedReader(new InputStreamReader(
c.getInputStream()));
w.write("GET / HTTP/1.0");
w.newLine();
w.newLine(); // end of HTTP request
w.flush();
String m = null;
while ((m=r.readLine())!= null) {
out.println(m);
}
w.close();
r.close();
c.close();
} catch (IOException e) {
System.err.println(e.toString());
}
}
private static void printSocketInfo(SSLSocket s) {
System.out.println("Socket class: "+s.getClass());
System.out.println(" Remote address = "
+s.getInetAddress().toString());
System.out.println(" Remote port = "+s.getPort());
System.out.println(" Local socket address = "
+s.getLocalSocketAddress().toString());
System.out.println(" Local address = "
+s.getLocalAddress().toString());
System.out.println(" Local port = "+s.getLocalPort());
System.out.println(" Need client authentication = "
+s.getNeedClientAuth());
SSLSession ss = s.getSession();
System.out.println(" Cipher suite = "+ss.getCipherSuite());
System.out.println(" Protocol = "+ss.getProtocol());
}
}

Exception at server side:-
D:\sampleHTTPSCode>java HTTPSServer
Server started:
Server socket class: class com.sun.net.ssl.internal.ssl.SSLServerSocketImpl
Socker address = 0.0.0.0/0.0.0.0
Socker port = 8080
Need client authentication = false
Want client authentication = false
Use client mode = false
before accepting port:
Socket class: class com.sun.net.ssl.internal.ssl.SSLSocketImpl
Remote address = /127.0.0.1
Remote port = 1796
Local socket address = /127.0.0.1:8080
Local address = /127.0.0.1
Local port = 8080
Need client authentication = false
Cipher suite = Unknown 0x0:0x0
Protocol = NONE
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHands
hakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at HTTPSServer.main(HTTPSServer.java:36)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificat
e_unknown
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Sou
rce)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)

at HTTPSServer.printSocketInfo(HTTPSServer.java:67)
at HTTPSServer.main(HTTPSServer.java:31)


Exception at client side:-
D:\sampleHTTPSCode>java HTTPSClient
The default SSL socket factory class: class com.sun.net.ssl.internal.ssl.SSLSock
etFactoryImpl
Socket class: class com.sun.net.ssl.internal.ssl.SSLSocketImpl
Remote address = localhost/127.0.0.1
Remote port = 8080
Local socket address = /127.0.0.1:1796
Local address = /127.0.0.1
Local port = 1796
Need client authentication = false
Cipher suite = SSL_NULL_WITH_NULL_NULL
Protocol = NONE
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHands
hakeException: sun.security.validator.ValidatorException: No trusted certificate
found