Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Difficulty with ADF Faces/ADF Essentials and Glassfish

BobStricklandNov 10 2013 — edited Nov 17 2013

Hi all,

I've got a web application written with ADF Faces, and it runs just fine within jDeveloper 11.1.2.3 but when I deploy it to Glassfish 3.1.2 (with ADF Essentials installed) something curious happens.

My application has no difficulty performing database reads, but when it tried to write to the database and commit, it fails.

I've seen only a couple of other people with this problem, and none of them seem to have found a solution - so I'm assuming it's something stupid that I'm doing or misunderstanding.

Here is the log file:

[#|2013-11-10T11:45:17.601-0500|WARNING|glassfish3.1.2|oracle.adf.controller.faces.lifecycle.Utils|_ThreadID=79;_ThreadName=Thread-2;|ADF: Adding the following JSF error message: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception

java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception

  at oracle.jbo.server.BaseSQLBuilderImpl.isSQLRecoverableException(BaseSQLBuilderImpl.java:4575)

  at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3380)

  at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3067)

  at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2071)

  at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)

  at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)

  at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)

  at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)

  at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)

  at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)

  at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)

  at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)

  at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)

  at app.AppModuleImpl.commitOperation(AppModuleImpl.java:50)

  at com.methods.lrc.view.VendorBean.createPaymentReceived(VendorBean.java:509)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  at java.lang.reflect.Method.invoke(Method.java:606)

  at com.sun.el.parser.AstValue.invoke(AstValue.java:254)

  at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)

  at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)

  at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

  at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

  at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)

  at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)

  at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)

  at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)

  at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)

  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:973)

  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)

  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)

  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)

  at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

  at com.methods.lrc.view.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:42)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

  at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

  at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)

  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)

  at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)

  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)

  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)

  at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

  at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)

  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)

  at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)

  at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)

  at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

  at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)

  at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)

  at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)

  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)

  at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

  at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

  at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

  at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

  at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

  at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

  at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

  at java.lang.Thread.run(Thread.java:724)

Here is the method where it fails:

    public String createPaymentReceived() {

        AppModuleImpl appModule = this.getAppModule();

        ViewObjectImpl paymentReceivedVOI = appModule.getPaymentsReceivedView3();

        Row paymentRow = paymentReceivedVOI.createRow();

        paymentRow.setAttribute("CheckNumber", prCheckNumber);

        paymentRow.setAttribute("PaymAmount", totalSelectedValue);

        paymentRow.setAttribute("PaymentComment", prComment);

        paymentRow.setAttribute("PaymentDate", prPaymentDate);

        paymentRow.setAttribute("PaymentType", prPaymentType);

        paymentRow.setAttribute("TrackId", prTrackId);

        appModule.commitOperation();

        DBSequence paymentsReceivedId = (DBSequence)paymentRow.getAttribute("PaymentsReceivedId");

        Iterator selectionIt = unpaidPaymentItemsTable.getSelectedRowKeys().iterator();

        while (selectionIt.hasNext()) {

            Object rowKey = selectionIt.next();

            unpaidPaymentItemsTable.setRowKey(rowKey);

            int index = unpaidPaymentItemsTable.getRowIndex();

            JUCtrlHierNodeBinding row = (JUCtrlHierNodeBinding)unpaidPaymentItemsTable.getRowData(index);

            Row selectedRow = row.getRow();

            selectedRow.setAttribute("PaymentsReceivedId", paymentsReceivedId.getSequenceNumber());

            selectedRow.setAttribute("PaymentDate", prPaymentDate);

        }

        appModule.commitOperation();

        prCheckNumber = null;

        totalSelectedValue = 0;

        prComment = null;

        prPaymentDate = new Date();

        prTrackId = null;

        prPaymentType = "K";

        refreshTableIterator("VendorPaymentItemsView1Iterator");

        refreshTableIterator("VendorPaymentsReceived1Iterator");

        return null;

    }

it fails on the second appModule.commitOperation() (which I've bolded)

if anyone can give a clue to what I'm misunderstanding I'd really appreciate it.  I'm sure that if I had the course for BaseSQLBuilderImpl.java and/or DBTransactionImpl it would be easier to see what the actual error was - unfortunately java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception doesn't tell me much of anything.

Thanks so much to anyone who's got the time/knowledge to help.

Bob

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 15 2013
Added on Nov 10 2013
5 comments
655 views