-
1. Re: How to plug JNDI SPI into JB3.0
davidjencks Dec 23, 2002 10:37 AM (in response to cridam44)if you are using the default configuration, either ..../default/lib or .../default/deploy should work. If they don't, study the ..../default/log/server.log carefully to see exactly what is happening when the .jar is being deployed.
-
2. Re: How to plug JNDI SPI into JB3.0
cridam44 Feb 7, 2003 8:22 AM (in response to cridam44)My JNDI SPI' JB3 configuration that doesn't work is the following :
/default/deploy
---- spi-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- Specify required library jars as needed.-->
---- spi.jar
jndi.properties at the root's jar
java.naming.factory.url.pkgs=com.domain
Until now, my JB2.4.7 configuration that has perfectly worked was the following :
--- /lib/ext/spi.jar
jndi.properties
--- /conf/catalina/jboss.cml
The log server error simply displays the error stack on very first lookup from the MBean
javax.naming.at NameNotFoundException: spi:SpiRoot not bound
org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
org.jnp.server.NamingServer.getObject(NamingServer.java:509)
org.jnp.server.NamingServer.lookup(NamingServer.java:282)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
javax.naming.InitialContext.lookup(InitialContext.java:347)
The most surprising thing is that the context is correctly initialized when the lookup is done from an web application. That's why i thought about a classloader side effects.
What's wrong ? Any idea welcome...
PS : i didn't configure ExternalContextMBean because my current packaging also works "like this" under other J2eeContainer ...
Chris -
3. Re: How to plug JNDI SPI into JB3.0
cridam44 Feb 7, 2003 8:27 AM (in response to cridam44)My JNDI SPI' JB3 configuration that doesn't work is the following :
/default/deploy
---- spi-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- Specify required library jars as needed.-->
---- spi.jar
jndi.properties at the root's jar
java.naming.factory.url.pkgs=com.domain
Until now, my JB2.4.7 configuration that has perfectly worked was the following :
--- /lib/ext/spi.jar
jndi.properties
--- /conf/catalina/jboss.cml
The log server error simply displays the error stack on very first lookup from the MBean
javax.naming.at NameNotFoundException: spi:SpiRoot not bound
org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
org.jnp.server.NamingServer.getObject(NamingServer.java:509)
org.jnp.server.NamingServer.lookup(NamingServer.java:282)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
javax.naming.InitialContext.lookup(InitialContext.java:347)
The most surprising thing is that the context is correctly initialized when the lookup is done from an web application. That's why i thought about a classloader side effects.
What's wrong ? Any idea welcome...
PS : i didn't configure ExternalContextMBean because my current packaging also works "like this" under other J2eeContainer ...
Chris -
4. Re: How to plug JNDI SPI into JB3.0
cridam44 Feb 7, 2003 8:33 AM (in response to cridam44)My JNDI SPI' JB3 configuration that doesn't work is the following :
/default/deploy
---- spi-service.xml
---- spi.jar
jndi.properties at the root's jar
java.naming.factory.url.pkgs=com.domain
Until now, my JB2.4.7 configuration that was ok was the following :
--- /lib/ext/spi.jar
jndi.properties
--- /conf/catalina/jboss.cml with my MBean declaration
The log server error simply displays the error stack on very first lookup from the MBean (the spi.jar is correctly loaded)
javax.naming.at NameNotFoundException: spi:SpiRoot not bound
org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
org.jnp.server.NamingServer.getObject(NamingServer.java:509)
org.jnp.server.NamingServer.lookup(NamingServer.java:282)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
javax.naming.InitialContext.lookup(InitialContext.java:347)
The most surprising thing is that the context is correctly initialized when the lookup is done from an web application. That's why i thought about a classloader side effects.
What's wrong ? Any idea welcome...
PS : i didn't configure ExternalContextMBean because my current packaging also works "like this" under other J2eeContainer ...
Chris -
5. Re: How to plug JNDI SPI into JB3.0
cridam44 Feb 7, 2003 8:41 AM (in response to cridam44)The service is deployed under /default/deploy
Moreover, the MBean is correctly created, only the jndi lookup failed (NameNotFound when lookup("spi:Spi")
Doing the same lookup from a web application works.
Any idea welcome -
6. Re: How to plug JNDI SPI into JB3.0
cridam44 Feb 7, 2003 8:53 AM (in response to cridam44)My JNDI SPI' JB3 configuration that doesn't work is the following :
/default/deploy
---- spi-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- Specify required library jars as needed.-->
---- spi.jar
jndi.properties at the root's jar
java.naming.factory.url.pkgs=com.domain
Until now, my JB2.4.7 configuration that has perfectly worked was the following : --- /lib/ext/spi.jar
jndi.properties
--- /conf/catalina/jboss.cml
<mbean code="management.Spi"name="Plugin:spiservice=Spi"/>
The log server error simply displays the error stack on very first lookup from the MBean
javax.naming.at NameNotFoundException: spi:SpiRoot not bound
org.jnp.server.NamingServer.getBinding(NamingServer.java:495) org.jnp.server.NamingServer.getBinding(NamingServer.java:503) org.jnp.server.NamingServer.getObject(NamingServer.java:509) org.jnp.server.NamingServer.lookup(NamingServer.java:282) org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464) org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443) javax.naming.InitialContext.lookup(InitialContext.java:347)
The most surprising thing is that the context is correctly initialized when the lookup is done from an web application. That's why i thought about a classloader side effects.
What's wrong ? Any idea welcome...
PS : i didn't configure ExternalContextMBean because my current packaging also works "like this" under other J2eeContainer ...
Chris