Cipher.getInstance("DES") not working in servlet!

Hi - I'm working on Sun ONE Identity Server 6.1 using Sun ONE Web Server 6.1 using J2SDK 1.4.1_05
I've modified one of the files to perform DES Encryption prior to getting some data.
The code works fine when compiled separately - even works fine as a console program - but when I try running it as a servlet - I get a WHOLE bunch of errors when the program hits this line:
cipher = Cipher.getInstance("DES");Here is the complete code:
public String encryptPassword(String Password, String AppName)
     Key key;
     Cipher cipher;
     String Data = Password;
     String ApplicationName = AppName;
     String result = new String("hi");
     try
                ObjectInputStream in = new ObjectInputStream(new FileInputStream("PrivateKey.ser"));
              key = (Key)in.readObject();
             in.close();
             Security.addProvider(new com.sun.crypto.provider.SunJCE());
          cipher = Cipher.getInstance("DES"); // This LINE GIVES THE ERROR
          cipher.init(Cipher.ENCRYPT_MODE, key);
          byte[] stringBytes = Data.getBytes("UTF8");
          byte[] raw = cipher.doFinal(stringBytes);                    
          BASE64Encoder encoder = new BASE64Encoder();
          String result = encoder.encode(raw);
     catch (Exception e)
          // Print some error
return result;
}Here is the error log from the webserver:
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Handler method "handleBtnSubmitRequest" threw an exception
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: java.lang.ExceptionInInitializerError
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.a(DashoA6275)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.getInstance(DashoA6275)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.encryptPassword(UMChangeUserPasswordViewBean.java:244)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.handleBtnSubmitRequest(UMChangeUserPasswordViewBean.java:172)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.lang.reflect.Method.invoke(Method.java:324)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 27 more
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.PrivilegedActionException: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.AccessController.doPrivileged(Native Method)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 28 more
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key 
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.pkcs11.PK11Signature.engineInitVerify(PK11Signature.java:172)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.crypto.Signature.initVerify(Signature.java:95) 
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.Signature.engineInitVerify(Signature.java:94)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.DSASignature.engineInitVerify(DSASignature.java:70)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.Signature.initVerify(Signature.java:297)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:363)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.e(DashoA6275)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_v.run(DashoA6275)
[20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 29 more
[20/Oct/2003:16:58:01] failure ( 6417):  for host 10.42.7.235 trying to POST /amconsole/user/UMChangeUserPassword, service-j2ee reports: StandardWrapperValve[UMServlet]: WEB2792: Servlet.service() for servlet UMServlet threw exception   com.iplanet.jato.CompleteRequestException   at com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:331)   at com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)   at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)   at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)   at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)    

Hey.
Not certain, but I think you need to make sure that your ciphers/certificates are installed on your server. Check the docs on the Sun server, and see what they say about installing certificates.
Hope this helps.
Vic

Similar Messages

  • Cipher.getInstance("DES") gives a Servlet Error!

    Hi - I'm working on Sun ONE Identity Server 6.1 using Sun ONE Web Server 6.1 using J2SDK 1.4.1_05
    I've modified one of the files to perform DES Encryption prior to getting some data.
    The code works fine when compiled separately - even works fine as a console program - but when I try running it as a servlet - I get a WHOLE bunch of errors when the program hits this line:
    cipher = Cipher.getInstance("DES");Here is the complete code:
    public String encryptPassword(String Password, String AppName)
         Key key;
         Cipher cipher;
         String Data = Password;
         String ApplicationName = AppName;
         String result = new String("hi");
         try
                    ObjectInputStream in = new ObjectInputStream(new FileInputStream("PrivateKey.ser"));
                  key = (Key)in.readObject();
                 in.close();
                 Security.addProvider(new com.sun.crypto.provider.SunJCE());
              cipher = Cipher.getInstance("DES"); // This LINE GIVES THE ERROR
              cipher.init(Cipher.ENCRYPT_MODE, key);
              byte[] stringBytes = Data.getBytes("UTF8");
              byte[] raw = cipher.doFinal(stringBytes);                    
              BASE64Encoder encoder = new BASE64Encoder();
              String result = encoder.encode(raw);
         catch (Exception e)
              // Print some error
    return result;
    }Here is the error log from the webserver:
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Handler method "handleBtnSubmitRequest" threw an exception
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: java.lang.ExceptionInInitializerError
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.a(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.Cipher.getInstance(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.encryptPassword(UMChangeUserPasswordViewBean.java:244)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.am.console.user.UMChangeUserPasswordViewBean.handleBtnSubmitRequest(UMChangeUserPasswordViewBean.java:172)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.lang.reflect.Method.invoke(Method.java:324)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 27 more
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.PrivilegedActionException: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.AccessController.doPrivileged(Native Method)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 28 more
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: Caused by: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key 
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.pkcs11.PK11Signature.engineInitVerify(PK11Signature.java:172)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.crypto.Signature.initVerify(Signature.java:95) 
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.Signature.engineInitVerify(Signature.java:94)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at org.mozilla.jss.provider.DSASignature.engineInitVerify(DSASignature.java:70)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at java.security.Signature.initVerify(Signature.java:297)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:363)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_b.e(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: at javax.crypto.SunJCE_v.run(DashoA6275)
    [20/Oct/2003:16:58:01] warning ( 6417):  CORE3283: stderr: ... 29 more
    [20/Oct/2003:16:58:01] failure ( 6417):  for host 10.42.7.235 trying to POST /amconsole/user/UMChangeUserPassword, service-j2ee reports: StandardWrapperValve[UMServlet]: WEB2792: Servlet.service() for servlet UMServlet threw exception   com.iplanet.jato.CompleteRequestException   at com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:331)   at com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)   at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)   at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)   at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)   at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)   at com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)   

    Hi - I'm working on Sun ONE Identity Server 6.1 using
    Sun ONE Web Server 6.1 using J2SDK 1.4.1_05
    I've modified one of the files to perform DES
    Encryption prior to getting some data.
    The code works fine when compiled separately - even
    works fine as a console program - but when I try
    running it as a servlet - I get a WHOLE bunch of
    errors when the program hits this line:Actually, I think the errors are telling you the problem - you're just getting tangled up in the stacktraces. Let's get rid of everything except the "causes" lines:Handler method "handleBtnSubmitRequest" threw an exception
    java.lang.ExceptionInInitializerError
    Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
    CORE3283: stderr: at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    Caused by: java.security.PrivilegedActionException: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key
    at java.security.AccessController.doPrivileged(Native Method)
    Caused by: java.security.InvalidKeyException: publicKey is not a PKCS #11 public key 
    failure ( 6417):  for host 10.42.7.235 trying to POST amconsole/user/UMChangeUserPassword, service-j2eeLooks to me like the ctor for Cipher is unhappy because it's finding a key that isn't a PKCS#11 public key while it's trying to set up.
    What trust-store is your installation using? Have you run keytool -list on it? Possibly there's a bad key/cert in there.
    What do you expect "key" to be, in your code? How certain are you that it's really a DES key? If someone asked me to guess from the filename "PrivateKey.ser", I'd guess it was the private half an RSA keypair, which will NOT work for DES - but that may be just an unfortunate choice of filenames.
    The net is, you need to figure out where the installation is finding the thing that's causing the InvalidKeyException. Haven't used SunONE, so I'm not much help on exactly where to look - you might post on a SunONE list, to get help from admin-mavens...
    Good luck!
    Grant

  • BUG: Oracle Schema Processor does not work in Servlets

    We found a bug with Oracle's Schema Processor. It does not work in Servlets.
    When we try to validate a XML document in a Servlet it does not work, but we can execute the same code in a stand alone application and it works.
    The following is the code we are using:
    try {
    File f =new File(filename);
    FileReader r = new FileReader(f);
    DOMParser dp = new DOMParser();
    URL url = createURL (filename);
    dp.setValidationMode(false);
    dp.setSchemaValidationMode(true);
    dp.setPreserveWhitespace(true);
    dp.parse(url);
    System.out.println("it is parsed");
    } catch(Exception e){System.out.println("there is Error"+e.getMessage());}
    null

    I don't think this is related to Servlets per se.
    Check that the Schema processor classes used by the servlet container, and your application are the same.
    Java does not have proper versioning of classes, I have seen many applications collapse. People compiled their code on developer machines, where it worked fine, but when moved to a production machine they failed because the production machine had a different version of classes. Usually the name of the class doesn't change, but either a method or a variable is missing in several classes. VM doesn't complain but simply crashes.
    In your Schema Processor classes that are used by the servlet engine might be different from the one that the app uses. Do a search on the file system to see how many copy of the same class bundle (zip, jar) you have on the system.

  • Runtime process not working from servlet container

              Hello,
              I'm executing a standalone executable from the Runtime class, using exec.
              Process process = Runtime.getRuntime().exec(buildCommand.toString());
              There are threads monitoring the input and error streams. This same use of the Runtime
              class is used at least 5 other times in the servlet with no problems. The same method
              is also called from a JUnit test and also executes properly.
              The method called from the servlet however does not work. the executable it's calling
              is a C++ executable that uses an ODBC alias set up on the machine to connect to the
              Oracle database. For some reason the ODBC layer throws an exception while trying
              to connect when the executable is called from the servlet, rather than called from
              the command line or JUnit test.
              Does the servlet have a different environment than a client call from the JUnit test?
              Would it not have access to ODBC drivers it needs? Could there be some sort of security
              setting that the servlet container is set too low?
              Any information would be terrific.
              Thanks,
              Sara
              

    Thanks!
    I borrowed a DVD drive and everything installed correctly.

  • Run-as does not work for servlets

    When a servlet is marked with a run-as role, other servlets in the same web app without run-as role will not propagate the caller principal correctly to EJBs.
    Is any configuration required except setting the run-as principal in sun-web.xml?

    Coming back one year later, this bug is still present, even in Update 1. Here is a little application that should show the problem:
    /*----------------------------- Test.java ------------------------------------*/
    package sunastest;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface Test extends EJBObject {
        String getPrincipal() throws RemoteException;
    /*----------------------------- TestHome.java --------------------------------*/
    package sunastest;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface TestHome extends EJBHome {
        Test create() throws CreateException, RemoteException;
    /*----------------------------- TestEJB.java ---------------------------------*/
    package sunastest;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class TestEJB implements SessionBean {
        private SessionContext sessionContext = null;
        public void setSessionContext(SessionContext sessionContext) {
            this.sessionContext = sessionContext;
        public void ejbCreate() {
        public void ejbRemove() {
        public void ejbActivate() {
        public void ejbPassivate() {
        public String getPrincipal() {
            return sessionContext.getCallerPrincipal().getName();
    /*----------------------------- TestServlet.java -----------------------------*/
    package sunastest;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class TestServlet extends HttpServlet {
        protected void doGet(
            HttpServletRequest request,
            HttpServletResponse response)
            throws ServletException, IOException {
            String p = null;
            try {
                Context jndiContext = new InitialContext();
                try {
                    TestHome home =
                        (TestHome) PortableRemoteObject.narrow(
                            jndiContext.lookup("java:comp/env/ejb/Test"),
                            TestHome.class);
                    Test test = home.create();
                    p = test.getPrincipal();
                } catch (RemoteException e) {
                    jndiContext.close();
                } catch (CreateException e) {
                    jndiContext.close();
                } finally {
                    jndiContext.close();
            } catch (NamingException e) {
                throw new ServletException(e);
            PrintWriter out = response.getWriter();
            out.println("principal in EJB: " + p);
    <!--=========================================================================-->
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC
             '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
             'http://java.sun.com/dtd/application_1_3.dtd'>
    <application>
        <display-name>app_test_ear</display-name>
        <description>Application description</description>
        <module>
            <ejb>ejb.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>web.war</web-uri>
                <context-root>test</context-root>
            </web>
        </module>
        <security-role>
            <role-name>RunAsRole</role-name>
        </security-role>
    </application>
    <!--=========================================================================-->
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-application PUBLIC
            '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN'
            'http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd'>
    <sun-application>
        <!-- create these users in the server -->
        <security-role-mapping>
             <role-name>User</role-name>
             <principal-name>user</principal-name>
        </security-role-mapping>
        <security-role-mapping>
             <role-name>RunAsRole</role-name>
             <principal-name>runasuser</principal-name>
        </security-role-mapping>
    </sun-application>
    <!--=========================================================================-->
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
            "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
            "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
        <enterprise-beans>
            <session>
                <ejb-name>Test</ejb-name>
                <home>sunastest.TestHome</home>
                <remote>sunastest.Test</remote>
                <ejb-class>sunastest.TestEJB</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Container</transaction-type>
            </session>
        </enterprise-beans>
        <assembly-descriptor>
            <method-permission>
              <unchecked />
              <method>
                <ejb-name>Test</ejb-name>
                <method-name>*</method-name>
              </method>
            </method-permission>
            <container-transaction>
              <method>
                <ejb-name>Test</ejb-name>
                <method-name>*</method-name>
              </method>
              <trans-attribute>NotSupported</trans-attribute>
            </container-transaction>
        </assembly-descriptor>
    </ejb-jar>
    <!--=========================================================================-->
    <?xml version="1.0"?>
    <!DOCTYPE sun-ejb-jar PUBLIC
            '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN'
            'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
        <enterprise-beans>
            <ejb>
                <ejb-name>Test</ejb-name>
                <jndi-name>test/Test</jndi-name>
                <bean-pool/>
            </ejb>
        </enterprise-beans>
    </sun-ejb-jar>
    <!--=========================================================================-->
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
        <servlet>
            <servlet-name>TestServlet</servlet-name>
            <servlet-class>sunastest.TestServlet</servlet-class>
        </servlet>
        <servlet>
            <servlet-name>RunAsTestServlet</servlet-name>
            <servlet-class>sunastest.TestServlet</servlet-class>
            <!-- only one servlet specifies run-as -->
            <run-as>
                <role-name>RunAsRole</role-name>
            </run-as>
            <!-- -->
        </servlet>
        <servlet-mapping>
            <servlet-name>TestServlet</servlet-name>
            <!-- call this, it will also run-as -->
            <url-pattern>/test</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>RunAsTestServlet</servlet-name>
            <url-pattern>/run-as</url-pattern>
        </servlet-mapping>
        <security-constraint>
            <web-resource-collection>
                <web-resource-name>test</web-resource-name>
                <url-pattern>/*</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
            </web-resource-collection>
            <auth-constraint>
                <role-name>User</role-name>
            </auth-constraint>
        </security-constraint>
        <login-config>
            <auth-method>BASIC</auth-method>
            <realm-name>test</realm-name>
        </login-config>
        <ejb-ref>
            <ejb-ref-name>ejb/Test</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>sunastest.TestHome</home>
            <remote>sunastest.Test</remote>
            <ejb-link>ejb.jar#Test</ejb-link>
        </ejb-ref>
    </web-app>
    <!--=========================================================================-->
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-application-client PUBLIC
            '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Application Client 1.3//EN'
            'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_3-0.dtd'>
    <sun-web-app>
        <servlet>
            <servlet-name>RunAsTestServlet</servlet-name>
            <principal-name>runasuser</principal-name>
        </servlet>
    </sun-web-app>
    <!--=========================================================================-->

  • This program is well compiled but does not work.

    I would like to know why this program does not work properly:
    the idea is :
    1. the user introduces a text as a string
    2.the progam creates a file (with a FileOutputStream)
    3. then this file is encripted according to DES (using JCE, cipheroutputStream)
    4.the new filw is an encripte file, whose content is introduced in a string (with a FileInputStream)
    (gives no probles of compilation!!)
    (don know why it does not work)
    here goes the code:
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    import java.security.*;
    import javax.crypto.*;
    public class cuadro extends Applet{
         private TextArea area1 =new TextArea(5,50);
         private TextArea area2 =new TextArea(5,50);
         private Button encriptar=new Button("encriptar");
         private Button decriptar=new Button("decriptar");
         public cuadro(){
              layoutApplet();
              encriptar.addActionListener(new ButtonHandler());
              decriptar.addActionListener(new ButtonHandler());
              resize(400,400);
              private void layoutApplet(){
              Panel keyPanel = new Panel();
              keyPanel.add(encriptar);
              keyPanel.add(decriptar);
              Panel textPanel = new Panel();
              Panel texto1 = new Panel();
              Panel texto2 = new Panel();
              texto1.add(new Label("               plain text"));
              texto1.add(area1);
              texto2.add(new Label("               cipher text"));
              texto2.add(area2);
              textPanel.setLayout(new GridLayout(2,1));
              textPanel.add(texto1);
              textPanel.add(texto2);
              setLayout(new BorderLayout());
              add("North", keyPanel);
              add("Center", textPanel);
              public static String encriptar(String text1){
              //generar una clave
              SecretKey clave=null;
              String text2="";
              try{
              FileOutputStream fs =new FileOutputStream ("c:/javasoft/ti.txt");
              DataOutputStream es= new DataOutputStream(fs);
                   for(int i=0;i<text1.length();++i){
                        int j=text1.charAt(i);
                        es.write(j);
                   es.close();
              }catch(IOException e){
                   System.out.println("no funciona escritura");
              }catch(SecurityException e){
                   System.out.println("el fichero existe pero es un directorio");
              try{
                   //existe archivo DESkey.ser?
                   ObjectInputStream claveFich =new ObjectInputStream(new FileInputStream ("DESKey.ser"));
                   clave = (SecretKey) claveFich.readObject();
                   claveFich.close();
              }catch(FileNotFoundException e){
                   System.out.println("creando DESkey.ser");
                   //si no, generar generar y guardar clave nueva
              try{
                   KeyGenerator claveGen = KeyGenerator.getInstance("DES");
                   clave= claveGen.generateKey();
                   ObjectOutputStream claveFich = new ObjectOutputStream(new FileOutputStream("DESKey.ser"));
                   claveFich.writeObject(clave);
                   claveFich.close();
              }catch(NoSuchAlgorithmException ex){
                   System.out.println("DES key Generator no encontrado.");
                   System.exit(0);
              }catch(IOException ex){
                   System.out.println("error al salvar la clave");
                   System.exit(0);
         }catch(Exception e){
              System.out.println("error leyendo clave");
              System.exit(0);
         //crear una cifra
         Cipher cifra = null;
         try{
              cifra= Cipher.getInstance("DES/ECB/PKCS5Padding");
              cifra.init(Cipher.ENCRYPT_MODE,clave);
         }catch(InvalidKeyException e){
              System.out.println("clave no valida");
              System.exit(0);
         }catch(Exception e){
              System.out.println("error creando cifra");
              System.exit(0);
         //leer y encriptar el archivo
         try{
              DataInputStream in = new DataInputStream(new FileInputStream("c:/javasoft/ti.txt"));
              CipherOutputStream out = new CipherOutputStream(new DataOutputStream(new FileOutputStream("c:/javasoft/t.txt")),cifra);
              int i;
              do{
                   i=in.read();
                   if(i!=-1) out.write(i);
              }while (i!=-1);
              in.close();
              out.close();
         }catch(IOException e){
              System.out.println("error en lectura y encriptacion");
              System.exit(0);
         try{
              FileInputStream fe=new FileInputStream("c:/javasoft/t.txt");
              DataInputStream le =new DataInputStream(fe);
                   int i;
                   char c;
                   do{
                        i=le.read();
                        c= (char)i;
                        if(i!=-1){
                        text2 += text2.valueOf(c);
                   }while(i!=-1);
                        le.close();
              /*}catch(FileNotFoundException e){
                   System.out.println("fichero no encontrado");
                   System.exit(0);
              }catch(ClassNotFoundException e){
                   System.out.println("clase no encontrada");
                   System.exit(0);
              */}catch(IOException e){
                   System.out.println("error e/s");
                   System.exit(0);
              return text2;
         class ButtonHandler implements ActionListener{
         public void actionPerformed(ActionEvent e){
              try{
              if (e.getActionCommand().equals(encriptar.getLabel()))
                   //     area2.setText(t1)
                   area2.setText(encriptar(area1.getText()));
                   //area2.setText("escribe algo");
                   else if (e.getActionCommand().equals(decriptar.getLabel()))
                        System.out.println("esto es decriptar");
                        //area2.setText("hola");
         }catch(Exception ex){
              System.out.println("error en motor de encriptacion");
                   //else System.out.println("no coge el boton encriptado/decript");

    If you don't require your code to run as an applet, you will probably get more mileage from refactoring it to run as an application.
    As sudha_mp implied, an unsigned applet will fail on the line
    FileInputStream fe=new FileInputStream("c:/javasoft/t.txt");
    due to security restrictions. (Which, incidentally, are there for a very good reason)

  • Please, help .. return not working. string can not be resolved to a variabl

    Greetings..
    I am writing a Java code that encrypt a String using DES. After encryption, I want to return the String, but I get error that says: variable can not be resolved. Please, help me to find out what is the problem ?? Thanks in advance.
    Here is the code:
    import javax.crypto.*;
    import java.security.*;
    public class Client {
         public String DESEncrypt(String cardnum)
              try{
              //create cipher object for DES
              Cipher c=Cipher.getInstance("DES");
              // craete the symmetric key for DES
              KeyGenerator kg=KeyGenerator.getInstance("DES");
              Key key=kg.generateKey();
              // DO the ecryption steps then display the result
              c.init(Cipher.ENCRYPT_MODE, key);
              //Dofinal accepts byts only. Thats why we use getbytes method.
              byte[] cardNoBytes=cardnum.getBytes("UTF8");
              //get the encrypted bytes
              byte[] encryptedCardNoBytes=c.doFinal(cardNoBytes);
              //convert bytes to string
              String cardNoString=new String(encryptedCardNoBytes);
              } catch(Exception e){ System.out.print("Error");
              return cardNoString;
         } //end the DESEncrypt method
    public static void main (String[] args) {
    try{
         Client cl=new Client();
         String x2=cl.DESEncrypt("123");
         System.out.println("The Encrypted text using DES is: " + x2+'\n');
    } catch(Exception e){ System.out.print("Error");
    }//end main
    }

    Next time, paste in the exact, complete error message and indicate clearly exactly which line is causing it.
    Your problem is that you declare cardNoString inside the try block, but you try to return it outside. Local variables only exist in the narrowest block in which they're declared. Once you exit try, that variable does not exist.
    You also have a logical problem. If an error occurs, you're just printing out :"Error", but you're not actually handling it. You're going on as if everything is fine. Catching an exception doesn't fix the error. If you can't fix it, don't catch it.
    What do you think your method will return if an exception occurs before you set cardNoString? What do you think it will do to the caller to have some arbitrary, meaningless value returned when he thinks everything went fine and he got a valid result?

  • HT204023 I think there is a setting in my I pad forbed me from using hot spot , my sim works at diffrent I pad while it does not work with my I pad

    Trying to use personal hot spot , it des not work . Using the same sim in a different device of the same type and operating system and generation it works correctly . It was working before in my I pad , why it is stopped , I wish to know , did I made a mistake ? what is it , did I changed the setting by mistake hindering the work of hotspot , advice me please
    Yasser

    Please do not give this any thought.   I was such a dummy.. duh, you have to have something running to PLAY the input!!!  I thought the Monitor was on in garage band, and found it was not.....
    have a nice day
    Sure wish you could remove posts you've made after you do the "DUH" thing.
    dale

  • Apache and Jserv issues - AppsLogin and AppsLocalLogin not working

    Hi,
    I am trying to understand the Apache and Jserv issues
    Home page - http://11i-tst-02.cisco.com:38901 - working fine
    This confirms that Apache core module is working fine. Does this confirm about the pls module also ?
    Apps local login - http://11i-tst-02.cisco.com:38901/OA_HTML/AppsLocalLogin.jsp - throwing Java Exception
    Request URI:/OA_HTML/AppsLocalLogin.jsp
    Exception:
    java.lang.NoClassDefFoundError
    at oracle.apps.fnd.sso.SSOManager.getAppsServletAgent(SSOManager.java:1727)
    at oracle.apps.fnd.sso.SSOManager.getLoginUrl(SSOManager.java:316)
    at oa_html._AppsLocalLogin._jspService(_AppsLocalLogin.java:410)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
    at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
    at oracle.jsp.JspServlet.service(JspServlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
    at org.apache.jserv.JServConnection.run(JServConnection.java:294)
    at java.lang.Thread.run(Thread.java:479)
    Is it related to SSO ? Because error mentions about SSOManager
    But why does AppsLocalLogin need to go thru SSO ?
    Doesn it mean Jserv issues ? I am able to see same message logged in jvm logs ?
    Restarting Apache doesnt help
    Servlet login - http://11i-tst-02.cisco.com:38901/oa_servlets/AppsLogin - throws Internal Server Erorr
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    Apache log doesnt show any error
    Servlet test works - http://11i-tst-02.cisco.com:38901/servlets/Hello
    Example Apache JServ Servlet
    Congratulations, ApacheJServ 1.1 is working!
    OAM works - http://11i-tst-02.cisco.com:38901/servlets/weboam/oam/oamLogin - Navigating to SSO page for authentication
    AOL test works - http://11i-tst-02.cisco.com:38901/OA_HTML/jsp/fnd/aoljtest.jsp
    FND_WEB.PING works - http://11i-tst-02.cisco.com:38901/pls/QTCSTG/FND_WEB.PING
    Connection test works - http://11i-tst-02.cisco.com:38901/servlets/oracle.apps.icx.common.ConnectionTest
    So, my question is why AppsLogin and AppsLocalLogin are not working - if servlets / AOL / FND / OAM links are working
    Is there issue with Jserv ?
    Can someone please explain the significance of the above tests
    And which tests need to pass for AppsLogin and AppsLocalLogin to work
    Thanks

    Since all the tests work fine as you stated above, I suggest you do the following:
    - Rerun Autoconfig on all tiers
    - rm -rf $OA_HTML/_pages
    - Bounce Apache

  • JSPs and Servlets do not work on Apache HTTP- Procesor Intel P4

    Computer description: Intel Pentium 4 processor with 20GB HD
    drive, 1GB RAM, Windows 2000Pro, Service pack II
    Before installation:
    We created a temporary directory on our Intel Pentium. 4
    processor server (e.g. \TEMP).
    Copied the contents of the Oracle* Server CD to the temporary
    directory.
    Renamed each copy of the SYMCJIT.DLL to SYMCJIT.OLD.
    Set the java_compiler=none environment variable.
    Installation:
    We run the SETUP.EXE from the \TEMP\install\win32 directory and
    install Oracle 8.1.7 EE Rel 3 Typical
    Configuration tool Net8 Configuration Assistant succeeded
    Configuration tool Oracle Database Configuration Assistant
    succeeded
    Configuration tool Starting Oracle HTTP service: 7 times error
    message (java.exe has generated errors and will be closed by
    Windows, You will need to restart the
    program, An error log is being created)
    HTTP server responses.
    All Java programs do not respond (e.g. IsItWorking does not work)
    After installation:
    Open the jserv.conf file chack that ApJServManual is set to Off.
    set ApJServLogLevel debug (will give more informative errors for
    debugging)
    set ApJServDefaultHost www.in.oracle.com (to your machine name
    with the
    domain name or IP address)
    set ApjServDefaultPort 80000
    Open the jserv.properties files and make the following changes:
    bindaddress=www.in.oracle.com (Same name as ApJServDefaultHost
    in jserv.conf)
    port=80000 (same port as in the jserv.conf)
    Enable all log options in jserv.properties:
    log=true
    log.file=/usr/local/apache/var/log/jserv.trace
    log.timestamp=true
    log.dateFormat=[yyyyMMdd HHmmss:SSS]
    log.channel.init=true
    log.channel.terminate=true
    log.channel.serviceRequest=true
    log.channel.authentication=true
    log.channel.requestData=true
    log.channel.responseHeaders=true
    log.channel.signal=true
    log.channel.exceptionTracing=true
    log.channel.servletManager=true
    Java servlets and JSP still do not redspond.
    If we try to start HTTP server from Windows service, we always
    get message: unable to locate dll: The dynamic link
    library Perl.dll could not be found in the secified path (our
    path: C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503
    \bin\mswin32-x86;
    C:\Program Files\Oracle\jre\1.1.7
    \bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;) and
    error message: Could not start
    OracleOraHome81HTTPServer service on local computer. The service
    did not respond to the start or control request in a
    timely fashion.
    Starting Oracle HTTP service from Start/Programs/Oracle: 7 times
    error message (java.exe has generated errors and will be closed
    by Windows, You will need to restart the
    program, An error log is being created)
    We tested also modifications of oraparam.ini
    a. Copy only the install directory from the CD to the hard
    disk ,say, e:\temp.
    b. Open oraparam.ini and make the following modifications
    (Assuming CD
    drive is f:)
    * Change the "SOURCE=" line to use the full path to the CD
    instead of a
    relative path. (i.e., SOURCE=f:\stage\products.jar)
    * Change the "JRE_LOCATION" line to use the full path to the CD
    instead of a
    relative path. (i.e.,
    JRE_LOCATION=f:\stage\Components\oracle\swd\jre\1.1.7\1
    \DataFiles\Expanded)
    * Change the "OUI_LOCATION" line to use the full path to the CD
    instead of a
    relative path. (i.e.,
    OUI_LOCATION=f:\stage\Components\oracle\swd\oui\1.6.0.9.0\1
    \DataFiles\Expanded
    * Change the "JRE_MEMORY_OPTIONS" line to add "-nojit" as the
    first argument.
    (i.e., JRE_MEMORY_OPTIONS=-nojit -ms16m -mx32m)
    ^^^^^^
    * Other entries should remain the same
    c. Launch setup.exe from the temporary location on your hard
    drive (i.e.
    e:\temp\install\ win32\setup.exe). This will use the modified
    oraparam.ini and pick up the information from the CD since the
    absolute
    locations are specified.
    After that modification of oraparam.ini, the HTTPServer does not
    respond at all.
    So we undo changes on oraparam.ini and reinstall HTTP.
    We copied SYMCJIT.DLL and jvm.dll from JDK 1.1.8_008 to
    Apache\jdk\..
    Since then at least the demo IsItWorking responses, but database
    connection can not be established. But jsp demo still do not?
    THX in advance
    Neja

    I'm still having problems with Portal config (as part of 9iAS) on
    a P4 but i have cleared the hurdle of the HTTP listener (i
    think).
    I downloaded and installed the JRE that is P4 compatible from
    www.sun.com (it puts it under c:\program files)
    then overwrote all the files in the jre directories in the cd
    staging area with the files from Sun (i.e. all symcjit.dll
    locations). I also had to put a file "javai.dll" in the same
    directory as the file "java.exe". This got the install all
    working.
    The service will fail first time because the install creates
    another set of incompatible jre files. You must again search for
    symcjit and repeat the above procedure.
    You must also overwrite the files in the c:\program
    files\oracle\inventory\jre directories (sorry cant remember exact
    path).
    Hope this helps.
    Mark Gornicki
    PS if anyone knows why Portal config hangs at 67%
    (before/during/after processing "bulkload.jar" section) please
    let me know :-)

  • Flash player not working on internet explorer 8 cipher strength 128-bit

    PLEASE HELP!
    I'Mm using Windows XP and Internet Explorer 8 with cipher strength 128-bit and Flash player does not work properly, like when I want to watch a music video or listen to music on You Tube it plays then stops and plays and stops continuously I have installed the latest Flash Player but still have the same problem.
    Please please help anyone!

    That sounds like you either have a very slow Internet connection, or the server at the other end (providing the video) is slow.
    Try clearing your Internet cache; this helps sometimes.

  • Servlets not working in tomcat-4.1.24

    Servlets are not working in a new context which I have created in tomcat-4.1.24. if i put the same servlet in examples context it is working. jsps are working in the new context also. any idea????
    binny

    Suppose your servlets class is called "app", you need to add this in your web.xml file
    <servlet>
    <servlet-name>app</servlet-name>
    <servlet-class>app</servlet-class>
    <servlet-mapping>
    <servlet-name>app</servlet-name>
    <url-pattern>/app</url-pattern>
    </servlet-mapping>
    </servlet>

  • Servlet reloading not working with WLS 5.1 sp8

              I downloaded and installed WLS 5.1's sp8 to fix the "java.net.SocketException: Connection aborted by peer: socket write error"
              problem. Although that problem is fixed, I have found that, however, the servlet (automatic) reloading does not
              work anymore. If I remove the sp8 from my Java system classpath and WL classpath (i.e. not using sp8), then
              the servler reloading works fine.
              Does anybody experience similar problem or have I forgot to do something?
              WLS properties/env vars setting:
              - weblogic.httpd.servlet.reloadCheckSecs=0
              - WEBLOGIC_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8.jar;...
              - JAVA_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8boot.jar;...
              Thanks in advance for any help.
              

              I've experienced the same problem with both sp6 and sp8. In both cases I performed several test, including
              - varied the value of weblogic.httpd.servlet.reloadCheckSecs
              - changes to the package depth the servlet belonged to
              - changes to the string length of the package names the servlet belonged to
              At best, the servlet would reload sometimes. I've moved back to sp5 and the problem has subsided.
              Note: I did not try registering the servlet to see how that would effect the dynamic reloading.
              Hope this helps
              - Dave
              "Michel Dinh" <[email protected]> wrote:
              >
              >I downloaded and installed WLS 5.1's sp8 to fix the "java.net.SocketException: Connection aborted by peer: socket write error"
              >problem. Although that problem is fixed, I have found that, however, the servlet (automatic) reloading does not
              >work anymore. If I remove the sp8 from my Java system classpath and WL classpath (i.e. not using sp8), then
              >the servler reloading works fine.
              >
              >
              >Does anybody experience similar problem or have I forgot to do something?
              >
              >WLS properties/env vars setting:
              >
              >- weblogic.httpd.servlet.reloadCheckSecs=0
              >- WEBLOGIC_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8.jar;...
              >- JAVA_CLASSPATH=%WEBLOGIC_HOME%\lib\weblogic510sp8boot.jar;...
              >
              >Thanks in advance for any help.
              

  • 8.1-beta servlets do not work?

    Hello,
              I'm using a web.xml file with 2 servlets in it that works fine
              in WLS 6.x and 7.x. Yet, it does not work in 8.1.
              If I delete the servlet and servlet-mapping elements I can
              deploy my webapp (in an ear) and it deploys. Otherwise it
              will not work.
              Has anyone else seen this with 8.1-beta?
              Thanks.
              

    Are you getting any exceptions / error messages?
              --Vinod.
              "Mark Swanson" <[email protected]> wrote in message
              news:[email protected]..
              > Hello,
              >
              > I'm using a web.xml file with 2 servlets in it that works fine
              > in WLS 6.x and 7.x. Yet, it does not work in 8.1.
              >
              > If I delete the servlet and servlet-mapping elements I can
              > deploy my webapp (in an ear) and it deploys. Otherwise it
              > will not work.
              >
              > Has anyone else seen this with 8.1-beta?
              >
              > Thanks.
              >
              >
              

  • Build WAR with servlet in JAR not work

    I am building a WAR file and have a bunch of jars and one of the jars has 2 servlets. When I create new web component from deploytool, I add all the jars and no class files. I then get to a page where I can select servet,jsp, or no component. I select servlet, and when I hit next get an error that there is no servlet class added, go back in add it(even though it is in a jar file). I then go back and add the servlet and then it tells me it can't find one of the classes the servlet is using.
    My main goal is to keep everything in jars. Is this possible with deploytool?? How? Why is this not working?
    thanks for any help anyone can provide.
    Dean

    This problem is known, please see http://developer.java.sun.com/developer/bugParade/bugs/4529122.html for a workaround.

Maybe you are looking for

  • How can I play iPhone 4 video on my HD TV

    I just took some video on my just arrived iPone 4. I plugged the USB end of the iPhone 4's cable into my TV. I scrolled through 'Inputs' on the TV. No go using 'Camcorder' setting which I connect to the front of the TV when used. No go using 'PC' inp

  • How to keep value in arrayList and print into matrix form.

    compute all primes less than N, and display the results step by step .summarize the computed results in an easy-to-read format.(matrix) The program starts by asking for an integer value N from the user. Print out the initial matrix of numbers from 2

  • How to left align the signature field of dynamic pdf

    Hi, I am working on dynamic (interactive) pdf and using Adobe LiveCycle Designer (Adobe Acrobat 9 Pro). My problem is that I cannot align left the signature field of my pdf. I can align left, right and center for textboxs and cannot just do that for

  • Acrobat X Pro - can't simply deskew PDF docs

    We run Adobe Acrobat X Pro (Windows 7 32-bit PCs).  No other versions are available. I have a PDF file created several years ago from scanned pages.  These consist of text, line drawings, and some photographs.  All pages are gray-scale. Some of the p

  • I dont know if this has been asked already but

    i'm doing a book for my photography corse, and using my aincent iPhoto. will i still be able to order the book fomr such and old version, and also wiht the hardback, will it be canvas like how its displayed on 05, or glossy covering sleeve like on 07