I'm running integration tests from outside of the JBoss AS and am using the
"jndi.properties" file to access the context.
I'm unable to ever get the connection because it seems there's a problem parsing
the java.naming.provider.url value. I've tried many different values that i've
found on the net.
if i use "jnp://localhost:1099":
anonymous wrote : javax.naming.CommunicationException: Could not obtain connection to any
of these urls: "jnp://localhost:1099" and discovery failed with error:
javax.naming.CommunicationException: Receive timed out [Root exception is
java.net.SocketTimeoutException: Receive timed out] [Root exception is
javax.naming.CommunicationException: Failed to connect to server "jnp:1099 [Root
exception is javax.naming.ServiceUnavailableException: Failed to connect to server
"jnp:1099 [Root exception is java.net.UnknownHostException: "jnp: "jnp]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at
com.gestalt.gccsa.fp.adhoc.db.objectmanager.ws.FunctGroupObjectManager.getConnection(FunctGroupObjectManager.java:866)
| at
com.gestalt.gccsa.fp.adhoc.db.objectmanager.ws.FunctGroupObjectManager.saveFunctGroupVersionObject(FunctGroupObjectManager.java:305)
| at
com.gestalt.gccsa.fp.adhoc.db.objectmanager.ws.SqlQueryManagerTest.(SqlQueryManagerTest.java:34)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at junit.framework.TestSuite.createTest(TestSuite.java:56)
| at junit.framework.TestSuite.addTestMethod(TestSuite.java:279)
| at junit.framework.TestSuite.(TestSuite.java:142)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at
org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:148)
| at org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:244)
| at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:101)
| at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:147)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
| Caused by: javax.naming.CommunicationException: Failed to connect to server
"jnp:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to
connect to server "jnp:1099 [Root exception is java.net.UnknownHostException:
"jnp: "jnp]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
| ... 28 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server
"jnp:1099 [Root exception is java.net.UnknownHostException: "jnp: "jnp]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
| ... 29 more
| Caused by: java.net.UnknownHostException: "jnp: "jnp
| at java.net.InetAddress.getAllByName0(Unknown Source)
| at java.net.InetAddress.getAllByName0(Unknown Source)
| at java.net.InetAddress.getAllByName(Unknown Source)
| at java.net.InetAddress.getByName(Unknown Source)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:76)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
what happend to the url for it to print this: [Root exception is
java.net.UnknownHostException: "jnp: "jnp] ???
I can list all the other values i've tried and their corresponding results, but that
would take more time than i have right now. Before i go to all that trouble, are there
any known problems with this? Is there something i'm missing?
jndi.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967946#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...