Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7473

Induce Model XML from Database throws exception

    Details

      Description

      Go to Webtools -> Import/Export -> Induce Model XML from Database (https://localhost:8443/webtools/control/view/ModelInduceFromDb)

      An exception is thrown: javax.servlet.ServletException: File [/entity/ModelInduceFromDb.jsp] not found.

        Issue Links

          Activity

          Hide
          gopalyadav Gopal Yadav added a comment -

          Attached patch for this issue, in which I have corrected the location of the file ModelInduceFromDb.jsp

          Show
          gopalyadav Gopal Yadav added a comment - Attached patch for this issue, in which I have corrected the location of the file ModelInduceFromDb.jsp
          Hide
          sunose William Wang added a comment -

          on ofbiz 16.11.01 need move whole apache-ofbiz-16.11.01\framework\webtools\template\entity
          to
          apache-ofbiz-16.11.01\framework\webtools\webapp\webtools
          because on WEB-INF/controller.xml definition is;
          <view-map name="ModelInduceFromDb" page="/entity/ModelInduceFromDb.jsp"/>

          Show
          sunose William Wang added a comment - on ofbiz 16.11.01 need move whole apache-ofbiz-16.11.01\framework\webtools\template\entity to apache-ofbiz-16.11.01\framework\webtools\webapp\webtools because on WEB-INF/controller.xml definition is; <view-map name="ModelInduceFromDb" page="/entity/ModelInduceFromDb.jsp"/>
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks for the report Gopal. Yes you are right William we must do a svn move rather than a delete+add to not lose svn history

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks for the report Gopal. Yes you are right William we must do a svn move rather than a delete+add to not lose svn history
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Actually after moving FTL templates to the template sub-dir we forgot links
          in the ctrlr. Changing the ctrlr is the best way.

          Fixed in
          trunk r1787535
          R16.11 r1787536

          Show
          jacques.le.roux Jacques Le Roux added a comment - Actually after moving FTL templates to the template sub-dir we forgot links in the ctrlr. Changing the ctrlr is the best way. Fixed in trunk r1787535 R16.11 r1787536
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Ooops, got a StackOverflowError with trunk, checking why...

          Show
          jacques.le.roux Jacques Le Roux added a comment - Ooops, got a StackOverflowError with trunk, checking why...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          OK found it: Could not initialize class org.apache.ofbiz.base.util.UtilCodec. Let's see...

          Show
          jacques.le.roux Jacques Le Roux added a comment - OK found it: Could not initialize class org.apache.ofbiz.base.util.UtilCodec. Let's see...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          No it's really a StackOverflowError
          The error above is due to this line in org.apache.ofbiz.webapp.control.ControlServlet.doGet()

          request.setAttribute("ERROR_MESSAGE", UtilCodec.getEncoder("html").encode(throwable.toString()));

          I have yet no ideas about the StackOverflowError :/

          Show
          jacques.le.roux Jacques Le Roux added a comment - No it's really a StackOverflowError The error above is due to this line in org.apache.ofbiz.webapp.control.ControlServlet.doGet() request.setAttribute(" ERROR_MESSAGE ", UtilCodec.getEncoder("html").encode(throwable.toString())); I have yet no ideas about the StackOverflowError :/
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          view/checkdb works
          But I noticed that, among these old JSP stuff, it's the only one and we have also this block commented out by Jacopo since 2007:

                    <#-- want to leave these out because they are only working so-so, and cause people more problems that they solve, IMHO
                      <li><a href="<@ofbizUrl>view/EditEntity</@ofbizUrl>"  target="_blank">Edit Entity Definitions</a></li>
                      <li><a href="<@ofbizUrl>ModelWriter</@ofbizUrl>" target="_blank">Generate Entity Model XML (all in one)</a></li>
                      <li><a href="<@ofbizUrl>ModelWriter?savetofile=true</@ofbizUrl>" target="_blank">Save Entity Model XML to Files</a></li>
                    -->
                    <#-- not working right now anyway
                      <li><a href="<@ofbizUrl>ModelGroupWriter</@ofbizUrl>" target="_blank">Generate Entity Group XML</a></li>
                      <li><a href="<@ofbizUrl>ModelGroupWriter?savetofile=true</@ofbizUrl>" target="_blank">Save Entity Group XML to File</a></li>
                    -->
                    <#--
                      <li><a href="<@ofbizUrl>view/tablesMySql</@ofbizUrl>">MySQL Table Creation SQL</a></li>
                      <li><a href="<@ofbizUrl>view/dataMySql</@ofbizUrl>">MySQL Auto Data SQL</a></li>
                    -->
          

          But view/ModelInduceFromDb is more annoying

          Show
          jacques.le.roux Jacques Le Roux added a comment - view/checkdb works But I noticed that, among these old JSP stuff, it's the only one and we have also this block commented out by Jacopo since 2007: <#-- want to leave these out because they are only working so-so, and cause people more problems that they solve, IMHO <li><a href= "<@ofbizUrl>view/EditEntity</@ofbizUrl>" target= "_blank" >Edit Entity Definitions</a></li> <li><a href= "<@ofbizUrl>ModelWriter</@ofbizUrl>" target= "_blank" >Generate Entity Model XML (all in one)</a></li> <li><a href= "<@ofbizUrl>ModelWriter?savetofile= true </@ofbizUrl>" target= "_blank" >Save Entity Model XML to Files</a></li> --> <#-- not working right now anyway <li><a href= "<@ofbizUrl>ModelGroupWriter</@ofbizUrl>" target= "_blank" >Generate Entity Group XML</a></li> <li><a href= "<@ofbizUrl>ModelGroupWriter?savetofile= true </@ofbizUrl>" target= "_blank" >Save Entity Group XML to File</a></li> --> <#-- <li><a href= "<@ofbizUrl>view/tablesMySql</@ofbizUrl>" >MySQL Table Creation SQL</a></li> <li><a href= "<@ofbizUrl>view/dataMySql</@ofbizUrl>" >MySQL Auto Data SQL</a></li> --> But view/ModelInduceFromDb is more annoying
          Hide
          mbrohl Michael Brohl added a comment - - edited

          Additional information from Allan Zarsuela in OFBIZ-9582:

          Environment:

          Ubuntu 16.04
          Apache OFBiz Version 16.11.03
          MySQL DB Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper
          mysql-connector-java-5.1.37-bin.jar

          I installed the apache-ofbiz-16.11.03 version to know if it's the same with
          what I downloaded in SVN that has error in Induce Model XML from Database.
          And it is so.

          Steps to duplicate Bug:
          1. Download and install apache-ofbiz-16.11.03 version
          2. Log in username and password respectively as admin ofbiz.
          3. Accessing the link below I encountered the error message
          below:

          https://localhost:8443/webtools/control/view/ModelInduceFromDb

          ERROR in error page, (infinite loop or error page not found with name
          [/error/error.jsp]), but here is the text just in case it helps you:
          java.lang.StackOverflowErrorERROR in error page, (infinite loop or error
          page not found with name [/error/error.jsp]), but here is the text just in
          case it helps you: java.lang.StackOverflowError

          In the log in terminal, I can see below. I already tried to truncate this
          table server_hit:

          (Error while inserting:
          [GenericEntity:ServerHit][contentId,webtools.view(java.lang.String)][createdStamp,2017-08-10
          16:01:50.212(java.sql.Timestamp)][createdTxStamp,2017-08-10
          16:01:50.212(java.sql.Timestamp)][hitStartDateTime,2017-08-10
          16:01:33.785(java.sql.Timestamp)][hitTypeId,REQUEST(java.lang.String)][lastUpdatedStamp,2017-08-10
          16:01:50.212(java.sql.Timestamp)][lastUpdatedTxStamp,2017-08-10
          16:01:50.212(java.sql.Timestamp)][partyId,admin(java.lang.String)][referrerUrl,https://localhost:8443/webtools/control/main?externalLoginKey=ELe10a3e70-599f-468e-acaa-0eb6b6394a79(java.lang.String)][requestUrl,https://localhost:8443/webtools/control/view/ModelInduceFromDb(java.lang.String)][runningTimeMillis,16425(java.lang.Long)][serverHostName,kexpresstest-ThinkCentre-A58(java.lang.String)][serverIpAddress,127.0.1.1(java.lang.String)][userLoginId,admin(java.lang.String)][visitId,10901(java.lang.String)]
          (SQL Exception while executing the following:INSERT INTO SERVER_HIT
          (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES,
          RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL,
          SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP,
          LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID,
          PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?,
          ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry
          '10901-webtools.view-2017-08-10 16:01:34-REQUEST' for key 'PRIMARY')))

          Show
          mbrohl Michael Brohl added a comment - - edited Additional information from Allan Zarsuela in OFBIZ-9582 : Environment: Ubuntu 16.04 Apache OFBiz Version 16.11.03 MySQL DB Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper mysql-connector-java-5.1.37-bin.jar I installed the apache-ofbiz-16.11.03 version to know if it's the same with what I downloaded in SVN that has error in Induce Model XML from Database. And it is so. Steps to duplicate Bug: 1. Download and install apache-ofbiz-16.11.03 version 2. Log in username and password respectively as admin ofbiz. 3. Accessing the link below I encountered the error message below: https://localhost:8443/webtools/control/view/ModelInduceFromDb ERROR in error page, (infinite loop or error page not found with name [/error/error.jsp] ), but here is the text just in case it helps you: java.lang.StackOverflowErrorERROR in error page, (infinite loop or error page not found with name [/error/error.jsp] ), but here is the text just in case it helps you: java.lang.StackOverflowError In the log in terminal, I can see below. I already tried to truncate this table server_hit: (Error while inserting: [GenericEntity:ServerHit] [contentId,webtools.view(java.lang.String)] [createdStamp,2017-08-10 16:01:50.212(java.sql.Timestamp)][createdTxStamp,2017-08-10 16:01:50.212(java.sql.Timestamp)][hitStartDateTime,2017-08-10 16:01:33.785(java.sql.Timestamp)] [hitTypeId,REQUEST(java.lang.String)] [lastUpdatedStamp,2017-08-10 16:01:50.212(java.sql.Timestamp)][lastUpdatedTxStamp,2017-08-10 16:01:50.212(java.sql.Timestamp)] [partyId,admin(java.lang.String)] [referrerUrl,https://localhost:8443/webtools/control/main?externalLoginKey=ELe10a3e70-599f-468e-acaa-0eb6b6394a79(java.lang.String)] [requestUrl, https://localhost:8443/webtools/control/view/ModelInduceFromDb(java.lang.String)][runningTimeMillis,16425(java.lang.Long)][serverHostName,kexpresstest-ThinkCentre-A58(java.lang.String)][serverIpAddress,127.0.1.1(java.lang.String)][userLoginId,admin(java.lang.String)][visitId,10901(java.lang.String )] (SQL Exception while executing the following:INSERT INTO SERVER_HIT (VISIT_ID, CONTENT_ID, HIT_START_DATE_TIME, HIT_TYPE_ID, NUM_OF_BYTES, RUNNING_TIME_MILLIS, USER_LOGIN_ID, STATUS_ID, REQUEST_URL, REFERRER_URL, SERVER_IP_ADDRESS, SERVER_HOST_NAME, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP, INTERNAL_CONTENT_ID, PARTY_ID, ID_BY_IP_CONTACT_MECH_ID, REF_BY_WEB_CONTACT_MECH_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Duplicate entry '10901-webtools.view-2017-08-10 16:01:34-REQUEST' for key 'PRIMARY')))

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              gopalyadav Gopal Yadav
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Development