-
Notifications
You must be signed in to change notification settings - Fork 3
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
nested exception is java.lang.NullPointerException] with root cause while running application on remote machine #10
Comments
can you send me a rule set you used in the server? it seems that there was an issue with rules. |
I am using Testing for ALL Node Lines and features.txt from https://github.com/DeanLee77/Nadia/tree/master/bin/testingPackage/testing10.
` |
There's a difference in the output of the above method on both local and remote machines. |
it is .RuleSetParser.handleChild(RuleSetParser.java:347) issue in com.NadiaRS/InferenceEngine/ruleParser |
|
for nodeSet object, when I run |
it seems that you printed Node object in a 'handleParent(String parentText, int lineNumber)'. |
output.txt |
hum... I have looked at the output file, and was wondering if the NADIA crushed after attempt to read line 118 of the rule file or not. |
Yeah. Some issue occurs after 117 and it crashes. I've tested other files as well but when the last 3 or 4 lines are left, it throws the exception. On the local machine, it doesn't behave like that |
I cloned the repository to a new folder. and started it again. It is working fine this time. I don't know what was the issue behind it |
Glad to hear that it is working now. sometimes Java works funny. Anyhow, when you need help, let me know. by the way, what is the entire project about, may I ask? |
I tried running https://github.com/DeanLee77/Nadia/tree/master/bin/testingPackage/testing10 but it throws the same error. For https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing2/Wedding%20Planner.txt |
They are working on deploying a system that works like your application. I didn't ask for many details. The UI for this app is kinda difficult for a user. |
so the application in the server does NOT work for a file, https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing10/Testing for ALL Node Lines and features.txt? but works with the file, 'https://github.com/DeanLee77/Nadia/blob/master/bin/testingPackage/testing2/Wedding Planner.txt '. Do I understand correctly? |
Yeah. That's right. I am now testing for other files as well and will let you know the result |
It causes the issues with the server on test 6,7,8 and 10. With rest of the files, it is working fine |
I Kind of have an idea what caused the error. the text file you tested contains a symbolic quotation mark at line: 118(“Steam force”), 11(“Australian”), 11(“Australian”), 10(“Australian”) of 10, 8, 7, 6 files respectively. Even though, handing such symbolic quotation mark has been handled during regex of Tokenizer class, it seems that the regex works funny in your environment. Anyhow, I believe once you changed the symbolic quotation mark from ( “ ” ) to ( " " ) then it will work. If it does not then need to put another log where appropriate. Please let me know how it goes. |
Yeah. It was exactly the same issue. I wonder why it was doing so. I've noticed one thing which is if I save the file with (“ ”) and then retrieve it from the database, the sign “ ” is replaced with ? ?. Here is the retrieved value for test 6 and same happens for test 10.
Maybe the database doesn't accept those characters and change it to some unknown value |
which database are you currently using? |
I am using PostgreSQL. The version is from 12.x series. |
There's another thing which I just tested. I wrote |
I would try to use double quotation mark in ascii or unicode, and avoid the symbolic mark from MS word. In addition, regex to handle the mark in Tokenizer class is ' Pattern quotedPattern = Pattern.compile("^(["\“])(.)(["\”])(\.)");' |
further more, it is not about regex at this point of time, the quotation mark is translated into something else in the database. I believe that the mistranslation is what caused the issue. |
It would be great if you update that. The regex you just mentioned produces a syntax error. I will try to update it. |
if you look at the 'Tokenizer' class, the regex is already there. |
Yeah. I Just tested it. The regex works fine. There might be a problem in the database or in that system. Thanks for guiding me with this. |
I am using Postgre 10.xxx version, and in my database the double quotation symbol, which is extracted from file 10, is translated as below. AND service type = \342\200\234Steam force\342\200\235 this '\342\200\234' code can be found at a link : 'http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=8220&mode=decimal', and the value is in a row labelled as 'Octal UTF-8 bytes' |
I've installed the application on a remote linux machine. After I run the app with gradle bootrun, it throws the below error while running the rules. It works fine when I run in the local machine.
`2020-03-16 03:27:57.282 ERROR 24422 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException: null
at com.NadiaRS.InferenceEngine.ruleParser.RuleSetParser.handleChild(RuleSetParser.java:347) ~[main/:na]
at com.NadiaRS.InferenceEngine.ruleParser.RuleSetScanner.scanRuleSet(RuleSetScanner.java:99) ~[main/:na]
at com.NadiaRS.controller.InferenceController.setInferenceEngine(InferenceController.java:202) ~[main/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[javax.servlet-api-3.1.0.jar:3.1.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
`
The text was updated successfully, but these errors were encountered: