Aaron,
Yes, I read that section. I have not tampered with any of these port
numbers. The client is being executed on the same machine as jBoss and my
bean.
As far as "security manager", what do you mean? Is there some other
property I'm to set beyond what I show below? In jboss/conf, I see the
file server.policy:
grant {
// Allow everything for now
permission java.security.AllPermission;
}
Shouldn't this allow me access?
I also see an MLET for org.jboss.security.EJBSecurityManagerService in
jboss.conf. It was put there on install and I haven't touched it.
And what of the demo's I've already run? The interest and cd EJBs from
"Getting Started: Beginning EJB programming using jBoss (Linux)" run
fine. But, oddly (to me), when my client tries to run
System.setProperty(), I get an AccessControlException at that point.
At 11:43 9/28/2000 -0400, you wrote:
> 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!
--------------------------------------------------------------------------
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]