Java agent not running properly on the web

All,

I have a simple java agent which is connecting to a oracle database and then getting a printing records from it. When I run it from the client, it runs successfully, but when i run it from the web, it prints out the first two prinlines that is test111 and test222 but crashes out after that. I have tried checking everything but see any reason. Iam pasting the error here. Could someone please help me.

Thanks in Advance.

Ki

02/09/2004 11:26:40 AM HTTP JVM: java.lang.SecurityException: wd-cpotluri.3ht.com,-1

02/09/2004 11:26:40 AM HTTP JVM: at lotus.notes.AgentSecurityManager.checkConnect(AgentSecurityManager.java:172)

02/09/2004 11:26:40 AM HTTP JVM: at java.net.InetAddress.getAllByName0(InetAddress.java:579)

02/09/2004 11:26:40 AM HTTP JVM: at java.net.InetAddress.getAllByName0(InetAddress.java:560)

02/09/2004 11:26:40 AM HTTP JVM: at java.net.InetAddress.getByName(InetAddress.java:469)

02/09/2004 11:26:40 AM HTTP JVM: at java.net.Socket.(Socket.java:121)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.nt.ConnOption.connect(ConnOption.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.net.ns.NSProtocol.connect(NSProtocol.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.jdbc.driver.OracleConnection.(OracleConnection.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)

02/09/2004 11:26:40 AM HTTP JVM: at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)

02/09/2004 11:26:40 AM HTTP JVM: at java.sql.DriverManager.getConnection(DriverManager.java:543)

02/09/2004 11:26:40 AM HTTP JVM: at java.sql.DriverManager.getConnection(DriverManager.java:194)

02/09/2004 11:26:40 AM HTTP JVM: at JavaAgent.NotesMain(JavaAgent.java:31)

02/09/2004 11:26:40 AM HTTP JVM: at lotus.domino.AgentBase.runNotes(Unknown Source)

02/09/2004 11:26:40 AM HTTP JVM: at lotus.domino.NotesThread.run(NotesThread.java:208)

Subject: Java agent not running properly on the web

Go to Agent Properties, Security Tab and Set runtime level to 3 (allow restricted operation with full administration rights). This worked for me.

Subject: RE: Java agent not running properly on the web

Tried that but no success. Any other idea(s)??Thanks

Ki

Subject: RE: Java agent not running properly on the web

Tony,

I had the exact same problem connecting to SQL Server from a web app. The solution was two-fold. First, changing the security level from 1 to 3 as described in the other post. Secondly, we needed to put initialization code (like in our JDBC case with the Class.forName(…) statement) into a public class defined as “static” to ensure it runs first.

Ken

Subject: RE: Java agent not running properly on the web

Just to contribute a little more:

I was also trying to connect to SQL Server from a web agent. While I didn’t change the security level from 1 to 2 (level 2 worked fine for me), I was receiving the error: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

Once I changed the security level, the agent started to work.

It’s also good to remember to give the agent signer rights to run restricted Java agents. That configuration can be found inside the server document (security tab).

Regards.