I have observed a very strange behavior in the latest Weblogic server, version 12.2.1.2. When an eclipselink dependency is added to your Java servlet application, Weblogic server is going to automatically trigger Jax-RS Jersey REST service under /resources/* path.
To remove any doubts, I have created a very simple helloworld war file. A sample war file can be created by following the instruction from this page (http://geekabyte.blogspot.com/2015/07/how-to-create-war-files-with-intellij.html)
If you followed the above instruction, basically the only dependency you would have is
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
And Helloworld as the only class in the application. You can deploy this to any server and it will run just fine.
Now you add another dependency to your maven pom file. It is eclipselink artifact as you can see below:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.2</version>
</dependency>
When you deploy the war file, the server will log the following:
<May 23, 2017, 2:42:47,343 PM MST> <Warning> <JAXRSIntegration> <BEA-2192511>
<The list of resource packages: org.eclipse.persistence.jpa.rs.exceptions;org.eclipse.persistence.jpa.rs.resources;org.eclipse.persistence.jpa.rs.resources.unversioned>
And you will see the following from your Weblogic Admin console
The impact of this is that if you follow the convention and store all your javascript and css files under /resources/ path, instead of serving these static files, the server will try to process these requests via JAX-RS service which end up returning 404 not found.
I have tried different configurations: Different server, different version of Weblogic server, Toplink instead of eclipselink, different version of eclipselink, and a bunch of other things which I will not mention here to keep it simple. Obviously we have a working application running in prior version of Weblogic which we are needing to migrate to the latest version of Weblogic. It took many days to pinpoint the problem to this one dependency. In any case, this problem only exists for Weblogic 12.2.* with eclipselink of any version as a dependency.
My obvious question to everyone is: Why is this happening? Has anyone experienced the same issue? What was your solution?