Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7315

Failed JBM examples - java.net.ProtocolException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.2.0
    • EAP_EWP 5.1.2 ER1
    • Messaging, Naming
    • None
    • Hide

      1. Download and unzip EAP 5.1.2 ER1 distribution - http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-5.1.2-ER1/jboss-eap-noauth-5.1.2-ER1.zip
      2. Download and unzip EAP 5.1.2 ER1 docs - http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-5.1.2-ER1/jboss-eap-docs-5.1.2-ER1.zip
      3. go to $JBOSS_HOME/bin and start EAP server - "sh run.sh -c default"
      4. in another console set $JBOSS_HOME variable
      5. go to $JBOSS_HOME/../doc/examples/jboss-messaging-examples/http
      6. run example - "ant" - and see errrors

      Show
      1. Download and unzip EAP 5.1.2 ER1 distribution - http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-5.1.2-ER1/jboss-eap-noauth-5.1.2-ER1.zip 2. Download and unzip EAP 5.1.2 ER1 docs - http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-5.1.2-ER1/jboss-eap-docs-5.1.2-ER1.zip 3. go to $JBOSS_HOME/bin and start EAP server - "sh run.sh -c default" 4. in another console set $JBOSS_HOME variable 5. go to $JBOSS_HOME/../doc/examples/jboss-messaging-examples/http 6. run example - "ant" - and see errrors
    • Regression
    • Not Required

      Hi,

      I have two failed JBM examples (http, servlet) with following jndi properties with which they'are failing to create InitialContext:

      java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
      java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      Exception:

      [java] javax.naming.NamingException: Failed to retrieve Naming interface for provider http://localhost:8080/invoker/JNDIFactory [Root exception is java.net.ProtocolException: Server redirected too many times (20)]
      [java] at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:96)
      [java] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
      [java] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
      [java] at javax.naming.InitialContext.init(InitialContext.java:223)
      [java] at javax.naming.InitialContext.<init>(InitialContext.java:175)
      [java] at org.jboss.example.jms.common.Util.doesDestinationExist(Util.java:51)
      [java] at org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:236)
      [java] at org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:197)
      [java] at org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:147)
      [java] at org.jboss.example.jms.http.HttpExample.main(HttpExample.java:136)
      [java]
      [java] Caused by: java.net.ProtocolException: Server redirected too many times (20)
      [java] Please verify if you have access to the server. If you are using JBossEAP maybe you don't have security access
      [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      [java] at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1368)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1362)
      [java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1016)
      [java] at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:209)
      [java] at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:92)
      [java] ... 9 more
      [java] Caused by: java.net.ProtocolException: Server redirected too many times (20)
      [java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
      [java] at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2173)
      [java] at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:579)
      [java] at java.net.URLConnection.getContentLength(URLConnection.java:474)
      [java] at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:204)
      [java] ... 10 more

      I don't have time to investigate it deeper but for sure it's a regression against EAP 5.1.1. Could you have a look at it please or reassign it to the right guy?

      Thank you,

      Mirek

              rrajasek@redhat.com Rajesh Rajasekaran
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: