Errors in Payara Embedded + MicroProfile

Hello, big brother! Recently, a problem has troubled me for a long time. I used payara-embedded embedded server and the deployed EJB service was successfully deployed. But as a java client, an error is reported when calling? Is there something wrong? Please give me some guidance, thank you! what happened?

javax.naming.NamingException: Invoker V0 not found at Not Found
at fish.payara.ejb.http.client.LookupDiscoveryServiceImpl.discoverV0(
at fish.payara.ejb.http.client.LookupDiscoveryServiceImpl.createDiscovery(
at fish.payara.ejb.http.client.RemoteEJBContext.determineLookup(
at fish.payara.ejb.http.client.RemoteEJBContext.lookup(
at fish.payara.ejb.http.client.RemoteEJBContext.lookup(
at javax.naming.InitialContext.lookup(
at eb.ClientPayara.main(
服务调用失败…:Invoker V0 not found at Not Found

The server code is as follows:

package micro.service;

import java.util.jar.JarEntry;
import java.util.jar.JarFile;

import org.glassfish.admin.amx.util.FileUtils;
import org.glassfish.embeddable.GlassFish;
import org.glassfish.embeddable.GlassFishException;
import org.glassfish.embeddable.GlassFishProperties;
import org.glassfish.embeddable.GlassFishRuntime;

public class MicroMain {

public InputStream getPath(String name) {
 // String url=MicroMain.class.getResource(name).getPath();
//	String f = MicroMain.class.getResource("micro/service/microprofile-1.0-SNAPSHOT.war").getPath();
	InputStream is = this.getClass().getResourceAsStream("microprofile-1.0-SNAPSHOT.war");
//	String f2 = MicroMain.class.getClassLoader().getResource("/microprofile-1.0-SNAPSHOT.war").getPath();
//	System.out.print(f2);
//  String url=MicroMain.class.getClassLoader().getResource("./microprofile-1.0-SNAPSHOT.war").getPath();
//	System.out.print(f);
	return is;

// public static void main(String args) {
// String path = new MicroMain().getPath(“./microprofile-1.0-SNAPSHOT.war”);
// }

public static void main(String[] args) {
	try {
		GlassFishRuntime runtime = GlassFishRuntime.bootstrap();
		GlassFishProperties glassfishProperties = new GlassFishProperties();
		glassfishProperties.setPort("http-listener", 9080);
		glassfishProperties.setPort("https-listener", 9845);
		GlassFish glassfish = runtime.newGlassFish(glassfishProperties);
		//String path = new MicroMain().getPath("microprofile-1.0-SNAPSHOT.war");
		//glassfish.getDeployer().deploy(new MicroMain().getPath("microprofile-1.0-SNAPSHOT.war"));
		InputStream is =new MicroMain().getPath("microprofile-1.0-SNAPSHOT.war");
		//File file= StreamUtil.stream2file(is);
		glassfish.getDeployer().deploy(is,"--name", "microprofile");

		//glassfish.getDeployer().deploy(new File("E:\\microprofile-1.0-SNAPSHOT.war"));
	} catch (GlassFishException ex) {


client code:

package eb;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.tian.bean.ShoppBookRemote;

import cm_.Cmt;

public class ClientPayara {

public static Context getinitContext() {
	Context ctx = null;
	try {
		Properties propers = new Properties();
		propers.put(Context.INITIAL_CONTEXT_FACTORY, "");
		propers.put(Context.PROVIDER_URL, "");	

// propers.put(Context.SECURITY_PRINCIPAL, “u1”);
// propers.put(Context.SECURITY_CREDENTIALS, “p1”);
ctx = new InitialContext(propers);
} catch (NamingException e) {
System.out.println(“服务器链接失败…:” + e.getMessage());
return ctx;

public static void main(String[] args) {
	Context ctx = getinitContext();
	try {

// ShoppBookRemote shop = (ShoppBookRemote) ctx
// .lookup(“java:global/mi/look/ShoppBookBean!com.tian.bean.ShoppBookRemote”);
// System.out.println(shop.queryBookList());

	   Cmt cmt=(Cmt) ctx.lookup("java:global/microprofile/CmtBean");
	} catch (NamingException e) {
		// TODO Auto-generated catch block
		System.out.println("服务调用失败.....:" + e.getMessage());


Greetings @lairoe.

Thanks for posting your question here, first allow me to clarify that I have moved your post to the Technical Discussion category since it was in the wrong place.

Now regarding your question, to assist you’ll have to raise a formal bug report at the Payara Community issue tracker (Issues · payara/Payara · GitHub) and provide a self-contained reproducer of the error so that we can analyse it in more detail, as the use case in question is more complex than usual.

Make sure, that your reproducer includes a complete set of instructions and the complete Java client code so that our engineers can verify if there’s a bug that requires fixing.