Mike Hostetler
2002-02-28 13:54:11 UTC
Hello,
I'm trying to use Jython to get to some EJB objects via JBoss 2.2 and
having very little luck. I can get to the database from another
application (that also uses the EJB, but is Java) so I know that it is
being deployed properly.
According to the JBoss startup, my database is being deploy thus:
[jdbc/WP30] Starting
[jdbc/WP30] XA Connection pool jdbc/WP30 bound to java:/jdbc/WP30
[jdbc/WP30] Started
File "<console>", line 1, in ?
DatabaseError: jdbc not bound
And there is a jndi.properties file in that directory, and Jython is
reading it. I know this because if I muck with it, it give me an error:
original jndi.properties:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
messed-up jndi.properties:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=fred://localhost
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
File "<console>", line 1, in ?
DatabaseError: fred
Now, I am totally lost. What could the problem be? Is there any
suggestions?
-- mikeh
--
I'm trying to use Jython to get to some EJB objects via JBoss 2.2 and
having very little luck. I can get to the database from another
application (that also uses the EJB, but is Java) so I know that it is
being deployed properly.
According to the JBoss startup, my database is being deploy thus:
[jdbc/WP30] Starting
[jdbc/WP30] XA Connection pool jdbc/WP30 bound to java:/jdbc/WP30
[jdbc/WP30] Started
from com.ziclix.python.sql import zxJDBC
jndi = "jdbc/WP30"
db = zxJDBC.lookup(jndi)
Traceback (innermost last):jndi = "jdbc/WP30"
db = zxJDBC.lookup(jndi)
File "<console>", line 1, in ?
DatabaseError: jdbc not bound
And there is a jndi.properties file in that directory, and Jython is
reading it. I know this because if I muck with it, it give me an error:
original jndi.properties:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
messed-up jndi.properties:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=fred://localhost
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
from com.ziclix.python.sql import zxJDBC
jndi = "jdbc/WP30"
db = zxJDBC.lookup(jndi)
Traceback (innermost last):jndi = "jdbc/WP30"
db = zxJDBC.lookup(jndi)
File "<console>", line 1, in ?
DatabaseError: fred
Now, I am totally lost. What could the problem be? Is there any
suggestions?
-- mikeh
--