The problem you are having now is not related to databases.  You
are getting a security exception when you try to perform a JNDI lookup.  
The port 1099 is where the jBoss JNDI server listens (there's a section in
the manual on default ports).  Is you client an applet or something?  Do
you have a security manager in your client?  Does it allow network access?  
Is the client running on the same machine as the server?  The exception
indicates that the client is trying to connect to "localhost", so if it's
really on a different machine, look at the section in the manual on
"clients on a different machine".

Aaron

On Thu, 28 Sep 2000, Thad Humphries wrote:
> Aaron,
> 
> Thanks!  I'm connected to Oracle and my bean deploys but I cannot connect 
> with a client.  I'm guessing I'm still missing something in jboss.jcml or 
> somewhere but I don't know.
> 
> The instructions and example in adv_config.html seems to have gotten Oracle 
> up and running! In the startup, I see
> 
> [Configuration] URL set to jdbc:oracle:thin:@localhost:1521:optix in 
> DefaultDomain:service=XADataSource,name=OptixConnectionPool
> [Configuration] GCMinIdleTime set to 1200000 in 
> DefaultDomain:service=XADataSource,name=OptixConnectionPool
> [Configuration] Password set to optix1 in 
> DefaultDomain:service=XADataSource,name=OptixConnectionPool
> 
> My next step was to deploy my CMP bean, which is the Cabin bean from 
> O'Reilly's "Enterprise Java Beans" by Monson-Haefel.  After playing with my 
> jboss.xml and jaws.xml files (and no 'xa.' in front of my datasource like 
> the older docs said), the bean seems to deploy fine:
> 
> [Auto deploy] Auto deploy of file:/opt/jboss/deploy/cabin.jar
> [Container factory] Deploying:file:/opt/jboss/deploy/cabin.jar
> [Container factory] /opt/jboss/tmp/deploy
> [Container factory] Loading ejb-jar.xml : 
> jar:file:/opt/jboss/tmp/deploy/tmpejbjar46693.jar!/META-INF/ejb-jar.xml
> [Container factory] Loading standardjboss.xml : 
> jar:file:/opt/jboss/lib/ext/jboss.jar!/org/jboss/metadata/standardjboss.xml
> [Container factory] 
> jar:file:/opt/jboss/tmp/deploy/tmpejbjar46693.jar!/META-INF/jboss.xml 
> found. Overriding defaults
> [Verifier] Verifying file:/opt/jboss/tmp/deploy/tmpejbjar46693.jar
> [Verifier] CabinBean: Verified.
> [Container factory] Deploying CabinBean
> [Container factory] Container Invoker Optimize='false'
> [JAWS] Initializing JAWS plugin for CabinBean
> [JAWS] Loading standardjaws.xml : 
> 
>jar:file:/opt/jboss/lib/ext/jboss.jar!/org/jboss/ejb/plugins/jaws/metadata/standardjaws.xml
> [JAWS] jar:file:/opt/jboss/tmp/deploy/tmpejbjar46693.jar!/META-INF/jaws.xml 
> found. Overriding defaults
> [Container factory] Bound CabinBean to CabinHome
> [Container factory] Deployed application: 
> file:/opt/jboss/deploy/cabin.jar
> 
> However my client isn't working--I'm getting an AccessControlException when 
> I call jndiContext.lookup("CabinHome").  In Client_1.java, with
> 
>          Properties props = new Properties();
>          props.put(Context.INITIAL_CONTEXT_FACTORY, 
> "org.jnp.interfaces.NamingContextFactory");
>          props.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
>          props.put(Context.PROVIDER_URL, "localhost:1099");
>          InitialContext jndiContext = new InitialContext(props);
> 
>          System.out.println("Got context");
>          Object obj = jndiContext.lookup("CabinHome");
> 
> I get
> 
> $ java -classpath 
> 
>$CLASSPATH:/opt/jboss/client/jnp-client.jar:/opt/jboss/lib/ext/ejb.jar:/opt/jboss/client/jboss-client.jar:.
> 
> com.titan.cabin.Client_1
> Got context
> Exception in thread "main" java.security.AccessControlException: access 
> denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
>          at 
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
>          at 
> java.security.AccessController.checkPermission(AccessController.java:399)
>          at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
>          at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
>          at java.net.Socket.<init>(Socket.java:262)
>          at java.net.Socket.<init>(Socket.java:100)
>          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:88)
>          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
>          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:272)
>          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
>          at javax.naming.InitialContext.lookup(InitialContext.java:350)
>          at com.titan.cabin.Client_1.main(Client_1.java:34)
> 
> 
> I also tried using System.setProperty() as in the Interest EJB example with 
> jBoss.  It works in that bean, but not in mine.  Huh?
> 
> If I ever get this up, I want to get *all* of Monson-Haefel's examples 
> running in jBoss and make them available somewhere for others to use.
> 
> Thanks for your help!
> 
> At 18:22 9/27/2000 -0400, you wrote:
> >         You are using the wrong syntax for your entry in jboss.conf - it
> >should only have 2 ARG lines IIRC.  This was a change in the month or two
> >preceding the BETA-PROD-01 release.  For the new syntax, you need to add
> >entries in both jboss.conf and jboss.jcml.  You can get examples on the
> >web page at http://www.jboss.org/minerva/minerva.htm or better examples in
> >the manual in CVS under jbossweb/manual/adv_config.html
> >
> >Aaron
> 
> --------------------------------------------------------------------------
> Thad Humphries                        "Who is this that darkens my counsel
> Web Development Manager                With words without knowledge?"
> Phone: 540/675-3015, ext. 225                              - Job 38:1, NIV
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to