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

Error is logged when no schemas exist to load #634

Closed
rjrudin opened this issue Nov 30, 2022 · 2 comments
Closed

Error is logged when no schemas exist to load #634

rjrudin opened this issue Nov 30, 2022 · 2 comments
Assignees
Milestone

Comments

@rjrudin
Copy link
Contributor

rjrudin commented Nov 30, 2022

Running mlLoadSchemas or mlDeploy on a project with no schemas and no schema database will produce the following logging:

Executing command [com.marklogic.appdeployer.command.schemas.LoadSchemasCommand] with sort order [350]
Loading schemas into database myApp-schemas from: /Users/rrudin/workspace/ml-gradle/examples/local-testing-project/src/main/ml-schemas
Unable to load schemas because no schemas database exists; cause: Local message: failed to apply resource at eval: Internal Server Error. Server Message: XDMP-NOSUCHDB: No such database myApp-schemas . See the MarkLogic server error log for further detail.
Releasing connection
Finished executing command [com.marklogic.appdeployer.command.schemas.LoadSchemasCommand] in 530ms

It's not an error, but it's confusing to see that. I believe what's happening is that due to a recent change for using a new ML function for loading TDE templates, there's an attempt to connect to the schemas database, even though no schemas exist. The schemas database doesn't exist, so an error occurs.

The fix should involve ensuring that no attempt at a connection is made unless there's at least one schema to exist.

Furthermore, if there is at least one schema and the connection fails, the exception should be propagated so that the deployment fails.

@rjrudin
Copy link
Contributor Author

rjrudin commented Nov 30, 2022

This is being tracked in ml-gradle but the fix will be in either ml-app-deployer or ml-javaclient-util. Once the location of the bug is determined, a ticket should be opened in the appropriate project (if we'd only known about multi-project builds in Gradle long ago...).

@rjrudin rjrudin added this to the 4.4.0 milestone Dec 15, 2022
@rjrudin rjrudin self-assigned this Dec 19, 2022
@rjrudin
Copy link
Contributor Author

rjrudin commented Dec 20, 2022

Being resolved via marklogic/ml-javaclient-util#167

@rjrudin rjrudin closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant