Sun JSSE intergration with WebLogic
First, I should state that I have been able to get my application to work in Tomcat
and run on it's own, but not in WebLogic.
Has anyone used Sun's JSSE implementation from within WebLogic? Is it possible
to do so?
I have set the following properties:
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.keyStoreType",
"pkcs12");
System.setProperty("javax.net.ssl.keyStore",
keystore);
System.setProperty("javax.net.ssl.keyStorePassword",
keyStorePassword);
System.setProperty("javax.net.ssl.trustStore",
trustStore);
System.setProperty("javax.net.ssl.trustStorePassword",
trustStorePassword);
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
I get the following exception when writing to the output stream of HttpsURLConnection:
java.io.IOExceptionWrite Channel Closed, possible SSL handshaking or trust failure
I am not that familiar with Weblogic, so any suggestions are welcome.
No, the loadLocalIdentity methods that take InputStream-s expect streams for the
certificate and the key pem files, with the key in pkcs8 format. If your certificate
is in pkcs12 keystore, you can read the cert and the key using java keystore api,
and then load them with the loadLocalIdentity(Certificate[], PrivateKey) method.
Pavel.
"Dave" <[email protected]> wrote:
>
Thanks for the response I appreciate it. I do have some follow up questions
you
may be able to help me with.
This application is performing two way SSL, but in this case my web app
(deployed
in WLS) is the client. Making a https call to public server that requires
the
client certificate. The public server issues the client certificates
in pkcs12
format. Can the weblogic.net.http.HttpsURLConnection class or WebLogic
SSL implementation
handle that format?
Thanks.
"tm" <no-reply> wrote:
From a coworker:
It sounds like in this particular case they are using an URL to open
the
connection.
On the server this will return a weblogic.net.http.HttpsURLConnection,
which
does not support the jsse configuration properties.
In the case of a one way connection they might be able to fix this by
setting weblogic.security.SSL.trustedCAKeyStore instead.
For two way they would need to use our HttpsURLConnection api to load
identity.
-tm
"tm" <no-reply> wrote in message news:[email protected]...
To the best of my knowledge, BEA doesn't test or claim to support
any
scenarios with Sun JSSE running inside a WLS server when the WLS serveris
setup to use SSL. However, it might work.
In any case, to see what WLS SSL is complaining about, turn on SSLdebug
tracing:
-Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true
-tm
"Dave" <[email protected]> wrote in message
news:[email protected]...
First, I should state that I have been able to get my application
to
work
in Tomcat
and run on it's own, but not in WebLogic.
Has anyone used Sun's JSSE implementation from within WebLogic?
Is
it
possible
to do so?
I have set the following properties:
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.keyStoreType",
"pkcs12");
System.setProperty("javax.net.ssl.keyStore",
keystore);
System.setProperty("javax.net.ssl.keyStorePassword",
keyStorePassword);
System.setProperty("javax.net.ssl.trustStore",
trustStore);
System.setProperty("javax.net.ssl.trustStorePassword",
trustStorePassword);
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
I get the following exception when writing to the output stream
of
HttpsURLConnection:
java.io.IOExceptionWrite Channel Closed, possible SSL handshaking
or
trust
failure
I am not that familiar with Weblogic, so any suggestions are welcome.
Similar Messages
-
Sun JSSE -- Weblogic Compatibility
Hi All,
I am Guru Dutt. I am trying to connect to a secure site using the sun
JSSE API on Weblogic, in JSP's
Preconditions:
* Changed the Security.policy file for adding SUN provider under
C:\bea\jdk131_06\jre\lib\security\
* Added jsse.jar, jnet.jar, jcert.jar into weblogic's classpath
* added the JSSE jar's in the the \ext directory.
********** The JSP File *********************88
<%@ page import="com.sun.net.ssl.SSLContext,
javax.net.ssl.SSLSocketFactory, com.sun.net.ssl.TrustManager,
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection,
javax.security.cert.X509Certificate,
com.sun.net.ssl.KeyManagerFactory, java.security.KeyStore"%>
<%@ page import="com.sun.net.ssl.TrustManagerFactory,java.io.BufferedReader,
java.io.BufferedWriter, java.io.IOException,
java.io.InputStreamReader, java.io.OutputStreamWriter,
java.io.PrintWriter, java.io.FileInputStream, java.net.URL"%>
<%@ page import="javax.net.ssl.SSLSocket,import java.io.PrintStream"%>
<%
URL tempUrl = new URL("https://www.versign.com/");
String host = tempUrl.getHost();
int port = tempUrl.getPort();
String path = tempUrl.getPath();
String query = tempUrl.getQuery();
SSLSocketFactory factory = null;
try{
SSLContext ctx;
KeyManagerFactory kmf;
KeyStore ks;
char[] passphrase = "passphrase".toCharArray();
ctx = SSLContext.getInstance("https");
TrustManagerFactory tmf =
TrustManagerFactory.getInstance("SunX509", "SunJSSE");
kmf = KeyManagerFactory.getInstance("SunX509");
ks = KeyStore.getInstance("JKS");
ks.load(new FileInputStream("testkeys"), passphrase);
kmf.init(ks, passphrase);
tmf.init(ks);
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
factory = ctx.getSocketFactory();
SSLSocket socket = (SSLSocket)factory.createSocket(host, 443);
out.println("after connection");
socket.startHandshake();
PrintWriter printOut = new PrintWriter(new BufferedWriter(new
OutputStreamWriter(socket.getOutputStream())));
printOut.println("GET " + path + " HTTP/1.1");
printOut.println();
printOut.flush();
BufferedReader in = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
String inputLine =null;
String inputString=null;
while ((inputLine = in.readLine()) != null)
inputLine=inputLine inputString"\n";
out.println(inputLine);
in.close();
printOut.close();
socket.close();
} catch (Exception e) {
out.println(e);
PrintWriter printStream = new PrintWriter(out);
e.printStackTrace(printStream);
while(printStream!=null)
printStream.println();
%>
Error Report
java.security.NoSuchAlgorithmException:
Algorithm https not available java.security.NoSuchAlgorithmException:
Algorithm https not available at
com.sun.net.ssl.SunJSSE_b.a(DashoA6275) at
com.sun.net.ssl.SSLContext.getInstance(DashoA6275) at
jsp_servlet.__httpsconnection._jspService(__httpsconnection.java:126)
at
weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Adv thanks if anyone can tell what is the workaround
Regards,
Guru Dutt.Maybe sun JSSE doesn't like the "https" being specified, I think it is
expecting the
SSL version there ("SSL", "SSLV3", "TLS", etc...)
ctx = SSLContext.getInstance("https");Tony
"Guru Dutt" <[email protected]> wrote in message
news:[email protected]...
Hi All,
I am Guru Dutt. I am trying to connect to a secure site using the sun
JSSE API on Weblogic, in JSP's
Preconditions:
* Changed the Security.policy file for adding SUN provider under
C:\bea\jdk131_06\jre\lib\security\
* Added jsse.jar, jnet.jar, jcert.jar into weblogic's classpath
* added the JSSE jar's in the the \ext directory.
********** The JSP File *********************88
<%@ page import="com.sun.net.ssl.SSLContext,
javax.net.ssl.SSLSocketFactory, com.sun.net.ssl.TrustManager,
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection,
javax.security.cert.X509Certificate,
com.sun.net.ssl.KeyManagerFactory, java.security.KeyStore"%>
<%@ pageimport="com.sun.net.ssl.TrustManagerFactory,java.io.BufferedReader,
java.io.BufferedWriter, java.io.IOException,
java.io.InputStreamReader, java.io.OutputStreamWriter,
java.io.PrintWriter, java.io.FileInputStream, java.net.URL"%>
<%@ page import="javax.net.ssl.SSLSocket,import java.io.PrintStream"%>
<%
URL tempUrl = new URL("https://www.versign.com/");
String host = tempUrl.getHost();
int port = tempUrl.getPort();
String path = tempUrl.getPath();
String query = tempUrl.getQuery();
SSLSocketFactory factory = null;
try{
SSLContext ctx;
KeyManagerFactory kmf;
KeyStore ks;
char[] passphrase = "passphrase".toCharArray();
ctx = SSLContext.getInstance("https");
TrustManagerFactory tmf =
TrustManagerFactory.getInstance("SunX509", "SunJSSE");
kmf = KeyManagerFactory.getInstance("SunX509");
ks = KeyStore.getInstance("JKS");
ks.load(new FileInputStream("testkeys"), passphrase);
kmf.init(ks, passphrase);
tmf.init(ks);
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
factory = ctx.getSocketFactory();
SSLSocket socket = (SSLSocket)factory.createSocket(host, 443);
out.println("after connection");
socket.startHandshake();
PrintWriter printOut = new PrintWriter(new BufferedWriter(new
OutputStreamWriter(socket.getOutputStream())));
printOut.println("GET " + path + " HTTP/1.1");
printOut.println();
printOut.flush();
BufferedReader in = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
String inputLine =null;
String inputString=null;
while ((inputLine = in.readLine()) != null)
inputLine=inputLine inputString"\n";
out.println(inputLine);
in.close();
printOut.close();
socket.close();
} catch (Exception e) {
out.println(e);
PrintWriter printStream = new PrintWriter(out);
e.printStackTrace(printStream);
while(printStream!=null)
printStream.println();
%>
Error Report
java.security.NoSuchAlgorithmException:
Algorithm https not available java.security.NoSuchAlgorithmException:
Algorithm https not available at
com.sun.net.ssl.SunJSSE_b.a(DashoA6275) at
com.sun.net.ssl.SSLContext.getInstance(DashoA6275) at
jsp_servlet.__httpsconnection._jspService(__httpsconnection.java:126)
at
weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1058)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:306)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5445)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3105)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Adv thanks if anyone can tell what is the workaround
Regards,
Guru Dutt. -
Sun Identity Server 6.1 with Weblogic 8.1 sp2
Hi,
I've installed the IS 6.1 with WLS 8.1 sp2 and the agent 2.1.1 and followed the agent configuration guide to configure the xml files (web.xml and weblogic.xml) and agent authenticator.
When I login to the restricted resource, the browser is redirected to the IS server login page. After login, the browser is redirected back to the resource with 403 forbidden.
Is there any step missing? Should I additional add some policy in the IS console? .....
CliveI have just installed Sun Identity Server 6.2 with WebLogic 8.1 SP3 and am experiencing the same results. Have you resolved this issue in your environment? We are evaluating Portal Server running on a BEA WLS Container and thus do not have Sun Support on the Identity Server Component of this configuration.
-
Sun JSSE -- Weblogic 7.0 Compatibility
Sorry Gurys forgot to mention the Weblogic's version
Its 7.0
and Sun JSSE is 1.0.3
Rest of the things are as mentioned in the
Sun JSSE -- Weblogic Compatibility ThreadSorry Gurys forgot to mention the Weblogic's version
Its 7.0
and Sun JSSE is 1.0.3
Rest of the things are as mentioned in the
Sun JSSE -- Weblogic Compatibility Thread -
Need help: how to implement sun niagara encryption chip with weblogic
Hi all, I have a issue with SSL performance on top of T2000 server, thats why I try to use encryption chip provided by SUN T1 technology, but I couldnt find the implementation document for this technology with weblogic server.
Im using weblogic 9.2MP3 with sun solaris 10. I really appreciate if any body can help me with this problem.
Thanks,Hello,
How are you obtaining the EntityManager and EntityManagerFactory? If it is injection, you should verify that the second transaction scope gets its own EM/EMF injected rather than being passed the one from the first one.
Best Regards,
Chris -
Trying to use the JSSE library with Jrocket 7.0
Hi All,
I HAC who is trying to use the JSSE library with Jrocket 7.0.
Sometimes the socket works and sometimes it does not. It throws the below
exception,
The exception stacktrace is given below:
java.net.SocketException: SSL implementation not available
at
javax.net.ssl.DefaultSSLSocketFactory.createSocket(Ljava.lang.String;I)Ljava
.net.Socket;(Unknown Source)
at
com.twister.transunion.TransUnionUtils.sendRequest(Ljava.lang.String;)Ljava.
lang.String;(Unknown Source)
at
com.twister.transunion.TransUnionUtils.parseRequest(Lcom.twister.transunion.
TransUnionRequest;)Z(Unknown Source)
at
com.twister.struts.signup.Signup5Action.button_apply_now(Lorg.apache.struts.
action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.htt
p.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.st
ruts.action.ActionForward;(Unknown Source)
at
COM.jrockit.reflect.NativeMethodInvoker.invoke0(ILjava.lang.Object;[Ljava.la
ng.Object;)Ljava.lang.Object;(Unknown Source)
at
COM.jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang
.Object;)Ljava.lang.Object;(Unknown Sou
the line of code causing the stack trace is:
Socket socket =
javax.net.ssl.SSLSocketFactory.getDefault().createSocket(HOST, PORT);
He has added the following line to his jre/lib/security/java.security file:
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
and he has added the JSSE jar files to the jre/lib/ext directory.
The problem occurs when SSL is enabled in the config.xml file (e.g. <SSL
Enabled="true" ...>). It does NOT occur when SSL is disabled.
When SSL is disabled, the following code shows all three providers as
defined in the java.security file. If SSL is enabled then he only sees the
default 2 implementation and NOT the one he added above.
java.security.Provider[] a = java.security.Security.getProviders();
for (int i=0; i < a.length; i++)
System.out.println("name: " + a.getName());
System.out.println("ver: " + a[i].getVersion());
System.out.println("info: " + a[i].getInfo());
The problem is that client does not want to use WebLogic specific classes to
create an SSL socket. As well he do NOT wish to dynamically register the
SunJSSE provider. Since this setup works when SSL is disabled in WebLogic he
believes he has configured everything properly.
It appears to me that WebLogic is removing the JSSE as a security provider
if SSL is enabled.
Is it the expected behaviour? and Is it possible to statically register the
JSSE provider in the jre/lib/security/java.security file ?
Any pointers will be appreciated,
Thanks in advance,
RubeshHi Howard, just trawling through the Labview TE issues as I myself have started to work on a similar issue. I have now infact upgraded the Labview Test Executive to work in 7.1 ok (both development and Runtime).
Using XP I had no issues upgrading in the development environment - creating the run-time version was not as easy but manged to do so with help from the Application Builder. I have also tested the SQL function (as i log to Oracle) and a basic audio test using a DSA4551 - again both seem to be upgraded with no issues.
regards, paul. -
Security violation exception with Weblogic cluster installation on OIm 9.1
Hi,
I have OIM9.1 installed on weblogic 8.1 SP4 in clustered environment, which more often than not seems to work fine. But some time I get following exception on server console/log file which causes certain provisioning task to be rejected...
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: javax.ejb.AccessLocalException: [EJB:010160]Security Violation: User: 'xelsysad
m' has insufficient permission to access EJB: type=<ejb>, application=Xellerate, module=xl
DataObjectBeans.jar, ejb=tcFormInstanceOperations, method=create, methodInterface=LocalHom
e, signature={}.
at weblogic.ejb20.internal.MethodDescriptor.checkMethodPermissionsLocal(MethodDesc
riptor.java:486)
at weblogic.ejb20.internal.StatelessEJBLocalHome.create(StatelessEJBLocalHome.java
:80)
at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_LocalHomeImpl.create(
tcFormInstanceOperations_2j82mm_LocalHomeImpl.java:93)
... 126 more
ERROR,19 Dec 2008 14:20:03,752,[XELLERATE.APIS],Class/Method: tcBaseUtilityClient/getLocal
Interface encounter some problems: {1}
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.in
Problem is, I get this exception only 4 out of 6 times (when it is least expected). I have googled, and tried all possible means but have't been able to resolve it. One more thing I am sure of is, it only comes with Weblogic installation not with Jboss. So there should be some configuration issue with weblogic installation.
Any suggestions would be useful...No Response???
Where are the good guys?? -
Untrusted server cert --- JSSE usage with applets
Hi all,
I am using JSSE client ( uses applets) connects to JSSE server.
I am getting error: untrusted server cert
I am able to connect JSSE server with the JSSE client with out applets with same self signed certificate.
I have read some where that applets by default refer cacerts instead of jssecacerts. Thats why i have added certificate to cacerts also.
I am sending errors (both at client and server side) and html file used for applets at client side.
machName portno port:127.0.0.1 2002 2002
found key for : alias
SunX509: skip default keystore: java.security.AccessControlException: access den
ied (java.util.PropertyPermission javax.net.ssl.trustStore read)
trigger seeding of SecureRandom
done seeding SecureRandom
Machine Name is 127.0.0.1
%% No cached client session
*** ClientHello, v3.1
RandomCookie: GMT: 1009970996 bytes = { 101, 168, 120, 86, 239, 175, 47, 195, 7
4, 19, 250, 73, 236, 219, 251, 102, 102, 151, 188, 95, 121, 105, 96, 173, 182, 3
3, 212, 30 }
Session ID: {}
Cipher Suites: { 0, 9 }
Compression Methods: { 0 }
[write] MD5 and SHA1 hashes: len = 45
0000: 01 00 00 29 03 01 3C 33 EF 34 65 A8 78 56 EF AF ...)..<3.4e.xV..
0010: 2F C3 4A 13 FA 49 EC DB FB 66 66 97 BC 5F 79 69 /.J..I...ff.._yi
0020: 60 AD B6 21 D4 1E 00 00 02 00 09 01 00 `..!.........
AWT-EventQueue-1, WRITE: SSL v3.1 Handshake, length = 45
[write] MD5 and SHA1 hashes: len = 47
0000: 01 03 01 00 06 00 00 00 20 00 00 09 06 00 40 3C ........ .....@<
0010: 33 EF 34 65 A8 78 56 EF AF 2F C3 4A 13 FA 49 EC 3.4e.xV../.J..I.
0020: DB FB 66 66 97 BC 5F 79 69 60 AD B6 21 D4 1E ..ff.._yi`..!..
AWT-EventQueue-1, WRITE: SSL v2, contentType = 22, translated length = 16340
AWT-EventQueue-1, READ: SSL v3.1 Handshake, length = 670
*** ServerHello, v3.1
RandomCookie: GMT: 1009970996 bytes = { 225, 193, 138, 42, 75, 55, 82, 98, 128,
65, 108, 86, 20, 94, 198, 33, 33, 115, 40, 27, 29, 0, 117, 169, 21, 60, 48, 113
Session ID: {60, 51, 239, 52, 239, 124, 121, 133, 111, 116, 246, 8, 10, 20, 99,
150, 141, 208, 153, 124, 223, 176, 115, 34, 158, 29, 153, 32, 194, 198, 217, 12
6}
Cipher Suite: { 0, 9 }
Compression Method: 0
%% Created: [Session-1, SSL_RSA_WITH_DES_CBC_SHA]
** SSL_RSA_WITH_DES_CBC_SHA
[read] MD5 and SHA1 hashes: len = 74
0000: 02 00 00 46 03 01 3C 33 EF 34 E1 C1 8A 2A 4B 37 ...F..<3.4...*K7
0010: 52 62 80 41 6C 56 14 5E C6 21 21 73 28 1B 1D 00 Rb.AlV.^.!!s(...
0020: 75 A9 15 3C 30 71 20 3C 33 EF 34 EF 7C 79 85 6F u..<0q <3.4..y.o
0030: 74 F6 08 0A 14 63 96 8D D0 99 7C DF B0 73 22 9E t....c.......s".
0040: 1D 99 20 C2 C6 D9 7E 00 09 00 .. .......
*** Certificate chain
chain [0] = [
Version: V1
Subject: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@479809
Validity: [From: Wed Jan 02 14:46:52 GMT+05:30 2002,
To: Thu Jan 02 14:46:52 GMT+05:30 2003]
Issuer: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
SerialNumber: [ 3c32d004 ]
Algorithm: [MD5withRSA]
Signature:
0000: 71 00 A6 5A 95 8D 02 1F FD DF 51 55 73 14 59 C2 q..Z......QUs.Y.
0010: 51 40 D5 38 BE 0C 52 17 44 01 CC 6B 72 05 69 94 [email protected].
0020: 9E 01 2D C5 E4 FF D9 B6 73 8F 0C 84 6F 2A 4B A4 ..-.....s...o*K.
0030: 42 B7 EE E2 B2 32 A6 64 28 6B A2 F1 91 A8 D2 36 B....2.d(k.....6
0040: 09 E8 50 72 1F 25 77 B5 0D 92 48 96 87 EE 76 AF ..Pr.%w...H...v.
0050: 67 FD BF 7F 77 35 36 2F F2 2F 2D 9E 1F 2C F2 8C g...w56/./-..,..
0060: BF B6 44 9F 49 EE E8 E3 13 ED EC 3D 17 1B EC 28 ..D.I......=...(
0070: 6A 37 36 37 BC C3 36 3F 76 22 FF 1C 02 AB 90 0A j767..6?v"......
AWT-EventQueue-1, SEND SSL v3.1 ALERT: fatal, description = certificate_unknown
AWT-EventQueue-1, WRITE: SSL v3.1 Alert, length = 2
IO exceptionuntrusted server cert chain
Exception occurred during event dispatching:
java.security.AccessControlException: access denied (java.lang.RuntimePermission
exitVM)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkExit(SecurityManager.java:765)
at java.lang.Runtime.exit(Runtime.java:91)
at java.lang.System.exit(System.java:701)
at Connection.<init>(Connection.java:94)
at Main$2.actionPerformed(Main.java:373)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
50)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:216)
at java.awt.Component.processMouseEvent(Component.java:3717)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
3)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.Dialog.show(Dialog.java:370)
at Main.validate(Main.java:434)
at Main$MenuItemListener.actionPerformed(Main.java:729)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
50)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
d(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:3717)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
3)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
errors at server side :
trustStore type is : jks
init truststore
adding private entry as trusted cert: [
Version: V1
Subject: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@291aff
Validity: [From: Wed Jan 02 14:46:52 GMT+05:30 2002,
To: Thu Jan 02 14:46:52 GMT+05:30 2003]
Issuer: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
SerialNumber: [ 3c32d004 ]
Algorithm: [MD5withRSA]
Signature:
0000: 71 00 A6 5A 95 8D 02 1F FD DF 51 55 73 14 59 C2 q..Z......QUs.Y.
0010: 51 40 D5 38 BE 0C 52 17 44 01 CC 6B 72 05 69 94 [email protected].
0020: 9E 01 2D C5 E4 FF D9 B6 73 8F 0C 84 6F 2A 4B A4 ..-.....s...o*K.
0030: 42 B7 EE E2 B2 32 A6 64 28 6B A2 F1 91 A8 D2 36 B....2.d(k.....6
0040: 09 E8 50 72 1F 25 77 B5 0D 92 48 96 87 EE 76 AF ..Pr.%w...H...v.
0050: 67 FD BF 7F 77 35 36 2F F2 2F 2D 9E 1F 2C F2 8C g...w56/./-..,..
0060: BF B6 44 9F 49 EE E8 E3 13 ED EC 3D 17 1B EC 28 ..D.I......=...(
0070: 6A 37 36 37 BC C3 36 3F 76 22 FF 1C 02 AB 90 0A j767..6?v"......
trigger seeding of SecureRandom
done seeding SecureRandom
Befotre main step
Waiting for request under port
matching server alias : alias
Finalizer, SEND SSL v3.1 ALERT: warning, description = close_notify
Finalizer, WRITE: SSL v3.1 Alert, length = 2
Waiting for request under port
[read] MD5 and SHA1 hashes: len = 3
0000: 01 03 01 ...
[read] MD5 and SHA1 hashes: len = 44
0000: 00 06 00 00 00 20 00 00 09 06 00 40 3C 33 EF 34 ..... .....@<3.4
0010: 65 A8 78 56 EF AF 2F C3 4A 13 FA 49 EC DB FB 66 e.xV../.J..I...f
0020: 66 97 BC 5F 79 69 60 AD B6 21 D4 1E f.._yi`..!..
Thread-0, READ: SSL v2, contentType = 22, translated length = 45
*** ClientHello, v3.1
RandomCookie: GMT: 1009970996 bytes = { 101, 168, 120, 86, 239, 175, 47, 195, 7
4, 19, 250, 73, 236, 219, 251, 102, 102, 151, 188, 95, 121, 105, 96, 173, 182, 3
3, 212, 30 }
Session ID: {}
Cipher Suites: { 0, 9 }
Compression Methods: { 0 }
%% Created: [Session-1, SSL_NULL_WITH_NULL_NULL]
*** ServerHello, v3.1
RandomCookie: GMT: 1009970996 bytes = { 225, 193, 138, 42, 75, 55, 82, 98, 128,
65, 108, 86, 20, 94, 198, 33, 33, 115, 40, 27, 29, 0, 117, 169, 21, 60, 48, 113
Session ID: {60, 51, 239, 52, 239, 124, 121, 133, 111, 116, 246, 8, 10, 20, 99,
150, 141, 208, 153, 124, 223, 176, 115, 34, 158, 29, 153, 32, 194, 198, 217, 12
6}
Cipher Suite: { 0, 9 }
Compression Method: 0
Cipher suite: SSL_RSA_WITH_DES_CBC_SHA
*** Certificate chain
chain [0] = [
Version: V1
Subject: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
Key: com.sun.net.ssl.internal.ssl.JSA_RSAPublicKey@47c5fc
Validity: [From: Wed Jan 02 14:46:52 GMT+05:30 2002,
To: Thu Jan 02 14:46:52 GMT+05:30 2003]
Issuer: CN=prasadv, OU=nms, O=mindtree, L=bangalore, ST=karnataka, C=IN
SerialNumber: [ 3c32d004 ]
Algorithm: [MD5withRSA]
Signature:
0000: 71 00 A6 5A 95 8D 02 1F FD DF 51 55 73 14 59 C2 q..Z......QUs.Y.
0010: 51 40 D5 38 BE 0C 52 17 44 01 CC 6B 72 05 69 94 [email protected].
0020: 9E 01 2D C5 E4 FF D9 B6 73 8F 0C 84 6F 2A 4B A4 ..-.....s...o*K.
0030: 42 B7 EE E2 B2 32 A6 64 28 6B A2 F1 91 A8 D2 36 B....2.d(k.....6
0040: 09 E8 50 72 1F 25 77 B5 0D 92 48 96 87 EE 76 AF ..Pr.%w...H...v.
0050: 67 FD BF 7F 77 35 36 2F F2 2F 2D 9E 1F 2C F2 8C g...w56/./-..,..
0060: BF B6 44 9F 49 EE E8 E3 13 ED EC 3D 17 1B EC 28 ..D.I......=...(
0070: 6A 37 36 37 BC C3 36 3F 76 22 FF 1C 02 AB 90 0A j767..6?v"......
*** ServerHelloDone
[write] MD5 and SHA1 hashes: len = 670
0000: 02 00 00 46 03 01 3C 33 EF 34 E1 C1 8A 2A 4B 37 ...F..<3.4...*K7
0010: 52 62 80 41 6C 56 14 5E C6 21 21 73 28 1B 1D 00 Rb.AlV.^.!!s(...
0020: 75 A9 15 3C 30 71 20 3C 33 EF 34 EF 7C 79 85 6F u..<0q <3.4..y.o
0030: 74 F6 08 0A 14 63 96 8D D0 99 7C DF B0 73 22 9E t....c.......s".
0040: 1D 99 20 C2 C6 D9 7E 00 09 00 0B 00 02 4C 00 02 .. ..........L..
0050: 49 00 02 46 30 82 02 42 30 82 01 AB 02 04 3C 32 I..F0..B0.....<2
0060: D0 04 30 0D 06 09 2A 86 48 86 F7 0D 01 01 04 05 ..0...*.H.......
0070: 00 30 68 31 0B 30 09 06 03 55 04 06 13 02 49 4E .0h1.0...U....IN
0080: 31 12 30 10 06 03 55 04 08 13 09 6B 61 72 6E 61 1.0...U....karna
0090: 74 61 6B 61 31 12 30 10 06 03 55 04 07 13 09 62 taka1.0...U....b
00A0: 61 6E 67 61 6C 6F 72 65 31 11 30 0F 06 03 55 04 angalore1.0...U.
00B0: 0A 13 08 6D 69 6E 64 74 72 65 65 31 0C 30 0A 06 ...mindtree1.0..
00C0: 03 55 04 0B 13 03 6E 6D 73 31 10 30 0E 06 03 55 .U....nms1.0...U
00D0: 04 03 13 07 70 72 61 73 61 64 76 30 1E 17 0D 30 ....prasadv0...0
00E0: 32 30 31 30 32 30 39 31 36 35 32 5A 17 0D 30 33 20102091652Z..03
00F0: 30 31 30 32 30 39 31 36 35 32 5A 30 68 31 0B 30 0102091652Z0h1.0
0100: 09 06 03 55 04 06 13 02 49 4E 31 12 30 10 06 03 ...U....IN1.0...
0110: 55 04 08 13 09 6B 61 72 6E 61 74 61 6B 61 31 12 U....karnataka1.
0120: 30 10 06 03 55 04 07 13 09 62 61 6E 67 61 6C 6F 0...U....bangalo
0130: 72 65 31 11 30 0F 06 03 55 04 0A 13 08 6D 69 6E re1.0...U....min
0140: 64 74 72 65 65 31 0C 30 0A 06 03 55 04 0B 13 03 dtree1.0...U....
0150: 6E 6D 73 31 10 30 0E 06 03 55 04 03 13 07 70 72 nms1.0...U....pr
0160: 61 73 61 64 76 30 81 9F 30 0D 06 09 2A 86 48 86 asadv0..0...*.H.
0170: F7 0D 01 01 01 05 00 03 81 8D 00 30 81 89 02 81 ...........0....
0180: 81 00 D2 18 99 9D 29 35 BC 5F AB 80 0C 14 F2 19 ......)5._......
0190: 13 B4 27 28 B1 37 AC 8F 33 CE 2F 08 BF F0 8E 88 ..'(.7..3./.....
01A0: DA BA 40 4B 94 F6 CE CB F3 C9 79 1F 80 CD BA D9 [email protected].....
01B0: 3B 19 8C 70 37 CE E4 DD 49 C7 EF AA FC 30 87 78 ;..p7...I....0.x
01C0: BF D7 8A 68 CE 13 F2 56 8C 08 51 CB AE 17 B1 DC ...h...V..Q.....
01D0: 0B 40 E7 35 AC F6 57 16 A5 B1 AA DB 88 26 2E 6A [email protected]......&.j
01E0: 4A C7 83 45 7F 79 D2 9F 28 ED 54 28 B8 56 48 A1 J..E.y..(.T(.VH.
01F0: 0D 95 47 E0 1F DB 70 0B 38 CA E5 B7 A0 DC 3C 87 ..G...p.8.....<.
0200: BC 07 02 03 01 00 01 30 0D 06 09 2A 86 48 86 F7 .......0...*.H..
0210: 0D 01 01 04 05 00 03 81 81 00 71 00 A6 5A 95 8D ..........q..Z..
0220: 02 1F FD DF 51 55 73 14 59 C2 51 40 D5 38 BE 0C [email protected]..
0230: 52 17 44 01 CC 6B 72 05 69 94 9E 01 2D C5 E4 FF R.D..kr.i...-...
0240: D9 B6 73 8F 0C 84 6F 2A 4B A4 42 B7 EE E2 B2 32 ..s...o*K.B....2
0250: A6 64 28 6B A2 F1 91 A8 D2 36 09 E8 50 72 1F 25 .d(k.....6..Pr.%
0260: 77 B5 0D 92 48 96 87 EE 76 AF 67 FD BF 7F 77 35 w...H...v.g...w5
0270: 36 2F F2 2F 2D 9E 1F 2C F2 8C BF B6 44 9F 49 EE 6/./-..,....D.I.
0280: E8 E3 13 ED EC 3D 17 1B EC 28 6A 37 36 37 BC C3 .....=...(j767..
0290: 36 3F 76 22 FF 1C 02 AB 90 0A 0E 00 00 00 6?v"..........
Thread-0, WRITE: SSL v3.1 Handshake, length = 670
Thread-0, READ: SSL v3.1 Alert, length = 2
Thread-0, RECV SSLv3 ALERT: fatal, certificate_unknown
html file used at client side
<HTML>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.3 -->
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 600 HEIGHT = 200 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = Main>
<PARAM NAME = CODEBASE VALUE = . >
<PARAM NAME = machinename VALUE = "127.0.0.1" >
<PARAM NAME = port VALUE = "2002" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
</OBJECT>
</HTML>
Please help me to solve out this problem.
Thanks,
prasad.Are u using MS JVM i.e default IE browser or you have installed the plug in?
-
JnlpDownloadServlet with Weblogic 6.1 - Null Pointer Exception
Hi,
I am using Web Start with Weblogic 6.1 and I keep getting the exception
java.lang.NullPointerException
at java.io.File.<init>(File.java:181)
at com.sun.javaws.servlet.DownloadRequest.<init>(DownloadRequest.java:62)
at com.sun.javaws.servlet.JnlpDownloadServlet.handleRequest(JnlpDownloadServlet.java:94)
at com.sun.javaws.servlet.JnlpDownloadServlet.doGet(JnlpDownloadServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:263)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Web start itself does not even startup !
If I don't use the JnlpDownloadServlet I can get a simple example to work.
The jnlp file I am using is
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp
spec="1.0+"
codebase="$$codebase" href="$$name">
<information>
<title>Test Application</title>
<vendor>BD</vendor>
<description>Demo Application</description>
<offline-allowed/>
</information>
<!-- security>
<all-permissions/>
</security-->
<resources>
<j2se version="1.3"/>
<jar href="testWebStart.jar" main="true" download="eager" />
</resources>
<application-desc main-class="testMClient" />
</jnlp>
The web.xml file is;
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<welcome-file-list>
<welcome-file>
index.html
</welcome-file>
</welcome-file-list>
<!-- Used to do mime mapping but it is not needed
since we are now using the JNLP sdervlet ! -->
<servlet>
<servlet-name>JnlpDownloadServlet</servlet-name>
<servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
<url-pattern>*.jar</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>JnlpDownloadServlet</servlet-name>
<url-pattern>*.jnlp</url-pattern>
</servlet-mapping>
</web-app>
Any help would be greatly appreciated,
Thanks,
BrianI have exactly the same problem running JBoss 3-Tomcat-4.0.1. After some investigation it seems that the problem is because of dependency on creating File objects using getRealPath()
The problem manifests itself on several places but for instance:
DownloadRequest Constructor:
if(_context != null && !_path.endsWith("/")) {
String s1 = context.getRealPath(path);
File file = new File(s1);
if(file != null && file.exists() && file.isDirectory())
_path += "/";
s1 is null so a nullpointer is thrown. Instead do something like:
if (_context != null && !_path.endsWith("/")) {
String s1 = context.getRealPath(path);
if (s1 != null) {
File file = new File(s1);
if (file.exists() && file.isDirectory())
_path += "/";
But it is harder to fix on other places such as
ResourceCatalog.scanDirectory(String path)
File file = new File(_servletContext.getRealPath(s));
This will faile since getRealPath returns null resulting in a nullpointer exception which will make it impossible to download versioned jars.
The documentation for ServletContext says that getRealPath will return null if the application is packaged in a war file but this is strange since it worked fine for me for running JBoss-2.4.0_Tomcat-3.2.3. Maybe this is new behaviour for the 2.3 servlet spec ( i assume WL 6.1 is also 2.3 compliant)? -
Announcing: Developing JSF Portlets with WebLogic Portal Whitepaper
Just Released: Developing JSF Portlets with WebLogic Portal Whitepaper
A supplemental developer's guide has been published to help guide WLP 10.x customers that wish to use JSF as the web framework for building portlets on WebLogic Portal. This is a sizable document (150 pages) that covers a large number of topics. It also coaches developers on best practices and common pitfalls.
Important: It also clarifies the supported configuration of JSF within Portal Web Projects. Workshop for WebLogic by default configures a web project in a configuration that is not supported by WebLogic Portal. The guide explains how to address this:
* Change from the unsupported MyFaces JSF implementation to the supported Sun Reference Implementation (RI)
* Change from the unsupported "client" STATE_SAVING_METHOD to the supported "server"
The guide can be downloaded here:
http://download.oracle.com/technology/products/weblogic/portal/weblogic-portal-jsf-whitepaper.pdf
To help internet searches locate this document, the table of contents is reproduced below:
Introduction
1.1. Prerequisites...................................................................... 8
1.2. Applicable Versions............................................................ 8
1.3. Native Portlet Bridges and Standard Portlet Bridges .......... 8
1.4. JSF Portlet Support Roadmap ........................................... 9
1.5. Whitepaper Structure ....................................................... 10
1.6. Look Before You Leap ..................................................... 10
1.7. For More Information........................................................ 10
Part 1: Converting JSF Applications into Portlets
2. IDE Support for JSF Portlets Chapter ...................................... 12
2.1. Workshop for WebLogic – WebLogic Portal's Supported IDE 12
2.2. Workshop Features for JSF Support in WebLogic Portal.. 12
3. Introduction to JSF Portlets Chapter ........................................ 18
3.1. Creating Your First JSF Portlet......................................... 18
3.2. Essentials of JSF Portlet Views........................................ 21
3.3. WebLogic Portal Artifacts................................................. 22
4. Configuring JSF within WebLogic Portal Chapter..................... 24
4.1. JSF Library Modules in WebLogic Server ........................ 24
4.2. Installing the JSF Libraries into a Portal Web Project ....... 25
4.3. JSF Configuration Settings............................................... 27
4.4. Configuring JSF 1.2 ......................................................... 29
4.5. Building an Unsupported JSF Implementation Library Module 31
4.6. Faces Configuration is Web Application Scoped.............. 31
5. Navigation within a JSF Portlet Chapter................................... 33
5.1. Navigating within a Portlet with the JSF Controller ........... 33
5.2. Redirects.......................................................................... 34
6. Namespacing Chapter ............................................................. 35
6.1. Namespacing Managed Bean Names.............................. 35
6.2. Client ID Namespacing with the View and Subview Components 35
6.3. Client ID Namespacing with the WLP NamingContainer .. 36
7. Logging, Iterative Development, and Debugging Chapter ........ 39
7.1. Logging............................................................................ 39
7.2. Iterative Development ...................................................... 39
7.3. Debugging ....................................................................... 40
8. Custom JavaScript Chapter ..................................................... 42
8.1. DOM Manipulation within a JSF ....................................... 42
8.2. Form Validation within a JSF Portlet ................................ 45
9. Preparing JSF Portlets for Production Chapter ........................ 46
9.1. Configuration.................................................................... 46
9.2. Performance and Scalability............................................. 47
9.3. Security............................................................................ 49
9.4. Localization...................................................................... 50
Part 2: Interacting with the Portal Environment
10. Native Bridge Architecture Chapter ...................................... 54
10.1. Container Architecture Overview.................................. 54
10.2. Container Architecture.................................................. 54
10.3. Container Interactions .................................................. 55
11. Interportlet Communication Chapter .................................... 56
11.1. Using Session and Request Attributes for IPC (Anti-pattern) 56
11.2. Using the WLP Event Facility for IPC with JSF Portlets 56
11.3. Notifications ................................................................. 60
11.4. Comparison of the IPC Approaches ............................. 60
12. Scopes Chapter ................................................................... 62
12.1. Conceptual Scopes for Standard JSF Applications ...... 62
12.2. Conceptual Scopes for Portal Applications................... 63
12.3. Implementation Patterns for Portal Scopes .................. 63
13. State Sharing Patterns Chapter ........................................... 66
13.1. State Sharing Concepts ............................................... 66
13.2. HttpSession Versus HttpServletRequest ...................... 66
13.3. Base Code for HttpSession Patterns ............................ 67
13.4. Single Portlet Pattern ................................................... 68
13.5. Multiple Portlet Patterns ............................................... 69
14. Rendering Lifecycles Chapter .............................................. 77
14.1. WLP and JSF Lifecycles .............................................. 77
14.2. Invocation Order of WLP and JSF Lifecycle Methods... 77
14.3. Accessing WLP Context Objects from JSF Managed Beans 78
15. Portal Navigation Chapter .................................................... 80
15.1. Programmatically Constructing JSF Portlet URLs ........ 80
15.2. Changing the Active Portal Page.................................. 80
15.3. Redirects within a Portal............................................... 83
16. Ajax Enablement Chapter .................................................... 85
16.1. Ajax in JSF Portlets...................................................... 85
16.2. Partial Page Rendering Pattern.................................... 85
16.3. Stateless API Request Pattern ..................................... 86
16.4. Portlet Aware API Request Pattern .............................. 87
16.5. Controlling the WLP Ajax Framework........................... 91
17. Additional WLP Features Chapter........................................ 93
17.2. Portlet Container Features ........................................... 93
17.3. Portal Container Features ............................................ 98
18. Example: Implementing a Login Portlet Chapter .................. 99
18.1. Login Portlet Motivation................................................ 99
18.2. Login Portlet Design..................................................... 99
18.3. Login Portlet Implementation...................................... 101
Part 3: Integrating Third Party Libraries
19. Integration Overview Chapter............................................. 111
19.1. Types of Libraries....................................................... 111
19.2. Roadmap for MyFaces Trinidad and ADF Faces Rich Client 111
20. Using the Facelets View Technology Chapter.................... 113
20.1. Introduction to Facelets .............................................. 113
20.2. Configuring Facelets Support ..................................... 113
21. Using the Apache MyFaces Tomahawk Component Library Chapter 115
21.1. What is Apache MyFaces Tomahawk? ...................... 115
21.2. Support for Tomahawk in WLP................................... 115
21.3. Tomahawk Component List........................................ 116
21.4. Installing and Configuring Tomahawk......................... 119
21.5. Resolving the Duplicate ID Issue................................ 120
21.6. Referring to Resources .............................................. 120
21.7. forceId Attribute.......................................................... 124
21.8. File Upload................................................................. 125
22. Using the Apache Beehive Navigation Controller Chapter . 126
22.1. Apache Beehive Page Flow ....................................... 126
22.2. JSF and Page Flows .................................................. 126
22.3. Configuring the JSF Integration with Page Flows ....... 127
Appendices
23. Appendix 1: Consolidated List of Best Practices ................ 130
24. Appendix 2: Known Issues and Workarounds.................... 132
24.1. CR383659, CR383662 Inconsistent failures with JSF portlets 132
24.2. CR342124: IllegalStateException due to duplicate client-id 132
24.3. CR384916: IllegalStateException due to duplicate client-id when using certain components such as Tomahawk and Trinidad...... 133
24.4. CR361477 Problems with the integration of JSF portlets with Apache Beehive Page Flows.................................................................. 133
24.5. CR377945 JSF 1.2 suffers from a memory leak during iterative development .............................................................................. 134
25. Appendix 3: The JSFPortletHelper Class ........................... 135
26. Appendix 4: The CleanupPhaseListener Class .................. 147Hi Peter!
First, I wish to thank you for the great work.
We followed your whitepaper and managed to deploy a JSF portlet on WLS.
But we are not able to register it (consume it) as remote portlet in Oracle Portal 10.1.4. The error log is as follows:
An error occurred while trying to refresh the provider. (WWC-43190)
An error occurred during the call to the WSRP Provider:
java.rmi.RemoteException: serialization error: serialization error:
unexpected null value for literal data; nested exception is:
serialization error: serialization error: unexpected null value for literal data
com.sun.xml.rpc.encoding.SerializationException: serialization error:
serialization error: unexpected null value for literal data
com.sun.xml.rpc.encoding.SerializationException: serialization error:
unexpected null value for literal data
Java stack trace from root exception:
unexpected null value for literal data
at
oracle.webdb.wsrp.RegistrationContext_LiteralSerializer.doSerialize(RegistrationContext_LiteralSerializer.java:107)
at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
at
oracle.webdb.wsrp.GetServiceDescription_LiteralSerializer.doSerialize(GetServiceDescription_LiteralSerializer.java:88)
at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
at
com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:473)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:62)
at
oracle.webdb.wsrp.WSRP_v1_ServiceDescription_PortType_Stub.getServiceDescription(WSRP_v1_ServiceDescription_PortType_Stub.java:63)
at
oracle.webdb.wsrp.client.design.v1.OraWSRP_v1_ServiceDescription_PortType.getServiceDescription(Unknown
Source)Do you have any idea why this happens? Or you can provide some useful links to WLP -Oracle Portal federation?
Thank you and best regards,
PaKo -
OIM 9101 with Weblogic 10.3.0 - basic query
Hi All
I am trying to install OIM 9101 with Weblogic 10.3.0 and Oracle DB 11.1.0.6 on Windows 2003 (64-bit) and Sun JDK 1.6.0_10 (Oracle certified configuration).
The problem is that my weblogic fails to start-up as soon as I enter the weblogic user-name on the command prompt. It says that the weblogic is not able to use some binary to pick-up the userID. This may be some issue related to Win 64bit environment.
To overcome this issue, I hard coded the userID and password for weblogic in Weblogic's SetDomainEnv.cmd file.
I want to know whether including the userID and password in the weblogic's file can result in OIM installation failure.
Please help.I personally don't think your OIM installation will fail because of that as OIM installation only execute some of the WLS configuration script to install OIM applications into WLS.
-
Debugger that works with WebLogic 5.1?
Are there any debuggers currently available that will work with WebLogic
5.1?
I assume that VisualCafe 4.0 (Expert Edition) will support local debugging,
but I'm also interested in remote debugging which the Expert edition does
not support.
If not, does anyone know when VisualCafe Enterprise Edition 4.0 will ship?
Thanks.
GregHi!
I have problem to get the co-client debug project to run. Do you have
the same problem?
-----Original Message-----
From: Terry Potter [mailto:[email protected]]
Posted At: måndag, augusti 07, 2000 23:18
Posted To: tools
Conversation: Debugger that works with WebLogic 5.1?
Subject: Re: Debugger that works with WebLogic 5.1?
I use the deistributed debugging that comes with Visual Cafe by Webgain
v4.0. It works fine.
"Jim Piersol" <[email protected]> wrote in message
news:3989ccec$[email protected]..
Get a real debugger. Try BugSeeker from http://www.karmira.com
Jim Piersol
Senior Software Engineer
Sun Certified Java Programmer
Strata Group, Inc.
[email protected]
"Greg Kim" <[email protected]> wrote in message
news:8ibuit$35e$[email protected].. -
ClassCircularityError in JAAS Authorization with Weblogic Server 10.3
We are implementing JAAS authorization in which roles and policies are stored in a custom JAAS policy file and users are stored in the embedded LDAP server provided by Weblogic. We are facing problem is authorizing users using the custom policy created.
We have implemented the JAAS authentication service with weblogic server 10g R3 and user's information stored in embedded LDAP server provided WLS. Given below are the details of implementation for JAAS Authorization:
Following are the custom classes created:
1. Custom Principal Class
public class Principal implements java.security.Principal, java.io.Serializable {
private String name;
public Principal() {
name = "";
public Principal(String newName) {
name = newName;
public boolean equals(Object o) {
if (o == null)
return false;
if (this == o)
return true;
if (o instanceof Principal) {
if (((Principal) o).getName().equals(name))
return true;
else
return false;
else
return false;
public int hashCode() {
return name.hashCode();
public String toString() {
return name;
public String getName() {
return name;
2. Custom Permission Class
public class ActionPermission extends Permission {
public ActionPermission(String name) {
super(name);
@Override
public boolean equals(Object obj) {
if ((obj instanceof ActionPermission)
&& ((ActionPermission) obj).getName().equals(this.getName())) {
return true;
} else {
return false;
@Override
public String getActions() {
return "";
@Override
public int hashCode() {
return this.getName().hashCode();
@Override
public boolean implies(Permission permission) {
if (!(permission instanceof ActionPermission)) {
return false;
String thisName = this.getName();
String permName = permission.getName();
if (this.getName().equals("*")) {
return true;
if (thisName.endsWith("*")
&& permName.startsWith(thisName.substring(0, thisName
.lastIndexOf("*")))) {
return true;
if (thisName.equals(permName)) {
return true;
return false;
Following are the configuration changes:
1. Added custom policy to weblogic.policy.
grant Principal com.scotia.security.authorization.Principal "test" <User defined in the embedded LDAP server of WLS>{
permission com.scotia.security.authorization.permission.ActionPermission "viewScreen";
2. Set the java security manager in startWeblogic.cmd file.
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.manager -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS%
3. Set Realm "Security Model" to "Custom Roles and Policies".
Right now we are facing the given below exception:
java.lang.ClassCircularityError: com/scotia/security/authorization/THORPrincipal
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1381)
at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1268)
at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1231)
at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1167)
at sun.security.provider.PolicyFile.implies(PolicyFile.java:1122)
at weblogic.security.service.WLSPolicy.implies(Unknown Source)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:213)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:301)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:731)
at weblogic.utils.classloaders.DirectoryClassFinder.getSource(DirectoryClassFinder.java:36)
Please help if anyone has some clue regarding this exception. We tried checking the jdk version used by eclipse and weblogic and found it to be same.1. Custom Principal Class
public class Principal implements java.security.Principal, java.io.Serializable {Rename it. You are asking for trouble naming a class after an interface it implements.
java.lang.ClassCircularityError: com/scotia/security/authorization/THORPrincipalWhat's that class? You haven't shown us. -
Jsf with weblogic server 6.1
Hi, Any help would be appreciated. I am trying to use jsf with weblogic server 6.1 and wlintegration 2.1 I tried to deploy the samples provided with jwsdp-1.2 When I start the guess number sample I get the following error message:
Duke's number: 3
<25-Jun-03 16:03:40 BST> <Error> <HTTP> <[WebAppServletConte
xt(57758238,examplesWebApp,/examplesWebApp)] Root cause of S
ervletException
javax.servlet.jsp.JspException: Cannot find FacesContext
at javax.faces.webapp.UIComponentTag.doStartTag(UICo
mponentTag.java:269)
at jsp_servlet._jsf_45_guessnumber._faces.__greeting
._jspService(__greeting.java:123)
at weblogic.servlet.jsp.JspBase.service(JspBase.java
:27), etc.
I updated the web.xml file, created the faces directory under my examplesWebApp active domain with the jsp files, it finds the UserNumberBean class but it still crashes with the above.
One problem I was having while deploying it that Weblogic Server did not allow me to copy jsf-api.jar, jstl.jar,etc under web-inf/lib.
So I added all required jar files under bea root/config/samples/lib and updated startWeblogic.cmd
Please help with how to deploy correctly the samples:
BotondThanks bill.
I checked my weblogic server 6.1,it limited to j2ee1.2 features only.So I changed it supporting j2ee1.3 features.Now my JSF example is working normally.
But I found a new question soon.
I writed some letter in Chinese in jsp page .And I got some errors in weblogic.
<2003-10-14 01:47:57> <Error> <HTTP> <101019> <[ServletContext(id=6480502,name=jaction,conte
xt-path=/jaction)] Servlet failed with IOException
java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "org.xm
l.sax.SAXParseException: An invalid XML character (Unicode: 0xb8) was found in the CDATA section., "
at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:124)
at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:356)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:214)
at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:149)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:538)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:364)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
at com.sun.faces.context.ExternalContextImpl.dispatchMessage(ExternalContextImpl.java:298)
at com.sun.faces.lifecycle.ViewHandlerImpl.renderView(ViewHandlerImpl.java:53)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:89)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:169)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:31
56)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
I donnot know what is the matter.And how to correct?
thanks again.
Yanger -
Stylesheet error with weblogic application server 9.1
Hi ALL,
I deployed my application on weblogic AS 9.1.
i have created my own domain using sun JDK 1.5.
i am able to log in into my application & able to do all the tasks.
but when i click on a specific tab weblogic AS 9.1 waits for some time & give this error on its console :-
<b>ERROR: 'Variable 'can-modify' is multiply defined in the same scope.'
FATAL ERROR: 'Could not compile stylesheet'</b>
i am not find any more details in the weblogic server error log.
the same application works fine with weblogic 8.1 sp4 + jdk 1.4 & tomcat 5.0.27 + jdk 1.5( without any error)
so i think the problem is not because of jdk, it something to do with weblogic!
does anybody has info about this.
it will be great help.
regards
RahulI found that error is coming from this line.
<b><xsl:variable name="can-modify" select="/dashboard/@can-save|/dashboard/@can-saveas" /></b>
can somebody suggest why this happening, same code works is weblogic 8.1 & give error in 9.1.
-Rahul
Maybe you are looking for
-
Error while connecting to external server through SOAP/HTTP adapter
Hi, we are trying to connect to the external server through SOAP adapter. The scenario is proxy to SOAP asynchronous scenario. We are getting following error in Communication channel monitoring: *Message processing failed. Cause: com.sap.aii.af.ra.ms
-
Airport Express icw wireless modem and B&O sound system
Hi all, I am considering buying the Airport Extreme. Main reasons are: 1) playing iTunes via the sound system and 2) wireless connection possibility to external hard disc. I will use it in combination with my current wireless modem and B&O sound syst
-
Proper use of rp_provide_from_last
Hello Experts, I've used the macro rp_provide_from_last p0000 space pn-begda pn-endda pn-begda = 05.07.2010 pn-endda = 05.07.2010 I can't retrieve the last record with p0000-begda = 07.07.2010 p0000-endda = 31.12.9999 Instead I keep retrieving the se
-
Disabling the dropdown LOV for existing records in SQL updateable report
Hi All - I have a SQL updateable report which has 3 columns. One of the column is a named-LOV. This report also provides the functionality of inserting new rows. Is there a way to only show the named-LOV dropdown list for only the new records to be i
-
Proxy object creation error - Message no. SPRX137
We were trying to create a proxy object and we come to the screen where you enter the wsdl URL. But the results we get is: Error when creating HTTP client: URL: Error:Connection Parameters (Host or Service) Not Availa Message no. SPRX137 We are unab