Problem using HttpURLConnection

Hi
I am using HttpURLConnection,to download the contents from the URL,in my application.
When only a limitted no of threads are started then it is working fine and the stuffs are getting downloaded into a file as per my requirement However if if sponning a large number of thread or if the http server is slow then
instead of downloading the contents slowly...the inputsteam is showing eof and the downloading is completed without actual completino.Hence i am failing to dowload all the contents{color:#008000}.(The application requires to start around 100 threads and download the contents of all the urls into a single file){color}
Following code has been used :
{color:#3366ff}+url = new URL(httpUrl);+
conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setAllowUserInteraction(false);
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.connect();
appendToTempFile("");
appendToTempFile("");
appendToTempFile("Downloading " httpUrl);+
in = conn.getInputStream();
BufferedReader reader =BufferedReader(new InputStreamReader(in));
String text;
+while ((text = reader.readLine()) != null) {+
if (!text.startsWith(" "))
appendToTempFile(text);
+}+
+}+
conn.disconnect();
*{color:#000000}Please suggest me some solution.{color}*
{color}

1.
Are you writing to the file with all threads at the same time? Then this could be a problem. My approach would be a consumer/producer pattern, where the download threads are the producers. They download the data and store it at a central place. Another thread, the consumer, fetches the data from this central place and writes it the file. This way you only have one thread, which is working with the file and you don't get problems like one thread is overwriting the data of another thread.
2.
If you start many download threads, there yould be limitations, which could result in timeouts or something like that. Some servers only allow a defined number of connections from one IP. Same goes for your browser. Firefox for example can be configured to open only a specified number of connections to one server. There are some os settings, which could be limitating, too. So you should try to not use too many threads. You could use a thread pool, for example.

Similar Messages

  • Tunneling Problem using HttpsUrlConnection

    Hi,
    I had gone through forums regarding this topic and still i am facing the same problem using the HttpsUrlConnection. We are working behind a proxy so we have to make a proxy authorization if we want to connect to a server in the internet.
    But in case of HttpUrlConnection, everything works
    fine. But if we do the same with a HttpsUrlConnection, the authentication fails. It throws an IOException
    with the message
    Unable to tunnel through 192.9.100.10:80.
    Proxy returns "HTTP/1.1 407 Proxy authentication required"
    Sample code as follows,
    The following code doesn't have any problem becos it works fine with HttpUrlConnection and also it is working without proxyserver for https as well.
    This is running under MSVM.
    I don't want to use SSLSocketFactory and i need to use following layout(i.e only with Httpsurlconnection)
    Is there any way to make work with proxyserver? Or can't we do this at all?
    System.setProperty("proxySet","true");
    System.setProperty("https.proxyHost","proxyIP");
    System.setProperty("https.proxyPort","80");
    OutputStream os = null;
    OutputStreamWriter osw = null;
    InputStream is = null;
    InputStreamReader isr = null;
    BufferedReader br = null;
    URL url;
    String line = null;
    System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    String login = proxyUserName+":"+proxyPassWord;
    String encodedLogin = new sun.misc.BASE64Encoder().encode(login.getBytes());
    url = new URL("https://www.verisign.com");
    HttpsURLConnection con = null;
    con =(HttpsURLConnection) url.openConnection();
    con.setRequestProperty("Proxy-Authorization", encodedLogin);
    con.setRequestMethod("GET");
    con.setDoOutput(true);
    con.setDoInput(true);
    con.setUseCaches(false);
    con.connect();
    os = con.getOutputStream();
    osw = new OutputStreamWriter(os);
    osw.write("SampleMsg");
    osw.flush();
    osw.close();
    is = con.getInputStream();
    isr = new InputStreamReader(is);
    br = new BufferedReader(isr);
    while ( (line = br.readLine()) != null)
         System.out.println("line: " + line);
    Can any one help me regarding this?I need a reply very urgently.
    Thanks,
    Prabhakaran R

    Hope this help.
    Note to change the properties to fit your system, and use the supported package ( JSSE, JRE1.5.......).
    You can use URLConnection for both HTTP or HTTPS protocol.
    import java.io.*;
    import java.net.*;
    import java.security.*;
    import java.util.*;
    import javax.net.ssl.*;
    public class testSSL9 {
    public testSSL9() {
    byte[] data = httpConnection();
    System.out.println(new String(data));
    public static void main(String[] args) {
    Properties sysprops = System.getProperties();
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    // sysprops.put("java.protocol.handler.pkgs",
    // "com.sun.net.ssl.internal.www.protocol");
    sysprops.put("java.protocol.handler.pkgs",
    "javax.net.ssl.internal.www.protocol");
    sysprops.put("javax.net.ssl.trustStore",
    "D:/jdk1.4/jre/lib/security/cacerts");
    sysprops.put("javax.net.debug", "ssl,handshake,data,trustmanager");
    sysprops.put("https.proxyHost", "172.16.0.1");
    sysprops.put("https.proxyPort", "3128");
    sysprops.put("https.proxySet", "true");
    sysprops.put("http.proxyHost", "172.16.0.1");
    sysprops.put("http.proxyPort", "3128");
    sysprops.put("proxySet", "true");
    testSSL9 testSSL91 = new testSSL9();
    private byte[] httpConnection() {
    try {
    URL url = null;
    // String strurl = "https://www.verisign.com";
    String strurl = "https://central.sun.net";
    // String strurl = "http://www.yahoo.com"; --> use: HttpURLConnection
    url = new URL(strurl);
    HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
    HttpsURLConnection.setFollowRedirects(false);
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setUseCaches(false);
    connection.connect();
    InputStream stream = null;
    BufferedInputStream in = null;
    ByteArrayOutputStream bytearr = null;
    BufferedOutputStream out = null;
    try {
    stream = connection.getInputStream();
    in = new BufferedInputStream(stream);
    bytearr = new ByteArrayOutputStream();
    out = new BufferedOutputStream(bytearr);
    catch (Exception ex1) {
    System.out.println(ex1);
    System.out.println("Server reject connection...sory");
    int i = 0;
    while ( (i = in.read()) != -1) {
    out.write(i);
    out.flush();
    stream.close();
    in.close();
    bytearr.close();
    out.close();
    return bytearr.toByteArray();
    catch (Exception ex) {
    ex.printStackTrace();
    return null;
    }

  • Using HttpUrlConnection

    Hi ,
    I'm facing problem in Using HttpUrlConnection. When I submit a request to sun java web server 1.6 . By using the following code I request the server , The server receives the request but can not read the request body that is written on the connection output stream.
    my client code :
    URL page = new URL(url);
    HttpURLConnection sock = (HttpURLConnection) page.openConnection();
    sock.setRequestMethod("POST");
    sock.setRequestProperty("Content-Length",
    "" + Integer.toString(body.getBytes().length));
    sock.setUseCaches(false);
    sock.setDoOutput(true);
    if (body.length() > 0) {
    DataOutputStream out = new DataOutputStream(sock.getOutputStream());
    out.writeBytes(body);
    out.flush();
    out.close();
    sock.connect();
    BufferedReader in = new BufferedReader (new InputStreamReader(sock.getInputStream(),"Cp1256"));
    int nHttpResponseCode = sock.getResponseCode();
    if(nHttpResponseCode != HttpURLConnection.HTTP_OK){
    System.out.println("\tHttp error:" + nHttpResponseCode );
    in.close();
    return nHttpResponseCode;
    //receive reply
    in.close();
    return nHttpResponseCode;
    My server code is :
    String params = null;
    try {
    java.io.InputStream in = request.getInputStream();
    byte b[] = new byte[1000]; //in.available()];
    in.read(b);
    char[] s = new char[b.length];
    for (int i = 0; i < b.length; i++) {
    if (b[i] == 0)break;
    s= (char) b[i];
    params = new String(s);
    catch (Exception exp) {
    exp.printStackTrace();
    I tried to submit the request after appending the request body to the url (url like that http://ipadd/webapp/page.jsp?appndedVlaues) and retreived the appended string by calling getQueryString method and It worked well.
    Does anybody faced such a problem before?
    please help
    Thanks

    I have done things like this several times with the URLConnection class and it always seem to work. I do not, however, call the
    sock.connect();
    method. My code seems to work fine without it. First I get the OutputStream and write to it. Then I get the InputStream and read the data from it.
    Does the "body" variable in the client code contain any data at all? I don't see it initialized anywhere with data.
    I have recently developed a file upload component. It's open source, Apache License and available from our website, www . jenkov . com. It works fine, and that too reads data from the request.getInputStream(). Perhaps you can look at that code and see if you can steal some bits that can make your server code work?

  • Unable to access URL using HttpURLConnection

    Hi,
    I am using HttpURLCOnnection class to post a data to a url(which is a web service). The webservice accepts data as text/xml.
    Following is the code snippet i used:
    URL url = new URL("http://xxx.xxx.xx.xx:8080/SampleWebService.svc");
    HttpURLConnection conn =(HttpURLConnection) url.openConnection();
    conn.setDoOutput(true);
    conn.setRequestMethod("POST");
    conn.setRequestProperty("Content-Type","text/xml");
    String urlStr="param1="+URLEncoder.encode(value1)+"&param2="+URLEncoder.encode(value2)
    OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
    wr.write(urlStr);
    wr.flush();
    InputStream in2 = conn.getInputStream();
    in2.close();
    wr.close();
    But when i execute the code, I am getting following error at the line(InputStream in2 = conn.getInputStream();)
    java.io.IOException: Server returned HTTP response code: 400 for URL
    Can someone please suggest a solution. Am i missing something here?
    Thanks in advance

    This may not be the cause of the problem, however I will point out that the Content-Type you are setting (text/xml) is not the content type you are sending (key=value&key=value...).
    If the webservice only accepts text/xml, then this is probably the cause of your problem.
    Another thing you could try is removing the line that sets the content type.
    Here are the request properties in some (hacky) code that I have used for sending POST requests:
                   conn.setDoOutput(true);
                   conn.setRequestProperty("Host", url.getHost());
                   conn.setRequestProperty("Referer", referer);
                   conn.setRequestProperty("Cache-Control", "max-age=0");
                   conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)");
                   conn.setRequestProperty("Cookie", cookies);Edited by: 842408 on Mar 7, 2011 10:14 AM
    Edited by: 842408 on Mar 7, 2011 10:14 AM

  • Problem using File sharing  in a small office network

    I have a problem using File sharing on an Imac and Macbook Pro.
    My office has a small network running Windows Small office file server 2003. I have one Windows 2000 PC connected to it and 3 Macs, an 2.4 gHz Intel iMac running Leopard 10.5.6 , a MBP running the same and a Mac Mini running 10.5.
    From the Finder Shared window of the Mac Mini, I can see all the computers on the network. It also used to be the case for the iMac, but the MBP could never see the Windows PC’s, not the server or the Win2000. This wasn’t a big problem as I was communicating between the Macs and using the shared printer on the iMac.
    On Monday Jan 19 the iMac was suddenly unavailable to the other 2 Macs. It was working normally on the Friday. The iMac can access the Mac Mini and copy files to it. The Mac Mini can see the iMac but cannot access it. Even trying to connect as, ends in a failed connection. I have tried rebooting, turning File sharing off and then on again to no avail.
    The iMac now also cannot see the Windows PC’s which it previously could.
    To get files from the MBP for printing, I now copy it to the Mac Mini and acces the folder from the iMac, a very tedious procedure. I don’t know why this happened and am scared that the Mac Mini is going to do the same thing.
    All three computers are also running VMware 2.0 with Windows XP pro, and from VMware the server is visible on all the computers.
    Any help will be much appreciated, I live in a small town in South Africa and the local computer suppliers have no knowledge of the Macs.
    I think that the problem with the iMac may have started after a software upgrade to 10.5.6 but I am not entirely sure.
    Thank you
    ajdk

    Well, you're current method sounds pretty good. But if you want to user a file server, hey go ahead.
    What you want to do when you centralize project files is to keep track of which one is the newest and becareful not to overwrite files with the same name. So you either have to set up individual spaces on the server (separate AFP/FTP folders maybe), or you'll need to run a file checkout service.
    The individual space is cheaper, but it's not much of a difference from backing up to the network drive. Since you have Gigabit connections, you might even opt to save ALL the user files on the server instead of just the project files.
    If you want to run a file checkout service, there's two approaches. You can run a service that can host any kind of file, or you can run a version control system for each kind of application (Photoshop, Word, etc.). Please notice, that as you read further and further along, the methods become more and more expensive and complicated. Once you get to this point, it will be necessary to purchase or build software in addition to the Mac OS X Server package.

  • Huge problem using apple mail while sending email to a group...

    Hey - I am quite confused... apple mail has huge problems using groups with about 150 addresses when writing and sending an email... the writing of emails is nearly impossible. Once the group name is inserted in the addressline (address book in iCloud!), apple mail uses nearly 100% CPU and further writing is nearly impossible. When sending such an email, all addresses are suddenly visible - though the box is NOT checked and the addresses should be hidden... what can I do? I use this feature (sending mails to groups) on a daily basis and cannot accept visible addresses...
    Greetings and sorry for inconvenient english...
    Christof

    How about next time you send to the group, cc yourself, or include yourself in the group. Then receive the email on the iphone, you can "reply all" in order to send to the group. If you use an imap account, you can make a new folder, call it something like "groups", and save different group emails there for the next time you need to "reply all".

  • Hi. I am just about to move from the UK to Kuwait. Will I have any problems using my iPhone 4 and able to join a local carrier using this device please?

    Hi. I am just about to move from the UK to Kuwait. Will I have any problems using my iPhone 4 and able to join a local carrier using this device please?

    If your phone is locked to a particular carrier, you must contact them to request they unlock it. Once they've taken care of that and you've followed the instructions to complete the unlock process, you will be able to use the phone elsewhere.
    ~Lyssa

  • Problem with HttpURLConnection and HttpSession.

    Hi,
    Problem with HttpURLConnection and HttpSession.
    I created a HttpSession object in my main class and then called a URL via HttpURLConnection.
    I tried to access the same session object from the servlet called by the URL . but the main session
    is not returned a new seperate session is created.let me know how can we continue the same session in
    the called URL also which is created in main class.
    Thanks
    Prasad

    You are not supported to create a HttpSession by java client. Only J2EE web container can create it.

  • Problem using integrated WLS in jDeveloper 11.1.2.1.0

    Hey there,
    I got a problem using the integrated WLS from the jDeveloper 11.1.2.1.0.
    After trying to deploy an ADF Web Application on the integrated WLS, I get the following log message:
    LOG
    +[Waiting for the domain to finish building...]+
    +[11:26:04 AM] Creating Integrated Weblogic domain...+
    +[11:28:13 AM] Extending Integrated Weblogic domain...+
    +[11:30:06 AM] Integrated Weblogic domain processing completed successfully.+
    *** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    +/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/bin/startWebLogic.sh+
    +[waiting for the server to complete its initialization...]+
    +.+
    +.+
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m  -XX:MaxPermSize=512m
    +.+
    WLS Start Mode=Development
    +.+
    CLASSPATH=/home/robin/bin/wls/oracle_common/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/home/robin/bin/wls/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/patch_oepe100/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/robin/bin/wls/jdk160_29/lib/tools.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic_sp.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic.jar:/home/robin/bin/wls/modules/features/weblogic.server.modules_12.1.1.0.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/webservices.jar:/home/robin/bin/wls/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/robin/bin/wls/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/home/robin/bin/wls/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar:/home/robin/bin/wls/wlserver_12.1/common/derby/lib/derbyclient.jar:/home/robin/bin/wls/wlserver_12.1/server/lib/xqrl.jar
    +.+
    PATH=/home/robin/bin/wls/wlserver_12.1/server/bin:/home/robin/bin/wls/modules/org.apache.ant_1.7.1/bin:/home/robin/bin/wls/jdk160_29/jre/bin:/home/robin/bin/wls/jdk160_29/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin
    +.+
    +*  To start WebLogic Server, use a username and   *+
    +*  password assigned to an admin-level user.  For *+
    +*  server administration, use the WebLogic Server *+
    +*  console at http://hostname:port/console        *+
    starting weblogic with Java version:
    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
    Starting WLS with line:
    +/home/robin/bin/wls/jdk160_29/bin/java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=/home/robin/bin/wls/wlserver_12.1/server/lib/weblogic.policy -Djavax.net.ssl.trustStore=/tmp/trustStore7618453572230021232.jks -Dhttp.proxyHost=emea-proxy.uk.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|localhost.localdomain|127.0.0.1|::1|MUELLER-BADY-GENTOO|MUELLER-BADY-GENTOO -Dhttps.proxyHost=emea-proxy.uk.oracle.com -Dhttps.proxyPort=80 -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -Djava.endorsed.dirs=/home/robin/bin/wls/jdk160_29/jre/lib/endorsed:/home/robin/bin/wls/wlserver_12.1/endorsed -da -Dplatform.home=/home/robin/bin/wls/wlserver_12.1 -Dwls.home=/home/robin/bin/wls/wlserver_12.1/server -Dweblogic.home=/home/robin/bin/wls/wlserver_12.1/server -Djps.app.credential.overwrite.allowed=true -Dcommon.components.home=/home/robin/bin/wls/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain -Djrockit.optfile=/home/robin/bin/wls/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/servers/DefaultServer -Doracle.domain.config.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig -Digf.arisidbeans.carmlloc=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/carml -Digf.arisidstack.home=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/servers/DefaultServer/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/home/robin/bin/wls/oracle_common/modules/oracle.ossoiap_11.1.1,/home/robin/bin/wls/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=/home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/oracle/store/gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home/robin/bin/wls/patch_wls1211/profiles/default/sysext_manifest_classpath:/home/robin/bin/wls/patch_oepe100/profiles/default/sysext_manifest_classpath:/home/robin/bin/wls/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server+
    +<Feb 10, 2012 11:30:09 AM CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>+
    +<Feb 10, 2012 11:30:10 AM CET> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>+
    +<Feb 10, 2012 11:30:11 AM CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems Inc..>+
    +<Feb 10, 2012 11:30:12 AM CET> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 >+
    +<Feb 10, 2012 11:30:15 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>+
    +<Feb 10, 2012 11:30:15 AM CET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>+
    +<Feb 10, 2012 11:30:15 AM CET> <Notice> <Log Management> <BEA-170019> <The server log file /home/robin/.jdeveloper/system11.1.2.1.38.60.81/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log is opened. All server side log events will be written to this file.>+
    Feb 10, 2012 11:30:24 AM oracle.security.jps.internal.keystore.file.FileKeyStoreManager saveKeyStore
    WARNING: Failed to save farm keystore. Reason {0}
    Feb 10, 2012 11:30:24 AM oracle.security.jps.internal.keystore.file.FileKeyStoreManager createKeyStore
    WARNING: Failed to save farm keystore. Reason {0}
    oracle.security.jps.service.keystore.KeyStoreServiceException: JPS-06513: Failed to save farm keystore. Reason
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.createKeyStore(FileKeyStoreManager.java:309)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:95)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:73)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:63)+
    +     at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:157)+
    +     at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:64)+
    +     at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.findServiceInstance(ContextFactoryImpl.java:139)+
    +     at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:170)+
    +     at oracle.security.jps.internal.core.runtime.ContextFactoryImpl.getContext(ContextFactoryImpl.java:191)+
    +     at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:132)+
    +     at oracle.security.jps.internal.core.runtime.JpsContextFactoryImpl.getContext(JpsContextFactoryImpl.java:127)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:850)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:844)+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
    +     at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
    +     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
    +     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
    +     at java.lang.Class.newInstance0(Class.java:355)+
    +     at java.lang.Class.newInstance(Class.java:308)+
    +     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1343)+
    +     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)+
    +     at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)+
    +     at weblogic.security.SecurityService.start(SecurityService.java:148)+
    +     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)+
    +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)+
    +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)+
    +<Feb 10, 2012 11:30:24 AM CET> <Error> <Security> <BEA-090892> <The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider>+
    +<Feb 10, 2012 11:30:24 AM CET> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
    +weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
    +     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1402)+
    +     at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)+
    +     at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)+
    +     at weblogic.security.SecurityService.start(SecurityService.java:148)+
    +     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)+
    +     Truncated. see log file for complete stacktrace+
    +Caused By: oracle.security.jps.JpsRuntimeException: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:293)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
    +     at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)+
    +     Truncated. see log file for complete stacktrace+
    +Caused By: oracle.security.jps.JpsException: [PolicyUtil] Exception while getting default policy Provider+
    +     at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:899)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
    +     at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
    +     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)+
    +     Truncated. see log file for complete stacktrace+
    +Caused By: java.security.PrivilegedActionException: oracle.security.jps.JpsException: [PolicyUtil] Unable to obtain default JPS Context!+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:284)+
    +     at oracle.security.jps.internal.policystore.JavaPolicyProvider.<init>(JavaPolicyProvider.java:270)+
    +     Truncated. see log file for complete stacktrace+
    +Caused By: oracle.security.jps.JpsException: [PolicyUtil] Unable to obtain default JPS Context!+
    +     at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:860)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil$1.run(PolicyUtil.java:844)+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.internal.policystore.PolicyUtil.getDefaultPolicyStore(PolicyUtil.java:844)+
    +     at oracle.security.jps.internal.policystore.PolicyDelegationController.<init>(PolicyDelegationController.java:291)+
    +     Truncated. see log file for complete stacktrace+
    Caused By: oracle.security.jps.service.keystore.KeyStoreServiceException: JPS-06513: Failed to save farm keystore. Reason
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.createKeyStore(FileKeyStoreManager.java:309)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:95)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:73)+
    +     at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.<init>(FileKeyStoreServiceImpl.java:63)+
    +     at oracle.security.jps.internal.keystore.KeyStoreProvider.getInstance(KeyStoreProvider.java:157)+
    +     Truncated. see log file for complete stacktrace+
    +>+
    +<Feb 10, 2012 11:30:24 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.>+
    +<Feb 10, 2012 11:30:24 AM CET> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.>+
    +<Feb 10, 2012 11:30:24 AM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.>+
    Process exited.
    */LOG*
    After that, I tried setting permissions for the cwallet.sso file to ugo+rwx, but this leads to the same problems as mentioned above.
    My second try was to setup an external WLS 12c, but it seems to be not yet possible to connect to a WLS 12c from within jDeveloper.
    Do you have any ideas ?
    Thank you in advance for your help.
    Regards,
    Robin

    After debugging the WLS Initialisation with jdb, I recognized that there was some trouble with dependent libraries.
    In the end, I solved my problem by using another OS (Ubuntu 11.10) for development. There, the WLS works out of the box, even with 64-Bit libraries.
    Thank you for your help.
    Regards,
    Robin

  • SAP Crystal Reports data source connection problem using sap business one

    Hi,
    I m facing a problem regarding: SAP Crystal Reports data source connection problem using sap business one
    I am trying to create a Crystal report but when I try to configure a new connection it does not work.
    I select Sap Business One data source and try to complete the information required to connection but it does not list my companies databases, what is the problem?
    Our Current SAP related software details are as follows:
    OS: Windows Server 2008
    SAP B1 Version: SAP B1 9 (902001) Patch 9
    SAP Crystal Report Version: 14.0.4.738 RTM
    Database: MS SQL Server 2008 R2
    I have also added some screenshots of the issues.
    Please have a look and let me know if you have any questions or any further clarifications.
    I m eagerly waiting for a quick and positive reply.

    Hi,
    There is problem with SAP Business One date source.
    I had faced same problem, I used OLEDB Data-source, and it worked fine for me.
    So, try to use OLEDB.
    Regards,
    Amrut Sabnis.

  • Calendar Server 3.5: Problem using user's ID with uniuser -mod command

    When there are two users who have the same Common Name (CN) in LDAP but
    different User ID's (uid
    field), I have a problem using the uid
    field as an argument to
    uniuser -mod in Netscape Calendar
    Server (NCS) 3.5. For example, there may be two users, User1 and User2, who
    both have the CN "John Smith."<BR>
    <P>
    <B>User1</B>
    uid: jsmith2
    sn: Smith
    givenname: John
    nscalxitemid: 10001:00314
    <B>User2</B>
    uid: jsmith
    sn: Smith
    givenname: John
    nscalxitemid: 10001:00213
    <P>
    Let's say I want to change the value for nsCalOrgUnit2
    for User1 to "jsmith." In NCS 4.0,
    I can specify the uid as
    an argument to uniuser -mod
    . However, in NCS 3.5, if I specify the
    uid as an argument to
    uniuser -mod, the entry
    for the user does not get changed.<BR>
    <P>
    <B>Calendar Server 4.0</B><BR>
    <P>
    %uniuser -mod "ID=00314" -m "OU2=jsmith/OU3=People" -n 10001
    <BR>
    uniuser: modified "Smith, John"<BR>
    <P>
    (The LDAP entry for User1 also reflects this change.)
    <P>
    <B>Calendar Server 3.5</B><BR>
    <P>
    %uniuser -mod "ID=00314" "OU2=jsmith/OU3=People" 10001
    <BR>
    uniuser: no need to modify "Smith,John"<BR>
    <P>
    (The LDAP entry for User1 does not reflect the change.)<BR>
    <P>
    %uniuser -mod "S=Smith/G=John/ID=00314" "OU2=jsmith/OU3=People"
    10001<BR>
    uniuser: no need to modify "Smith,John"<BR>
    <P>
    (The LDAP entry for User1 does not reflect the change.)<BR>
    <P>
    If I use the command uniuser -mod "S=Smith/G=John"
    "OU2=jsmith/OU3=People" 10001
    in NCS 3.5, the script will change the entry of the first "John Smith" in the
    database and will cause the LDAP entry for this user to be updated as well.
    However, the entry modified may or may not be the correct one. So, in
    NCS 3.5, is there a way to specify a particular uid
    to ensure that the correct LDAP entry
    is modified?
    <P>
    To modify a user's information using the uid
    field in Calendar Server 3.5, change
    the user.ini file. The
    following steps show how to change a user's information by modifying the
    .ini file:<BR>
    <P>
    <OL>
    <LI>Open the user.ini
    file, which is in the path /users/unison/misc/user.ini
    <P>
    <LI>Add a section containing the desired changes. For example,<BR>
    <P>
    [Test]<BR>
    OU2 = jsmith<BR>
    OU3 = People<BR>
    <P>
    <LI>Run uniuser with
    the following options:<BR>
    <P>
    % uniuser -mod "ID=00314" -s Test 10001
    </OL>

    It turns out to be a problem with the user Keychain. It has some weird entry that was sending the wrong password. I delete all entries to the server and that corrected the problem

  • Problem using a conditional suppress in a cross-tab ?

    is there a problem using a conditional suppress in a cross-tab on a row  or summarized field  in crystal XI?
    I am using the following conditional suppress on a summarized field and its rows
             If {@SortCode}=4 then true;
    Sortcode is a group sorting formula field
    the summarized field is a formula field as well.
    All of the summarized fields are suppressed although the cross- tab performs correctly on @Sortcode  and the summarized field when not using the condition        
    it seems to me to be a reporting flow issue although i've included "whileprintingrecords" and "evaluateafter" with no success.
    i have also moved the cross-tab from the report header to group header and applied a conditional suppress on the group header through section expert.
    this supresses the group i dont want but includes grand totals for each group and also varys the number of columns
    i can't filter on sortcode because one of the grand total calculations requires those records and a subreport or second cross-tab does not contain the same number of columns
    the cross-tab is necessary as a client may have columns spanning one to many pages
    thanks for your help

    Hi I have a similar problem,
    I have an clock in solution, where i have some dates with data such as, various entries for a date eg, 01/11/2010 1hr, 01/11/2010 3 hrs etc, 03/11/2010 2hrs , 05/11/2010 4.5hrs, 05/11/2010 4 hrs so i need total for each day and highlight only those days, where total is less than 4.5, including days which donu2019t have records eg 02/11/2010 & 04/11/2010, I summarise in totals using a cross tab, to get summarised output for each day as,
                Totals
    01/11/2010    4
    03/11/2010    2
    05/11/2010    8.5
    in order to get the dates which didnu2019t have records, i added a dataset from Excel spreadsheet where i just have a sequential dates for the year , and use record selection to select only those dates in range which i need to display, so the result i get
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    05/11/2010    8.5
    so far so good, all using cross tab, now i want to suppress rows which have total > 4.5 so the result should be
    01/11/2010    4
    02/11/2010    0
    03/11/2010    2
    04/11/2010    0
    How can i do that?

  • Could not complete the command because of a problem using the Adobe Color Engine

    Hi all
    This bizarrely started this morning - completely out of the blue - and I've no idea why.
    Setup: Mac 10.8.2 / Creative Suite Premium PhotoShop CS5 extended (patched to 12.04)
    Am working on images exported from LightRoom 4 (16bit A3 Pro Photo RGB PSDs) in PhotoShop CS5.
    As part of my image grading process I have a PhotoShop Action that does the following: copy layer to new document (document respects all of copied layer settings) > Image > Adjustments > HDR toning > apply a certain HDR preset > copy to resultant image back to original doc > set opacity as 40%.
    Totally out of the blue, after having this action for about 2 months, this morning I start getting a warning dialog of "Could not complete the command because of a problem using the Adobe Color Engine" and the action fails. The failure seems to take place at the 'make document' part of the action and seems to somehow be related to the contents of the clipboard.
    I've tried trashing and re-creating the action. It works first time out fine and then - on the next image - errors again.
    At present I can only safely carry out the work 'manually' by completing all the actions myself.
    I can think of no settings that have changed and the OS hasn't been updated in a while.
    I have found one other thread on a similar problem in PhotoShop Elements, but no definitive solution.
    Any help appreciated as I have a shedload of stuff to process.
    Best wishes
    TP

    OK: trash of prefs didn't work. Tried thrice. Re-created orig action. same problem.
    BUT!
    Your 'Image > Duplicate' suggestion does seem to work. If I use that in a new action as the method for creating the HDR version doc (instead of 'Select > Copy > New > Paste), it seems to work.
    Will try that out this afternoon, but for now: WIN!
    Many thanks for the suggestion!
    TP

  • When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message 'An error as occurred. Please try again later'. It has been this way for some weeks. I don't have this problem using Safari or Opera.

    When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message ‘An error as occurred. Please try again later’. It has been this way for some weeks. I don’t have this problem using Safari or Opera.

    I believe that our “Werbung problem” adds an additional second hyperlink to the pop-up window. This second link is activated whenever you trigger a saved hyperlink to a Mail.com site.
    I had the same problem and eliminated it by deleting all bookmarks, hyperlinks and automatic links that take firefox to a mail.com address. So I just deleted all bookmarks I had saved for mail.com. I also changed my home page link because it also went to my email at mail.com. I then did a warm boot, opened firefox and re-saved my bookmarks and homepage to the desired addresses. Good luck.

  • Problem using Toshiba Software Installer for Win 7 on Satellite L750-1MT

    Hello!
    I have problem using Toshiba Software Installer for Win 7 on Satellite L750-1MT (PSK30E-02T002B3) with no OS preinstalled.
    I do the following:
    1. Install Windows 7 x64, SP1.
    2. Install LAN driver (device was not recognized by Windows 6) (downloaded from [http://se.computers.toshiba-europe.com/innovation/jsp/supportMyProduct.do?service=SE&LNG=26&userAction=S MP_RESULTS_PAGE&partNumber=PSK30E-02T002B3&serialNumber=&USER_ACTION=Serial%20number])
    3. Install all Windows Updates from Microsoft
    4. Run Toshiba Software Installer for Win 7 - it installs a couple of drivers and then asks to reboot.
    Here is the log file for the first try (win7update.log):
    Update started 12\28\2011 at 21:11
    Installed TVALZ_O.INF
    Installed IO & Memory Access Driver
    driver_bluetooth_TC00241200A.exe /s /log /test has been installed with the result code of PASS
    util_tvap_TC00215000H.exe /s /log /test /wait15 has been installed with the result code of PASS
    Update completed at 21:29
    After reboot I run it again and the result is:
    Update started 12\28\2011 at 21:38
    Toshiba Bluetooth stack has already been installed.
    Toshiba Value Added Package has already been installed.
    Update completed at 21:40
    Any help is appreciated!
    Thanks in advance!

    You are right this notebook model was delivered without OS.
    Win7 64bit is supported for this notebook model and all necessary drivers, tools and utilities are available on Toshiba download page.
    What I can say is that all this stuff must be installed in right install order. I know it sounds stupid now but I recommend you to make clean OS again and continue installation following this installation order:
    Win7 SP1
    Intel Chipset SW Installation Utility 9.2.0.1015
    TOSHIBA Supervisor Password Utility 4.8.6.0
    TOSHIBA HW Setup Utility 4.8.6.0
    TOSHIBA Bulletin Board V2.1.10
    TOSHIBA ReelTime 1.7.17.0
    Intel Management Engine Interface 7.0.2.1164
    NVIDIA Display Driver 8.17.12.6669
    Intel Rapid Storage Technology Driver 10.1.2.1004
    TOSHIBA Value Added Package 1.5.4.64
    USB3.0 Driver 2.0.32.0
    NVIDIA HD Audio Driver 1.1.13.1
    Conexant Audio Driver 8.51.1.0a
    Intel Wireless LAN Driver 14.0.2.2.1.s64_wCAT
    or
    Atheros Wireless LAN Driver 9.2.0.206.0.s3264_wCAT
    or
    Realtek Wireless LAN Driver 2.00.0013
    TOSHIBA Wireless LAN Indicator 1.0.3
    Synaptics Touch Pad Driver 15.2.11.1
    TOSHIBA Software Modem 2.2.97(SM2297ALS05)
    Conexant Modem Driver 7.80.4.53
    TOSHIBA HDD Protection 2.2.1.12
    Atheros Bluetooth Filter Driver Package v1.0.7
    Bluetooth Stack for Windows by Toshiba v8.00.04(T)
    Atheros LAN Driver 1.0.0.46
    Realtek Card Reader 1.0.0.12
    TOSHIBA Sleep Utility 1.4.2.7
    TOSHIBA Face Recognition V3.1.8
    TOSHIBA eco Utility 1.2.25.64
    Intel Proset 14.0.2.0.1.s64_wCAT
    Intel Wireless Display 2.0.29T
    TOSHIBA HDD_SSD Alert 3.1.64.7
    TOSHIBA Service Station V2.1.52
    TOSHIBA PC Health Monitor 1.7.4.64
    ConfigFree 8.0.37
    TOSHIBA Web Camera Application V2.0.0.19
    TOSHIBA Network Device ID Registry Setting Tool 3.0.32.4-14_wMSI
    TOSHIBA Media Controller 1.0.86.2
    TOSHIBA Media Controller Plug-in 1.0.6.1
    PatchFiles$$2 PCIIDEREG-1.2
    PatchFiles$$3 TosVolRegulator_x64_1.1
    It is very important to use right installation order.
    Please post some feedback.

Maybe you are looking for