Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: Rest request flow logs #645

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9fc7356
Merge pull request #1 from moqui/master
dixitdeepak Nov 18, 2021
940e7e9
Merge branch 'moqui:master' into master
dixitdeepak Dec 7, 2021
067a9fa
Merge branch 'moqui:master' into master
dixitdeepak Dec 14, 2021
79b237e
Merge branch 'moqui:master' into master
dixitdeepak Dec 16, 2021
ed07e5c
Merge branch 'moqui:master' into master
dixitdeepak Dec 21, 2021
d44b67e
Merge branch 'moqui:master' into master
dixitdeepak Jan 4, 2022
8dd8906
Merge branch 'moqui:master' into master
dixitdeepak Jan 7, 2022
894cffb
Merge branch 'moqui:master' into master
dixitdeepak Jan 12, 2022
cb85752
Merge branch 'moqui:master' into master
dixitdeepak Jan 24, 2022
c54f4d3
Merge branch 'moqui:master' into master
dixitdeepak Apr 20, 2022
4750a9c
Merge branch 'moqui:master' into master
dixitdeepak Jul 18, 2022
88e8ceb
Merge branch 'moqui:master' into master
dixitdeepak Jul 19, 2022
06d2f86
Merge branch 'moqui:master' into master
dixitdeepak Jul 27, 2022
cd2b5e9
Merge branch 'moqui:master' into master
dixitdeepak Aug 1, 2022
9407201
Merge branch 'moqui:master' into master
dixitdeepak Aug 17, 2022
c243711
In XML Actions groovy generating macros, change the iterator to behav…
jonesde Sep 8, 2022
7eb786b
Fix issue in commit a few hours ago where the code generated for XML …
jonesde Sep 9, 2022
fe22ec4
In EntityDbMeta change all calls to getTables() and getColumns() to i…
jonesde Sep 9, 2022
359b362
Merge pull request #2 from hotwax/mysql8-fix
dixitdeepak Sep 12, 2022
6695d44
Merge branch 'moqui:master' into upstream-sync
dixitdeepak Sep 23, 2022
26a6f9d
Merge pull request #3 from hotwax/upstream-sync
dixitdeepak Sep 23, 2022
0505a0f
Merge branch 'moqui:master' into master
dixitdeepak Jan 9, 2023
cec4a0b
Merge branch 'moqui:master' into master
dixitdeepak Mar 23, 2023
4df4209
Upgraded freemarker version to 2.3.32, also updated ftl version in Ft…
dixitdeepak Feb 1, 2023
5e01dce
Various library updates: jackson-databind, jetty, joda-time, shiro, s…
jonesde Feb 1, 2023
47828f0
Added missing package name in entity relationship
dixitdeepak Feb 2, 2023
087749d
Add StatusFlowTransitionFromAndTo view-entity
jonesde Feb 3, 2023
fbb65c2
In ServiceFacadeImpl add classes for Service LoadRunner, used for loa…
jonesde Feb 4, 2023
4558bdf
In Service LoadRunner add stats broken down by artifact type with det…
jonesde Feb 4, 2023
9ed1483
Service LoadRunner improved stats gathering with time bin based stats…
jonesde Feb 5, 2023
d3ddb8b
In Service LoadRunner add small random delay support, use available t…
jonesde Feb 6, 2023
e462fed
In build.gradle also delete the SaveOpenSearch.zip file in cleanLoadS…
jonesde Feb 6, 2023
5bd110b
Fix PIT testing against ElasticSearch 7.10.2, the last open source ve…
jonesde Feb 6, 2023
87add59
Add new moqui-demo component repo to addons.xml
jonesde Feb 6, 2023
f88210e
Add getScreenPathHasTransition in ScreenRenderImpl
acetousk Feb 15, 2023
abe9936
In ElasticDatasourceFactory add better exceptions than NPE when no El…
jonesde Feb 19, 2023
185a696
Increase default worker-pool-core to 16 threads, and max to 32 or CPU…
jonesde Feb 20, 2023
b17d351
In ScreenRenderImpl remove token created requirement when checking fo…
aabiabdallah Feb 21, 2023
c7b038f
Revert "Update to session token condition"
jonesde Feb 22, 2023
1b7d7e1
Fixed a runtime error if Currency is BTC (#555)
hellozhangwei Feb 22, 2023
4478e3a
Anonymous usage of screens with transitions (#541)
jenshp Feb 22, 2023
4f858cb
Small fix for new authz changes for anonymous-view/-all, handle no sc…
jonesde Feb 23, 2023
a97e5ed
Handle usernames with different casing in session data
jenshp Feb 23, 2023
5e70c50
Add common java includes to the xml actions ftl file
acetousk Mar 7, 2023
f5e57d6
Add subTopic field to NotificationMessage
jonesde Mar 7, 2023
d42ae9c
Refactor getTitle to prioritize title() method call over data
acetousk Mar 13, 2023
222a9b0
Merge branch 'moqui:master' into master
dixitdeepak Jul 11, 2023
d855886
Upstream sync (#7)
dixitdeepak Jul 11, 2023
b468570
Merge branch 'master' of https://github.com/hotwax/moqui-framework
dixitdeepak Jul 11, 2023
dd5985a
Master (#9)
dixitdeepak Nov 6, 2023
fbb171b
Upstream sync (#10)
dixitdeepak Nov 29, 2023
c50641e
Master (#11)
dixitdeepak Dec 3, 2023
4432dd7
Merge branch 'moqui:master' into main
dixitdeepak Dec 3, 2023
9cab303
Master (#13)
dixitdeepak Dec 13, 2023
034b64b
Library updates: Jetty to 10.0.18, Log4J to 2.22.0, H2 to 2.2.224, co…
jonesde Dec 19, 2023
5f2d0c8
Worked on following:
dixitdeepak Jan 12, 2024
4f9359e
Content type is reserved word in Amazon Aurora DB
dixitdeepak Mar 8, 2024
fc5bf4e
Removed custom changes that was added to support aws aurora
dixitdeepak May 9, 2024
33613b4
create a service to unify login attempts
pythys Jan 8, 2024
2298fdc
Follow up on PR #628: formatting changes only to reduce indentation a…
jonesde Jan 10, 2024
ba98ad5
Re-ordered Console Appender in log4j2.xml
AyanF Feb 7, 2024
4316756
Add screen resource type for a footer script
acetousk Feb 16, 2024
9208d9c
Add xolvegroup/WorkManagement, corrected branch on xolvegroup/Sales i…
jonesde Feb 17, 2024
06d7b1c
In addons.xml add moqui-demo and moqui-poi to demo component set
jonesde Feb 24, 2024
57b3793
In EntityDbMeta fix issue with datasources that do not use JDBC, bulk…
jonesde Feb 24, 2024
bc7f46e
In ElasticFacadeImpl fix issue with index name prefixing and unprefix…
jonesde Feb 27, 2024
46d9cb3
Content type is reserved word in Amazon Aurora DB
dixitdeepak Mar 8, 2024
4795262
Removed custom changes that was added to support aws aurora
dixitdeepak May 9, 2024
f2a7830
Added logs to trace rest request
AyanF Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
<component name="moqui-easyexcel" group="chunlinyao" version="" branch="master"/><!-- no releases -->
<component name="OFBizToMantle" group="jonesde" version="" branch="master"/><!-- no releases -->
<component name="ServiceJobMonitor" group="tailorsoft" version="" branch="master"/><!-- no releases -->
<component name="Sales" group="xolvegroup" version="" branch="master"/><!-- no releases -->
<component name="Sales" group="xolvegroup" version="" branch="main"/><!-- no releases -->
<component name="WorkManagement" group="xolvegroup" version="" branch="main"/><!-- no releases -->

<!-- Component Sets -->
<!-- NOTE: using these component sets is NOT recommended, with so many components doing
Expand All @@ -106,7 +107,7 @@
<component-set name="apps" components="HiveMind,PopCommerce,PopRestStore,MarbleERP"/>
<component-set name="ecosystem" sets="framework,mantle,apps"/>

<component-set name="demo" components="example,HiveMind,PopCommerce,PopRestStore,MarbleERP"/>
<component-set name="demo" components="moqui-poi,moqui-demo,example,HiveMind,PopCommerce,PopRestStore,MarbleERP"/>
<component-set name="popc" components="PopCommerce,PopRestStore"/>

<!-- Release builds:
Expand Down
52 changes: 26 additions & 26 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.47.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.50.0'
// uncomment to add the Error Prone compiler: classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.8'
}
}
Expand Down Expand Up @@ -96,15 +96,15 @@ dependencies {
api 'org.apache.commons:commons-csv:1.10.0' // Apache 2.0
// NOTE: commons-email depends on com.sun.mail:javax.mail, included below, so use module() here to not get dependencies
api module('org.apache.commons:commons-email:1.5') // Apache 2.0
api 'org.apache.commons:commons-lang3:3.13.0' // Apache 2.0; used by cron-utils
api 'org.apache.commons:commons-lang3:3.14.0' // Apache 2.0; used by cron-utils
api 'commons-beanutils:commons-beanutils:1.9.4' // Apache 2.0
api 'commons-codec:commons-codec:1.16.0' // Apache 2.0
api 'commons-collections:commons-collections:3.2.2' // Apache 2.0
api 'commons-digester:commons-digester:2.1' // Apache 2.0
api 'commons-fileupload:commons-fileupload:1.5' // Apache 2.0
api 'commons-io:commons-io:2.13.0' // Apache 2.0
api 'commons-logging:commons-logging:1.2' // Apache 2.0
api 'commons-validator:commons-validator:1.7' // Apache 2.0
api 'commons-io:commons-io:2.15.1' // Apache 2.0
api 'commons-logging:commons-logging:1.3.0' // Apache 2.0
api 'commons-validator:commons-validator:1.8.0' // Apache 2.0

// Cron Utils
api 'com.cronutils:cron-utils:9.2.1' // Apache 2.0
Expand All @@ -119,7 +119,7 @@ dependencies {
api 'org.freemarker:freemarker:2.3.32' // Apache 2.0

// H2 Database
api 'com.h2database:h2:2.2.222' // MPL 2.0, EPL 1.0
api 'com.h2database:h2:2.2.224' // MPL 2.0, EPL 1.0

// Java Specifications
api 'javax.transaction:jta:1.1'
Expand All @@ -144,11 +144,11 @@ dependencies {
api 'com.beust:jcommander:1.82'

// Jackson Databind (JSON, etc)
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
api 'com.fasterxml.jackson.core:jackson-databind:2.16.0'

// Jetty HTTP Client and Proxy Servlet
api 'org.eclipse.jetty:jetty-client:10.0.16' // Apache 2.0
api 'org.eclipse.jetty:jetty-proxy:10.0.16' // Apache 2.0
api 'org.eclipse.jetty:jetty-client:10.0.18' // Apache 2.0
api 'org.eclipse.jetty:jetty-proxy:10.0.18' // Apache 2.0

// javax.mail
// NOTE: javax.mail depends on 'javax.activation:activation' which is the old package for 'javax.activation:javax.activation-api' used by jaxb-api
Expand All @@ -158,18 +158,18 @@ dependencies {
api 'joda-time:joda-time:2.12.5' // Apache 2.0

// JSoup (HTML parser, cleaner)
api 'org.jsoup:jsoup:1.16.1' // MIT
api 'org.jsoup:jsoup:1.17.1' // MIT

// Apache Shiro
api module('org.apache.shiro:shiro-core:1.12.0') // Apache 2.0
api module('org.apache.shiro:shiro-web:1.12.0') // Apache 2.0
api module('org.apache.shiro:shiro-core:1.13.0') // Apache 2.0
api module('org.apache.shiro:shiro-web:1.13.0') // Apache 2.0

// SLF4J, Log4j 2 (note Log4j 2 is used by various libraries, best not to replace it even if mostly possible with SLF4J)
api 'org.slf4j:slf4j-api:2.0.9'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
runtimeOnly 'org.apache.logging.log4j:log4j-jcl:2.20.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'
implementation 'org.apache.logging.log4j:log4j-core:2.22.0'
implementation 'org.apache.logging.log4j:log4j-api:2.22.0'
runtimeOnly 'org.apache.logging.log4j:log4j-jcl:2.22.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.22.0'

// SubEtha SMTP (module as depends on old javax.mail location; also uses SLF4J, activation included elsewhere)
api module('org.subethamail:subethasmtp:3.1.7')
Expand All @@ -190,11 +190,11 @@ dependencies {
// ========== test dependencies ==========

// junit-platform-launcher is a dependency from spock-core, included explicitly to get more recent version as needed
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.0'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.1'
// junit-platform-suite required for test suites to specify test class order, etc
testImplementation 'org.junit.platform:junit-platform-suite:1.10.0'
testImplementation 'org.junit.platform:junit-platform-suite:1.10.1'
// junit-jupiter-api for using JUnit directly, not generally needed for Spock based tests
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
// Spock Framework
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0") // Apache 2.0
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0' // Apache 2.0
Expand All @@ -203,16 +203,16 @@ dependencies {

// ========== executable war dependencies ==========
// Jetty
execWarRuntimeOnly 'org.eclipse.jetty:jetty-server:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-webapp:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-jndi:10.0.16' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty.websocket:websocket-javax-server:10.0.16' // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-javax-client:10.0.16') { // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-server:10.0.18' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-webapp:10.0.18' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty:jetty-jndi:10.0.18' // Apache 2.0
execWarRuntimeOnly 'org.eclipse.jetty.websocket:websocket-javax-server:10.0.18' // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-javax-client:10.0.18') { // Apache 2.0
exclude group: 'javax.websocket' } // we have the full websocket API, including the client one causes problems
execWarRuntimeOnly 'javax.websocket:javax.websocket-api:1.1'
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-jetty-server:10.0.16') // Apache 2.0
execWarRuntimeOnly ('org.eclipse.jetty.websocket:websocket-jetty-server:10.0.18') // Apache 2.0
// only include this if using Endpoint and MessageHandler annotations:
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:10.0.16') // Apache 2.0
// execWarRuntime ('org.eclipse.jetty:jetty-annotations:10.0.18') // Apache 2.0
execWarRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0'
}

Expand Down
1 change: 1 addition & 0 deletions framework/entity/ResourceEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ along with this software (see the LICENSE.md file). If not, see
<entity entity-name="WikiBlogCategory" package="moqui.resource.wiki" use="nontransactional">
<field name="wikiPageCategoryId" type="id" is-pk="true"/>
<field name="wikiBlogId" type="id" is-pk="true"/>
<field name="sentDate" type="date-time"><description>The date/time a blog post within a category was sent by email or other means.</description></field>
<relationship type="one" related="moqui.resource.wiki.WikiPageCategory" short-alias="category"/>
<relationship type="one" related="moqui.resource.wiki.WikiBlog" short-alias="blog"/>
</entity>
Expand Down
1 change: 1 addition & 0 deletions framework/entity/ScreenEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ along with this software (see the LICENSE.md file). If not, see
<moqui.basic.EnumerationType description="Screen Theme Resource Type" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Style Sheet (CSS) URL" enumId="STRT_STYLESHEET" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Script URL" enumId="STRT_SCRIPT" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Script Footer URL" enumId="STRT_SCRIPT_FOOTER" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Shortcut Icon URL" enumId="STRT_SHORTCUT_ICON" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Header Logo URL" enumId="STRT_HEADER_LOGO" enumTypeId="ScreenThemeResourceType"/>
<moqui.basic.Enumeration description="Header Title" enumId="STRT_HEADER_TITLE" enumTypeId="ScreenThemeResourceType"/>
Expand Down
36 changes: 35 additions & 1 deletion framework/service/org/moqui/impl/UserServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,40 @@ along with this software (see the LICENSE.md file). If not, see
<actions><script>ec.user.setPreference(preferenceKey, preferenceValue)</script></actions>
</service>

<service verb="login" noun="UserAccount" authenticate="anonymous-all" allow-remote="false">
<implements service="org.moqui.impl.UserServices.get#ExternalUserAuthcFactorInfo"/>
<in-parameters>
<parameter name="username"/>
<parameter name="password"/>
<parameter name="code"/>
</in-parameters>
<out-parameters>
<parameter name="loggedIn" type="Boolean"/>
</out-parameters>
<actions>
<if condition="ec.web?.sessionAttributes?.moquiPreAuthcUsername"><then>
<!-- already pre-auth'ed, verify code below -->
<set field="username" from="ec.web?.sessionAttributes?.moquiPreAuthcUsername"/>
</then><else>
<!-- no pre-auth, try logging in (pre-auth if 2nd factor required) -->
<set field="loggedIn" from="ec.user.loginUser(username, password)"/>
</else></if>
<if condition="ec.web.sessionAttributes.moquiAuthcFactorRequired"><then>
<if condition="code"><then>
<service-call name="org.moqui.impl.UserServices.validate#ExternalUserAuthcCode"
in-map="[code:code]" out-map="validateOut"/>
<if condition="validateOut.verified"><then>
<set field="loggedIn" from="ec.user.internalLoginUser(validateOut.username)"/>
</then><else>
<message type="danger" public="true">Authentication code is not valid</message>
</else></if>
</then><else>
<service-call name="org.moqui.impl.UserServices.get#ExternalUserAuthcFactorInfo" out-map="context"/>
</else></if>
</then></if>
</actions>
</service>

<service verb="create" noun="UserAccount" authenticate="anonymous-all" allow-remote="false">
<in-parameters>
<auto-parameters entity-name="moqui.security.UserAccount" include="nonpk"><exclude field-name="currentPassword"/>
Expand Down Expand Up @@ -377,7 +411,7 @@ along with this software (see the LICENSE.md file). If not, see
<field-map field-name="toAddresses" from="userAccount.emailAddress"/>
<field-map field-name="bodyParameters" from="bodyParameters + [userAccount:userAccount, resetPassword:resetPassword]"/>
</service-call>
<message public="true" type="success">A reset password was sent by email to ${userAccount.emailAddress}. This password may only be used to change your password. Your current password is still valid.</message>
<message public="true" type="success">A reset password was sent to the email of username ${userAccount.username}. This password may only be used to change your password. Your current password is still valid.</message>
<if condition="userAccount.requirePasswordChange == 'Y'"><message public="true" type="info">You must change your password before login.</message></if>
</actions>
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,23 @@ class ElasticFacadeImpl implements ElasticFacade {
if (index == null) return null
index = index.trim()
if (index.isEmpty()) return null
return indexPrefix != null && !index.startsWith(indexPrefix) ? indexPrefix.concat(index) : index
// handle comma separated index names
return index.split(",").collect({
it = it.trim()
return indexPrefix != null && !it.startsWith(indexPrefix) ? indexPrefix.concat(it) : it
}).join(",")
// return indexPrefix != null && !index.startsWith(indexPrefix) ? indexPrefix.concat(index) : index
}
String unprefixIndexName(String index) {
if (index == null) return null
index = index.trim()
if (index.isEmpty()) return null
return indexPrefix != null && index.startsWith(indexPrefix) ? index.substring(indexPrefix.length()) : index
// handle comma separated index names
return index.split(",").collect({
it = it.trim()
return indexPrefix != null && it.startsWith(indexPrefix) ? it.substring(indexPrefix.length()) : it
}).join(",")
// return indexPrefix != null && index.startsWith(indexPrefix) ? index.substring(indexPrefix.length()) : index
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public <V> V getTool(@Nonnull String toolName, Class<V> instanceClass, Object...

@Override
public void initWebFacade(@Nonnull String webappMoquiName, @Nonnull HttpServletRequest request, @Nonnull HttpServletResponse response) {
logger.info("------------- ExecutionContextImpl.java , initializing web facade -----------------")
WebFacadeImpl wfi = new WebFacadeImpl(webappMoquiName, request, response, this);
webFacade = wfi;
webFacadeImpl = wfi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,14 @@ class UserFacadeImpl implements UserFacade {
String hashedKey = eci.ecfi.getSimpleHash(loginKey, "", eci.ecfi.getLoginKeyHashType(), false)
Timestamp fromDate = getNowTimestamp()
long thruTime = fromDate.getTime() + Math.round(expireHours * 60*60*1000)
/*
TODO:deepak: Set the require new transaction false, we are getting lock wait timeout exception at second login attempt
Will check and discuss this with community
*/

eci.serviceFacade.sync().name("create", "moqui.security.UserLoginKey")
.parameters([loginKey:hashedKey, userId:userId, fromDate:fromDate, thruDate:new Timestamp(thruTime)])
.disableAuthz().requireNewTransaction(true).call()
.disableAuthz().requireNewTransaction(false).call()

// clean out expired keys
eci.entity.find("moqui.security.UserLoginKey").condition("userId", userId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ class WebFacadeImpl implements WebFacade {
void handleServiceRestCall(List<String> extraPathNameList) {
ContextStack parmStack = (ContextStack) getParameters()

logger.info("====================== Service REst for post")
logger.info("Service REST for ${request.getMethod()} to ${request.getPathInfo()} headers ${request.headerNames.collect()} parameters ${getRequestParameters().keySet()}")

// check for login, etc error messages
Expand Down Expand Up @@ -1069,6 +1070,7 @@ class WebFacadeImpl implements WebFacade {
parmStack.putAll((Map) bodyListObj)
eci.contextStack.push(parmStack)

logger.info("---------------- calling rest api run with params =-----"+extraPathNameList.toString());
RestApi.RestResult restResult = eci.serviceFacade.restApi.run(extraPathNameList, eci)
responseList.add(restResult.responseObj ?: [:])

Expand All @@ -1088,6 +1090,7 @@ class WebFacadeImpl implements WebFacade {
}
} else {
eci.contextStack.push(parmStack)
logger.info("---------------- 2 calling rest api run with params =-----"+extraPathNameList.toString());
RestApi.RestResult restResult = eci.serviceFacade.restApi.run(extraPathNameList, eci)
eci.contextStack.pop()
response.addIntHeader('X-Run-Time-ms', (System.currentTimeMillis() - startTime) as int)
Expand All @@ -1102,6 +1105,7 @@ class WebFacadeImpl implements WebFacade {
// NOTE: This will always respond with 200 OK, consider using 201 Created (for successful POST, create PUT)
// and 204 No Content (for DELETE and other when no content is returned)
sendJsonResponse(restResult.responseObj)
logger.info("------------------- Sends rest result repsonse ")
}
}
} catch (AuthenticationRequiredException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,12 @@ class EntityDbMeta {
ResultSet tableSet2 = null
boolean beganTx = useTxForMetaData ? efi.ecfi.transactionFacade.begin(5) : false
try {
con = efi.getConnection(groupName)
try {
con = efi.getConnection(groupName)
} catch (EntityException ee) {
logger.warn("Could not get connection so treating entity ${ed.fullEntityName} in group ${groupName} as table does not exist: ${ee.toString()}")
return false
}
DatabaseMetaData dbData = con.getMetaData()

String[] types = ["TABLE", "VIEW", "ALIAS", "SYNONYM", "PARTITIONED TABLE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ class ScreenRenderImpl implements ScreenRender {
@Override ScreenRender saveHistory(boolean sh) { this.saveHistory = sh; return this }

@Override
void render(HttpServletRequest request, HttpServletResponse response) {
void
render(HttpServletRequest request, HttpServletResponse response) {
logger.info("------------------------- ScreenRenerImpl.groovy, render(HttpServletRequest request, HttpServletResponse response) Rendering HTTP Request---------------------------");
if (rendering) throw new IllegalStateException("This screen render has already been used")
rendering = true
this.request = request
Expand Down Expand Up @@ -277,6 +279,7 @@ class ScreenRenderImpl implements ScreenRender {
}

protected void internalRender() {
logger.info("--------------- ScreenRenderImpl.groovy, Running Internal Render, this will call rest/s1 of rest.xml ------------------------------");
// make sure this (sri) is in the context before running actions or rendering screens
ec.contextStack.put("sri", this)

Expand Down
Loading
Loading