You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ann Tomcat <an...@yahoo.com> on 2001/06/10 19:55:52 UTC

Problem connecting to the database

Hi!guys,


I have developed an application using Tomcat 3.1
,jdk1.3 and Oracle8.1.5 as the database.

The application includes servlets,applets and jsp
pages.

Environment: NT
Jdk : 1.3
Oracle : 8.1.5
Tomcat : 3.1

The application runs Ok till the servlet execution
ie proper database connection.But when the JApplet
tries to connect to the database gives 
'Access Denied: java.permission.SocketPermission 
[server_name] resolve error.

Note: 
1) The database is on the same machine as the JApplet.
2) I did place .java.policy file in 
[c:\WINNT\PROFILES\ADMINSTRATION\] which is the home
directory as per the java console with proper socket
permission.
3) When I try to connect the database using
appletviewer in the JDK1.3 the JApplet has no problem
with the database connection.

Can anybody help me out with this issue ? 

This is very urgent.

Thanks

Ann.



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: Problem connecting to the database

Posted by Ann Tomcat <an...@yahoo.com>.
Hi!Hemant,

Inspite of including the all permission grant in
.java.policy file I have problem connecting to the 
database.

The .java.policy file looks like:
grant codeBase "http://localhost:8080/log/" {
  permission java.lang.RuntimePermission "usePolicy";
  permission java.net.SocketPermission "*", "accept,
connect, listen, resolve";
  permission java.io.FilePermission "<<ALL FILES>>",
"read";
  permission java.security.AllPermission;
};

when I use the system on IE 5.0 it gives me
'Access Denied: java.permission.SocketPermission
[server_name] resolve' error on appletviewer there 
is no such problem.

Can you please suggest me a way out ? 

Thanks 

Ann


--- Hemant Singh <he...@yahoo.com> wrote:
> HI Ann:
> no doubt your problem is offcourse configuration
> related.
> Try giving all permission in your java.policy
> file(Make sure it is
> java.policy or .java.policy)
> eg.
> grant {
>     permission java.security.AllPermission;
> }
> Let me know if this also don't work
> Regards,
> Hemant
> 
> ----- Original Message -----
> From: "Ann Tomcat" <an...@yahoo.com>
> To: <to...@jakarta.apache.org>
> Sent: Sunday, June 10, 2001 11:25 PM
> Subject: Problem connecting to the database
> 
> 
> > Hi!guys,
> >
> >
> > I have developed an application using Tomcat 3.1
> > ,jdk1.3 and Oracle8.1.5 as the database.
> >
> > The application includes servlets,applets and jsp
> > pages.
> >
> > Environment: NT
> > Jdk : 1.3
> > Oracle : 8.1.5
> > Tomcat : 3.1
> >
> > The application runs Ok till the servlet execution
> > ie proper database connection.But when the JApplet
> > tries to connect to the database gives
> > 'Access Denied: java.permission.SocketPermission
> > [server_name] resolve error.
> >
> > Note:
> > 1) The database is on the same machine as the
> JApplet.
> > 2) I did place .java.policy file in
> > [c:\WINNT\PROFILES\ADMINSTRATION\] which is the
> home
> > directory as per the java console with proper
> socket
> > permission.
> > 3) When I try to connect the database using
> > appletviewer in the JDK1.3 the JApplet has no
> problem
> > with the database connection.
> >
> > Can anybody help me out with this issue ?
> >
> > This is very urgent.
> >
> > Thanks
> >
> > Ann.
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> - only $35
> > a year!  http://personal.mail.yahoo.com/
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: Problem connecting to the database

Posted by Hemant Singh <he...@yahoo.com>.
HI Ann:
no doubt your problem is offcourse configuration related.
Try giving all permission in your java.policy file(Make sure it is
java.policy or .java.policy)
eg.
grant {
    permission java.security.AllPermission;
}
Let me know if this also don't work
Regards,
Hemant

----- Original Message -----
From: "Ann Tomcat" <an...@yahoo.com>
To: <to...@jakarta.apache.org>
Sent: Sunday, June 10, 2001 11:25 PM
Subject: Problem connecting to the database


> Hi!guys,
>
>
> I have developed an application using Tomcat 3.1
> ,jdk1.3 and Oracle8.1.5 as the database.
>
> The application includes servlets,applets and jsp
> pages.
>
> Environment: NT
> Jdk : 1.3
> Oracle : 8.1.5
> Tomcat : 3.1
>
> The application runs Ok till the servlet execution
> ie proper database connection.But when the JApplet
> tries to connect to the database gives
> 'Access Denied: java.permission.SocketPermission
> [server_name] resolve error.
>
> Note:
> 1) The database is on the same machine as the JApplet.
> 2) I did place .java.policy file in
> [c:\WINNT\PROFILES\ADMINSTRATION\] which is the home
> directory as per the java console with proper socket
> permission.
> 3) When I try to connect the database using
> appletviewer in the JDK1.3 the JApplet has no problem
> with the database connection.
>
> Can anybody help me out with this issue ?
>
> This is very urgent.
>
> Thanks
>
> Ann.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/