1 2 Previous Next 23 Replies Latest reply: Apr 25, 2013 6:00 PM by bigchill RSS

    Please Solve This Problem

    amd_el
      I,m Using Jdev 11.1.2.3 and I finished the project work that upload CSV File into ADF table this CSV File Contain column Date Not Import into table and where i commit give me error about date and in log file on weblogic give me this error:_

      ADF: Adding the following JSF error message: 01/04/2013 java.lang.IllegalArgumentException: 01/04/2013 at oracle.jbo.domain.Date.parseISO8601FormatString(Date.java:763) at oracle.jbo.domain.Timestamp.toTimestamp(Timestamp.java:526) at oracle.jbo.domain.Timestamp.<init>(Timestamp.java:272) at oracle.jbo.domain.Timestamp$1.convert(Timestamp.java:72) at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:869) at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:116) at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2220) at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1050) at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:992) at model.AppModuleImpl.createRow(AppModuleImpl.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:655) at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2162) at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3088) at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:266) at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1626) 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 view.UploadBean.parse(UploadBean.java:22) at view.UploadBean.fileUploadValueChangeListener(UploadBean.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:144) at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824) at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:243) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:405) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508) 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:173) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 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 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)

      pls how i can sole this problem
      thanks
        • 1. Re: Please Solve This Problem
          Timo Hahn
          User, please copy the stacktrace as is into the post. The way it looks right now it's not readable at all. We need the line breaks!

          Please elaborate on what you want to do. Do you want to import the date from the CVS file or not?

          Timo
          • 2. Re: Please Solve This Problem
            amd_el
            Thanks for replay

            I'm already import the CSV file, but there is a problem with the date field
            • 3. Re: Please Solve This Problem
              Timo Hahn
              Where is the stack trace?

              Timo
              • 4. Re: Please Solve This Problem
                amd_el
                sorry what is the stack trace
                • 5. Re: Please Solve This Problem
                  amd_el
                  I'm already import the CSV file, but there is a problem with the date field
                  thanks
                  ahmad
                  • 6. Re: Please Solve This Problem
                    Timo Hahn
                    the unreadable part from the first post
                    ADF: Adding the following JSF error message: 01/04/2013 java.lang.IllegalArgumentException: 01/04/2013 at oracle.jbo.domain.Date.parseISO8601FormatString(Date.java:763) at oracle.jbo.domain.Timestamp.toTimestamp(Timestamp.java:526) at oracle.jbo.domain.Timestamp.<init>(Timestamp.java:272) at oracle.jbo.domain.Timestamp$1.convert(Timestamp.java:72) at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:869) at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:116) at oracle.jbo.server.AttributeDefImpl.convertToJava...
                    By the way please add information aboput the type of the column in hte db you try to store the date from the csv file in and any code you use to read the value fron the file and set it to the column.


                    Timo
                    • 7. Re: Please Solve This Problem
                      amd_el
                      i,m using this example in this link:
                      http://dstas.blogspot.co.uk/2012/11/csv-files-with-adf-csvparser-example.html
                      and I have added some modifications to this example this modifications  about table that contain date column
                      but this  date column not import with another data
                      • 8. Re: Please Solve This Problem
                        Timo Hahn
                        Well, as you have made changes to the sample I guess one of them went wrong. As you don't provide the stackstrace in a readable form I can't help.

                        Timo
                        • 9. Re: Please Solve This Problem
                          amd_el
                          thanks for trying
                          • 10. Re: Please Solve This Problem
                            amd_el
                            i,m using this UploadBean to upload the file but all data in CSV file upload without date coulmn


                            package view;

                            import javax.faces.event.ValueChangeEvent;

                            import oracle.adf.model.BindingContext;
                            import oracle.adf.model.adapter.dataformat.csv.CSVParser;

                            import oracle.binding.BindingContainer;

                            import oracle.binding.OperationBinding;

                            import org.apache.myfaces.trinidad.model.UploadedFile;

                            *public class UploadBean {*
                            *public UploadBean() {*
                            *}*

                            *public void parse(String[] lineValues){*
                            BindingContainer bdCont=BindingContext.getCurrent().getCurrentBindingsEntry();
                            OperationBinding operation = bdCont.getOperationBinding("createRow");
                            operation.getParamsMap().put("lineValues", lineValues);
                            operation.execute();


                            *}*
                            *public void fileUploadValueChangeListener(ValueChangeEvent valueChangeEvent) {*
                            *// Add event code here...*
                            System.out.println(" uploading file ");
                            UploadedFile file = (UploadedFile)valueChangeEvent.getNewValue();


                            *try {*
                            CSVParser csvParser = new CSVParser(file.getInputStream());

                            *//skip the first line since it holds the header*
                            csvParser.nextLine();

                            *while(csvParser.nextLine()){*
                            String[] lineValues = csvParser.getLineValues();
                            this.parse(lineValues);
                            *}*

                            *} catch (Exception e) {*
                            e.printStackTrace();
                            *}*
                            *}*
                            *}*
                            • 11. Re: Please Solve This Problem
                              Timo Hahn
                              Last try from my side!

                              Why don't you privide the stacktrace (the error message you posted in the first post) in a readable form?
                              10 posts and we not even close to the problem!

                              The code you posted in your last posting doesn't help a bit. How should we know where the problem is?
                              I can only guess that you have a problem when you parse the lines and try to insert them into the table. However I don't know how you do this. And you can't expect us to do your work.
                              Stacktraces are very good to fins information about the problem and where it occurs. I can't download the code you have loaded. From the blog I see that a custom method in the application module (createRow) is involved. Have you made changes to this method? If yes which ones? Does this method do a conversion of string to the needed date type?

                              Timo
                              • 12. Re: Please Solve This Problem
                                amd_el
                                Initially Sorry for the delay and I hope that you will not be disturbed by help me

                                stack trace

                                     at oracle.jbo.domain.Date.parseISO8601FormatString(Date.java:763)
                                     at oracle.jbo.domain.Timestamp.toTimestamp(Timestamp.java:526)
                                     at oracle.jbo.domain.Timestamp.<init>(Timestamp.java:272)
                                     at oracle.jbo.domain.Timestamp$1.convert(Timestamp.java:72)
                                     at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:869)
                                     at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:116)
                                     at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2220)
                                     at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1050)
                                     at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:992)
                                     at model.AppModuleImpl.createRow(AppModuleImpl.java:44)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                     at java.lang.reflect.Method.invoke(Method.java:597)
                                     at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:655)
                                     at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2162)
                                     at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3088)
                                     at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:266)
                                     at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1626)
                                     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 view.UploadBean.parse(UploadBean.java:22)
                                     at view.UploadBean.fileUploadValueChangeListener(UploadBean.java:40)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                     at java.lang.reflect.Method.invoke(Method.java:597)
                                     at com.sun.el.parser.AstValue.invoke(Unknown Source)
                                     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
                                     at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
                                     at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:144)
                                     at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
                                     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824)
                                     at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:243)
                                     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
                                     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:405)
                                     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
                                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
                                     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:173)
                                     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                                     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 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)
                                • 13. Re: Please Solve This Problem
                                  Arunkumar Ramamoorthy-Oracle
                                  User,

                                  Check out the stack trace

                                  at view.UploadBean.parse(UploadBean.java:22)
                                  at view.UploadBean.fileUploadValueChangeListener(UploadBean.java:40)

                                  The particular lines of the class is trying to parse a string to Date, which is throwing error. Try running the application in debug mode, by adding breakpoints to the above mentioned lines of the code to see where it is going wrong.

                                  -Arun
                                  • 14. Re: Please Solve This Problem
                                    amd_el
                                    thanks for help me

                                    this is UploadBean i using it to import CSV file this file contain Column date

                                    package view;

                                    import javax.faces.event.ValueChangeEvent;

                                    import oracle.adf.model.BindingContext;
                                    import oracle.adf.model.adapter.dataformat.csv.CSVParser;

                                    import oracle.binding.BindingContainer;

                                    import oracle.binding.OperationBinding;

                                    import org.apache.myfaces.trinidad.model.UploadedFile;

                                    public class UploadBean {
                                    public UploadBean() {
                                    }

                                    public void parse(String[] lineValues){
                                    BindingContainer bdCont=BindingContext.getCurrent().getCurrentBindingsEntry();
                                    OperationBinding operation = bdCont.getOperationBinding("createRow");
                                    operation.getParamsMap().put("lineValues", lineValues);
                                    operation.execute();


                                    }
                                    public void fileUploadValueChangeListener(ValueChangeEvent valueChangeEvent) {
                                    // Add event code here...
                                    System.out.println(" uploading file ");
                                    UploadedFile file = (UploadedFile)valueChangeEvent.getNewValue();


                                    try {
                                    CSVParser csvParser = new CSVParser(file.getInputStream());

                                    //skip the first line since it holds the header
                                    csvParser.nextLine();

                                    while(csvParser.nextLine()){
                                    String[] lineValues = csvParser.getLineValues();
                                    this.parse(lineValues);
                                    }

                                    } catch (Exception e) {
                                    e.printStackTrace();
                                    }
                                    }
                                    }

                                    ahmad
                                    1 2 Previous Next