tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: After Upgrading to TomEE 7.0.0 from TomEE 1.7.2 JNDI lookup does not work
Date Fri, 10 Jun 2016 15:22:06 GMT
Documentation is there:
http://tomee.apache.org/ng/admin/configuration/server.html

See tomee.remote.support and tomee.serialization*


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-06-10 15:27 GMT+02:00 MMA_EDFX <madhava.maiya@edifixio.com>:

> I am getting below exception when I upgrade to TomEE 7.0.0 when trying to
> lookup jndi.
>
> Exception:
>
> WARNING: RequestFailed{server=http://localhost:9500/tomee/ejb}
> JNDI_LOOKUP:/CalculatorService {error=Cannot open input stream to server: }
> Exception in thread "main"
> org.apache.openejb.client.ClientRuntimeException:
> Invalid response from server: -1
>         at
> org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:468)
>         at javax.naming.InitialContext.lookup(InitialContext.java:411)
>         at
>
> com.edifixio.jms.service.CalculatorServiceTest.main(CalculatorServiceTest.java:26)
>
> Java class:
>
> public class CalculatorServiceTest{
>
>         public static void main(String[] args) throws NamingException{
>                 Hashtable<String,String> env = new
> Hashtable<String,String>();
>
>
> env.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory");
>                 env.put(Context.PROVIDER_URL,"
> http://localhost:9500/tomee/ejb");
>                 Context ctx = new InitialContext(env);
>                 CalculatorService calculatorService =
> (CalculatorService)ctx.lookup("CalculatorService");
>                 System.out.println(calculatorService.add(100,20));
>         }
>
> }
>
> This works fine if I use TomEE 1.7.2.
>
> How do I make it work with TomEE 7.0.0.
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/After-Upgrading-to-TomEE-7-0-0-from-TomEE-1-7-2-JNDI-lookup-does-not-work-tp4678844.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message