question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The resource [/xxxxx] is not found.

See original GitHub issue
@Controller
class Controller {

    @RequestMapping(
            path = "/connection",
            method = {RequestMethod.GET},
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Object getConnection(HttpRequest request) {
        Map<String, Object> map = new HashMap<>();
        map.put("getLocalAddr", request.getLocalAddr());
        map.put("getLocalName", request.getLocalName());
        map.put("getLocalPort", request.getLocalPort());
        map.put("getRemoteAddr", request.getRemoteAddr());
        map.put("getRemoteHost", request.getRemoteHost());
        map.put("getRemotePort", request.getRemotePort());
        //Logger.i(JSON.toJSONString(map));
        return map;
    }
}

http://192.168.0.100:8899/connection return

The resource [/connection] is not found.

anything i missed?thx

INFO: andserver 2.1.9 jdk-1.8.0_292

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
bonepeoplecommented, Jun 23, 2021

@Yooi 问题已解决,这个问题应该是Andserver没有适配jdk11而导致的,jdk11中没有MimeTypeParseException类,所以com.yanzhenjie.andserver.processor.ControllerProcessor无法正常生成Controller的代码,最终导致我们写的接口没有添加到服务器中。 在配置文件中添加以下代码后可以正常使用

implementation 'javax.activation:javax.activation-api:1.2.0'

You should include javax.activation:javax.activation-api:1.2.0 as an external dependency to your project to explicitly access the class javax.activation.DataSource.

javax.activation:javax.activation-api:1.2.0 is not a module, so requires java.activation has no meaning. In Java 9 and 10, you can use requires java.activation or --add-modules java.activation instead of including the dependency. In Java 11+ the module doesn’t exist in the JDK anymore, so requires java.activation won’t work there.

https://stackoverflow.com/questions/52921879/migration-to-jdk-11-has-error-occure-java-lang-noclassdeffounderror-javax-acti

0reactions
1499320204commented, Mar 24, 2022

更新到了2.1.10我还是遇到了这个问题,我写了个demo是没问题的,但是容到项目里网页就显示The resource [/] is not found. 然后不动代码的情况下我把版本退到2.1.9又正常了。

Read more comments on GitHub >

github_iconTop Results From Across the Web

The resource object with key 'xxxxx' was not found. - MSDN
I have a simple web site asp.net, with masterpage and five pages. I added a App_GlobalResources folder. Within this two files Resource: Resource...
Read more >
iis7.5 error: The resource object with key 'XXX' was not found
In a specific server (windows 2008 R2 IIS7.5) I am getting the error: The resource object with key 'GoToLastExistingData' was not found.
Read more >
The resource 'xxx' was not found - Octopus Server
Hello there, one from our developer report very weird issue in Octopus. After some modifications of deployment process, error occurred during save operation....
Read more >
Deploying template : networkInterface xxxxx was not found ...
Error details say that the networkInterfaces was not found. Please make sure that the referenced resource exists
Read more >
Create Application User - "Resource with id xxx does not exist"
Create Application User - "Resource with id xxx does not exist". Verified. In a customer tenant we have an application user which cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found