Java.lang.ExceptionInInitializerError,Exception creating new Poolableobject

Hi,
i am getting the below errors while running a page from JDEV, which is a simple page with few fields.
Please help me in resolving this error.
500 Internal Server Error
java.lang.ExceptionInInitializerError
     at oracle.apps.fnd.sso.Utils.<clinit>(Utils.java:664)
     at oracle.apps.fnd.common.WebRequestUtil.validateContextPrivate(WebRequestUtil.java:431)
     at oracle.apps.fnd.common.WebRequestUtil.validateContext(WebRequestUtil.java:324)
     at oracle.apps.fnd.common.WebRequestUtil.validateContext(WebRequestUtil.java:227)
     at OAErrorPage.jspService(_OAErrorPage.java:62)
     [OAErrorPage.jsp]
     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:847)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:813)
     at OA.jspService(_OA.java:115)
     [OA.jsp]
     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
     at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509)
     at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)
     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211)
     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171)
     at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)
     at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294)
     at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149)
     at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118)
     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085)
     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072)
     at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595)
     at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)
     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)
     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)
     at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:292)
     at oracle.apps.fnd.common.WebAppsContext.<init>(WebAppsContext.java:1095)
     at oracle.apps.fnd.sso.Utils.getAppsContext(Utils.java:539)
     at oracle.apps.fnd.sso.SessionMgr.loadInstalledLanguages(SessionMgr.java:3875)
     at oracle.apps.fnd.sso.SessionMgr.getInstalledLanguages(SessionMgr.java:3693)
     at oracle.apps.fnd.sso.Utils.getBaseInstalledLangCode(Utils.java:1476)
     at oracle.apps.fnd.sso.Authenticator.<clinit>(Authenticator.java:45)
     ... 38 more
Caused by: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.
     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1286)
     at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:1027)
     at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:583)
     at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:300)
     at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1719)
     at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2266)
     at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2203)
     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2061)
     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1871)
     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1715)
     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1728)
     at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1453)
     at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:170)
     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500)
     ... 58 more
Caused by: oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.AppsException: java.sql.SQLException: Io exception: Got minus one from a read call
     at oracle.apps.fnd.security.AppsConnectionManager.makeGwyuidConn(AppsConnectionManager.java:907)
     at oracle.apps.fnd.security.AppsConnectionManager.getGwyuidConn(AppsConnectionManager.java:966)
     at oracle.apps.fnd.security.AppsConnectionManager.makeGuestConnection(AppsConnectionManager.java:784)
     at oracle.apps.fnd.security.DBConnObj.<init>(DBConnObj.java:228)
     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:494)
     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1273)
     ... 71 more
Caused by: oracle.apps.fnd.common.AppsException: java.sql.SQLException: Io exception: Got minus one from a read call
     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1423)
     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1326)
     at oracle.apps.fnd.security.AppsConnectionManager.makeGwyuidConn(AppsConnectionManager.java:888)
     ... 79 more
Caused by: java.sql.SQLException: Io exception: Got minus one from a read call
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
     at java.sql.DriverManager.getConnection(DriverManager.java:525)
     at java.sql.DriverManager.getConnection(DriverManager.java:140)
     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1410)
     ... 81 more

Issue solved, its due to my mistake i never defined the variable to capture the error message in procedure and also in the security rules i have changed the function to Desktop Integration - Create Document instead of Desktop Integration - Setup Options.

Similar Messages

  • Exception in thread "main" java.lang.ExceptionInInitializerError

    Exception in thread "main" java.lang.ExceptionInInitializerError
    at platinum.logger.XAbstractLogger.setStreams(XAbstractLogger.java:44)
    at platinum.logger.XConsoleLogger.initStreams(XConsoleLogger.java:32)
    at platinum.logger.XConsoleLogger.<init>(XConsoleLogger.java:27)
    at platinum.platinum.main(platinum.java:55)
    Caused by: java.lang.NullPointerException
    at platinum.util.XResourceManager.initResourceBundle(XResourceManager.java:34)
    at platinum.XRepository.<clinit>(XRepository.java:109)
    ... 4 more
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds)
    I get a msg like this wen i try to run my project.
    The code which gives the error is:
    import java.io.*;
    import java.util.*;
    import platinum.*;
    public abstract class XAbstractLogger implements XLogger
         public XAbstractLogger()
              this(XProjectConstants.LOG_MODE_VERBOSE);
         public XAbstractLogger(int log_mode)
              setLogMode( new XLogMode(log_mode) );
         protected void setStreams(PrintStream ps_out, PrintStream ps_err) throws IOException,Exception
              out = ps_out;
              err = ps_err;
              // Log some stuff
         String[] props = {
                   "java.version", "java.vendor", "java.compiler", "os.name",
                   "os.version", "os.arch", "user.home"
              if( !logMode.isOff() )
                   logImpl(XRepository.getLogger(), "When reporting bugs, please include the following information:", MESSAGE, out);
                   logImpl(XRepository.getLogger(), XProjectConstants.PRODUCT_NAME+" version="+XProjectConstants.PRODUCT_VERSION, MESSAGE, out);
                   for( int i=0; i<props.length; i++)
                        logImpl(XRepository.getLogger(), props[i] + "=" + System.getProperty(props), MESSAGE, out);
         public void setLogMode(XLogMode log_mode)
              logMode = log_mode;
         public void addLogException(String log_e, XLogMode log_mode)
              if( !logExceptions_Modes.containsKey(log_e) )
                   logExceptions_Modes.put(log_e, log_mode);
         public void removeLogException(String log_e)
              logExceptions_Modes.remove(log_e);
         public final void message(Object src, Object obj)
              if( logMode.getLogMessages() )
                   logImpl(src, obj, MESSAGE, out);
         public final void debug(Object src, Object obj)
              if( logMode.getLogDebugs() )
                   logImpl(src, obj, DEBUG, out);
         public final void warning(Object src, Object obj)
              if( logMode.getLogWarnings() )
                   logImpl(src, obj, WARNING, err);
         public final void error(Object src, Object obj)
              if( logMode.getLogErrors() )
                   logImpl(src, obj, ERROR, err);
         private void logImpl(Object src, Object obj, int type, PrintStream ps)
              if( ps==null )
                   return;
         String class_name = XRepository.getResourceManager().getClassName(src);
              if( isAnException(class_name, type) )
                   return;
              ps.print("["+getTitle(type)+"-"+class_name+"] ");
              if( obj instanceof Throwable )
                   ((Throwable)obj).printStackTrace(ps);
              else
                   ps.println(obj);
         private boolean isAnException(String str, int type)
         Iterator it = logExceptions_Modes.keySet().iterator();
         String excep_item;
         XLogMode log_mode;
              while( it.hasNext() )
                   excep_item = (String)it.next();
                   log_mode = (XLogMode)logExceptions_Modes.get(excep_item);
                   if( excep_item.equalsIgnoreCase(str) )
                        if( ((type==MESSAGE) && (log_mode.getLogMessages()==false)) ||
                             ((type==DEBUG) && (log_mode.getLogDebugs()==false)) ||
                             ((type==WARNING) && (log_mode.getLogWarnings()==false)) ||
                             ((type==ERROR) && (log_mode.getLogErrors()==false)) )
                        return true;
              return false;
         private String getTitle(int type)
              switch( type )
                   case MESSAGE:
                        return ">Message:";
                   case DEBUG:
                        return ">Debug:";
                   case WARNING:
                        return ">Warning:";
                   case ERROR:
                        return ">Error:";
                   default:
                        return ">??!!";
    // Attributes:
         private static final int MESSAGE = 1;
         private static final int DEBUG = 3;
         private static final int WARNING = 5;
         private static final int ERROR = 7;
         private PrintStream out = null;
         private PrintStream err = null;
         private Map logExceptions_Modes = new HashMap();
         private XLogMode logMode = new XLogMode();

    The code which gives the error is:You have read the stack trace incorrectly and posted the wrong code.... read the trace again:
    at platinum.platinum.main(platinum.java:55)
    Caused by: java.lang.NullPointerException
    at platinum.util.XResourceManager.initResourceBundle(XResourceManager.java:34)
    at platinum.XRepository.<clinit>(XRepository.java:109) Something is throwing null pointer exception in *'platinum.util.XResourceManager.initResourceBundle'* method.
    Thanks!

  • Java.lang.ExceptionInInitializerError ~~~~ AXIS

    Hi I am trying to call my webservice from a web application my code is below:
    public void useService(){
    try{
    HelloService serv = new HelloServiceLocator(); // error thrown here
    Hello test = serv.getHello();
    String msg = test.greet("Hi");
    System.out.println("Reply FROM WEBSERVICE: " + msg);
    catch(Exception e){
    System.out.println("error");
    e.printStackTrace();
    But when this panel loads I get the following error:
    java.lang.ExceptionInInitializerError
    at org.apache.axis.client.Service.<init>Service.java(109)
    When I run it from netbeans it works fine but on the web appilcation I get the above error. I have cached all the required jars etc, pls if sum 1 could help...

    FIXED! You need to put a file called
    commons-logging.properties in your WEB-INF\classes
    directory *. That file should have one line:
    org.apache.commons.logging.LogFactory=org.apache
    .commons.logging.impl.LogFactoryImplThat fixed my problem, and it may fix yours. Good
    luck!
    * Or somewhere where it will be copied to
    WEB-INF\classes. For example, I'm using the IBM
    Rational Software Development Platform, and what
    works for me is to put commons-logging.properties in
    my JavaSource folder so that it gets copied to
    WEB-INF\classes on build.REALLY, I'M DESPERATED!!!!
    PLEASE! HELP! I'm desperated to create a portlet that accesses to .NET web service!! On Portal server 5.0!!! THE SAME AS YOU!!
    PLEASE HELP ME!!! How do you make it? Proxy classes generated with WSAD 5.1.2 doesn't works correctly! If I try to use JNDI I've got this error!!
    javax.naming.NameNotFoundException: Name comp/env/service not found in context "java:".
    when proxy class executes this code:
    simpleWebServiceSoap = ((org.tempuri.SimpleWebService)ctx.lookup("java:comp/env/service/SimpleWebService")).getSimpleWebServiceSoap();
    BUT IF I TRY TO USE without JNDI, using LOCATOR CLASS, I get the same error that you! How you solve this!! Where Can I obtain this file!!!
    commons-logging.properties.
    And What I have to do? To solve My problem!!
    REALLY, I'M DESPERATED!!!!
    And . Why you don't try to use JNDI?

  • Java.lang.ExceptionInInitializerError,Could not instantiate TransactionMana

    hi all,
    <b>i am using SAP Netweaver Developer studio. have problem using hibernate in a EJB Modul Project. i have create a stateless session bean to writie the bussiness logic using my hibernate mapping classes, but somehow i get the error:</b>
    Details: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method createPerson.
         at src.ejb.HibernateLocalLocalObjectImpl0.createPerson(HibernateLocalLocalObjectImpl0.java:407)
         at com.servlet.TestServlet.doPost(TestServlet.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: java.lang.ExceptionInInitializerError
         at src.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:29)
         at src.ejb.HibernateBean.createPerson(HibernateBean.java:158)
         at src.ejb.HibernateLocalLocalObjectImpl0.createPerson(HibernateLocalLocalObjectImpl0.java:391)
         ... 17 more
    Caused by: org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup
         at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:47)
         at org.hibernate.transaction.JTATransactionFactory.configure(JTATransactionFactory.java:48)
         at org.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(TransactionFactoryFactory.java:51)
         at org.hibernate.cfg.SettingsFactory.createTransactionFactory(SettingsFactory.java:401)
         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:129)
         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
         at src.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24)
         ... 19 more
    <b>is there  anybody can tell me why i am getting this error? i was sitting in front of the computer for days now, but could find out where i am doing wrong.
    i have tested my hibernate classes without session beans(in a normal java Project, every thing works fine. and i tried to do exactly what they have done in the HibernateExampleEHCache examples, to combine my hibernate with session beans together, but couldn't get the programm running.  </b>

    Are you sure this is the right value for the class name?
    org.hibernate.transaction.SAPWebASTransactionManagerLookup
    <b>No, i am not sure. i just copied it from a example. but i think i will not need it. so i have deleted them now.</b>
    Looks as well like you have implemented a primary index scheme (next value) that is not supported by your DB ?
    See error on DUAL
    <b>I just used sequence for the primary key in my Person.hbm.xml.  even i change it to native, it comes back with the same error too.</b>
    <b>Person.hbm.xml:</b>
    <class name="src.hibernate.Person" table="TMP_PERSON">
    <id name="id" column="PERSONID">
    <generator class="native"/>
    <b>java class:</b>
    public class Person {
         private Long id;
                    getter and setter
    <b>my method in a stateless session bean:</b>
    public Long createPerson(
              String surname,
              String firstname,
              String tel,
              String email) {
              Session session = null;
              Transaction tx = null;
              try {
                   session = HibernateSessionFactory.openSession();
                   tx = session.beginTransaction();
                   Person aPerson = new Person();
                   aPerson.setSurname(surname);
                   aPerson.setFirstname(firstname);
                   aPerson.setTelNr(tel);
                   aPerson.setEmail(email);
                   Long personId = (Long)session.save(aPerson);
                   tx.commit();
                   return personId;
              } catch (HibernateException e) {
                   if (tx != null)
                        tx.rollback();
                   throw new HibernateException(e);
              } finally {
                   HibernateSessionFactory.closeSession(session);

  • Java.lang.ExceptionInInitializerError question

    Hi, the following two postings were sent to the Programming forum, and we were referred to the Cryptography forum. Any ides on this problem, cryptography gurus?
    This topic has 2 replies on 1 page (Most recent message: Jul 8, 2002 11:27 AM)
    Having a problem with Java Cryptography Extension (JCE)
    Author: dnhll23 Jul 6, 2002 2:11 AM
    Hi, this is my first attempt at using the JCE. I'm using JCE 1.2.1
    and basically all I'm trying to do at this point is encrypt a
    FileInputStream object using the DES standard, with the JCE
    classes. Here is my code Fragment.
    protected FileOutputStream encriptFile(FileInputStream baseFile,
    File encFileName) throws IOException
    try
    // Create the output file for the encrypted document
    FileOutputStream encriptedFile = new FileOutputStream
    (encFileName);
    // Must register the provider that implements the algorithm
    Provider sunJce = new com.sun.crypto.provider.SunJCE();
    Security.addProvider(sunJce);
    char[] pbeKeyData = password.toCharArray();
    PBEKeySpec pbeKeySpec = new PBEKeySpec(pbeKeyData);
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance
    ("DES");
    SecretKey pbeKey = keyFactory.generateSecret(pbeKeySpec);
    Cipher pbe = Cipher.getInstance("DES"); // Same as above.
    pbe.init(Cipher.ENCRYPT_MODE, pbeKey);
    CipherOutputStream cout = new CipherOutputStream
    (encriptedFile, pbe);
    // Use a byte array to write the file output in blocks of 64
    bytes.
    byte[] buffer = new byte[64];
    while (true)
    int bytesRead = -1;
    bytesRead = baseFile.read(buffer);
    if (bytesRead == -1) break;
    cout.write(buffer, 0, bytesRead);
    cout.flush();
    cout.close();
    baseFile.close(); // Close the input file.
    catch (java.security.NoSuchAlgorithmException nsA)
    System.err.println(nsA);
    nsA.printStackTrace();
    catch (java.lang.ExceptionInInitializerError eIIE)
    System.err.println(eIIE);
    eIIE.printStackTrace();
    catch (Exception e)
    System.err.println(e);
    e.printStackTrace();
    My problem arises with the line "SecretKeyFactory keyFactory =
    SecretKeyFactory.getInstance("DES");" This line throws an
    ExceptionInInitializerError and the catch block tells me this
    java.lang.ExceptionInInitializerError
    java.lang.ExceptionInInitializerError: java.lang.SecurityException:
    Cannot set up certs for trusted CAs
    (The rst of the stackCall here)...
    From what I've read in the documentation, I need to have a provider
    set up that handles the SecretKeyFactory and encryption algorithms,
    but the documentation also says that the SunJCE provider that I set
    up near the start of my method should have been able to handle this.
    Is there anyone out there with expeience doing this kind of thing
    that can help.
    Thanks
    Re: Having a problem with Java Cryptography Extension (JCE)
    Author: mutmansky
    In Reply To: Having a problem with Java Cryptography Extension (JCE) Jul 8, 2002 11:22 AM
    Reply 1 of 2
    Have you figured out an answer to this problem yet? I'm having a very similar problem. I'm running an applet that needs to decrypt information that it is retrieving from CORBA and I'm getting the following exception:
    java.lang.ExceptionInInitializerError
    at javax.crypto.Cipher.getInstance(DashoA6275)
    at CorbaDecrypt.doDecryption(CorbaDecrypt.java:132)
    at EventChannelListener.run(EventChannelListener.java:325)
    Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs: java.lang.SecurityException: Cannot verify jar:file:C:/PROGRA~1/Java/J2RE14~1.0_0/lib/security/local_policy.jar!/
    at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    ... 3 more
    I'm using JDK 1.4 so, there's no need for my code to have the two Provider setup lines, but otherwise my code looks much the same as yours. The code works fine when run in a test app on the server, but not in the Applet. The file that it's looking to verify (local_policy.jar) does not exist, and I don't want to create one manually, because my users would have to do that then too, which is unacceptable. I am using a trusted applet, so I'm not sure what more I can do to grant the applet the proper permissions. Does anyone have any ideas what we need to do here?
    Thanks.
    Steve

    Hi all --
    I'm have the same problem as the initially posted question. I'm using JDK 1.3.03 and I get the following excepion:
    Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot set up certs for trusted CAs
    at javax.crypto.b.<clinit>([DashoPro-V1.2-120198])
    at javax.crypto.SecretKeyFactory.getInstance([DashoPro-V1.2-120198])
    at PasswordEncoder.encrypt(PasswordEncoder.java:28)
    at PasswordEncoder.main(PasswordEncoder.java:89)
    I've followed all the instructions for installation and configuration in the JCE User's Guide.
    Any suggestions?
    Thanks all.
    Niran

  • Java.lang.ClassCastException while creating array descriptor

    ( This post was moved from SQL / PLSQL forum to here )
    Hi everyone, i used to pass string array from java to plsql. I wrote a java source, then i load db with loadjava. And i wrote java spec. Then i run the function but i am getting this error :
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    My Java Source is :
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    public class SplitterOracle3 {
    public static oracle.sql.ARRAY tokens2(String str,String delim)
    try
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Connection conn = new OracleDriver().defaultConnection( );
    OracleDriver ora = new OracleDriver();
    OracleConnection conn = (OracleConnection) ora.defaultConnection();
    //ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("MY_ARRAY", ((conn).getRealConnection());
    //Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    //Connection conn = ((DelegatingConnection) getDataSource().getConnection()).getInnermostDelegate();
    // get an initial context
    //OracleConnection oracleConnection = (OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection) wsConn);
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);
    String strarr[] = new String[47];
    strarr[0]="ahmet";
    strarr[1]="mehmet";
    int curIndex = 0;
    int nextIndex = 0;
    boolean nextIsLastToken = false;
    int i=0;
    while (true)
    nextIndex = str.indexOf(delim, curIndex);
    if (nextIsLastToken)
    //return false;
    break;
    if (nextIndex == -1)
    nextIsLastToken=true;
    nextIndex = str.length();
    strarr[i] = str.substring(curIndex, nextIndex);
    curIndex = nextIndex + 1;
    i++;
    ARRAY dirArray = new ARRAY(arraydesc, conn, strarr);
    return dirArray;*/
    catch(Exception ex)
    System.err.println(ex.getMessage());
    ex.printStackTrace();
    return null;
    public static void main(String[] args)
    String str="2000,2,123553168,1,10,64895,65535,27662,64860,64895,65535,27662,64860,0,,,,,,0,0,2491039806,,,,,,,,,0,0,1,,2491039106,,,,,,,,,,,,";
    String strarr[] = new String[47];
    long l1,l2;
    int j=0;
    l1 = System.currentTimeMillis();
    for ( int i=0; i<20000000; i++)
    strarr = tokens2(str,",");
    l2 = System.currentTimeMillis();
    System.out.println("Fark :"+ (l2-l1));
    The line has "ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);" causes this error.
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    But i could not find the solution. Can you help me?
    Thanks for responses.

    Hi,
    Did you try my suggestion from Re: java.lang.ClassCastException while create array descriptor
    Try replacing
    oracle.jdbc.driver.OracleConnectionwith
    oracle.jdbc.OracleConnectionRegards
    Peter

  • Java.lang.ExceptionInInitializerError

    I am trying to create a link to another system from an existing application developed on Oracle9i JDeveloper 9.0.2.822 using java version 1.3.1_02.
    This uses an API provided by the Vendor of the target system (webMethods 6.1) which uses the entrust libraries.
    I have successfully created a client class which successfully connects to the target system and returns data when run as a standalone class.
    C:\oracle9iDev\ora92\jdk\bin\javaw.exe -hotspot -classpath C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\classes;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\client.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entbase.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entcertlist.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entcms.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entjsse.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entmisc.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entnsext.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entp10.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entp11.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entp12.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entp5.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entp7.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entroaming.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entserverlogin.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entsmime.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entsmimev3.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entssl.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\enttunnel.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entuser.jar;C:\TrueChange\conMSD_V83663\MSD\Code\MSDWorkspace\Project\public_html\WEB-INF\lib\entrust\entxml.jar;C:\oracle9iDev\ora92\jdev\lib\jdev-rt.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jmt.jar;C:\oracle9iDev\ora92\BC4J\lib\collections.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jct.jar;C:\oracle9iDev\ora92\lib\xmlparserv2.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jndi.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jdomorcl.jar;C:\oracle9iDev\ora92\BC4J\jlib\bc4jdatum.jar;C:\oracle9iDev\ora92\jdbc\lib\classes12.jar;C:\oracle9iDev\ora92\jdbc\lib\nls_charset12.jar;C:\oracle9iDev\ora92\jlib\jdev-cm.jar;C:\oracle9iDev\ora92\j2ee\home\lib\ojsp.jar;C:\oracle9iDev\ora92\j2ee\home\lib\ojsputil.jar;C:\oracle9iDev\ora92\j2ee\home\oc4j.jar;C:\oracle9iDev\ora92\lib\servlet.jar;C:\oracle9iDev\ora92\jdev\lib\ojc.jar;C:\oracle9iDev\ora92\j2ee\home\oc4j.jar;C:\oracle9iDev\ora92\lib\servlet.jar;C:\oracle9iDev\ora92\lib\xmlparserv2.jar;C:\oracle9iDev\ora92\lib\xmlcomp.jar;C:\oracle9iDev\ora92\BC4J\jlib\bc4jtester.jar;C:\oracle9iDev\ora92\jlib\jdev-cm.jar;C:\oracle9iDev\ora92\lib\xmlparserv2.jar;C:\oracle9iDev\ora92\jlib\help4-nls.jar;C:\oracle9iDev\ora92\jlib\help4.jar;C:\oracle9iDev\ora92\jlib\share.jar;C:\oracle9iDev\ora92\jlib\jewt4-nls.jar;C:\oracle9iDev\ora92\jlib\jewt4.jar;C:\oracle9iDev\ora92\jlib\oracle_ice5.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jmtejb.jar;C:\oracle9iDev\ora92\j2ee\home\ejb.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jndi.jar;C:\oracle9iDev\ora92\j2ee\home\oc4j.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jct.jar;C:\oracle9iDev\ora92\BC4J\lib\bc4jctejb.jar;C:\oracle9iDev\ora92\BC4J\lib\collections.jar;C:\oracle9iDev\ora92\j2ee\home\ejb.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jndi.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\activation.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jcert.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jndi.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jnet.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\jta.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\mail.jar;C:\oracle9iDev\ora92\j2ee\home\ejb.jar;C:\oracle9iDev\ora92\j2ee\home\jaxp.jar;C:\oracle9iDev\ora92\j2ee\home\jdbc.jar;C:\oracle9iDev\ora92\j2ee\home\jaas.jar;C:\oracle9iDev\ora92\j2ee\home\jsse.jar;C:\oracle9iDev\ora92\soap\lib\soap.jar;C:\oracle9iDev\ora92\lib\xmlparserv2.jar;C:\oracle9iDev\ora92\jlib\javax-ssl-1_2.jar;C:\oracle9iDev\ora92\jlib\jssl-1_2.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\activation.jar;C:\oracle9iDev\ora92\jdk\jre\lib\ext\mail.jar;C:\oracle9iDev\ora92\j2ee\home\lib\http_client.jar -Dhttp.proxyHost=http -Dhttp.proxyPort=//PROXY:80 com.webMethods.GetAltoDetails
    Context context = null; context = new Context(); Instance of Context created No of details = 2
    Details[0] CountyText = Merseyside
    Details[1] CountyText = Merseyside Process exited with exit code 0.
    However, when invoke the class from withing the J2EE applicationI get the following error message when it tries to create an instance of the class 'Context':
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    C:\oracle9iDev\ora92\jdk\bin\javaw.exe -hotspot -classpath C:\oracle9iDev\ora92\j2ee\home\oc4j.jar -Dhttp.proxyHost=http -Dhttp.proxyPort=//PROXY:80 com.evermind.server.OC4JServer -config C:\oracle9iDev\ora92\jdev\system\oc4j-config\server.xml
    [waiting for the server to complete its initialization...]
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    Target URL -- http://10.45.4.28:8988/msd/Login/Login.jsp
    Context context = null;
    context = new Context();
    Caught ExceptionInInitializerError
    null
    java.lang.ExceptionInInitializerError: java.lang.SecurityException: Self-Integrity Check FAILED: java.lang.SecurityException: java.security.PrivilegedActionException <<java.util.zip.ZipException: error in opening zip file>>      at com.entrust.toolkit.security.provider.JCEVerifierImpl.checkIntegrity(Unknown Source)      at com.entrust.toolkit.security.provider.Entrust.<init>(Unknown Source)      at com.wm.app.b2b.client.BaseContext.<clinit>(BaseContext.java:109)
         at MSD.OrderProcessingCTL.getAltoDetailsFromWebservice(OrderProcessingCTL.java:1795)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.framework.BaseRouterServlet.invokeControllerMethod(BaseRouterServlet.java:283)
         at com.framework.BaseRouterServlet.doPost(BaseRouterServlet.java:127)
         at com.framework.BaseRouterServlet.doGet(BaseRouterServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:684)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Any ideas why this happening?

    I've managed to fix this myself now.
    It turned out to be a classpath issue. The J2EE application cannot find 'com.wm.app.b2b.client.Context' when it tries to create an istance of it.
    I resolved it by putting the client.jar and entrust folder in the the $JAVA_HOME\jre\lib\ext folder instead of ..\WEB-INF\lib.
    The following document is very revealing:
    http://www.oracle.com/technology/tech/java/oc4j/pdf/ClassLoadingInOC4J_WP.pdf

  • Idlj error - java.lang.ExceptionInInitializerError:

    I got the following error while using idlj with an IDL file as argument (no option). Anyone has any idea?
    Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.NullPointerException
    at com.sun.tools.corba.se.idl.Util.getDefaultMessage(Util.java:231)
    at com.sun.tools.corba.se.idl.Util.getMessage(Util.java:191)
    at com.sun.tools.corba.se.idl.Token.<clinit>(Token.java:267)
    at com.sun.tools.corba.se.idl.Parser.parse(Parser.java:123)
    at com.sun.tools.corba.se.idl.Compile.parse(Compile.java:258)
    at com.sun.tools.corba.se.idl.toJavaPortable.Compile.start(Compile.java:152)
    at com.sun.tools.corba.se.idl.toJavaPortable.Compile.main(Compile.java:133)

    I've encountered the same problem when the target directory does not prexist. Do you have enclosing modules in your IDL? You may try pre-creating these directories.

  • Java.lang.thread exception while using Xalan 2.0 in WLS 6.0

    Hi, I'm trying to use Xalan 2.0 in a servlet hosted by WLS. Ive
    modified Xalan's SimpleTransform sample to be a servlet. I
    create a Transformer with the .xsl, then call tranform() to
    print the tranformed xml to the response stream. The xml is
    tranformed correctly, but it throws a java.lang.thread
    exception. The standalone Xalan sample doesn't do this. Anyone
    else seen this problem?
    Here's the code of interestest, I apologize if its not formatted very well:
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException
         PrintWriter out = res.getWriter();
         res.setContentType("text/html");
         out.println("<html><head><title>XalanTest<title></head>");
         out.println("<body><h1>XalanTest</h1>");
         try{
         TransformerFactory tFactory = TransformerFactory.newInstance();
         StreamSource ss = new StreamSource("file:\\\\My-path\\birds.xsl");
         Transformer transformer = tFactory.newTransformer(ss);
         StreamResult SR = new StreamResult(out);
         transformer.transform(new StreamSource("file:\\\\My-path\\birds.xml"), SR );
         catch(Exception e){
         out.println("<p>" + e.toString() + "</p>");
         e.printStackTrace(out);
         out.println("<p>Exception</p>");
              out.println("</body></html>");

    It also looks like the workaround suggested does not work.
    I put the following code as workaround:
         response.setContentType("text/html");
         response.setHeader ("Pragma", "no-cache");
         Transformer transformer;
         TransformerFactory factory = TransformerFactory.newInstance();
         String stylesheet = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.xsl";
         String sourceId = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.xml";
         String outputFile = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.html";
         String outputDirectFile = "config\\closs\\applications\\webroot\\jsp\\example\\Load2_Direct.html";
         try
              PrintWriter fout = new PrintWriter (new FileOutputStream (outputFile));
              OutputStream os = new ByteArrayOutputStream();
              transformer = factory.newTransformer(new StreamSource(stylesheet));
              transformer.transform(new StreamSource(sourceId), new StreamResult(outputDirectFile));
              transformer.transform(new StreamSource(sourceId), new StreamResult(os));
              os.flush ();
              os.close();
              out.print(os.toString());
              fout.print (os.toString ());
              fout.flush ();
              fout.close ();
         catch (Exception e)
              // Error Handler
         e.printStackTrace();
    The two .html files produced look exactly the same, which is good.
    However, the screen output to my html browser (Internet Explorer 5.50 sp1) produces
    different output.
    That is strange, but that shows that this bug does not have a known workaround
    "Rabinowitz" <[email protected]> wrote:
    >
    I have the same problem with java sun xml parser (jaxp 1-1)
    It is interesting to know that all this perfectly works under weblogic
    5.1, so
    I cannot migrate my application to 6.0
    So, the functionality of weblogic 6.0 degraded since 5.1.
    I cannot buy the explanation that that is not bea's fault, because it
    perfectly
    worked with the same version of xml parser.
    Now, their customer support is saying they have not decided whether this
    is a
    bug or a feature.
    Interesting to know that degradation of functionality could be a feature!
    It is now June 21, 3 months since this bug was reported, sp2 was shipped
    since
    that time, and this bug is still there.
    "Chuck H. Zhao" <[email protected]> wrote:
    I am having the exact same problem you are having. If we analyze the
    stack
    trace:
    javax.xml.transform.TransformerException: java.lang.Thread
    at
    org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1212)
    at
    org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
    at java.lang.Thread.run(Thread.java:484)
    java.lang.ClassCastException: java.lang.Thread
    at
    weblogic.servlet.internal.ResponseHeaders.setDateHeader(ResponseHeaders.java
    :273)
    at
    weblogic.servlet.internal.ServletResponseImpl.setDateHeader(ServletResponseI
    mpl.java:449)
    at
    weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseIm
    pl.java:637)
    at
    weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamI
    mpl.java:124)
    at
    weblogic.servlet.internal.WLOutputStreamWriter.flush(WLOutputStreamWriter.ja
    va:124)
    at java.io.PrintWriter.flush(PrintWriter.java:120)
    at
    org.apache.xalan.serialize.SerializerToXML.flushWriter(SerializerToXML.java:
    1431)
    at
    org.apache.xalan.serialize.SerializerToXML.endDocument(SerializerToXML.java:
    629)
    at
    org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
    ..java:180)
    at
    org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1194)
    at
    org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
    at java.lang.Thread.run(Thread.java:484)
    What happened is: to support incremental output, Xalan-Java performs
    the
    transformation in a second thread while building the source tree inthe
    main
    thread. So Transformer.transform() creates a new thread to run the
    transformer.run() method, which will write to weblogic's internal
    ServletOutputStreamImpl, and in the end calls flush() on it.
    ServletOutputStreamImpl determines that the headers haven't been written
    yet, and the headers need to be written before any servlet output, so
    it
    calls ServletResponseImpl.writeHeaders(), which eventually calls
    ResponseHeaders.setDateHeader(). The last method assumes the thread
    is
    weblogic's internal ExecuteThread and tries to cast the thread as such,
    maybe to get the date from it. But the thread is a plain java.lang.Thread
    created by xalan, thus we get the java.lang.ClassCastException:
    java.lang.Thread
    This suggests a second workaround: call ServletResponse.flushBuffer()
    before any xalan stuff, which will force the headers to be written in
    weblogic's ExecuteThread. The shortcoming of this is that this will
    cause
    the response to be commited, and if the xalan stuff throws exception
    you can
    not forward to another page.
    Another thing is that xalan should not directly call flush() on
    ServletOutputStreamImpl at all. I will report it to xalan and see if
    they
    consider that a bug. If they fix that then we have a third workaround:
    set
    the buffer size of ServletResponse big enough to accomodate everything
    including the xslt outputs, so the ServletOutput does not need to be
    flushed
    during xalan code.
    I do not consider this problem a weblogic bug, since the servlet container
    has to right to expect any thread inside it to be its own. Serlvet2.2
    spec
    says:
    1.2 What is a Servlet Container?
    A Servlet Container may place security restrictions on the environment
    that
    a servlet executes in. In
    a Java 2 Platform Standard Edition 1.2 (J2SE) or Java 2 Platform Enterprise
    Edition 1.2 (J2EE)
    environment, these restrictions should be placed using the permission
    architecture defined by Java 2
    Platform. For example, high end application servers may limit certain
    action, such as the creation of
    a Thread object, to insure that other components of the container are
    not
    negatively impacted.
    Weblogic should explicitly warn the developers that creating threads
    inside
    the servlet container may have adverse effects, the same kind of problem
    we
    are having. (or maybe they already did somewhere in their documentation?)
    On the xalan side, I would suggest them to either give the option to
    switch
    the two threads, or to give the option to buffer the output and write
    it out
    in the main thread, which is exactly what you did in your first workaround.
    Any comments or thoughts on the subject are welcome.
    -- Chuck Zhao
    "MK Parini" <[email protected]> wrote in message
    news:[email protected]...
    I found, what I think to be a bug, and a work-around for it.
    When doing an XSLT Transformation, you must specify a StreamResult
    to which to write the output. I was doing my transformation in
    a
    servlet so I was writing my output to the HttpResponse
    (The variable res is a javax.servlet.http.HttpServletResponse
    object)
    StreamResult htmlTarget = new StreamResult(res.getWriter());
    If I use this, when I perform the transformation using the TRAX
    APIs,
    InputStream xslFile = context.getResourceAsStream(fileName);
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Templates xslTemplates = tFactory.newTemplates(new StreamSource(xslFile));
    transformer = xslTemplates.newTransformer();
    transformer.transform(xmlSource, htmlTarget);
    I receive the ClassCastException from the class
    weblogic.servlet.internal.ResponseHeaders.setDateHeader(ResponseHeaders.java
    :273),
    as seen in my previous posting.
    I discovered, if I write my output to a StringBuffer, and then
    I write
    the StringBuffer to the HttpResponse, I do not get the ClassCastException.
    For example,
    StringWriter myWriter = new StringWriter(2400);
    StreamResult htmlTarget = new StreamResult(myWriter);
    <Same transformation code as above>
    myWriter.close();
    PrintWriter out = res.getWriter();
    out.print(myWriter.toString());
    Is this a bug in the weblogic internal servlet class or am I just
    missing something?
    Also, one concern that I have with the workaround is that it might
    hurt performance.
    Any comments or thoughts on the subject are welcome.

  • Java.lang.ClassNotFound Exception whenever I include .send()

    Everything runs fine, but when I add the .send(message); [it is in bold] I get a java.lang.ClassNotFound Exception.
    It still compiles, it just won't allow me to launch the program in the emulator. If I take that one piece of code out, everything runs fine again. I've been messing with it, and searching for a long time in an attempt to solve the problem but I've yet to come across a solution.
    I'm also using Bluej
    import java.io.*;
    import java.lang.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;//Add SMS text, Map selection (upload image/altitude-scale)
    import javax.microedition.lcdui.Font;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.wireless.messaging.*;
       public class cardcanvas extends GameCanvas implements Runnable, CommandListener {
        Image i, Mortar, Target, paintballcharleston, selectimg, Cursor;
        SendSMS sendtext;
        Thread t = new Thread(this);
        Command cmdfire=new Command("Fire", Command.BACK, 1 );
        Command cmdreset=new Command("Reset", Command.ITEM, 2 );
        String text, message;
        static Image Map;
        MessageConnection messageConnection;
        TextMessage textMessage;
        int mortarX=5500, mortarY=5500, targetX=5500, targetY=5500, distanceX, distanceY, delay, mapx=-250, mapy=-250, xvel=115, yvel=130, gameAction=0, timer=0;
        double A, B, C, b, degreeX, degreeY, degreeV, voltageX, voltageY, scale=1.4235, findDegree=90;//get scale of pixel:realtime feet
        boolean paintdown=false, paintup=false, paintright=false, paintleft=false, left, finish, firemor, initiate, click, bottom=true, noYdegree, reset, sms=false;
        public cardcanvas(){
            super(false);
            this.addCommand(cmdfire);
            this.addCommand(cmdreset);
            this.setCommandListener(this);
        public void intit() {}
        public void start() {
            t.start() {}
        public void run()
            try{
                while(true)
                    if(paintright) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel+5;
                        if(timer>=4&&timer<6) xvel=xvel+10;
                        if(timer>=6) xvel=xvel+20;
                    if(paintleft) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel-5;
                        if(timer>=4&&timer<6) xvel=xvel-10;
                        if(timer>=6) xvel=xvel-20;
                    if(paintup) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel-5;
                        if(timer>=4&&timer<6) yvel=yvel-10;
                        if(timer>=6) yvel=yvel-20;
                    if(paintdown) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel+5;
                        if(timer>=4&&timer<6) yvel=yvel+10;
                        if(timer>=6) yvel=yvel+20;
                    if(mapy<-320) mapy=-320;
                    if(mapx>0) mapx=0;
                    if(mapy>0) mapy=0;
                    if(mapx>197) mapx=197;
                    if(xvel>225)
                        mapx=mapx-5;
                        targetX=targetX-5;
                        mortarX=mortarX-5;
                        xvel=225;
                    if(xvel<5)
                        mapx=mapx+5;
                        targetX=targetX+5;
                        mortarX=mortarX+5;
                        xvel=5;
                    if(yvel>260)
                        mapy=mapy-5;
                        targetY=targetY-5;
                        mortarY=mortarY-5;
                        yvel=260;
                    if(yvel<5)
                        mapy=mapy+5;
                        targetY=targetY+5;
                        mortarY=mortarY+5;
                        yvel=5;
                        if(reset) {
                            mapx=-250;
                            mapy=-250;
                            xvel=115;
                            yvel=130;
                            left=false;
                            firemor=false;
                            finish=false;
                            initiate=false;
                            click=false;
                            bottom=true;
                            noYdegree=false;
                            reset=false;
                            targetX=5500;
                            targetY=5500;
                            mortarX=5500;
                            mortarY=5500;
                            A=0;
                            B=0;
                            C=0;
                            b=0;
                            degreeX=0;
                        if(initiate) {
                           distanceX=targetX-mortarX;
                           distanceY=targetY-mortarY;
                           A=distanceY;
                           B=distanceX;
                               if(distanceY<0)
                                    A=distanceY*-1;
                                    bottom=false;
                               if(distanceX<0)
                                    B=distanceX*-1;
                                    left=true;
                            A=A*scale;
                            B=B*scale;
                            C=Math.sqrt((A*A)+(B*B));
                                while(((A*(Math.tan(b)))<B+.00002))
                                    b=b+.0001;
                            b=b*180/3.1415926535897932384626435;
                            degreeX=b;
                                if(bottom)
                                    b=90-b;
                                    b=b+90;
                                    degreeX=b;
                                if(left)
                                    degreeX=360-b;
                            initiate=false;
                            text=("DegreeX is "+degreeX+" Range is "+C);
                             sendTextMessage();
                     verifyGameState();
                     paint(getGraphics());
                     Thread.currentThread().sleep(1);
                catch (Exception E) {}
        private void verifyGameState() {}
        public void sendTextMessage()
            try
                String message = " ";
                MessageConnection messageConnection = (MessageConnection)Connector.open("sms://18433036060");
                TextMessage textMessage = (TextMessage)messageConnection.newMessage(
                        MessageConnection.TEXT_MESSAGE, "18433036060");
                textMessage.setPayloadText(message);
                *messageConnection.send(textMessage);*
            catch (Exception e) {}
    }If I remove messageConnection.send(texstMessage); the error is gone.
    Thanks in advance for your time

    cardmidlet:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import java.io.IOException;
    import java.lang.*;
    public class cardmidlet extends MIDlet implements CommandListener {
        private Display display; Display map;
        cardmidlet midlet;
        private Form form; Form mapselection;
        private List menuList ;
        String[] elements=new String[]{"Initiate Program","Select Map","Help","About"};
        private Command selectCommand;
        Alert alert;
            private Command fnext=new Command("NEXT",Command.ITEM,1);
            private Command fback=new Command("BACK",Command.BACK,1);
            private Command mapnext=new Command("Next",Command.ITEM,1);
        private TextField uname; TextField mapchoice;
        public String nname, nmap;
        cardcanvas cd;
        protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
        protected void pauseApp() {
        public cardmidlet() {
             menuList();
             cd = new cardcanvas();
        public void menuList(){
             display = Display.getDisplay(this);
             menuList = new List("Menu", List.IMPLICIT, elements, null);
             selectCommand=new Command("open",Command.ITEM,1);
             menuList.setSelectCommand(selectCommand);
             menuList.setCommandListener(this);  
        protected void startApp() throws MIDletStateChangeException {
            display.setCurrent(menuList);
        public void about(){
            alert = new Alert("Option Selected", "This program is created by"+"\n"+" Chris Furlong.", null, null);
              alert.setTimeout(Alert.FOREVER);
              alert.setType(AlertType.INFO);
              display.setCurrent(alert);
        public void help() {
            alert = new Alert("Option Selected", "Use the 4 d-pad keys to move the cursor. Press the center button once to select the mortar position, and a second time to select the target position. When both the mortar and the target are on screen, press the upper left key to begin the firing process. If you place one on the map by mistake, simply reset the program with the upper right key and start over.", null, null);
            alert.setTimeout(Alert.FOREVER);
            alert.setType(AlertType.INFO);
            display.setCurrent(alert);
        public void InitiateProgram(){
            display=Display.getDisplay(this);
            uname=new TextField("Enter your name","",50,TextField.ANY);
            form =new Form("New User");
            form.append(uname);
            form.addCommand(fnext);
            form.addCommand(fback);
            form.setCommandListener(this);
            display.setCurrent(form);
        public void selectmap()
           /* display=map.getDisplay(this);
            mapchoice=new TextField("Enter Map Name","",50,TextField.ANY);
            mapselection=new Form("Map Selection");
            mapselection.append(mapchoice);
            mapselection.addCommand(mapnext);
            mapselection.addCommand(fback);
            mapselection.setCommandListener(this);
            display.setCurrent(mapselection);*/
            display = map.getDisplay(this);
            map choose=new map();
        public String name(){
            nname=uname.getString();
            return nname;
    /*   public String mapname() {
            nmap=mapchoice.getString();
            return nmap;
        public void commandAction(Command com, Displayable arg1) {
             if(com==selectCommand)
                if(menuList.getSelectedIndex()==3)
                    about();
                if(menuList.getSelectedIndex()==2)
                    help();
                if(menuList.getSelectedIndex()==1)
                    selectmap();
                if(menuList.getSelectedIndex()==0)
                    InitiateProgram();
            if(com==fback)
                display.setCurrent(menuList);
            if(com==fnext){
                display = Display.getDisplay(this);
                cd.start();
                display.setCurrent(cd);
            if(com==mapnext)
                display = map.getDisplay(this);
                map choose=new map();
                display.setCurrent(choose);
    }

  • Exception creating new Poolable object

    Hi All
    I have installed jdeveloper 12.1.2 and when running the hello world page iam getting this error....pls advice
    *500 Internal Server Error*
    oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509)     at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)     at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294)     at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149)     at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072)     at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595)     at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)     at oracle.apps.fnd.common.WebAppsContext.<init>(WebAppsContext.java:1140)     at oracle.apps.fnd.common.WebRequestUtil.validateContext(WebRequestUtil.java:225)     at OAErrorPage.jspService(_OAErrorPage.java:62)     [OAErrorPage.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:847)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:813)     at runregion.jspService(_runregion.java:193)

    Hi kali....
    yes i have downloaded<<Patch 9172975>> 10G JDEVELOPER WITH OA EXTENSION ARU FOR R12.1 RUP2..and got the latest .dbc file now from dba...now iam getting.......
    Exception Details.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: PASSWORD_INVALID.
         at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(Unknown Source)
         at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(Unknown Source)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(Unknown Source)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(Unknown Source)
         at runregion.jspService(_runregion.java:132)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    althogh i have created new user......and assigned the responsibility.....
    select fnd_web_sec.validate_login('TEST_USER','TEST@123') from dual;
    vaue is 'Y'
    select fnd_web_sec.validate_login('GUEST','ORACLE') from dual;
    vaue is 'Y'
    PLS ADVISE....

  • I get java.lang.ExceptionInInitializerError

    Here is the code:
    public class m2q8 {
    static int[] a;
    static { a[0]=2; }
    public static void main( String[] args) {}
        }java.lang.ExceptionInInitializerError
    Caused by: java.lang.NullPointerException
    at m2q8.<clinit>(m2q8.java:3)
    Could not find the main class: m2q8. Program will exit.
    Exception in thread "main"
    Process completed.
    I don't get it...

    JavaMessi wrote:
    how would the code looks like if I want to initialize it first?It does not matter - you never use it.
    public class M2q8 {
        static int[] A;
        static { A = new int[]{2}; /* A[0]=2; */ }
        public static final void main(final String[] arg) {
            System.out.println(java.util.Arrays.toString(A));
    JavaMessi wrote: [in reply 15|http://forums.sun.com/thread.jspa?messageID=11014537#11014537]
    I need to take the scjp test You need to review your career options.

  • Java.lang.outofmemory exception

    Hello,
    I have an application, that writes several thousands of records into a file and transfers the same to the server. I am encountering an exception "java.lang.OutOfMemoryError" exception.
    I had checked this forum earlier and found a solution that recommended an increase in the memory slot allocated to the JVM. Despite, an increase in this slot from 256MB (eclipse's default) to 1024 MB, my problem still persists. I had updated the eclipse.ini field from "-vmargs -Xms40m -Xmx256m" to "-vmargs -Xms40m -Xmx1024m". Is there anything else that I need to do, to take care of this problem? I am using green threads in the application, does this have anything to do with the above mentioned exception?
    Thanks!

    I am using
    green threads in the application, does this have
    anything to do with the above mentioned exception?It wouldn't be hard to find out. Create a new java class where the main method does the same work; writing several thousands of records into a file and transferring it to the server.
    Maybe it's all the other variables you have in your application that are cutting into the memory. But can you really reduce them?
    Are you loading all thousands of records to memory (I'd imagine in a hashmap or a list) all at once? Like said, do this in smaller chunks, store the records in memory just one at a time and see if that works. It will be slow but it won't run out of memory. Then increase your "batch size" until you find the optimum.

  • Problem using JFreechart. What is java.lang.ExceptionInInitializerError?

    Hi
    I am using the JFreechart APIs to make a graph.I have been able to create a CategoryDataSet. But when i try to create a chart using the createBarChart function, I get the following errors:
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at org.jfree.chart.ChartFactory.createBarChart(ChartFactory.java:823)
            at StackedBarChartTest.createChart(StackedBarChartTest.java:96)
            at StackedBarChartTest.<init>(StackedBarChartTest.java:35)
            at StackedBarChartTest.main(StackedBarChartTest.java:161)
    Caused by: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.plot.LocalizationBundle, locale en_US
            at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1508)
            at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1262)
            at java.util.ResourceBundle.getBundle(ResourceBundle.java:717)
            at org.jfree.chart.plot.CategoryPlot.<clinit>(CategoryPlot.java:278)
            ... 4 moreThis is how I am trying to create the chart
    JFreeChart chart = ChartFactory.createBarChart("Bar Chart Demo", "Category", "Value", dataset, PlotOrientation.VERTICAL, true, true, false                   );

    What is java.lang.ExceptionInInitializerError?{color:0000ff}http://java.sun.com/javase/6/docs/api/java/lang/ExceptionInInitializerError.html{color}
    db

  • Cryptix java.lang.ExceptionInInitializerError

    Hi again,
    I've changed my package to cryptix32 to avoid the java.lang security error I had with cryptix31.
    My code is:
    try {
    Security.addProvider(new Cryptix());
    catch (Exception e) {
    %>Eccezione: <%=e%><%
    java.lang.ExceptionInInitializerError
    java.lang.ExceptionInInitializerError at cryptix.provider.Cryptix.getVersionAsDouble(Cryptix.java:115) at cryptix.provider.Cryptix.(Cryptix.java:93) at jsp_servlet._ep.__cookie._jspService(cookie.jsp:46) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.lang.Exception: privileges unsupported at netscape.security.PrivilegeManager.enablePrivilege(PrivilegeManager.java:41) at cryptix.CryptixProperties.setProperties(CryptixProperties.java:443) at cryptix.CryptixProperties.(CryptixProperties.java:414) ... 15 more
    and if i refresh the page I get this error:
    java.lang.NoClassDefFoundError
    java.lang.NoClassDefFoundError at cryptix.provider.Cryptix.getVersionAsDouble(Cryptix.java:115) at cryptix.provider.Cryptix.(Cryptix.java:93) at jsp_servlet._ep.__cookie._jspService(cookie.jsp:46) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Thanks in advance.

    Hi,
    Thanks for your replies, to get around the permission problem, I had to login as SYS and do the following:
    call dbms_java.grant_policy_permission('REPORTER', 'SYS', 'java.security.SecurityPermission', '*');
    After doing this, the next road block was the missing path to the cryptix properties file and that was resolved by loading the entire cryptix jar file.

Maybe you are looking for