Re: Syslog

2001-04-10 Thread Eric Anderson

It looks like you're using one of the newer versions of Syslog.  I only have 
experience with an older version that did not use an XML config file.

My first guess after looking at your code is that ServletContext.getRealPath() is not 
returning what you think it should.  Have you tried writing this path to System.out so 
you could see if it's correct?

Cheers,
Eric 
--

On Tue, 10 Apr 2001 15:11:32  
 Diego Amicabile wrote:
>This is the LoggerServlet which is loaded on startup
>
>public class LoggerServlet extends HttpServlet {
>  private static final String CONTENT_TYPE =
>"text/html";
>  /**Initialize global variables*/
>  public void init(ServletConfig config) throws
>ServletException {
>super.init(config);
>try {
>  System.out.println("Trying to read configuration
>file");
>  Syslog.configure(new
>File(getServletContext().getRealPath("/WEB-INF/logger.xml")));
> 
>Syslog.setLogMask(Syslog.atOrAbove(Syslog.DEBUG));
>  Syslog.debug(this,"LoggerServlet started");
>} catch (SyslogInitException sie) {
>  sie.printStackTrace();
>}
>  }
>  /**Clean up resources*/
>  public void destroy() {
>  }
>}
>
>This is my configuration file
>
> 
>
>  class="com.protomatter.syslog.PrintWriterLog" 
>> 
>
>  System.out 
>
>  class="com.protomatter.syslog.SimpleLogPolicy"> 
>ALL_CHANNEL 
>INHERIT_MASK 
>   
>
>  class="com.protomatter.syslog.SimpleSyslogTextFormatter">
>
>true 
>false 
>   
>
> 
>
>  
>
> 
>
>   
>
>When I start the web application the message "Trying
>to read configuration file"  appears, no exception is
>thrown, so I assume the configuration file is read,
>but nothing is written afterwards - so the Syslog does
>not work!
>
>Greetings 
>Diego
>
>
>__
>Do You Yahoo!?
>Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
>
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




Re: Syslog

2001-04-09 Thread Eric Anderson

I've used Syslog in several projects now, and it's worked fine.  Are you calling its 
initialization methods to set the logging level?

-Eric
 
--

On Mon, 9 Apr 2001 14:55:50   
 Diego Amicabile wrote:
>Hi people,
>
>has anybody tried to use the Syslog from protomatter
>inside of Orion (http://protomatter.sourceforge.net)
>
>I have tried and I was not successful. I let a
>servlet, which is loaded on startup, load a
>configuration file, I used the -Xnoclassgc option, but
>even after the Syslog is initialzed nothing is ever
>written into the log files. 
>What should be done? Any idea?
>
>Greetings
>Diego
>
>
>
>__
>Do You Yahoo!?
>Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
>
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




Re: JNDI SecurityException

2001-03-27 Thread Eric Anderson

>> I tried the ApplicationClientInitialContextFactory (by mistake) when I first set 
>this up. 
>> I just gave me other problems (I think there was some sort of complaint about a 
>missing
>> application.xml file). 
>
>I believe this complaint is because it is looking for META-INF/application-client.xml
>and is not finding it.

Ah yes, I think you're right.  I think that I tried to get around this by copying a 
sample application-client.xml file into META-INF on the client side, and that had no 
effect at all.  Perhaps the contents did not make Orion happy.

>I have no idea. I simply know that someone on the list claimed to have reported this
>bug, and to this day my servlets simply will not properly authenticate. I do not know
>if this is a problem with just servlets, or anything using ApplicationClient{ICF}. Our
>servlets are running in Orion. I consider this a very serious bug that has servived
>several releases.

Serious indeed.  What are you doing for a work-around?  

Bugs aside, the amount of work required to deploy code on Orion is pretty 
mind-boggling.  That, combined with the lack of detailed documentation, is 
disasterous.  I've only had experience with one other J2EE server, JBoss.  JBoss can 
be a real pain to set up, and like Orion has useless or missing error messages, but at 
least deployment is relatively painless.  Orion is my private nightmare - I've wasted 
days trying to get the simplest things to work, like this JNDI lookup.  I *want* to 
use Orion, but it doesn't want me to use it!

Eric


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




RE: JNDI SecurityException

2001-03-26 Thread Eric Anderson

Hi Nimret,

>this is funny - it took me a whole week to get this right +)

That's not funny!  That means that the documentation is seriously inadequate!

>> System.setProperty("java.naming.factory.initial","com.evermind
>.server.rmi.RMIInitialContextFactory");
>
>this should be different .. check the jndi.properties file i am sending
>along with this msg.

You're using the ApplicationClientInitialContextFactory.  I tried that in error when I 
first started porting this code to Orion, and that didn't work either.  I got the 
impression from reading these archives that this factory was used for doing lookups on 
"J2EE applications", which is not really what I have.  I just have a bean, and that 
bean's home interface ought to be locatable using the most primitive RMI approach 
there is.  It works with JBoss.

>try java.naming.provider.url=ormi://10.16.16.104/attribute for the application tag from server.xml here>

Tried it, no luck, just the same SecurityException.

>
>these should be added to config/principals.xml ( if not already there):

I'm using the admin user/password, so these are already configured in 
./config/principals.xml.

>i think u might be able to get by creating a jndi.properties file with these
>values ( it works for client side apps for me).

I shouldn't need an external properties file should I?  Adding these properties to 
System.Properties from within the program ought to work I think.

> lemme know if u make any
>progress with this .. if not, i can send u an example client with all the
>config settings, etc.

You're deploying whole J2EE apps - .ear files, right?  Do you have a working example 
that's *just* a bean and *just* a servlet/JSP client?  I really want to do as little 
deployment configuration as possible with the bean.  
Thanks,
Eric


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




Re: JNDI SecurityException

2001-03-26 Thread Eric Anderson

I tried the ApplicationClientInitialContextFactory (by mistake) when I first set this 
up.  I just gave me other problems (I think there was some sort of complaint about a 
missing application.xml file).  As far as I know, there should be no reason that I 
cannot use the RMIInitialContextFactory for this.  I don't *have* an application on 
Orion, all I have is a single bean.

Interesting what you point out about a possible bug.  Why would this affect only 
servlets though?  Wouldn't this affect *any* remote client?  Or is this a bug that 
affects servlets running in the Orion servlet container?  I'm running mine under 
Tomcat.

Thanks,
Eric 
--

On Mon, 26 Mar 2001 14:25:36  
 Tim Endres wrote:
>First, have you tried using ApplicationClientInitialContextFactory as opposed
>to RMIInitialContextFactory? Second, I believe it is a known bug in Orion that
>servlet's do not properly send their user/password information to the app server.
>In other words, Servlet InitialContext authentication is broken.
>
>tim.
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




Re: JNDI SecurityException

2001-03-26 Thread Eric Anderson

Hi,

I just tried this.  No change: SecurityException - invalid username/password for 
PersonBean.

Tnx,
Eric 
--

On Mon, 26 Mar 2001 13:22:56  
 KirkYarina wrote:
>System.setProperty("java.naming.provider.url","ormi://192.168.100.3/appname");
>  
>   ^^
>
>Try this; it was just discussed ( 
>http://www.mail-archive.com/orion-interest%40orionserver.com/msg11568.html )
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




Re: JNDI SecurityException

2001-03-26 Thread Eric Anderson

No, the admin user in this case is not deactivated.  There's no deactivated attribute 
on that element anyway, so I'm assuming that the default is 'activated' as you say.

Thanks,
Eric
--

On Mon, 26 Mar 2001 13:29:38  
 Ray Harrison wrote:
>Don't know if this is the case, but look in your %ORION_DIR/config/principals.xml
>and look at the user entry for admin. Check to make sure that deactivated="false" in 
>the admin
>description section as below:
>
>
>   
>   The default administrator
>   
>   
>   
>   
>
>
>If there is no reference to the 'deactivated' keyword, I believe that the default is 
>'false'
>and this isn't your problem...
>
>Good luck!
>Ray
>--- Eric Anderson <[EMAIL PROTECTED]> wrote:
>> I'm trying to re-deploy an existing CMP bean on Orion and am having no 
>> luck at all with the JNDI lookup of the bean's home interface.  No 
>> matter what I change or what I try, I *always* get a SecurityException 
>> saying that the userid/password is invalid.  The principal and 
>> credentials that I am using are that of the admin user. 
>> 
>> This application used to work on JBoss.  It consists of the one bean 
>> ("PersonBean") and a servlet, run separately in Tomcat (this cannot be 
>> changed for now) that uses the bean.  On the servlet client side, I've 
>> tried many different versions of the bean name ("ejb/Personbean", 
>> "java:comp/env/ejb/PersonBean", "PersonBean" ... ) but that makes no 
>> difference - SecurityException, bad userid/password, every single time.
>> I'm setting the following properties explicity from the servlet, prior 
>> to doing any JNDI operations:
>> 
>>
>>
>System.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
>>
>> System.setProperty("java.naming.provider.url","ormi://192.168.100.3");
>>System.setProperty("java.naming.security.principle","admin");
>>System.setProperty("java.naming.security.credentials","foobar");
>> 
>> I've tried specifying an "application" (PersonBean) in the URL, but all 
>> I get is the same old SecurityException again.
>> 
>> On the server side, I've tried copying some of the config data from the 
>> server's principals.xml file into the principals.xml file in the bean 
>> deployment directory.  This also had no effect on the SecurityException.
>> 
>> So what am I missing?
>> 
>> Thanks,
>> Eric
>> 
>> 
>
>
>__
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail. 
>http://personal.mail.yahoo.com/
>
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




JNDI SecurityException

2001-03-26 Thread Eric Anderson

I'm trying to re-deploy an existing CMP bean on Orion and am having no 
luck at all with the JNDI lookup of the bean's home interface.  No 
matter what I change or what I try, I *always* get a SecurityException 
saying that the userid/password is invalid.  The principal and 
credentials that I am using are that of the admin user. 

This application used to work on JBoss.  It consists of the one bean 
("PersonBean") and a servlet, run separately in Tomcat (this cannot be 
changed for now) that uses the bean.  On the servlet client side, I've 
tried many different versions of the bean name ("ejb/Personbean", 
"java:comp/env/ejb/PersonBean", "PersonBean" ... ) but that makes no 
difference - SecurityException, bad userid/password, every single time.
I'm setting the following properties explicity from the servlet, prior 
to doing any JNDI operations:

   
System.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
   
System.setProperty("java.naming.provider.url","ormi://192.168.100.3");
   System.setProperty("java.naming.security.principle","admin");
   System.setProperty("java.naming.security.credentials","foobar");

I've tried specifying an "application" (PersonBean) in the URL, but all 
I get is the same old SecurityException again.

On the server side, I've tried copying some of the config data from the 
server's principals.xml file into the principals.xml file in the bean 
deployment directory.  This also had no effect on the SecurityException.

So what am I missing?

Thanks,
Eric