OCI, java.lang.ArithmeticException: / by zero

Hi,
Could someone help me with this?
I'm using OCI driver, because database character set is user-defined.
There is no problem with connection, but if I open any database objects list or execute any statement I've got this exception:
Oracle SQL Developer 1.5.5:
java.lang.ArithmeticException: / by zero
     at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1245)
     at oracle.jdbc.driver.OracleCallableStatement.<init>(OracleCallableStatement.java:100)
     at oracle.jdbc.driver.T2CCallableStatement.<init>(T2CCallableStatement.java:103)
     at oracle.jdbc.driver.T2CDriverExtension.allocateCallableStatement(T2CDriverExtension.java:96)
     at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:3430)
     at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:3377)
     at oracle.dbtools.db.DBUtil.executeReturnOneCol(DBUtil.java:275)
     at oracle.dbtools.raptor.InitializeConnectionListener.initConnection(InitializeConnectionListener.java:137)
     at oracle.dbtools.raptor.InitializeConnectionListener$1.run(InitializeConnectionListener.java:85)
Oracle SQL Developer 2.1.1.64:
Level Sequence Elapsed Message
SEVERE     99     2448498          / by zero
I dig into JVM using VisualVM and find out that oracle.jdbc.driver.T2CConnection.conversion (DBConversion.java) has property sMaxCharSize=0.
When I'm connecting to other DB (wihtout user defined charset) this property has value 1 and everything is ok.
Other DB tools like Squirell SQL, PL/SQL Developer works fine so maybe there is a bug in Oracle SQL Developer?.

This seems more like a bug in the JDBC driver than in SQL Developer itself.
Try replacing the JDBC driver in SQLDEVELOPER_INSTALL_DIR\jdbc\lib with the very latest version from OTN.
You may also want to try upgrading your OCI client to latest and if you still got the problem then better raise a SR on Metalink/MOS if you have a DB support contract.

Similar Messages

  • Error: java.lang.ArithmeticException: / by zero on SQLDEVELOPER

    Hello, I have SQLdevoleper 3.1, Java JDK 1.6.0.30. Connect to Oracle data base 10g is successfully. But when i open a table, i receive the following:
    java.lang.ArithmeticException: / by zero
         at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1291)
         at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:29)
         at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:67)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3523)
         at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3409)
         at oracle.dbtools.raptor.controls.grid.OracleRSTModel.prepareStatement(OracleRSTModel.java:81)
         at oracle.dbtools.raptor.controls.grid.ResultSetTableModel.openResultSet(ResultSetTableModel.java:458)
         at oracle.dbtools.raptor.controls.grid.ResultSetTableModel.fetchNext(ResultSetTableModel.java:183)
         at oracle.dbtools.raptor.controls.grid.ResultSetTableModel$4.doWork(ResultSetTableModel.java:636)
         at oracle.dbtools.raptor.controls.grid.ResultSetTableModel$4.doWork(ResultSetTableModel.java:620)
         at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:515)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)
    and when I enter SELECT (select sysdate from dual), the result returns "/ by zero"
    How to solve this problem? Tell me who can, please.

    Proceed as follows:
    1. Start sqldeveloper.
    2. Go to Tools-->preferences-->database-->NLS parameters.
    3. Change LANGUAGE to AMERICAN.
    4. Restart sql developer.
    Not help. What more can I do?

  • Error : java.lang.ArithmeticException:/ by zero

    Hi ,
    i don't know what 's wrong with my program
    i call applet in jar file when it call applet it show
    applet initailize and show background color
    and show java.lang.ArithmeticException:/ by zero
    i don't understand how this exception mean??
    in my servlet never use / to do anything
    any idea??

    The Exception is thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class.
    Post ur Applet code so that we can analyse

  • Java.lang.ArithmeticException: Rounding necessary

    hi when i run my application am geting this error
    java.lang.ArithmeticException: Rounding necessary
    there is no any calculation in my application,am in jdeveloper 11.1.1.6.0
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Rounding necessary
    java.lang.ArithmeticException: Rounding necessary
        at java.math.BigDecimal.divideAndRound(BigDecimal.java:1439)
        at java.math.BigDecimal.setScale(BigDecimal.java:2390)
        at java.math.BigDecimal.setScale(BigDecimal.java:2437)
        at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:754)
        at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:2196)
        at oracle.jbo.domain.Number.bigDecimalValue(Number.java:575)
        at oracle.jbo.domain.Number.hashCode(Number.java:451)
        at oracle.jbo.Key.hashCode(Key.java:439)
        at oracle.jbo.common.WeakHashtableImpl.get(WeakHashtableImpl.java:192)
        at oracle.jbo.common.WeakHashtable.get(WeakHashtable.java:94)
        at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:741)
        at oracle.jbo.server.EntityCache.add(EntityCache.java:537)
        at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3182)
        at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3813)
        at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5830)
        at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
        at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
        at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
        at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
        at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
        at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
        at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
        at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
        at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
        at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
        at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4443)
        at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
        at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1605)
        at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingIfNeeded(DCJboDataControl.java:1360)
        at oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded(DCIteratorBinding.java:2160)
        at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3246)
        at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
        at oracle.adf.controller.internal.binding.TaskFlowRegionController.doRegionRefresh(TaskFlowRegionController.java:270)
        at oracle.adf.controller.internal.binding.TaskFlowRegionController.refreshRegion(TaskFlowRegionController.java:119)
        at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3204)
        at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
        at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:115)
        at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:359)
        at oracle.adf.controller.v2.lifecycle.Lifecycle$2.execute(Lifecycle.java:137)
        at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$400(ADFPhaseListener.java:23)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:238)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:274)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
        at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Rounding necessary
    java.lang.ArithmeticException: Rounding necessary
        at java.math.BigDecimal.divideAndRound(BigDecimal.java:1439)
        at java.math.BigDecimal.setScale(BigDecimal.java:2390)
        at java.math.BigDecimal.setScale(BigDecimal.java:2437)
        at oracle.sql.NUMBER.toBigDecimal(NUMBER.java:754)
        at oracle.sql.NUMBER.bigDecimalValue(NUMBER.java:2196)
        at oracle.jbo.domain.Number.bigDecimalValue(Number.java:575)
        at oracle.jbo.domain.Number.hashCode(Number.java:451)
        at oracle.jbo.Key.hashCode(Key.java:439)
        at oracle.jbo.common.WeakHashtableImpl.get(WeakHashtableImpl.java:192)
        at oracle.jbo.common.WeakHashtable.get(WeakHashtable.java:94)
        at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:741)
        at oracle.jbo.server.EntityCache.add(EntityCache.java:537)
        at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3182)
        at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:3813)
        at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5830)
        at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3693)
        at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3548)
        at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2261)
        at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5111)
        at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2971)
        at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2827)
        at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2787)
        at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1616)
        at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3544)
        at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10165)
        at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4443)
        at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
        at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1605)
        at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingIfNeeded(DCJboDataControl.java:1360)
        at oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded(DCIteratorBinding.java:2160)
        at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3246)
        at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
        at oracle.adf.controller.internal.binding.TaskFlowRegionController.doRegionRefresh(TaskFlowRegionController.java:270)
        at oracle.adf.controller.internal.binding.TaskFlowRegionController.refreshRegion(TaskFlowRegionController.java:119)
        at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3204)
        at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
        at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:115)
        at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:359)
        at oracle.adf.controller.v2.lifecycle.Lifecycle$2.execute(Lifecycle.java:137)
        at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$400(ADFPhaseListener.java:23)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:238)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:274)
        at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
        at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    It is possible Java 1.3 was not so perdantic. ALso it is easy to write prgrams with bugs in them which just happen to work the way they are used. Doing things a little differently reveals the bug.
    The problem comes from the use of new BigDecimal(double). This gives a faithful reproduction of the underlying double value. Many methods which convert double to another type allow for a small rounding error in the double, this constructor does not.
    Even a simple value like 0.1 has a small rounding error for double type. Normally this is not obvious, with BigDecimal it is.
    double d = 0.1;
    System.out.println("d= " + Double.toString(d));
    BigDecimal bd = new BigDecimal(d);
    System.out.println("bd= " + bd);
    BigDecimal bd2 = BigDecimal.valueOf(d);
    System.out.println("bd2= " + bd2);prints
    d= 0.1
    bd= 0.1000000000000000055511151231257827021181583404541015625
    bd2= 0.1As you can see the second method for converting a double doesn't have this round issue for this value. This might be a temping option and it might work most of the time, however using setScale() with a rounding option will work every time.

  • Java.lang.ArithmeticException

    I tried to throw a ArithmeticException in my servlet
    errorpage.html was created
    This entry was put to the webxml file
    <error-page>
    <exception-type>
    java.lang.ArithmeticException
    </exception-type>
    <location>
    /error.html
    </location>
    </error-page
    Still I cant see the error.html even the servlet is throwing the ArithmeticException
    Why is that?

    Dont use slash.
    <location> error.html </location>

  • ROUND_UNNECESSARY - java.lang.ArithmeticException: Rounding necessary

    I am doing a BigDecimal.divide with ROUND_UNNECESSARY as my rounding mode - this is because I want the real number returned to me so that I can use my own customized rounding method. How can I accomplish this without rounding? By the way, the operation can have any real number as numerator and denominator

    I am doing a BigDecimal.divide with ROUND_UNNECESSARY
    as my rounding mode - this is because I want the real
    number returned to me so that I can use my own
    customized rounding method. How can I accomplish this
    without rounding? By the way, the operation can have
    any real number as numerator and denominatorJust a guess assuming you are getting the exception in your subject which I have never encountered.
    What would be the value of the BigDecimal if no rounding was performed and you were dividing 1 by 3?
    Could you maybe round to some huge number of decimal places and then use your routine on that result?

  • SetFont throws ArithmeticException: / by zero

    Hello,
    I'm trying to properly display cp437 text file. I have found [perfect font|http://www.dafont.com/perfect-dos-vga-437.font] for this purpose. Loading font using Font.createFont is working, but when it should be used by calling jTextArea.setFont, it throws few times ArithmeticException. Font is working properly when it is installed to windows/fonts folder.
    Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
            at javax.swing.text.PlainView.paint(PlainView.java:256)
            at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1422)
            at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:722)
            at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:869)
            at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:848)
            at javax.swing.JComponent.paintComponent(JComponent.java:763)
            at javax.swing.JComponent.paint(JComponent.java:1029)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JViewport.paint(JViewport.java:747)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
            at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1475)
            at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1406)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
            at javax.swing.JComponent.paint(JComponent.java:1015)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
            at java.awt.Container.paint(Container.java:1780)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
            at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    It's weird. I dont think it's my fault. Look...
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * NewJFrame.java
    * Created on 8.9.2009, 19:50:52
    package fonttest;
    import java.awt.Font;
    import java.awt.FontFormatException;
    import java.io.File;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    * @author filuta
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
            try {   
                Font dosfont = Font.createFont(Font.TRUETYPE_FONT,
                        new File("C:\\Users\\filuta\\Downloads\\dos437\\" +
                        "Perfect DOS VGA 437.ttf")).deriveFont(12f);
                jTextArea1.setFont(dosfont);
            catch (FontFormatException ex) {
                Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
            catch (IOException ex) {
                Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jTextArea1.setColumns(20);
            jTextArea1.setRows(5);
            jScrollPane1.setViewportView(jTextArea1);
            getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
            pack();
        }// </editor-fold>
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        // End of variables declaration
    }

  • Java.lang.arrayIndex.outOfBound

    iam trying to insert data from a table to the database, but i have a " java.lang.arrayIndex.outOfBound"
    while(true){
             String name=(String)jTable1.getValueAt(row,4);
             String shape=(String)jTable1.getValueAt(row,3);
             quantity=(Double)jTable1.getValueAt(row,2);
             unitPrice=(Double)jTable1.getValueAt(row,1);
            System.out.print(" "+name+" "+shape+" "+quantity+" "+unitPrice);
                try{
                String mine="INSERT INTO Purchase VALUES (?,?,?,?,?)";
                      PreparedStatement ps = con.prepareStatement(mine);
                         ps.setInt(1,glob);
                         ps.setString(3, name);
                         ps.setString(4,shape);
                         ps.setDouble(5,unitPrice);
                          ps.setDouble(6,quantity);
                         // ps.setDate(7,new java.sql.Date((new java.util.Date()).getTime()));
                        ps.execute();
                        con.close();
                  }catch(SQLException e){
                             System.out.println("........."+e.toString());}
                             row++;
                        if((String)jTable1.getValueAt(row,4)==null)
                        break;
        }                       

    This is a stack trace:
    Exception in thread "main" java.lang.ArithmeticException: / by zero
    at zcomponentdriver.Main.doSomethingBad(Main.java:37)
    at zcomponentdriver.Main.startProcess(Main.java:34)
    at zcomponentdriver.Main.main(Main.java:42)
    The bold part says that line 37 of the Main class did something bad. It's in the doSomethingBad method.
    I'm not sure what you mean by auto number, that's not something inherent to PreparedStatement and the only reason your posted code would throw an ArrayIndexOutOfBoundsException is because field 6 doesn't exist when you call setDouble(6, quantity). I figure that's because you accidently skipped 2.

  • Financial Reporting Exception - Error executing query: java.lang.Arithmetic

    Hi all,
    I'm using the Financial Reporting Studio 11.1.2.507 to develop a report to a planning application, so i'm using a planning connection to do it. This report involves some calcs and i have sure that is possible generate a divide by zero. But what happen is: I started developing this report using the user admin and no error message was shown. Then when i tryed to acess this report with a user other than the admin user the error occurs: "Error executing query: java.lang.ArithmeticException: / by zerojava.lang.ArithmeticException".
    So, have you seen this scenario before?
    Could you help me with this issue?
    p.s: if i wasn't clear enough, please tell me!
    Warm regards,
    Rafael Melo - Brasil

    Mehmet,
    Thanks a lot for your quick response. The error message appears when i acess through the workspace. When I was developing I was acessing with admin user (FR Studio) and now I'm using other user to test the report in the workspace. I've commited a mistake when i thought that the user point of view that I defined when i was developing would be applied over all users. So, when I opened the report with a user other than the admin the error ocurred because the default attributes resulted in a empty resultset or something like that.
    Is there a way to define a user point of view (pov) for all user at once?
    Best Regards,
    Rafael Melo

  • Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • Java.lang.Integer defaulting to zero

    I am using JAXB for several years, but never dived into details.
    I am not using a schema.
    When I am unmarshalling a XML file, JAXB always defaults my java.lang.Integer attributes to zero instead to null, when the attribute is not given in the XML file.
    How can I change this? I like the Integers to be null, just like in a "normal" Java program.
    Thanks
    Markus

    mkarg wrote:
    When I am unmarshalling a XML file, JAXB always defaults my java.lang.Integer attributes to zero instead to null, when the attribute is not given in the XML file.I am using JAXB 2.1.3 in JDK 1.6. It uses java.math.BigInteger instead of java.lang.Integer for xs:integer types in schema.
    It assigns null when attribute is not given in XML, this is similar to your need.
    Which version of JAXB are you using?

  • 500 Internal Server Error java.lang.NoSuchFieldError:  oracle.jdbc.oci8.OCI

    I am running small SQLJ in a JSP to get the hang of it.
    I am running on 920, and have downloaded the new runtime classes for 920 and tested per the instructions.
    Using JDev 903, here is the private method for running a query ( It is from an article I found by Julie Basu at Oracle; I have played around with the empno/emp_no variable to convert it to an int):
    <%! private String runQuery(String emp_no) throws java.sql.SQLException {
    DefaultContext dctx =null;
    String ename = null; double sal = 0.0; String hireDate=null;
    StringBuffer sb = new StringBuffer();
    //int emp_no = Integer.parseInt(emp_no);
    try {
    dctx =Oracle.getConnection("jdbc:oracle:oci8:@olap","scott","tiger");
    #sql [dctx] { SELECT ename, sal, TO_CHAR(hiredate,'DD-MON-YYYY')
    INTO :ename,:sal,:hireDate
    FROM scott.emp WHERE empno=:emp_no
    sb.append("<BLOCKQUOTE><BIG><B><PRE>\n");
    sb.append("Name :"+ename+ "\n");
    sb.append("Salary :"+sal+ "\n");
    sb.append("Date hired :"+hireDate);
    sb.append("</PRE></B>></BIG></BLOCKQUOTE>");
    } catch (java.sql.SQLException e){
    sb.append("<P> SQL Error: <pre> "+e+" </pre> </p>\n");
    } finally {
    if (dctx!=null) dctx.close();
    return sb.toString();
    %>
    I keep getting the following error:
    java.lang.NoSuchFieldError: oracle.jdbc.oci8.OCIEnv.envCharSetId
         int oracle.jdbc.oci8.OCIEnv.get_env_handle()
              native code
         long oracle.jdbc.oci8.OCIEnv.getEnvHandle()
              OCIEnv.java:70
         oracle.jdbc.dbaccess.DBConversion oracle.jdbc.oci8.OCIDBAccess.logon(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OCIDBAccess.java:390
         void oracle.jdbc.driver.OracleConnection.<init>(oracle.jdbc.dbaccess.DBAccess, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OracleConnection.java:361
         java.sql.Connection oracle.jdbc.driver.OracleDriver.getConnectionInstance(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              OracleDriver.java:485
         java.sql.Connection oracle.jdbc.driver.OracleDriver.connect(java.lang.String, java.util.Properties)
              OracleDriver.java:337
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties, java.lang.ClassLoader)
              DriverManager.java:517
         java.sql.Connection java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, java.lang.String)
              DriverManager.java:177
         void sqlj.runtime.ref.ConnectionContextImpl.<init>(sqlj.runtime.ref.ProfileGroup, java.lang.String, java.lang.String, java.lang.String, boolean)
              ConnectionContextImpl.java:346
         void sqlj.runtime.ref.DefaultContext.<init>(java.lang.String, java.lang.String, java.lang.String, boolean)
              DefaultContext.java:172
         sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String, boolean)
              Oracle.java:580
         sqlj.runtime.ref.DefaultContext oracle.sqlj.runtime.Oracle.getConnection(java.lang.String, java.lang.String, java.lang.String)
              Oracle.java:609
         java.lang.String _SQLJ.runQuery(java.lang.String)
         [SQLJ.jsp]
              SQLJ.jsp:42
         void SQLJ.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [SQLJ.jsp]
              SQLJ.jsp:20
         void com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              OrionHttpJspPage.java:56
              [SRC:/SQLJ.jsp]
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
              JspPageTable.java:317
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:465
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:379
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    When I run it using just JDBC with the thin Driver, I have no problems.
    What could be the issue?
    Thanks,
    Scott Rappoport

    Fail to make OCI connection Using JDeveloper

  • OCI 8 Error: java.lang.UnsatisfiedLinkError : do_open

    Hi Folks,
    I am using Jdeveloper3.2 and have jdk1.3 running with it, and I have OCI8 driver being used database connectivity from java to oracle. I have all the path setting checked and everything seems to be fine. I have oracle 8i, But I get the error as follows....
    java.lang.UnsatisfiedLinkError: do_open
    at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:310)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    Any help on this problem is highly appreciated.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Kesav ():
    Hi Folks,
    I am using Jdeveloper3.2 and have jdk1.3 running with it, and I have OCI8 driver being used database connectivity from java to oracle. I have all the path setting checked and everything seems to be fine. I have oracle 8i, But I get the error as follows....
    java.lang.UnsatisfiedLinkError: do_open
    at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:310)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    Any help on this problem is highly appreciated.
    Thanks In Advance<HR></BLOCKQUOTE>
    Maybe you can check the version of your jdk and jdbc.
    I met the same problem in my project.If you use jdbc for jdk1.1.*,you have to download and set jdk1.1.* to be your default compiler.And you'd better download new jdbc package from technet.oracle.com,the unzip it ,set classpath to classes111.zip ,and set path to the directory of jdk1.1.*.
    I used jdk1.3 first,so it didn't work.
    null

  • Java.lang.ArrayIndexOutOfBoundsException

    I got java.lang.ArrayIndexOutOfBoundsException
    in the method find(). But why?
    /**Class CDRack represents collections of compact discs.
    Discs are located in the rack in slots numbered from zero upwards.
    The discs are represented by Record objects and empty slots by null values. */
    public class CDRack extends Object {
      private Record[] collection;
    /**Creates a new, empty CD rack.
    Parameters:
    size - the size of the new rack, i.e. the number of slots it has */
    public CDRack(int size) {
    collection = new Record[size];   
    this.size = size;
    /**Determines if the given disc object is stored in the rack.
    Parameters:
    disc - a disc to be located in the rack
    Returns:
    the slot number of the given cd if it is in the rack or
    a negative number if it is not */
    public int find(Record disc) {
         if (collection[slot]==null)
            return -1;
         else {
            disc = collection[slot];
            return slot;
    }

    Thanks for help to everyone. I works out now :)
    like this:
          public int find(Record disc) {
              for(int slot=0; slot<collection.length; slot++) {
                 if (collection[slot] == disc) {
                 return slot;
              return -1;
               

  • Java.lang.ClassCastException

    My class CDRack is almost ready, but in the last method
    sortAlphabetically() there
    comes java.lang.ClassCastException. I found in the net
    http://java.sun.com/docs/books/tutorial/collections/algorithms/
    that with method Collections.sort(l) I can sort alphabetically.
    The code compiles, but when I run it with a tester program, it stops
    to ClassCastException in the almost last row.
    Something is wrong with Collections.sort(l) ?
    /** Class CDRack represents collections of compact discs. Discs are
    located in the rack in slots numbered from zero upwards. The discs are
    represented by Record objects and empty slots by null values. */
    public class CDRack extends Object {
      private Record[] mRecords;
      private int size;
    /**Creates a new, empty CD rack.
    Parameters:
    size - the size of the new rack, i.e. the number of slots it has */
          public CDRack(int size) {
              mRecords = new Record[size];
              this.size = size;
    /** "Organizes" the discs in the rack so that they will be located in
    consecutive slots starting at slot number zero, and any and all empty
    slots will be at the "end of the rack". After calling this method, the
    discs are in an undefined (i.e. arbitrary) order - the only thing this
    method guarantees is that there aren't any empty slots in between full
    ones.
          public void organize() {
              // Turn array into a list - more flexible
              List l = Arrays.asList(aanilevyt);
              // Remove all nulls from a copy of the list which supports  removal.
              l = new ArrayList(l);
              while (l.remove(null)) /*do nothing*/;
              // Clear the original array.
              for (int i = 0; i < mRecords.length; i++){
                   mRecords[i] = null;
              } // Put the non-nulls back.
              l.toArray(mRecords);
    /**"Organizes" the discs in the rack to the beginning of the rack (see
    the method organize) and sorts them in alphabetical order. Recordings
    by the same artist are placed in alphabetical order by disc name. */
        public void sortAlphabetically() {
              // Turn array into a list - more flexible
              List l = Arrays.asList(aanilevyt);
              // Remove all nulls from a copy of the list which supports  removal.
              l = new ArrayList(l);
              while (l.remove(null)) /*do nothing*/;
              // Clear the original array.
              for (int i = 0; i < mRecords.length; i++){
                   mRecords[i] = null;
              } // Put the non-nulls back.
              l.toArray(mRecords);
              Collections.sort(l);   // alphabetical order. THERE IS CLASSCASTEXCEPTION 
    }

    I have thought and thought but the sorting alphabetically doesnt work.
    I can't use Collections.sort and class Record doesnt implement Comparable(and I can't change it).
    One suggestion was that I could make my own class which implements Comparator. Could it be like this
    import java.util.*;
    public class AlphabeticComparator
    implements Comparator{
      public int compare(Object o1, Object o2) {
        String s1 = (String)o1;
        String s2 = (String)o2;
        return s1.toLowerCase().compareTo(
          s2.toLowerCase());
    }      But how an earth can I tell to CDRack class that it would
    use the class AlphabeticComparator?
    Somebody please save my Christmas!
    /** Class CDRack represents collections of compact discs. Discs are
    located in the rack in slots numbered from zero upwards. The discs are
    represented by Record objects and empty slots by null values. */
    public class CDRack extends Object {
      private Record[] mRecords;
      private int size;
    /**Creates a new, empty CD rack.
    Parameters:
    size - the size of the new rack, i.e. the number of slots it has */
          public CDRack(int size) {
              mRecords = new Record[size];
              this.size = size;
    /** "Organizes" the discs in the rack so that they will be located in
    consecutive slots starting at slot number zero, and any and all empty
    slots will be at the "end of the rack". After calling this method, the
    discs are in an undefined (i.e. arbitrary) order - the only thing this
    method guarantees is that there aren't any empty slots in between full
    ones.
          public void organize() {
              // Turn array into a list - more flexible
              List l = Arrays.asList(aanilevyt);
              // Remove all nulls from a copy of the list which supports  removal.
              l = new ArrayList(l);
              while (l.remove(null)) /*do nothing*/;
              // Clear the original array.
              for (int i = 0; i < mRecords.length; i++){
                   mRecords<i> = null;
              } // Put the non-nulls back.
              l.toArray(mRecords);
    /**"Organizes" the discs in the rack to the beginning of the rack (see
    the method organize) and sorts them in alphabetical order. Recordings
    by the same artist are placed in alphabetical order by disc name. */
        public void sortAlphabetically() {

Maybe you are looking for

  • Lync 2013 Client Not Display Numbers in Contact Card

    Hi I have a problem where Lync 2013 client connecting to Lync 2010 backend appears not download the contact list completely. Lync 2010 clients are all operating normally.  On Lync 2010 client, you can view all contact details including Enterprise Voi

  • Convert DD to DMS using sdo_coord_ops = 101 returns ORA-13199

    Hi, I need to convert lat/long DD to DMS. There is an operation in sdo_coord_ops (coord_op_id = 101) to do that but returns ORA-13199 when i try sdo_cs.add_preference_for_op I know that i can do that conversion with a function (Re: SDO_UTIL.BEARING_T

  • X205-S9810 Computer just stopped working No beeps just black screen

    Yesterday my laptop which was running just fine, went to sleep and I couldn't revive it.  When I turn it on the fans start, the hard drive initializes then stops, the DVD starts and stops then the fans turn off and that's it.  Black screen the entire

  • IPhoto & iWeb

    Howdy, I have created an album in iPhoto, dragged photos (161 images) into it directly from my events (so no tweaking etc), and then have dragged that album into a web page in iWeb. Now the problem I have is that I obviously want to optimise my websi

  • MYSQl Connectivity in Linux

    i am using redhat linux ee 4. mysql is integrated in it. i also have jdbc connector j. is there any additional softwares needed to connect java with mysql