Re: Tomcat 5.5: java.io.FilePermission read access denied to logging.properties

2010-09-26 Thread Rainer Jung

On 15.09.2010 11:02, Pid wrote:

On 14/09/2010 23:35, André Warnier wrote:

Pid wrote:

On 14/09/2010 16:17, Steve Ryder wrote:

java.security.AccessControlException: access denied
(java.io.FilePermission
/home/sryder/JsrSystems.info/ROOT/WEB-INF/classes/logging.properties
read)

When I first noticed this I added the java.io.FilePermission to
catalina.policy under WEB APP PERMISSIONS
grant { // Added by JSR 2010-09-13:
  permission java.io.FilePermission *, read,write;
 // Added by JSR 2010-02-08:
  permission java.util.PropertyPermission *, read,write;
 permission java.net.SocketPermission*, connect,resolve;

I still get the error at startup!

I have no logging.properties file under either the classes or under
common/classes.
Do I need to add one?  Can it be just a blank line?


Silly question: does the file have the appropriate user permissions for
Tomcat to access it?


Considering that the OP writes, just above there, that he does not have
a file there, that does indeed sound like a silly question.


Yeah.  I completely misread that.  Maybe I need specs.


The method in the stack indicates it might be a missing permission on 
the directories. The code wants to check whether the logging.properties 
in the webapp exists, and it seems it can't read the necessary directory 
information. So


- check directory permissions for 
/home/sryder/JsrSystems.info/ROOT/WEB-INF/classes/ and above


and if that doesn't suffice

- try adding read permissions for the directories to the policy file

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Logging Not Working Properly

2010-09-26 Thread Rainer Jung



On 24.09.2010 16:05, Donald Winston wrote:


I can't get logging to work properly with tomcat(. The file handler prefix 
works but anything below INFO does not show up in the log! What could be wrong? 
I declare the logger in my classes like the following:
private static Logger logger = 
Logger.getLogger(JessServletCommand.class.getName());

My logging.properties file is in my WEB-INF/classes directory. It is the 
following:

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler


# Handler specific properties.
# Describes specific configuration info for Handlers.


org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = test.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


This part only configure the handlers. You need to set the level and the 
loggers as well, so that the loggers actually produce the messages. The 
level on the handlers is only kind of additional filter the be able to 
e.g. write different amounts to console and file.


Examples for configuring loggers are contained in the default 
conf/logging.properties shipped with Tomcat:


Examples:

my.package.level = FINE
my.otherpackage.SomeClass.level=FINEST
my.badpackage.SomeNoisyClass.level=ERROR

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5: java.io.FilePermission read access denied to logging.properties

2010-09-26 Thread Steve Ryder
Thanks.  It turns out the root cause of the error was not permissions at 
all, but another error caused by a left over web.xml reference to a class 
that did not exist.  When I discovered, and removed, that statement in the 
web.xml, the logging properties error went away as well.



- Original Message - 
From: Rainer Jung rainer.j...@kippdata.de

To: users@tomcat.apache.org
Sent: Sunday, September 26, 2010 6:50 AM
Subject: Re: Tomcat 5.5: java.io.FilePermission read access denied to 
logging.properties




On 15.09.2010 11:02, Pid wrote:

On 14/09/2010 23:35, André Warnier wrote:

Pid wrote:

On 14/09/2010 16:17, Steve Ryder wrote:

java.security.AccessControlException: access denied
(java.io.FilePermission
/home/sryder/JsrSystems.info/ROOT/WEB-INF/classes/logging.properties
read)

When I first noticed this I added the java.io.FilePermission to
catalina.policy under WEB APP PERMISSIONS
grant { // Added by JSR 2010-09-13:
  permission java.io.FilePermission *, read,write;
 // Added by JSR 2010-02-08:
  permission java.util.PropertyPermission *, read,write;
 permission java.net.SocketPermission*, connect,resolve;

I still get the error at startup!

I have no logging.properties file under either the classes or under
common/classes.
Do I need to add one?  Can it be just a blank line?


Silly question: does the file have the appropriate user permissions for
Tomcat to access it?


Considering that the OP writes, just above there, that he does not have
a file there, that does indeed sound like a silly question.


Yeah.  I completely misread that.  Maybe I need specs.


The method in the stack indicates it might be a missing permission on the 
directories. The code wants to check whether the logging.properties in the 
webapp exists, and it seems it can't read the necessary directory 
information. So


- check directory permissions for 
/home/sryder/JsrSystems.info/ROOT/WEB-INF/classes/ and above


and if that doesn't suffice

- try adding read permissions for the directories to the policy file

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26

2010-09-26 Thread sbrejeon


Konstantin Kolinko wrote:
 
 2010/7/6 Roxana missbl...@gmail.com:
 BTW, if you really need to compare apples with oranges, you can
 convert one of them or both to strings.
 Best regards,
 Konstantin Kolinko
 

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?revision=981816view=markup

equals:
144  } else if (obj0.getClass().isEnum()) {
145 return obj0.equals(coerceToEnum(obj1, obj0.getClass())); 

coerceToEnum(obj, type):
180  if (type.isAssignableFrom(obj.getClass())) {
181 return (Enum?) obj;
182 }
183 
184 if (!(obj instanceof String)) {
185 throw new ELException(MessageFactory.get(error.convert,
186 obj, obj.getClass(), type));
187 } 

enum A{
 test
}

enum B{
 test
}

A.test==B.test throws the exception. couldn't it just return false?

Regards
Sbrejeon






-- 
View this message in context: 
http://old.nabble.com/Strange-difference-in-behavior-ELSupport-in-Tomcat-6.0.20-and-Tomcat--6.0.26-tp29088066p29815264.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26

2010-09-26 Thread Mark Thomas
On 27/09/2010 02:23, sbrejeon wrote:
 A.test==B.test throws the exception. couldn't it just return false?

Such a change would put Tomcat's EL implementation in breach of the EL
spec so this behaviour will not be changed.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Strange difference in behavior ELSupport in Tomcat 6.0.20 and Tomcat 6.0.26

2010-09-26 Thread sbrejeon


markt-2 wrote:
 
 On 27/09/2010 02:23, sbrejeon wrote:
 A.test==B.test throws the exception. couldn't it just return false?
 
 Such a change would put Tomcat's EL implementation in breach of the EL
 spec so this behaviour will not be changed.
 
 Mark
 

Thank you for your quick reply.

The spec says that If A or B is an enum, coerce both A and B to enum, apply
operator.
Does't it simply mean that both A and B must be coercible to enums. instead
of if A is an enum then B must be an enum of type A, or vice versa.

in the coerceToEnum method I would return the object if it is an enum
(whatever its type is):

public final static Enum? coerceToEnum(final Object obj, Class type) {
if (obj == null || .equals(obj)) {
return null;
}

if(obj.getClass().isEnum()){
 return (Enum?)obj;
}
...
}

Like the original creator of this post, I have a series of enums of
different types that implement a common interface. I need to be able to
compare them and I don't want to have to translate them to Strings.

Regards
Sbrejeon


-- 
View this message in context: 
http://old.nabble.com/Strange-difference-in-behavior-ELSupport-in-Tomcat-6.0.20-and-Tomcat--6.0.26-tp29088066p29815521.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



BOE LDAP Configuration

2010-09-26 Thread Carter, Reginald
log4j:event 
logger=com.crystaldecisions.sdk.plugin.authentication.ldap.internal.LDAPImpl 
timestamp=1284763084123
 level=ERROR thread=http-44306-Processor25
log4j:message![CDATA[GetDirContext(): Failed to obtain 
InitialDirContext]]/log4j:message
log4j:throwable![CDATA[javax.naming.CommunicationException: simple bind 
failed:
prdsap01.prod-sap.grainger.com:636 [Root exception is 
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error:
 java.security.InvalidAlgorithmParameterException: the trustAnchors parameter 
must be non-empty]


Getting the above error any suggestion on documentation or things that have 
worked for others...


RE: Tomcat Consultant

2010-09-26 Thread Karthik Nanjangude
Hi

A better approach to use J2EE container ( with Tomcat built in )   use JBOSS ...



With regards
Karthik

-Original Message-
From: Jorge Medina [mailto:cerebrotecnolog...@gmail.com]
Sent: Sunday, September 26, 2010 4:25 AM
To: Tomcat Users List
Subject: Re: Tomcat Consultant

http://en.wikipedia.org/wiki/Application_server


I am no expert, I have never used a J2EE container, so verify my words below:

A web container (Tomcat) allows you to run servlets...(or JSPs that
get compiled into servlets)
A J2EE container or Application Server (Glassfish) can also manage
EJBs, it will support message queues (JMS), it will allow you to
manage database and JNDI resources, it can handle a transaction
manager.
You can probably use JMS, set up JNDI resources and use a transaction
manager within your webapp in Tomcat but you have to add the features
yourself; an application server should be able to help set up all that
and help you manage it, in theory speeding up your development.

An application server is also a web container, but it offers you many
other features.

http://download.oracle.com/javaee/1.4/tutorial/doc/Overview3.html



On Sat, Sep 25, 2010 at 2:07 PM, Daniel Savard daniel.sav...@gmail.com wrote:
 Jorge,

 Could you explain further what's the difference between an app
 container and an app server? For me it seems pretty much the same.

 Regards,
 Daniel Savard

 2010/9/24, Jorge Medina cerebrotecnolog...@gmail.com:
 Hey, you don't need a Big-5 consulting company.
 You need a a couple of experts: a networking guy and a Tomcat guy.
 But anyway, I'm sure a Fortune 500 have the money to overpay one of the
 Big-5.

 Now, from my understanding, Tomcat is only a web app container while
 Websphere is an application server.
 Therefore, depending on your application you may not be able to
 migrate it to Tomcat, but rather to Glassfish. Glassfish is also an
 application server.

 -Jorge



 On Fri, Sep 24, 2010 at 1:57 PM, Christopher Schultz
 ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 To whom it may concern,

 On 9/24/2010 1:25 PM, tdelesio wrote:
 My fortune 500 company is testing a pilot for switching over a J2EE
 web app over from Web Sphere application server to Tomcat and we are
 looking for a consultant to setup a crusted production instance of
 tomcat.

 Wait... are you testing it? If so, then you don't need anyone to set it
 up, do you? By crusted, did you mean trusted?

 Does anyone have any recommendations for a top notch consulting firm
 that could provide these services?

 I'm sure that any of the big-5 consulting companies would be very happy
 to take way more money than is necessary to set up an instance of Tomcat
 for you.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkyc5o4ACgkQ9CaO5/Lv0PAjugCgiACwh5crjW+HXMKbzAWc+A27
 dC4AoJjm6Dgs7FbMPrD3VBBdZl48VXas
 =vADj
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 --
 -
 Daniel Savard

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org