How to make a executable jar with glassfish and Grizzly

Asked

Viewed 16 times

0

I would like to make a Rest application but I needed to be able to use a executable jar to climb the server so I don’t need an IDE, someone can tell me how to make a executable jar with glassfish and Grizzly. after generated it gives me this error:

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: org.glassfish.jersey.server.internal.scanning.ResourceFinderException: The URI scheme rsrc of the URI rsrc:br/com/transacao/conta is not supported. Package scanning deployment is not supported for such URIs.
Try using a different deployment mechanism such as explicitly declaring root resource and provider classes using an extension of javax.ws.rs.core.Application
        at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.addResourceFinder(PackageNamesScanner.java:282)
        at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.init(PackageNamesScanner.java:196)
        at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.<init>(PackageNamesScanner.java:153)
        at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.<init>(PackageNamesScanner.java:110)
        at org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:668)
        at org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:651)
        at br.com.transacao.conta.Servidor.inicializaServidor(Servidor.java:19)
        at br.com.transacao.conta.Servidor.main(Servidor.java:12)
        ... 5 more
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.