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

Cannot find API Properties #185

Closed
jamesrwelch opened this issue Nov 4, 2021 · 20 comments · Fixed by #195
Closed

Cannot find API Properties #185

jamesrwelch opened this issue Nov 4, 2021 · 20 comments · Fixed by #195
Milestone

Comments

@jamesrwelch
Copy link
Contributor

On first install, I get the following exception:

type: "ApiInternalException"
message: "Api Properties have not been loaded. Please contact the System Administrator"
stacktrace:
0: "jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)"
1: "jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)"
2: "uk.ac.ox.softeng.maurodatamapper.core.admin.ApiPropertyController.listAllReadableResources(ApiPropertyController.groovy:85)"
3: "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
4: "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
5: "uk.ac.ox.softeng.maurodatamapper.core.controller.EditLoggingController.listAllResources(EditLoggingController.groovy:136)"
6: "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
7: "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
8: "uk.ac.ox.softeng.maurodatamapper.core.admin.ApiPropertyController.index(ApiPropertyController.groovy:43)"
9: "org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)"
10: "org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)"
11: "org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)"
12: "org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)"
13: "org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)"
14: "org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)"
15: "org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)"
16: "org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)"
17: "org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)"
18: "org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)"
19: "org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)"
20: "org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)"
21: "org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)"
22: "org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)"
23: "java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)"
24: "java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)"
25: "java.lang.Thread.run(Thread.java:831)"
@olliefreeman
Copy link
Contributor

Was this a clean install from scratch???

@jamesrwelch
Copy link
Contributor Author

@olliefreeman - yes, completely clean install on my laptop. Jaimie had the same problem yesterday, but seems to have fixed itself when she updated to the latest release. I went straight for the latest release.

@olliefreeman
Copy link
Contributor

Odd

@olliefreeman
Copy link
Contributor

Can you do
docker-compose down
docker-compose up -d

@olliefreeman
Copy link
Contributor

See if that fixes it

@jamesrwelch
Copy link
Contributor Author

jamesrwelch commented Nov 4, 2021

WARNING: The MDM_TAG variable is not set. Defaulting to a blank string.
WARNING: The MDM_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './../docker-compose.yml' is invalid because:
services.mauro-data-mapper.ports contains an invalid type, it should be a number, or an object

@jamesrwelch
Copy link
Contributor Author

Just cleaning up and trying again

@olliefreeman
Copy link
Contributor

olliefreeman commented Nov 4, 2021

Do you have the .env file ?? That is loaded into docker to define those properties

@jamesrwelch
Copy link
Contributor Author

Another fresh install. Yes, got the .env file. Not getting the error message about MDM_PORT any more, but still getting the issue about properties through the UI.

@olliefreeman
Copy link
Contributor

K….if you restart the instance now using the down then up command does that resolve it

@jamesrwelch
Copy link
Contributor Author

No :(

@olliefreeman
Copy link
Contributor

Can you check the shared_volumes/logs/maurodatamapper/Mauro-data-mapper/mauro-data-mapper.log you’ll need to be root user….see if there’s any errors as to why the AP didn’t save

@olliefreeman
Copy link
Contributor

This def isn’t an issue on existing instances as Ouh updated fine and I accessed AP to activate the oic plugin

@jamesrwelch
Copy link
Contributor Author

jamesrwelch commented Nov 4, 2021

Not that I can see
mauro-data-mapper.log

@olliefreeman
Copy link
Contributor

Odd….I genuinely don’t have a clue without playing with it…sorry

@jamesrwelch
Copy link
Contributor Author

No worries... you're off... I'll keep hunting.

@jamesrwelch
Copy link
Contributor Author

The database table of api properties is definitely empty after start-up. This isn't the case with MAB

@jamesrwelch
Copy link
Contributor Author

@aaronforshaw - as mentioned earlier - just wondering if there's anything you might be able to spot, since you were in that bit of the code recently. But as I said, doesn't seem to be replicable on M-A-B on a fresh database.

@jamesrwelch
Copy link
Contributor Author

Keeping notes after feedback from Aaron... the code appears to fail silently if defaults.properties is not found. I can see it in the mdm-core.jar file for version 4.11.0 - same place, same file size as in 4.10.0 and 4.5.0.

@jamesrwelch jamesrwelch transferred this issue from MauroDataMapper/mdm-docker Nov 11, 2021
@jamesrwelch
Copy link
Contributor Author

I can confirm that it's an issue with the asset pipeline not being able to load the defaults.properties file. Going to revert back to the old way of loading it to see if that improves things. Once fixed, the error handling / logging needs imrpoving so that if the file is not found, an error is written to the logs

olliefreeman added a commit that referenced this issue Nov 25, 2021
Don't generate an empty asset manifest file for mdm-plugin-profile (Solves #185)
@olliefreeman olliefreeman added this to the 4.12.0 milestone Nov 30, 2021
@olliefreeman olliefreeman added this to Backlog in State via automation Nov 30, 2021
@olliefreeman olliefreeman moved this from Backlog to Merged to Develop in State Nov 30, 2021
@olliefreeman olliefreeman removed this from the 4.12.0 milestone Jan 7, 2022
@olliefreeman olliefreeman added this to the 5.0.0 milestone Jan 7, 2022
@project-bot project-bot bot moved this from Merged to Develop to Backlog in State Jan 7, 2022
@project-bot project-bot bot moved this from Backlog to Fix for next release in State Jan 7, 2022
@olliefreeman olliefreeman moved this from Fix for next release to Merged to Develop in State Jan 14, 2022
@olliefreeman olliefreeman moved this from Merged to Develop to Released in State Feb 4, 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
2 participants