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?

Similar Messages

  • 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.

  • 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.

  • 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?

  • 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>

  • 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

  • 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

  • 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.

  • Getting java.lang.NullpointerException while closing resultset aft using it

    Hi,
    I kindly request to share your ideas reg. my problem.
    I am opening a database connection using connection pool and i am using two or more resultsets and statement objects.I am closing these objects at the end of their usage.But i am getting java.lang.NullpointerException when i close them(if i don't close them it works fine). what might be the reason. Had i did any thing wrong in the code.
    please view the code
    public String storeNewConnection(String CIRCLE,String DIVISION,String SUB_DIVISION,String SECTION,String CONSUMER_NAME,String FATHER_NAME,String STREET_NAME,String DOOR_NO,String TOWN_CITY,String LAND_MARK,String PINCODE,String STDCODE,String PHONE_NO,String EMAIL,String NEIGHBOUR_SCNO,String DOCUMENT_CODE,String LT_APR_NO,String year1,String month1,String day1,String PCBNO,String CONSUMER_STATUS,String SOCIAL_GROUP,String CATEGORY_SUPPLY,String LOCATION_PREMISES,String PURPOSE_OF_SUPPLY,String DURATION,String LOAD_TYPE,String CONNECTED_LOAD,String CONTRACTED_LOAD,String APPLICATION_FEE,String DEVELOPMENT_CHARGES,String SECURITY_DEPOSIT,String ADDL_SECURITY_DESPOSIT,String DEPOSITED_THRU,String DD_CHEQUE_DETAILS,String year2,String month2,String day2,String REMARKS,String POLE_NO)
              int count=0;
              Statement st=null;
              ResultSet rs=null,rs1=null,rs2=null,rs3=null;
              PreparedStatement pst=null;
              String result="",query="",sysDate="",sysDate2="";
              String reg_no = "";
              try
                   st=con.createStatement();
                   //Check dates with sys date
                   String date1 =null;                    
                   String date2 =null;
                   if(! (year1.equals("") || month1.equals("") || day1.equals("")) )
                        date1=day1+"-"+month1+"-"+year1;
                        rs2=st.executeQuery("select round(to_date('"+date1+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs2.next();
                        if(rs2.getInt(1) != 0)
                             return "false";                              
                   if(! (year2.equals("") || month2.equals("") || day2.equals("")) )
                        date2=day2+"-"+month2+"-"+year2;
                        rs3=st.executeQuery("select round(to_date('"+date2+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs3.next();
                        if(rs3.getInt(1) != 0)
                             return "false";     
                   rs1=st.executeQuery("select to_char(sysdate,'yyyyMONdd'),to_char(sysdate,'dd-Mon-yyyy') from dual");
                   rs1.next();
                   sysDate=rs1.getString(1);
                   sysDate2=rs1.getString(2);
                   rs=st.executeQuery("select max(SERIAL_NO) from NEW_CONNECTIONS where to_char(sysdate,'yyyy') = to_char(REG_DATE,'yyyy') and to_char(sysdate,'mm') = to_char(REG_DATE,'mm') and SUB_DIVISION_CODE = "+SUB_DIVISION+" and DIVISION_CODE = "+DIVISION+" and CIRCLE_CODE = "+CIRCLE+" ");
                   if(rs.next())
                        count = rs.getInt(1);
                        count++;                              
                   else
                        count=1;
                   query="insert into NEW_CONNECTIONS ( "+
                        " REG_NO,SERIAL_NO,REG_DATE,CIRCLE_CODE,DIVISION_CODE,SUB_DIVISION_CODE,SECTION_CODE, "+
                        " CONSUMER_NAME,FATHER_NAME,STREET_NAME,DOOR_NO,TOWN_CITY,LAND_MARK,PINCODE, "+
                        " STDCODE,PHONE_NO,EMAIL,NEIGHBOUR_SCNO,DOCUMENT_CODE,LT_APR_NO,LT_APR_DATE, "+
                        " PCBNO,CONSUMER_STATUS,SOCIAL_GROUP,CATEGORY_SUPPLY,LOCATION_PREMISES,PURPOSE_OF_SUPPLY,"+
                        " DURATION,LOAD_TYPE,CONNECTED_LOAD,CONTRACTED_LOAD,APPLICATION_FEE,DEVELOPMENT_CHARGES, "+
                        " SECURITY_DEPOSIT,ADDL_SECURITY_DEPOSIT,DEPOSITED_THRU,DD_CHEQUE_DETAILS,DD_CHEQUE_DATE,REMARKS,APPLICATION_STATUS,POLE_NO) "+
                        " values(?,?,'"+sysDate2+"',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                   pst = con.prepareStatement(query);
                   String cnt ="";
                   if(count <= 9)
                        cnt="0000";
                   else if(count <= 99)
                        cnt="000";
                   else if(count <= 999)
                        cnt="00";
                   else if(count <= 9999)
                        cnt="0";
                   cnt+=Integer.toString(count);
                   reg_no = CIRCLE+DIVISION+SUB_DIVISION+SECTION+"N"+cnt+sysDate;               
                   int serial_no =count;
                   int pin = 0;
                   if(!PINCODE.equals(""))
                        pin =Integer.parseInt(PINCODE);
                   int std = 0;
                   if(!STDCODE.equals(""))
                        std = Integer.parseInt(STDCODE);
                   int status = Integer.parseInt(CONSUMER_STATUS);
                   int social_group = Integer.parseInt(SOCIAL_GROUP);
                   int supply = Integer.parseInt(CATEGORY_SUPPLY);
                   int location = Integer.parseInt(LOCATION_PREMISES);
                   int purpose = Integer.parseInt(PURPOSE_OF_SUPPLY);
                   int duration = Integer.parseInt(DURATION);
                   int laod_type = Integer.parseInt(LOAD_TYPE);
                   float conn_load = Float.parseFloat(CONNECTED_LOAD);
                   int cont_load = 0;
                   if(!CONTRACTED_LOAD.equals(""))
                        cont_load =Integer.parseInt(CONTRACTED_LOAD);
                   int app_fee = Integer.parseInt(APPLICATION_FEE);
                   int dev_chg = Integer.parseInt(DEVELOPMENT_CHARGES);
                   int sec_dep = Integer.parseInt(SECURITY_DEPOSIT);
                   int addl_sec_dep = 0;     
                   if(!ADDL_SECURITY_DESPOSIT.equals(""))
                        addl_sec_dep =Integer.parseInt(ADDL_SECURITY_DESPOSIT);
                   int dep_thru = Integer.parseInt(DEPOSITED_THRU);          
                   pst.setString(1,reg_no);
                   pst.setInt(2,serial_no);
                   pst.setString(3,CIRCLE);
                   pst.setString(4,DIVISION);
                   pst.setString(5,SUB_DIVISION);
                   pst.setString(6,SECTION);
                   pst.setString(7,CONSUMER_NAME);
                   pst.setString(8,FATHER_NAME);
                   pst.setString(9,STREET_NAME);
                   pst.setString(10,DOOR_NO);
                   pst.setString(11,TOWN_CITY);
                   pst.setString(12,LAND_MARK);
                   pst.setInt(13,pin);
                   pst.setInt(14,std);
                   pst.setString(15,PHONE_NO);
                   pst.setString(16,EMAIL);
                   pst.setString(17,NEIGHBOUR_SCNO);
                   pst.setString(18,DOCUMENT_CODE);
                   pst.setString(19,LT_APR_NO);
                   pst.setString(20,date1);
                   pst.setString(21,PCBNO);
                   pst.setInt(22,status);
                   pst.setInt(23,social_group);
                   pst.setInt(24,supply );
                   pst.setInt(25,location);
                   pst.setInt(26,purpose);
                   pst.setInt(27,duration);
                   pst.setInt(28,laod_type);
                   pst.setFloat(29,conn_load );
                   pst.setInt(30,cont_load);
                   pst.setInt(31,app_fee);
                   pst.setInt(32,dev_chg);
                   pst.setInt(33,sec_dep);
                   pst.setInt(34,addl_sec_dep);
                   pst.setInt(35,dep_thru );
                   pst.setString(36,DD_CHEQUE_DETAILS);
                   pst.setString(37,date2);
                   pst.setString(38,REMARKS);
                   pst.setInt(39,1);
                   pst.setString(40,POLE_NO);
                   pst.executeUpdate();
                   result=reg_no;                                   
                   rs.close();
                   rs=null;
                   rs1.close();
                   rs1=null;
                   rs2.close();
                   rs2=null;
                   rs3.close();
                   rs3=null;
                   st.close();
                   st=null;
                   pst.close();
                   pst=null;
              catch(Exception e)
                   e.printStackTrace();
                   result="false";
                   return result;
              finally
                   if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
              return result;
    Also plz help me to improve the code if necessary so that it will work fine for multiple users
    thaks & regards
    Prasanth.C

    Thanks a lot.
    i replaced the code below
    if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
    instead of blindly closing the resultsets and statements
    now it works fine.
    One more thing, is my code structurally correct, i mean the variables, try...catch blocks,results,statements,database connections and overall coding. whether it looks like professional code.
    thaks & regards,
    Prasanth.C

  • Data Federator Connection to R3 - java.lang.NullPointerException

    Hi.
    We are trying to add a SAP R3 DataSource in Data Federator XI 3.0 SP2.
    Test Connection gives us the following message: "The connection was established but there is no table for the given connection parameters", what it seems to be ok according to the SAP doc.
    However, when we try to get a list of the Functions or Infosets in the SAP system, an error comes because of a "java.lang.NullPointerException". Checking the application log we get the following:
    2010/03/30 12:21:27.059|<=|||0|26537104| |||||||||||||||"[LeSelect.Api.LSStatementImpl] - [Execution Thread 4]Executing query: CALL executeConnectorCommand '/TEST//TEST/user_bla/sources/draft/R3SYS', 'GET_FUNCTION_LIST * * 200'"
    2010/03/30 12:21:27.074|>=|E||0|26537104| |||||||||||||||"[LeSelect.Core.n] - [Execution Thread 4]Bad Wrapper Error:
    java.lang.NullPointerException
         at LeSelect.Wrappers.SAPR3.H.F(y:343)
         at LeSelect.Wrappers.SAPR3.H.executeCommand(y:285)
         at LeSelect.Core.B.D.R(y:151)
         at LeSelect.Core.QueryEngine.H.p.G(y:131)
         at LeSelect.Core.QueryEngine.H.p.A(y:105)
         at LeSelect.Core.QueryEngine.B.J.A(y:72)
         at LeSelect.Core.QueryEngine.Executor.y.A(y:227)
         at LeSelect.Core.QueryEngine.m.A(y:284)
         at LeSelect.Api.LSStatementImpl.lsExecuteQuery(y:314)
         at LeSelect.B.E.D.V(y:935)
         at LeSelect.B.E.K.B(y:105)
         at LeSelect.B.E.G$_A.run(y:691)"
    We registered the callback program and did all of the steps indicated for the installation, also checked the possible sources of the error according to OSS Note 1278491.
    Any idea how to solve this? Thanks.

    Hello, we have the similar problem: while connecting from Data Federator to SAP ERP we get the following error - "Wrapper /ZTEST/sources/ZTEST reported an exception which is not a WrapperException: java.lang.NullPointerException: null"
    It's necessary to install "SAP BusinessObjects Data Federator Infoset, SAP Query and ABAP Functions Connector Prototype"
    SAP BusinessObjects Web Intelligence Reporting for SAP ERP
    for connection to SAP ERP.
    Are there any ideas? Thanks

  • "AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame

    I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
    Exception in thread "main" java.lang.NullPointerException
    at pkg1.GUI.createFrame(GUI.java:123)
    at pkg1.GUI.startFrame2(GUI.java:66)
    at pkg1.Top.cos(Top.java:25)
    at pkg1.Top.main(Top.java:20) My code:
    GUI class
    package pkg1;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Toolkit;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    import oracle.jdeveloper.layout.XYLayout;
    public class GUI
        public JDesktopPane desktop;
        private XYLayout xYLayout1 = new XYLayout();
        public int openFrameCount = 0;
        JFrame f = new JFrame();
        public void GUII()  // Prepare JFrame
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(500, 600);
            f.setVisible(true);
        public void startFrame()
            desktop = new JDesktopPane();
            createFrame(); //create first "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void startFrame2()
            createFrame(); //create second "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void createFrame()
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true); //necessary as of 1.3
            desktop.add(frame);
            frame.add(new GUI2());
        } Top class
    public class Top
        public static void main(String[] args)
            GUI g = new GUI();
            g.GUII(); //Create JFrame
            g.startFrame(); //Create JInternalFrame
            Top t = new Top();
            t.sth();
        public void sth()
            GUI gui = new GUI();
            gui.startFrame2();
    } MyIntternalFrame class
    import javax.swing.JInternalFrame;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import oracle.jdeveloper.layout.XYConstraints;
    import oracle.jdeveloper.layout.XYLayout;
    /* Used by InternalFrameDemo.java. */
    public class MyInternalFrame extends JInternalFrame {
        static int openFrameCount =  0;      
        static final int xOffset = 30, yOffset = 30;
        private XYLayout xYLayout1 = new XYLayout();
        private JButton jButton1 = new JButton();
        private JLabel jLabel1 = new JLabel();
        private JFrame c = new JFrame();
        private JPanel d = new JPanel();
        private XYLayout xYLayout2 = new XYLayout();
        public MyInternalFrame() {         
            super("Document #"  + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            int width = new GUI2().width + 10;
            int height = new GUI2().height + 40;
            setSize(width,height);
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
    } Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another class

    Some possibly helpful suggestions:
    1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
    2) Get rid of GUII. The GUI constructor will do all this and more.
    3) Get rid of startFrame and startFrame2.
    4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
    5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
    6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
    Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane).

  • Java.lang.NoClassDefFoundError while calling a java class from BPEL

    Hi,
    I'm calling a java class to convert JSON to XML using BPEL. I have imported all the necessary jar files in the project and compiling done successfully.
    But at runtime , i get the java.lang.NoClassDefFoundError: net/sf/json/JSON error.
    For this i placed all the necessary jars under FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ path and restarted the server.
    But still i'm getting the same error at runtime.
    Did i missed any step? Let me know the procedure to solve this.
    Do i have to run ant or edit Manifest file after placing the jar?
    in one site i find we have to place the jars under <DOMAIN HOME>/lib directory. Is this correct?
    We are using SOA suite 11.1.1.6.
    Thanks,
    Terry

    Hi Karan,
    I have done placing the jars at FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ and ran ant  -f build.xml .The build was successful without any error.
    I have even placed the jars in <DOMAIN HOME>/lib (/us2001/fmw/11.1.1.6/user_projects/domains/ohsdomain/lib) and did a server restart.
    After these activities, when i execute the composite, i still get the error in em console,
    Message
    got RuntimeException
    Supplemental Detail
    oracle.fabric.common.FabricException: Could not create object of class 'packageName.className'; nested exception is:
    java.lang.NoClassDefFoundError: net/sf/json/JSON
    at oracle.integration.platform.blocks.wsif.WsifReference.request(WsifReference.java:698)
    at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
    at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:182)
    Any help on this.
    Thanks,
    Terry

  • Error 500: java.lang.NoClassDefFoundError

    I'm trying to setup a web app and I opened up it's index.faces page on internet explorer, but it's giving me this huge error message on the page instead:
    Error 500: java.lang.NoClassDefFoundError: Error while defining class: <Class 1> This error indicates that the class: <Class 2> could not be located while defining the class: <Class 1> This is often caused by having the class at a higher point in the classloader hierarchy Dumping the current context classloader hierarchy: ==> indicates defining classloader *** indicates classloader where the missing class could have been found ***[0] com.ibm.ws.classloader.CompoundClassLoader@6a6cfd0b Local ClassPath: /mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/classes:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/commons-collections.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/icu4j_3_4_1.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/wsac_taglib_210.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/commons-beanutils.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/commons-logging.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/commons-digester.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/wsf_core.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/wsf_persistence.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/struts.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/jsf-ibm.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war/WEB-INF/lib/wsf_util.jar:/mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_WEB.war Delegation Mode: PARENT_FIRST ==>[1] com.ibm.ws.classloader.JarClassLoader@1784790283 Local Classpath: /mp/app/WebSphere6/AppServer/profiles/TestProfile01/installedApps/TestCell/ClarityPasswordResetEAR.ear/ClarityPasswordReset_BO.jar:/mp/app/WebSphere6/Custom-Libs/WSF_supplement/wscommon.jar Delegation mode: PARENT_FIRST [2] com.ibm.ws.classloader.ProtectionClassLoader@6e37bd08 [3] com.ibm.ws.bootstrap.ExtClassLoader@7d213d09 [4] sun.misc.Launcher$AppClassLoader@7dc43d09 [5] sun.misc.Launcher$ExtClassLoader@7dc03d09 ---Original exception--- java.lang.NoClassDefFoundError: <Class 2> at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code)) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.beans.Beans.instantiate(Beans.java:202) at java.beans.Beans.instantiate(Beans.java:63) at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:204) at com.sun.faces.application.ApplicationImpl.createAndMaybeStoreManagedBeans(ApplicationImpl.java:913) at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:84) at com.ibm.faces.databind.SelectItemsVarResolver.resolveVariable(SelectItemsVarResolver.java:38) at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125) at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146) at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:156) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:137) at javax.faces.component.UIOutput.getValue(UIOutput.java:147) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:84) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:204) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:171) at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeEnd(DefaultAjaxRenderer.java:83) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:762) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:604) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:527) at com.sun.faces.taglib.html_basic.InputTextTag.doEndTag(InputTextTag.java:673) at com.ibm._jsp._passwordreset._jspx_meth_h_inputText_0(_passwordreset.java:133) at com.ibm._jsp._passwordreset._jspx_meth_h_form_0(_passwordreset.java:199) at com.ibm._jsp._passwordreset._jspx_meth_hx_scriptCollector_0(_passwordreset.java:227) at com.ibm._jsp._passwordreset._jspx_meth_f_view_0(_passwordreset.java:255) at com.ibm._jsp._passwordreset._jspService(_passwordreset.java:85) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:674) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117) at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:334) at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:325) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:254) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:674) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3004) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:89) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) --- end Original exception----
    Any Help will be appreciated. Thank you.

    sounds like your deployment isn't right - either your classpath isn't set correctly or you haven't included all the classes necessary in your deployment - or if this was working but now it's not then perhaps you removed something?

  • Java.lang.VerifyError - Incompatible object argument for function call

    Hi all,
    I'm developing a JSP application (powered by Tomcat 4.0.1 in JDK 1.3, in Eclipse 3.3). Among other stuff I have 3 classes interacting with an Oracle database, covering 3 use cases - renaming, adding and deleting an database object. The renaming class simply updates the database with a String variable it receives from the request object, whereas the other two classes perform some calculations with the request data and update the database accordingly.
    When the adding or deleting classes are executed, by performing the appropriate actions through the web application, Tomcat throws the following:
    java.lang.VerifyError: (class: action/GliederungNewAction, method: insertNewNode signature: (Loracle/jdbc/driver/OracleConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V) Incompatible object argument for function call
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at action.ActionMapping.perform(ActionMapping.java:53)
         at ControllerServlet.doResponse(ControllerServlet.java:92)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    ...The renaming works fine though. I have checked mailing lists and forums as well as contacted the company's java support but everything I have tried out so far, from exchanging the xerces.jar files found in JDOM and Tomcat to rebuidling the project didn't help.
    I just can't explain to myself why this error occurs and I don't see how some additional Java code in the other 2 classes could cause it?
    I realize that the Tomcat and JDK versions I'm using are totally out of date, but that's company's current standard and I can't really change that.
    Here's the source code. I moved parts of the business logic from Java to Oracle recently but I left the SQL statements that the Oracle stored procedures are executing if it helps someone.
    package action;
    import java.sql.CallableStatement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.StringTokenizer;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import oracle.jdbc.driver.OracleConnection;
    * This class enables the creation and insertion of a new catalogue node. A new node
    * is always inserted as the last child of the selected parent node.
    public class GliederungNewAction implements Action {
         public String perform(ActionMapping mapping, HttpServletRequest request,
                   HttpServletResponse response) {
              // fetch the necessary parameters from the JSP site
              // the parent attribute is the selected attribute!
              String parent_attribute = request.getParameter("attr");
              String catalogue = request.getParameter("catalogue");
              int parent_sequenceNr = Integer.parseInt(request.getParameter("sort_sequence"));
              // connect to database    
              HttpSession session = request.getSession();   
              db.SessionConnection sessConn = (db.SessionConnection) session.getAttribute("connection");
              if (sessConn != null) {
                   try {
                        sessConn.setAutoCommit(false);
                        OracleConnection connection = (OracleConnection)sessConn.getConnection();
                        int lastPosition = getLastNodePosition( getLastChildAttribute(connection, catalogue, parent_attribute) );
                        String newNodeAttribute = createNewNodeAttribute(parent_attribute, lastPosition);
                        // calculate the sequence number
                        int precedingSequenceNumber = getPrecedingSequenceNumber(connection, catalogue, parent_attribute);
                        if ( precedingSequenceNumber == -1 ) {
                             precedingSequenceNumber = parent_sequenceNr;
                        int sortSequence = precedingSequenceNumber + 1;
                        setSequenceNumbers(connection, catalogue, sortSequence);
                        // insert the new node into DB
                        insertNewNode(connection, catalogue, newNodeAttribute, parent_attribute, "Neuer Punkt", sortSequence);
                        connection.commit();
                   } catch(SQLException ex) {
                        ex.printStackTrace();
              return mapping.getForward();
          * Creates, fills and executes a prepared statement to insert a new entry into the specified table, representing
          * a new node in the catalogue.
         private void insertNewNode(OracleConnection connection, String catalogue, String attribute, String parent_attribute, String description, int sortSequence) {
              try {
                   String callAddNode = "{ call fasi_lob.pack_gliederung.addNode(:1, :2, :3, :4, :5) }";
                   CallableStatement cst;
                   cst = connection.prepareCall(callAddNode);
                   cst.setString(1, catalogue);
                   cst.setString(2, attribute);
                   cst.setString(3, parent_attribute);
                   cst.setString(4, description);
                   cst.setInt(5, sortSequence);
                   cst.execute();
                   cst.close();
              } catch (SQLException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
    //          String insertNewNode = "INSERT INTO vstd_media_cat_attributes " +
    //                    "(catalogue, attribute, parent_attr, description, sort_sequence) VALUES(:1, :2, :3, :4, :5)";
    //          PreparedStatement insertStmt;
    //          try {
    //               insertStmt = connection.prepareStatement(insertNewNode);
    //               insertStmt.setString(1, catalogue);
    //               insertStmt.setString(2, attribute);
    //               insertStmt.setString(3, parent_attribute);
    //               insertStmt.setString(4, description);
    //               insertStmt.setInt(5, sortSequence);
    //               insertStmt.execute();
    //               insertStmt.close();
    //          } catch (SQLException e) {
    //               e.printStackTrace();
          * This method returns the attribute value of the last child of the parent under which
          * we want to insert a new node. The result set is sorted in descending order and only the
          * first result (that is, the last child under this parent) is fetched.
          * If the parent node has no children, "parent_attr.0" is returned. 
          * @param connection
          * @param catalogue
          * @param parent_attribute
          * @return attribute of the last child under this parent, or "parent_attr.0" if parent has no children
         private String getLastChildAttribute(OracleConnection connection, String catalogue, String parent_attribute) {
              String queryLastChild = "SELECT attribute FROM vstd_media_cat_attributes " +
                                            "WHERE catalogue=:1 AND parent_attr=:2 ORDER BY sort_sequence DESC";
              String lastChildAttribute;
              PreparedStatement ps;
              try {
                   ps = connection.prepareStatement(queryLastChild);
                   ps.setString(1, catalogue);
                   ps.setString(2, parent_attribute);
                   ResultSet rs = ps.executeQuery();
                   /* If a result is returned, the selected parent already has children.
                    * If not set the lastChildAttribute to parent_attr.0
                   if (rs.next()) {
                        lastChildAttribute = rs.getString("attribute");
                   } else {
                        lastChildAttribute = parent_attribute.concat(".0");
                   rs.close();
                   return lastChildAttribute;
              } catch (SQLException e) {
                   e.printStackTrace();
                   return null;
          * This helper method determines the position of the last node in the attribute.
          * i.e for 3.5.2 it returns 2, for 2.1 it returns 1 etc.
          * @param attribute
          * @return position of last node in this attribute
         private int getLastNodePosition(String attribute) {
              StringTokenizer tokenizer = new StringTokenizer(attribute, ".");
              String lastNodePosition = "0";
              while( tokenizer.hasMoreTokens() ) {
                   lastNodePosition = tokenizer.nextToken();
              return Integer.parseInt(lastNodePosition);
          * This method calculates the attribute of a node being inserted
          * by incrementing the last child position by 1 and attaching the
          * incremented position to the parent.
          * @param parent_attr
          * @param lastPosition
          * @return attribute of the new node
         private String createNewNodeAttribute(String parent_attr, int lastPosition) {
              String newPosition = new Integer(lastPosition + 1).toString();
              return parent_attr.concat("." + newPosition);
          * This method checks if the required sequence number for a new node is already in use and
          * handles the sequence numbers accordingly.
          * If the sequence number for a new node is NOT IN USE, the method doesn't do anything.
          * If the sequence number for a new node is IN USE, the method searches for the next free
          * sequence number by incrementing the number by one and repeating the query until no result
          * is found. Then all the sequence numbers between the required number (including, >= relation)
          * and the nearest found free number (not including, < relation) are incremented by 1, as to
          * make space for the new node.
          * @param connection
          * @param catalogue
          * @param newNodeSequenceNumber required sequence number for the new node
         private void setSequenceNumbers(OracleConnection connection, String catalogue, int newNodeSequenceNumber) {
              // 1. check if the new sequence number exists - if no do nothing
              // if yes - increment by one and see if exists
              //           repeat until free sequence number exists
              // when found increment all sequence numbers freeSeqNr > seqNr >= newSeqNr
              String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
                        "WHERE catalogue=:1 AND sort_sequence=:2";
              PreparedStatement ps;
              try {
                   ps = connection.prepareStatement(query);
                   ps.setString(1, catalogue);
                   ps.setInt(2, newNodeSequenceNumber);               
                   ResultSet rs = ps.executeQuery();
                   // if no result, the required sequence number is free - nothing to do
                   if( rs.next() ) {
                        int freeSequenceNumber = newNodeSequenceNumber;
                        do {
                             ps.setString(1, catalogue);
                             ps.setInt(2, freeSequenceNumber++);
                             rs = ps.executeQuery();
                        } while( rs.next() );
                        // increment sequence numbers - call stored procedure
                        String callUpdateSeqeunceNrs = "{ call fasi_lob.pack_gliederung.updateSeqNumbers(:1, :2, :3) }";
                        CallableStatement cst = connection.prepareCall(callUpdateSeqeunceNrs);
                        cst.setString(1, catalogue);
                        cst.setInt(2, newNodeSequenceNumber);
                        cst.setInt(3, freeSequenceNumber);
                        cst.execute();
                        cst.close();
    //                    String query2 = "UPDATE vstd_media_cat_attributes " +
    //                                      "SET sort_sequence = (sort_sequence + 1 ) " +
    //                                      "WHERE catalogue=:1 sort_sequnce >=:2 AND sort_sequence <:3";
    //                    PreparedStatement ps2;
    //                    ps2 = connection.prepareStatement(query2);
    //                    ps2.setString(1, catalogue);
    //                    ps2.setInt(2, newNodeSequenceNumber);
    //                    ps2.setInt(3, freeSequenceNumber);
    //                    ps.executeUpdate();
    //                    ps.close();
                   } // end of if block
                   rs.close();
              } catch (SQLException e) {
                   e.printStackTrace();
          * This method finds the last sequence number preceding the sequence number of a node
          * that is going to be inserted. The preceding sequence number is required to calculate
          * the sequence number of the new node.
          * We perform a hierarchical query starting from the parent node: if a result is returned,
          * we assign the parent's farthest descendant's node sequence number; if no result
          * is returned, we assign the parent's sequence number.
          * @param connection
          * @param catalogue
          * @param parent_attr parent attribute of the new node
          * @return
         private int getPrecedingSequenceNumber(OracleConnection connection, String catalogue, String parent_attr) {
              int sequenceNumber = 0;
              String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
                                "WHERE catalogue=:1 " +
                                "CONNECT BY PRIOR attribute = parent_attr START WITH parent_attr=:2 " +
                                "ORDER BY sort_sequence DESC";
              try {
                   PreparedStatement ps = connection.prepareStatement(query);
                   ps.setString(1, catalogue);
                   ps.setString(2, parent_attr);
                   ResultSet rs = ps.executeQuery();
                   if ( rs.next() ) {
                        sequenceNumber = rs.getInt("sort_sequence");
                   } else {
                        // TODO: ggf fetch from request!
                        sequenceNumber = -1;
                   rs.close();
                   ps.close();
              } catch (SQLException e) {
                   e.printStackTrace();
              return sequenceNumber;
    }

    After further googling I figured out what was causing the problem: in eclipse I was referring to external libraries located in eclipse/plugins directory, whereas Tomcat was referring to the same libraries (possibly older versions) in it's common/lib directory.

  • Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Hello everyone ... sorry for my English but I am an Italian boy with a problem that is not answered.
    I had to create a web application-service (created in Java with NetBeans 6.7) which is connected to a database postgresql (8.3.5) and for connection to the server using tomcat (3.2.4) through SOAP messages (2_2).
    OPERATING SYSTEM: WINXP
    I have created classes ... I created the database ... completed the project in NetBeans without any errors ... implemented the necessary libraries in the project (also ).... 8.3.604.jar jdbc tomcat configured and soap ... .. and set the environment variables (soap, mail, send in xerces )...... run the application on the NetBeans appears the login screen of my web service .....
    enter username and password (exactly!) and the NetBeans gives me an Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at Intro.loginActionPerformed(Intro.java:522)
            at Intro.access$100(Intro.java:21)
            at Intro$2.actionPerformed(Intro.java:111)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            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)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 31 seconds)  The line 522 Intro class is as follows:
    private void loginActionPerformed(java.awt.event.ActionEvent evt) {                                     
            try {
                URL address= new URL("http://"+ip+":8080/soap/servlet/rpcrouter");
                //Costruzione della chiamata
                Call chiamata = new Call();
                chiamata.setTargetObjectURI("urn:server");
                chiamata.setMethodName("controllaAgenzia");
                chiamata.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
                //creazione parametri che dovro' passare al soap
                Vector<Parameter> params = new Vector<Parameter>();
                String u = user.getText();
                String p = String.valueOf(password.getPassword());
                params.addElement(new Parameter("user", String.class, u, null));
                params.addElement(new Parameter("password", String.class, p, null));
                chiamata.setParams(params);//parametri passati al soap
                try {
                    //Invocazione RPC
                    Response respons = chiamata.invoke(address, "");
                    //qui ho la risposta inviata dal server
                    *Parameter par = respons.getReturnValue();*
                    Object value = par.getValue();
                    String REP = String.valueOf(value);
                    System.out.println(REP);
                    if (REP.equals("ACK_agenzia")) {
                        new MainAgenzia(ip);
                        this.dispose();
                    } else if (REP.equals("NACK_agenzia")) {
                        JOptionPane.showMessageDialog(null, "I dati inseriti non sono corretti", "Errore", JOptionPane.ERROR_MESSAGE);
                        password.setText("");
                        user.setText("");
                    } The strange thing is that this web service was running just finished the project.
    After 4-5 days of its operation has stopped, creandomi this problem.
    I think the answer is, the server that is not the case.
    I thought all I thought was jdbc, but I can connect to the database, so I do not know what to do and how to proceed.
    thanks to all, and thanks to my translator. :P

    Parameter par = respons.getReturnValue();There is only one possible reason, "respons" is null.

Maybe you are looking for

  • Message Mapping activation error-Source code has syntax errors in UDF

    Hi all, I wrote a small UDF for sum of 2 numbers: import udf.* public String getsum(String a, String b, Container container) throws StreamTransformationException{ int c = Integer.parseInt(a); int d = Integer.parseInt(b); int e = packageDemo.getSum(c,

  • Youtube and Apple Tv

         My Youtube on Apple TV does not work. When I try to access any of the Youtube options (history, recent, most viewed, top rated) I get the same message indicating a communication problem and to try later.  I've been trying later for several month

  • How can i connect my i-pad to my tv ?

    please can you help , I need to know how can i connect my i-pad to my tv ? thank you

  • Data pump, Query "1=2" performance?

    Hi guys I am trying to export a schema using data pump however I need no data from a few of the tables since they are irrelevant but I'd still like to have the structure of the table itself along with any constraints and such. I thought of using the

  • Pages and iPhone and iWork and iMac. 100% confused.....

    I open Pages on my iPhone. Pressing the + sign give me the option to create document or copy from iTunes, iDisk or WebDAV. I was rather hoping for the option of seeing an icon leading to my iwork storage area at that point, but no. Not sure why I wou