0

I'm trying to deploy a Play 2.1.1 app onto Websphere 8.5.5 using Play2War. The app works fine when started with play ~run but when I deploy the war onto Websphere, I get this error message:

org.reflections.ReflectionsException:
    could not create Vfs.Dir from url, no matching UrlType was found
    [wsjar:file:/C:/apps/websphere/wlp/usr/servers/server_kev/workarea/org.eclipse.osgi/bundles/45/data/cache/com.ibm.ws.app.manager_gen_0fdbabb2-5ae7-4075-bda1-136e52319906/.cache/WEB-INF/lib/playbackend.jar!/]

Anyone else seen this problem?

KevSheedy
  • 3,195
  • 4
  • 22
  • 26

3 Answers3

1

If not already comes out of the box with your current Reflections lib, just add a Vfs UrlType:

Vfs.addDefaultURLTypes(
    new Vfs.UrlType() {
        public boolean matches(URL url) {
           return url.getProtocol().equals("vfs");
        }

        public Vfs.Dir createDir(URL url) {
            return DefaultUrlTypes.jarUrl.createDir(url);
        }

Check out in the latest sources

zapp
  • 1,533
  • 1
  • 14
  • 18
0

If you use Subcontext Deployment, make sure in conf/application.conf, you add:

application.context=/KevSheedyApp/

You may name your war as KevSheedyApp.war.

You should be able to access your application through http://host:port/KevSheedyApp/bla/bla

Mingyu
  • 31,751
  • 14
  • 55
  • 60
0

I would get this even with the latest version of the Reflections lib. I eventually found that it was the way I was building my (fat) jar (or in your case the war). I had an ant script (initially generated by Eclipse) that copied the libs as-is into the jar and used some sort of loader. I instead told it to unpack the libs into my jar and this fixed the issue. Not sure why this happens when they are packed as-is into the jar/war. I hope this helps someone.

Gabriel
  • 593
  • 5
  • 13