For a signed applet am getting java.security.PrivilegedActionException:
I have a signed applet,now for testing it's a self signed applet.
It used for adding files using JFilechooser.
It works fine in my machine with JRE version 1.5.0_12 .
In other machines having jre version with 1.5 onwards it's working fine.
But one problem am facing now is ,whenever we call a method in applet
thorugh javascript it is giving security error . This problem comes only when the applet is running in some other machine having a diff jre (in that system the applet loads well,problem comes only when we access any applet method from a javascript).
Is it due to the diff of java enabled in javascript (at client browser) and in applet (when complied and created the singed jar )
bellow shows part of the error.
java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
... 4 more
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\dnixon\My Documents\photos\astro1.jpg read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
Please any one help.
thanks in advance
It's very urgent
[http://forums.sun.com/thread.jspa?forumID=421&threadID=5308353]
Similar Messages
-
Hi
I deployed an ESB service.
I am trying to test it from Server Enterprise Manager, Webservices feature.
I wrapped up my original message with SOAP 1.1 and 1.2 specifications.
When I invoke the service, I am getting
java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Unable to get header stream in saveChanges error.
Any idea how to get rid of that ?
Thanks
PraveenThe current version of ESB does not support SOAP 1.2. You need to make sure your message contains the correct SOAP 1.1 namespace so ESB uses the correct SOAP version:
SOAP 1.1: http://schemas.xmlsoap.org/soap/envelope/
SOAP 1.2: http://www.w3.org/2003/05/soap-envelope
Kind Regards,
Andre Jochems -
Java.security.AccessControlException: access denied; for a signed applet
Hi,
I have a signed applet which is used to read local files. When I call the applet method which is reading the file, from javascript I am getting "java.security.AccessControlException: access denied ". Where as if the method gets called during applet load, file is read without errors? How can I get over this problem?
If there is a way loading the applet based on a condition from Javascript, please let me know.
Thanks,[http://forums.sun.com/thread.jspa?forumID=421&threadID=5308353]
-
Self signed Applet - still getting Security Exception...
Hi everyone...
I m new to Java Mail... Nd I m developing a Applet to send mail from my Gmail account, nd I used keytool, jarsigner to Self sign the applet. Nd I wrote a Html page and when calling my applet method using javascript, I m having Security Exception... And I m using Java 1.5 (i.e., J2SE 5)
Here is the sample of my code...
--------- MyMail.java -----------
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
And all neccessory packages are imported....
public class MyMail extends JApplet
String server = "smtp.gmail.com";
String username;
String password;
String fromAddres="";
String toAddres="";
Other Variable declaration goes here........
Session ses;
Transport tr;
MimeMessage msg;
public void init() //For testing purpose
doLogin("username","password"); //My account details
public void doLogin(String user,String pass)
username = user;
password = pass;
boolean success;
fromAddres = user+"@gmail.com";
toAddres = "[email protected]";
subject = "TEst SubJect";
body = "This is Test Mail";
success = doAuthentication();
if(success)
setHeaders(server,username,password,fromAddres,toAddres,cc,bcc,htmlFormat,subject,body);
sendMail(ses);
doLogout();
public void doLogout()
//Deals with the logout from my account
public boolean doAuthentication()
//Deals with the authentication of my account
// Setting properties, creating a session, getting transport object...
//and returns true if authentication is success, false if not.
public void setHeaders(String server, String username, String password, String fromAddress, String toAddress, String cc, String bcc, boolean htmlFormat, String subject, String body)
//Sets the headers fields for the message (recieved through arguments)
public void sendMail(Session ses)
//Deals with sending mail
class MyPasswordAuthenticator extends Authenticator
//Deals with the authentication of my account
---------- MyMail.html -----------
<html>
<head>
<script language=javascript>
function sendmail()
document.MyMail.doLogin("username","password"); //my account details
</script>
</head>
<body>
<input type=button name=but value=Send mail onclick=sendmail()>
<applet name=MyMail code=MyMail.class
archive=mail.jar,activation.jar,mailplus.jar width=0 height=0>
</applet>
</body>
</html>
And the applet is Self signed using the tools supplied from Java SDK...
it got signed...
And as the applet got loaded when i opend the MyMail.html, as i called the doLogin(..,..) in init() it is sending mail successfully...
The problem is.... As I given the action for my button to send mail (by calling java method from java script i.e., calling doLogin() when the button clicked) I m getting Security Exception
So...anyone plz tell me the solution....
Thnx in advance....
- Kantahttp://www.google.nl/search?hl=nl&q=site%3Asun.com+javascript+signed+applet&btnG=Google+zoeken&meta=
DoPrivileged would solve your problem but I've seen some cases where the
threaded (link mentioned below second post) mothod is the only way it'll work.
Signing applets:
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post and reply 18 for the java class file using doprivileged
Still problems?
A Full trace might help us out:
http://forum.java.sun.com/thread.jspa?threadID=656028 -
I'm using JDeveloper 10.1.3
I've created a Web Service from a PL/SQL function using JDeveloper. The Web Service is running within the embedded OC4J app server. I can (using provided URL) open a browser and invoke the WS correctly.
I've built a Web Service Stub against the WS using JDeveloper but when I try to call the Web Service i get the following exception
WARNING: Unable to connect to URL: http://172.22.5.33:8988/Application1-Sample2-context-root/MyWebService6SoapHttpPort due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at sample2.proxy.runtime.MyWebService6SoapHttp_Stub.getsomethingasxml(MyWebService6SoapHttp_Stub.java:93)
at as22ltest2.MyWebService6SoapHttpPortClient.getsomethingasxml(MyWebService6SoapHttpPortClient.java:41)
at as22ltest2.MyWebService6SoapHttpPortClient.main(MyWebService6SoapHttpPortClient.java:29)
Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:93)
at oracle.j2ee.ws.common.util.exception.JAXRPCExceptionBase.<init>(JAXRPCExceptionBase.java:88)
at oracle.j2ee.ws.client.ClientTransportException.<init>(ClientTransportException.java:32)
at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:144)
at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:120)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:169)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:110)
at sample2.proxy.runtime.MyWebService6SoapHttp_Stub.getsomethingasxml(MyWebService6SoapHttp_Stub.java:77)
... 2 more
NOTES
a) The Web Service is running when I try this.
b) The Web Service can be invoked by clicking on the supplied URL in the output window.
c) I've tried it with & without Proxy settings - it's on the same PC so shouldn't need them anyway.
There's nothing showing up in the Web Service output window when I invoke the Stub.
I've written just one line of code and have built the Web Service & Stub using JDeveloper so can't see why it doesn't work.Aimey,
Having recently gone through this exercise, I might be able to help.
Let me begin by stating that the server keystore (server.jks) should contain the private serversign and serverenc keys and the public key for the client in use. The CA is not necessarily required, but it does make adding additional public keys easier.
1a)It uses the private key specified in the keystore options
1b)Under outbound confidentiality is where you specify to use the client supplied certificate (the client's public key) to encrypt
1c) see 1b)
2a) You do. You need to set the client to use x509
2b) you are correct
2c) you are also correct
2d) again, you are correct.
What you did not state (and it is very important) is that on the Encrypt tag, you use the serverenc alias. This is in the client keystore as a public certificate. Without the use of the public serverenc certificate, you cannot encrypt your outbound message.
So the exchange pattern looks like this:
Client -- creates message, signs using the private client key, encrypts using the public serverenc key, transmits
Server -- receives message, checks signature against the client public key, decrypts using the private serverenc key, processes, encrypts using the serverenc private key, signs using the client public key, and then transmits
Client -- receives response, checks signature against the client private key, decrypts using the public serverenc key, and returns value
Your description of your client and server keys is insufficient to help with any further problems you have, but I hope this explanation of the message exchange pattern (MEP) was helpful. -
Java.security.PrivilegedActionException while invoking web service on OC4J
Hi,
I have a developed web service in Jdeveloper which is hosted on OC4J app server. I am able to invoke it properly and get results using the web service end point in browser window.
Now I created a java proxy for this WS in Jdeveloper and tried invoking it inside another web service. I get the following error while the 1st WS is invoked:
2010-03-09 17:15:04.607 WARNING Unable to connect to URL: <internal web service URL> due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
10/03/09 17:15:04 java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
10/03/09 17:15:04 at autoauthorise.runtime.VehicleTypeSpecsWSSoapHttp_Stub.getVehicleTypeSpecs(VehicleTypeSpecsWSSoapHttp_Stub.java:91)
10/03/09 17:15:04 at com.bt.vehtype.ws.VehicleTypeSpecsWSSoapHttpPortClient.getVehicleTypeSpecs(VehicleTypeSpecsWSSoapHttpPortClient.java:40)
10/03/09 17:15:04 at com.bt.fleet.willow.ws.AutoAuthorise.autoAuthorise(AutoAuthorise.java:20)
10/03/09 17:15:04 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10/03/09 17:15:04 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10/03/09 17:15:04 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10/03/09 17:15:04 at java.lang.reflect.Method.invoke(Method.java:585)
10/03/09 17:15:04 at oracle.j2ee.ws.server.ImplInvocationHandler.invoke(ImplInvocationHandler.java:126)
10/03/09 17:15:04 at $Proxy0.autoAuthorise(Unknown Source)
10/03/09 17:15:04 at com.bt.fleet.willow.ws.runtime.AutoAthoriseWSSoapHttp_Tie.invoke_autoAuthorise(AutoAthoriseWSSoapHttp_Tie.java:62)
10/03/09 17:15:04 at com.bt.fleet.willow.ws.runtime.AutoAthoriseWSSoapHttp_Tie.processingHook(AutoAthoriseWSSoapHttp_Tie.java:161)
10/03/09 17:15:04 at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:287)
10/03/09 17:15:04 at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:356)
10/03/09 17:15:04 at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:283)
10/03/09 17:15:04 at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:272)
10/03/09 17:15:04 at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:94)
10/03/09 17:15:04 at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:128)
10/03/09 17:15:04 at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:170)
10/03/09 17:15:04 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
Please help, I cant see any problem.
Edited by: Ankit_Screen on Mar 11, 2010 6:27 AMcan't anybody help me?
-
Generated Web Service Client giving java.security.PrivilegedActionException
I generated a Web Service Proxy using jdev but when I run the client I get a hand shake error. I dont get this error in eclipse but happens when I try to run it in JDev. Is there some certificate setting or KeyStore setting I need to do to make this error go away:
Do I need to add the KeyStore or Certificate from the site I am accessing to oracle application server or jdeveloper... whats the procedure for that..
WARNING: Unable to connect to URL: https://mytest.test.com/WebService/MyTest_1.0/soap.soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at project7.proxy.runtime.MyTestSoapBinding_Stub.echoOfficeLocation(MyTestSoapBinding_Stub.java:11977)
at project7.proxy.MyTestClient.echoOfficeLocation(MyTestClient.java:1276)
at project7.proxy.MyTestClient.main(MyTestClient.java:38)
Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:174)
at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:150)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:176)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
at project7.proxy.runtime.MyTestSoapBinding_Stub.echoOfficeLocation(MyTestSoapBinding_Stub.java:11961)
... 2 more
Process exited with exit code 0.hi Kimberly
It looks like you're getting some feedback in this forum thread:
"how do you add an existing certificate or keystore to jdev to access WS"
how do you add an existing certificate or keystore to jdev to access WS
regards
Jan Vervecken -
All -
I'm new to consuming web services in JDeveloper. I'm using Oracle JDEV 10.1.3.3/OC4J. I'm using this version since it is compatible with Oracle EBS 12.1.3. My intent is to pull data from our third party recruitment app (Success Factors) and load that data into Oracle HRIS. I'm already doing this through a .NET application. I'm converting it to be a Java Concurrent Program in EBS. The code listed below is a stub call to verify I'm on the right track. I created a JDeveloper Web Services proxy project. I'm testing it locally on my windows desktop. When I'm able to consume the service successfully, then I'll think about moving it to the EBS server.
I'm getting the following error when I invoke the following service:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
End point is: https://api4.successfactors.com/sfapi/v1/soap?wsdl
Any help/assistance would be much appreciated.
Below is my code and output of my test:
package emsc.oracle.apps.emscper.sfapi.proxy;
import HTTPClient.HTTPConnection;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSession;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSessionResponse;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Login;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResponse;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResult;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Logout;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LogoutResponse;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFCredential;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFParameter;
import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Error;
import java.io.File;
import javax.xml.rpc.ServiceFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import javax.xml.ws.BindingProvider;
import javax.xml.soap.SOAPException;
import java.util.Map;
import oracle.security.ssl.OracleSSLCredential;
public class SFAPITest {
// Declare members:
private String companyId;
private String userName;
private String password;
private String developerKey;
private Date effDt;
private String greaterThanEffDt;
private String lessThanEffDt;
// Declare constants:
final static private String breakLine = "+---------------------------------------------------------------------------+";
final static private String format = "yyyy-mm-dd";
private enum ReqId {
PrimaryReq(25),
PrimaryReqCEO(26),
EmCarePrimary(27),
RTI(28),
EmCareClinical(29);
private int reqId;
private ReqId() {
private ReqId(int value) {
reqId = value;
public int getReqId() {
return reqId;
// Getters and Setters:
protected String getCompanyId() {
return this.companyId;
protected void setCompanyId(String value) {
this.companyId = value;
protected String getUserName() {
return this.userName;
protected void setUserName(String value) {
this.userName = value;
protected String getPassword() {
return this.password;
protected void setPassword(String value) {
this.password = value;
protected String getDeveloperKey() {
return this.developerKey;
protected void setDeveloperKey(String value) {
this.developerKey = value;
protected Date getEffDt() {
return this.effDt;
protected void setEffDt(Date value) {
this.effDt = value;
protected String getGreaterThanEffDt() {
return this.greaterThanEffDt;
protected void setGreaterThanEffDt(String value) {
this.greaterThanEffDt = value;
protected String getLessThanEffDt() {
return this.lessThanEffDt;
protected void setLessThanEffDt(String value) {
this.lessThanEffDt = value;
public void runProgram()
SFAPIService mySFAPIService;
String CompletionText = "";
String effDtStr2 = null;
/* Code your program logic here.
* Use getJDBCConnection method to get the connection object for any
* JDBC operations.
* Use CpContext provided commit,rollback methods to commit/rollback
* data base transactions.
* Don't forget to release the connection before returning from this
* method.
/* Call setCompletion method to set the request completion status and
* completion text.
* Status values are ReqCompletion.NORMAL,ReqCompletion.WARNING,
* ReqCompletion.ERROR.
* Use Completion text message of length 240 characters. If it is more
* than 240 then full string will appear in log file and truncated 240
* characters will be used as request completion text.
try
ServiceFactory factory = ServiceFactory.newInstance();
mySFAPIService = (emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService)factory.loadService(emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService.class);
SFAPI api = mySFAPIService.getSFAPI();
/// SFAPI api = new SFAPI();
//Map<String, Object> requestContext = ((BindingProvider) api).getRequestContext();
//requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
System.out.println("ServiceName => " + mySFAPIService.getServiceName().toString());
System.out.println("End Point => " + mySFAPIService.getServiceName().toString());
System.out.println(breakLine);
// Authentication: Login to SFAPI:
SFCredential credential = new SFCredential();
// Fake credentials being passed in for this post:
credential.setCompanyId("XXX");
credential.setUsername("XXX");
credential.setPassword("XXX");
credential.setDeveloperKey("XXX");
HTTPConnection httpsConnection = null;
OracleSSLCredential _credential = new OracleSSLCredential();
_credential.setWallet("\\\\\\C:\\Program Files\\Java\\jdk1.6.0_33\\jre\\lib\\security", "ParkEstes3");
/*System.setProperty("javax.net.ssl.trustStore","C:\\\\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\keystore");
System.setProperty("javax.net.ssl.trustStorePassword","changeit");
System.out.println(System.getProperty("javax.net.ssl.trustStore"));*/
// SFParameter: Define a generic SFParameter List. This is a necessary parameter
// to invoking calls in SFAPI:
/*System.setProperty("javax.net.ssl.keyStore",
"file:\\\C:\\jdk1.4.1\\jre\\lib\\security\\client.keystore");
System.setProperty("javax.net.ssl.keyStorePassword","welcome"); */
/* System.setProperty("oracle.net.wallet_location",
"(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=\\\C:\Users\dparrish\Oracle\WALLETS)))"); // (2) */
File kstore = new File("C:\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\jssecacerts");
boolean exists = kstore.exists();
if (!exists) {
System.out.println("Keystore does not exist");
else {
System.out.println("Keystore does exist");
System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
//System.setProperty("proxySet", "false");
//System.setProperty("http.proxyHost", "127.0.0.1");
//System.setProperty("http.proxyPort", "8080");
System.out.println(kstore.getAbsolutePath());
List<SFParameter> lst = new ArrayList<SFParameter>();
SFParameter param = new SFParameter();
param.setName("");
param.setValue("");
lst.add(param);
SFParameter[] sfParam = lst.toArray(new SFParameter[lst.size()]);
Login login = new Login();
try {
login.setCredential(credential);
System.out.println("1");
login.setParam(sfParam);
System.out.println("2");
LoginResponse loginResponse = new LoginResponse();
LoginResult loginResult = new LoginResult();
try {
loginResponse = api.login(login);
catch (Exception e ) {
System.out.println(e.getMessage());
System.out.println("3");
try {
loginResult = loginResponse.getResult();
catch (Exception e ) {
System.out.println(e.getMessage());
System.out.println("4");
IsValidSession vs = new IsValidSession();
IsValidSessionResponse isValidSessionResponse = api.isValidSession(vs);
System.out.println("5");
if (isValidSessionResponse.isResult()) {
System.out.println("Session is valid");
System.out.println("Result => " + loginResult.getSessionId());
System.out.println(breakLine);
Logout logout = new Logout();
LogoutResponse logoutResponse = api.logout(logout);
if (logoutResponse.isResult()) {
System.out.println("Logout of SFAPI Successful");
else {
System.out.println("Logout of SFAPI Unsuccessful");
else {
System.out.println("Session is invalid");
List<Error> errors = new ArrayList<Error>();
for (int i = 0; i < loginResult.getError().length; i++) {
errors.add(loginResult.getError()[i]);
for (int i = 0; i < errors.size(); i++) {
System.out.println("Error Indice => " + i);
System.out.println("Error Code: => " + errors.get(i).getErrorCode());
System.out.println("Error Message: => " + errors.get(i).getErrorMessage());
System.out.println(breakLine);
} // end for loop of SFObject errors
} // end InvalidSession
catch (Exception e)
System.out.println("Session Credential Exception");
System.out.println("Exception => " + e.getMessage());
System.out.println(breakLine);
catch (Exception e)
System.out.println("Parameter List Exception");
System.out.println("Exception => " + e.getMessage());
System.out.println(breakLine);
} // end runProgram
// Constructor:
public SFAPITest() {
} // end constructor
public static void main (String args[]) {
try
SFAPITest test = new SFAPITest();
test.runProgram();
catch (Exception e) {
System.out.println("main exception => " + e.getMessage());
} // SFAPITest
Here is the output with trace:
WARNING: Unable to connect to URL: https://api4.successfactors.com:443/sfapi/v1/soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
Session Credential Exception
Exception => ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
+---------------------------------------------------------------------------+
Process exited with exit code 0.The other end is throwing back a programming error.
That might be because you are sending incorrect data and the other end fails to validate it.
You might be able to guess based on your C# code. But, since you are using soap one generic solution is available to you.
- Get an http proxy interceptor like wireshark.
- Run it while your C# app runs, collect the http requests from that.
- Run it while running your java code, collect the http requests from that.
Compare the two. -
Java.security.PrivilegedActionException in a web service proxy
Hello.
I have developed a simple web service with an oracle tutorial : http://www.oracle.com/technology/obe/obe1013jdev/ws/wsandascontrol.htm
I have created the proxy to test it and i get the next error:
ADVERTENCIA: impossible to connect URL: http://localhost:8888/URJCWebServices-AudioStreamSerie1-context-root/AudioStreamSerie1SoapHttpPort debido a java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at audiostreamserie1proxy.runtime.AudioStreamSerie1SoapHttp_Stub.startTransmission(AudioStreamSerie1SoapHttp_Stub.java:95)
at audiostream.AudioStreamSerie1SoapHttpPortClient.startTransmission(AudioStreamSerie1SoapHttpPortClient.java:41)
at audiostream.AudioStreamSerie1SoapHttpPortClient.main(AudioStreamSerie1SoapHttpPortClient.java:29)
Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:174)
at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:150)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:176)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
at audiostreamserie1proxy.runtime.AudioStreamSerie1SoapHttp_Stub.startTransmission(AudioStreamSerie1SoapHttp_Stub.java:79)
... 2 more
What could be the problem? i have followed the steps of the tutorial.
Thank you.
Edited by: [email protected] on 17-abr-2009 1:57can't anybody help me?
-
BPEL Call synchronous ESB java.security.PrivilegedActionException
There is three project :
BPEL A : synchronous process , reply fault
ESB1 : Exxcetion type : synchronous, use BPEL A as SOAP service
BPEL B : synchronous process ,call ESB1
When invoke ESB1 in em , it works good.
But when execute BPEL B in BPELConsole , the following fault occured :
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="summary">
<summary>
exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
</summary>
</part>
</remoteFault>
What's wrong with this ?
Anyone help me ?There is three project :
BPEL A : synchronous process , reply fault
ESB1 : Exxcetion type : synchronous, use BPEL A as SOAP service
BPEL B : synchronous process ,call ESB1
When invoke ESB1 in em , it works good.
But when execute BPEL B in BPELConsole , the following fault occured :
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="summary">
<summary>
exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
</summary>
</part>
</remoteFault>
What's wrong with this ?
Anyone help me ? -
I have gone to just about every extreme possible, and no matter what I do, I cannot get Java to allow an applet to run. I have been trying to do a J-Track on some satellites on the NASA/JPL website, and no matter what I do, and from the totally useless "help" sites here in the Firefox "help" pages, I cannot get the &^%$#@ applet to run.
Did you try to clear the Java cache?
*http://www.java.com/en/download/help/5000020300.xml - How do I clear the Java cache?
*Control Panel > Java > General tab > "Temporary Internet Files" > Settings > Delete Files
Did you add an exception to the Java security manager?
*https://support.mozilla.org/kb/how-allow-java-trusted-sites
*http://www.java.com/en/download/help/appsecuritydialogs.xml -
Problem of granting permissions for a signed applet
I'm writing an applet, which needs to
1. write a file into client file system, then
2. launch an application to edit this file, then
3. read the edited content from the file
Obviously, all the above 3 steps are restricted operations, they are not allowed for an applet by default. So I suppose that if the applet is signed, it will get the additional permissions. And because I want this applet work for both IE and NS browser, I choose to use Java Plug-in.
But base on the Java 2 Security Tutorial, it seems I can't specify the permissions in the jar. I can only sign my applet, let the end user knows this applet comes from me. And it's the end user's job to run the policytool program, and give the "FilePermission" of "read, write, delete, execute" to the code signed by me(or download from a specific codebase, or both), if they decide to "trust" me.
I can't imagine how to make the business user understand the Security concept of Java, and ask them to configure their system properly. It's just a mission impossible! So, did I miss some important part in the signning process? Is there such a way which keeps the policy setting for this applet in the signed jar, so the business user only need to click "Grant" to allow it running?
Thank you very much.
Kevin Zhang
P.S. some interesting facts confuse me:
1. I signed the jar (which I'm not sure if I signed it currectly, I will tell you why later), and converted the <applet> tag to <object> tag for IE. It works, which makes me confused :-) Because I didn't specify the permissions at all, neither in the code nor in the signning process. Should I consider that by default it gives all the permissions?
2. Same jar file. I use the original <applet> tag on Netscape 6.2, which use java plug-in to handle <applet> tags. This time an AccessControlException is thrown. I can understand that's obviously because of no permission. But both this one and the above one are using same JRE 1.3.1_01 plug-in, why they behave differently?Hi Kevin
I have the exactly the same requirement as yours....
(1. write a file into client file system, then
2. launch an application to edit this file, then
3. read the edited content from the file).
Plz go thru the following. I signed my applet as follows:-
makecert -sk exec -n "CN=Hemanth" exec.cer
cert2spc exec.cer exec.spc
javac ExecNP.java (ExecNP.java is the applet code. I have given the code of the applet)
cabarc -s 6144 n exec.cab ExecNP.class
setreg 1 true
signcode -j javasign.dll -jp exec.ini -spc exec.spc -k exec exec.cab
chkjava exec.cab
Code of ExecNP.java :-
import com.ms.security.*;
import com.ms.security.permissions.*;
import java.lang.Runtime.*;
public class ExecNP extends java.applet.Applet
public void init()
try {
PolicyEngine.assertPermission(PermissionID.EXEC);
Runtime.getRuntime().exec("c:\\windows\\notepad.exe");
} catch(Exception e) {
Here is the html code :-
<applet code=ExecNP width=800 height=200> <PARAM NAME='cabbase' VALUE='exec.cab'> </applet>
When I try to open this html file I get the following exception in the Java Console
java.lang.UnsatisfiedLinkError: initPolicyEngine
Please tell me whats wrong.
Hemanth. -
What are the default permissions for "self-signed" applets?
Hello!
I have a self-signed applet (=signed with a self made certificate) and under most plugin-enviroments java asks the user if it accepts this certificate as trustworth.
On my linux-box I do not have any problems to write files to the local filesystem after I accepted this self-signed applet.
However I've often read that users must grant some permissions even for signed applets, so is there a list of permissions that are denied by default?
Are there differences between java releases starting with 1.2.2?
Thanks in advance, lg ClemensDefault settings are like you said, jre asks the user and everything will work.
Unless.your applet uses classes that are not signed like with calls from javascript to your applet the plugin.jar is used and you'll get an exception when writing to files.
When writing to files the OS might not allowe the user to write to a certain file or folder.
Don't know what type of exception will be thrown if the OS doesn't allowe it but it has
nothing to do with applet permissions.
To change the default setting you can add the following line in the grant { bit of the
java.policy
permission java.lang.RuntimePermission "usePolicy";
When this line is there all signatures will be ignored and an applet can only do extra
things (like access to local files) if a policy is set up for this applet.
To find out what's wrong at your clients site you should ask them to send a full trace
and check that. I hope you did a .printStacktrace() on the exception in your code so
you can see if any other classes are involved when the exception is thrown.
To turn the full trace on (windows) you can start the java console, to be found here:
C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
In the advanced tab you can fill in something for runtime parameters fill in this:
-Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
if you cannot start the java console check here:
C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
I think for linux this is somewhere in youruserdir/java (hidden directory)
add or change the following line:
javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
for 1.5:
deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
The trace is here:
C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
I think for linux this is somewhere in youruserdir/java (hidden directory) -
Grant permission for a signed applet
I have my jar file signed. Now, I hate to have the user to modify their .java.policy file, beside, I did not have my certificate verified by Verisign. Is there any other way to do it? I have read some posts which the user of the signed applet will see a pop up dialog while loading the signed applet, if they click on "grant all access", then the applet will have all the permission. Can anyone tell me how to do that?
Thanks
Andynicoleman1 put together a "tutorial" on signing your applet (jar). The instructions will work for all browsers that support the Java Plugin.
Here is a link to the thread:
http://forum.java.sun.com/thread.jsp?forum=63&thread=174214
Pete -
Should a signed applet ever throw a security exception?
hi,
I've had a few times when a signed applet seems to throw a security exception (at the moment am trying to figure out a SocketException being thrown).
I thought if the applet was signed, and when the browser asks if you want to grant it permissions you press Yes (which I do), then there should not be any security issues?
thanks,
asjfA signed applet has to assert which permissions it wants. The client JVM then asks the user if they will give those permissions to the signer. If the applet tries to do something for which it hasn't been granted permission a security exception is thrown.
Maybe you are looking for
-
How do I unlock an iphone 5 with Sprint 15.1 at IOS 7.0.6 IMEI 99 000320 012095 0 . The SIM is in and Sprint gave me the unlock code, but what are the steps to unlock it?
-
Airplay wont play sound longer than 1 second, except when mirroring my desktop
Hello Support Community, Running a Macbook Pro i7 Build 13B42 and using a brand new Apple Tv to stream Audio. The macbook pro is wifi and network utility reports 144 mBit/s steady stream. The apple tv is plugged in via ethernet directly to the modem/
-
Hello, After quality inspection what happen to the material??
-
Need to create one TO for multiple SU's
Hi All, I want to create a single TO for multiple Storage units. where destination storage bin and type will remain same for all. Is it possible in standard SAP.. To create one TO for an SU L_TO_CREATE_MOVE_SU can be used.. I tried using L_TO_CREATE_
-
Safari 4.0.4 Customize tool Bar
I recently upgraded to Safari 4.0.4. When I click on the Customize Toolbar, the sub-menu does not show up. I have repaired my Permissions, and reset Safari (top 5 options), and still no luck. How do I see the Customize Toolbar sub-menu? I must be doi