You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Stephen Pain <st...@db.com> on 2004/06/10 19:43:38 UTC

RE: JMSReceiver - chainsaw (webstart)

Hi Paul,

Noticed your commit fixing the receiver restart issue... thanks for that.  Did you get a chance to check out why the duplicate receivers are being shown in the receiver panel again?

Unfortunately JMS isn't going so well - I've messed around with adding weblogic.jar to the classpath, no luck.  To run it in eclipse, I have to specify the jar on the classpath defined within eclipse (in the Run settings); putting it on the system classpath doesn't seem to help.

I can run it from ant with the file on the system classpath, but that's to be expected.

Putting it in lib/ext is definitely not helping. My interpretation was that putting it here means it gets loaded in preference to other some other system libs and causes a problem that way... I get various errors, ranging from the NPE I included in a previous email below, to a problem deserializing the events.

I've been looking around on google too, not found anything yet.  Just about the only thing I have established so far is that lib/ext is *not* the way to go.  Pretty much exhausted all my ideas so far though - my best option might be to get grabCvs working a bit better and just build my own jar. I'd like to avoid that if possible though.

Cheers,
Stephen

Phone x59668



                                                                                                                                                                                                              
                      Paul Smith                                                                                                                                                                              
                      <psmith@apache.or        To:       Log4J Developers List <lo...@logging.apache.org>                                                                                                 
                      g>                       cc:                                                                                                                                                            
                                               Subject:  RE: JMSReceiver - chainsaw                                                                                                                           
                      10/06/2004 00:04                                                                                                                                                                        
                      Please respond to                                                                                                                                                                       
                      "Log4J Developers                                                                                                                                                                       
                      List"                                                                                                                                                                                   
                                                                                                                                                                                                              
                                                                                                                                                                                                              




>From my googling this appears that it might be Classloader related.

Ok, given that through Eclipse you can get it to work by simply having it
on the general classpath, it should be possible to get this to work. What
about if you try and put the Weblogic.jar file in the %CLASSPATH%
environment variable, rather than having the jar in the ext dir.  Not sure why, but
some news group items on weblogic seem to think that this might help.

I am pretty confident it is a Classloader issue.

Paul

On Wed, 9 Jun 2004, Paul Smith wrote:

> Hmmm, I wonder if the weblogic.jar needs to be signed?  But then I don't
> think it needs to be when just running outside Web start.
>
> I'll have to do some googling and get back to you.  Looks like JMS is going
> to be my nemisis of the month.
>
> cheers,
>
> Paul Smith
>
> On Wed, 9 Jun 2004, Stephen Pain wrote:
>
>>
>> Hi Paul,
>>
>> Putting the weblogic.jar in JAVA_HOME/lib/ext as you suggested allowed me
>> to start chainsaw, but I wasn't getting any events via the JMSReceiver
>> (not seeing any exceptions in the console log either).  So I tried running
>> from eclipse, and got the nasty error below.
>>
>> I tried removing weblogic.jar from the classpath in eclipse and the system
>> classpath and still get the same error whenever weblogic.jar is in
>> JAVA_HOME/lib/ext.  If I remove weblogic.jar from there, I can get the
>> JMSReceiver to work perfectly from the local eclipse build (after I put it
>> back on the classpath), but this doesn't help with the webstart version.
>>
>> I think we need to find a different way of telling webstart about the jar
>> file!
>>
>> Cheers,
>> Stephen
>>
>> java.lang.NullPointerException
>>      at
>> weblogic.rmi.internal.StubGenerator.getStubOnClient(StubGenerator.java:694)
>>      at
>> weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:666)
>>      at
>> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
>>      at
>> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
>>      at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
>>      at
>> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
>>      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
>>      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
>>      at javax.naming.InitialContext.init(Unknown Source)
>>      at javax.naming.InitialContext.<init>(Unknown Source)
>>      at
>> org.apache.log4j.net.JMSReceiver.activateOptions(JMSReceiver.java:199)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:887)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:769)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:718)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:703)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:796)
>>      at org.apache.log4j.chainsaw.LogUI.createChainsawGUI(LogUI.java:272)
>>      at org.apache.log4j.chainsaw.LogUI.main(LogUI.java:242)
>> --------------- nested within: ------------------
>> weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to
>> generate class for weblogic.jndi.internal.ServerNamingNode_WLStub ] - with
>> nested exception:
>> [java.lang.NullPointerException]
>>      at
>> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:716)
>>      at
>> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
>>      at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
>>      at
>> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
>>      at
>> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
>>      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
>>      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
>>      at javax.naming.InitialContext.init(Unknown Source)
>>      at javax.naming.InitialContext.<init>(Unknown Source)
>>      at
>> org.apache.log4j.net.JMSReceiver.activateOptions(JMSReceiver.java:199)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:887)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:769)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:718)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:703)
>>      at
>> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:796)
>>      at org.apache.log4j.chainsaw.LogUI.createChainsawGUI(LogUI.java:272)
>>      at org.apache.log4j.chainsaw.LogUI.main(LogUI.java:242)
>>
>>
>>
>>
>>
>>                      Paul Smith
>>                      <psmith@apache.or        To:       Log4J Developers
>> List <lo...@logging.apache.org>
>>                      g>                       cc:
>>                                               Subject:  RE: JMSReceiver -
>> chainsaw
>>                      09/06/2004 10:07
>>                      Please respond to
>>                      "Log4J Developers
>>                      List"
>>
>>
>>
>>
>>
>>
>> ok, I am just applying your patch now (by hand, but that's just coz I
>> can't work out why the patch doesn't work).
>>
>> Soon I will check in the change to cvs, will you be able to verify by
>> trying it out with the ant version?
>>
>> cgheers,
>> Paul
>>
>> On Wed, 9 Jun 2004, Stephen Pain wrote:
>>
>>>
>>> here's the unified diff - sorry for the delay...
>>>
>>> Cheers,
>>> Stephen
>>>
>>> $ diff -u JMSReceiver.java.old JMSReceiver.java
>>> --- JMSReceiver.java.old        2004-06-07 10:38:01.186774200 +0100
>>> +++ JMSReceiver.java    2004-06-07 10:35:27.096615800 +0100
>>> @@ -7,6 +7,10 @@
>>>
>>> package org.apache.log4j.net;
>>>
>>> +import java.io.FileInputStream;
>>> +import java.util.Hashtable;
>>> +import java.util.Properties;
>>> +
>>> import javax.jms.Message;
>>> import javax.jms.MessageListener;
>>> import javax.jms.TopicConnection;
>>> @@ -53,18 +57,21 @@
>>>   protected String userId;
>>>   protected String password;
>>>   protected TopicConnection topicConnection;
>>> +  protected String jndiPath;
>>>
>>>   private String remoteInfo;
>>> +  private String providerUrl;
>>>
>>>   public JMSReceiver() { }
>>>
>>>   public JMSReceiver(String _topicFactoryName, String _topicName,
>>> -    String _userId, String _password) {
>>> +    String _userId, String _password, String _jndiPath) {
>>>
>>>       topicFactoryName = _topicFactoryName;
>>>       topicName = _topicName;
>>>       userId = _userId;
>>>       password = _password;
>>> +      jndiPath = _jndiPath;
>>>   }
>>>
>>>   /**
>>> @@ -125,6 +132,23 @@
>>>   }
>>>
>>>   /**
>>> +       * Sets the path to a properties file containing
>>> +       * the initial context and jndi provider url
>>> +       */
>>> +  public void setJndiPath(String _jndiPath) {
>>> +        jndiPath = _jndiPath;
>>> +   }
>>> +
>>> +   /**
>>> +       * Gets the path to a properties file containing
>>> +       * the initial context and jndi provider url
>>> +       */
>>> +   public String getJndiPath() {
>>> +        return jndiPath;
>>> +   }
>>> +
>>> +
>>> +  /**
>>>    * Returns true if the receiver is the same class and they are
>>>    * configured for the same properties, and super class also considers
>>>    * them to be equivalent. This is used by PluginRegistry when
>>> determining
>>> @@ -165,8 +189,19 @@
>>>     if (!isActive()) {
>>>       try {
>>>         remoteInfo = topicFactoryName + ":" + topicName;
>>> -
>>> -        Context ctx = new InitialContext();
>>> +
>>> +               Context ctx = null;
>>> +               if (jndiPath == null || jndiPath.equals("")) {
>>> +                       ctx = new InitialContext();
>>> +               } else {
>>> +                       Properties p = new Properties();
>>> +                       p.load(new FileInputStream(jndiPath));
>>> +                       ctx = new InitialContext(p);
>>> +               }
>>> +
>>> +               // give some more flexibility about the choice of a tab
>>> name
>>> +               providerUrl =
>>> (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
>>> +
>>>         TopicConnectionFactory topicConnectionFactory;
>>>         topicConnectionFactory =
>>>           (TopicConnectionFactory) lookup(ctx, topicFactoryName);
>>> @@ -191,6 +226,7 @@
>>>         topicConnection.start();
>>>
>>>         setActive(true);
>>> +
>>>       } catch(Exception e) {
>>>         setActive(false);
>>>         if (topicConnection != null) {
>>> @@ -233,6 +269,7 @@
>>>
>>>        // store the known remote info in an event property
>>>        event.setProperty("log4j.remoteSourceInfo", remoteInfo);
>>> +               event.setProperty("log4j.jmsProviderUrl", providerUrl);
>>>
>>>        doPost(event);
>>>       } else {
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>                      Paul Smith
>>>                      <psmith@apache.or        To:       Log4J Developers
>>> List <lo...@logging.apache.org>
>>>                      g>                       cc:
>>>                                               Subject:  RE: JMSReceiver
>>> - chainsaw
>>>                      08/06/2004 23:13
>>>                      Please respond to
>>>                      "Log4J Developers
>>>                      List"
>>>
>>>
>>>
>>>
>>>
>>>
>>> you couldn't do me a huge favour and do this as a 'diff -u' could you?
>>> (Unified diff), that way I can easily do this on my windows box inside
>>> the
>>> ide.
>>>
>>> I won't be able to redo the webstart till tonight (another 12 hours from
>>> now) because I forgot to email myself certificate from home so I can do
>>> this sort of thing from work.
>>>
>>> I think your approach of being able to specify a path to the
>>> jndi.properties file is the best one I can think of too, that doesn't
>>> involve any Classloader+SecurityManager trickery (Classloaders get very
>>> complicated in a Web start environment).
>>>
>>> Anyway, a Unified diff would help me a lot.
>>>
>>> cheers
>>>
>>> ,Paul
>>>
>>> On Tue, 8 Jun 2004, Stephen Pain wrote:
>>>
>>>>
>>>> Here's the patch... still thinking about the Xbox!
>>>>
>>>> If you could get this in and then include JMSReceiver in the webstart
>>>> jar it would be a big help (release notes now say that JMSReceiver is
>>>> included, but I'm still getting class not found).
>>>>
>>>> Cheers,
>>>> Stephen
>>>>
>>>> $ diff JMSReceiver.java.old JMSReceiver.java
>>>> 9a10,13
>>>>> import java.io.FileInputStream;
>>>>> import java.util.Hashtable;
>>>>> import java.util.Properties;
>>>>>
>>>> 55a60
>>>>>   protected String jndiPath;
>>>> 57a63
>>>>>   private String providerUrl;
>>>> 62c68
>>>> <     String _userId, String _password) {
>>>> ---
>>>>>     String _userId, String _password, String _jndiPath) {
>>>> 67a74
>>>>>       jndiPath = _jndiPath;
>>>> 127a135,151
>>>>>       * Sets the path to a properties file containing
>>>>>       * the initial context and jndi provider url
>>>>>       */
>>>>>   public void setJndiPath(String _jndiPath) {
>>>>>        jndiPath = _jndiPath;
>>>>>    }
>>>>>
>>>>>    /**
>>>>>       * Gets the path to a properties file containing
>>>>>       * the initial context and jndi provider url
>>>>>       */
>>>>>    public String getJndiPath() {
>>>>>        return jndiPath;
>>>>>    }
>>>>>
>>>>>
>>>>>   /**
>>>> 168,169c192,204
>>>> <
>>>> <         Context ctx = new InitialContext();
>>>> ---
>>>>>
>>>>>               Context ctx = null;
>>>>>               if (jndiPath == null || jndiPath.equals("")) {
>>>>>                       ctx = new InitialContext();
>>>>>               } else {
>>>>>                       Properties p = new Properties();
>>>>>                       p.load(new FileInputStream(jndiPath));
>>>>>                       ctx = new InitialContext(p);
>>>>>               }
>>>>>
>>>>>               // give some more flexibility about the choice of a
>>>>> tab name
>>>>>               providerUrl =
>>>>> (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
>>>>>
>>>> 193a229
>>>>>
>>>> 235a272
>>>>>               event.setProperty("log4j.jmsProviderUrl",
>>>>> providerUrl);
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>                      Paul Smith
>>>>                      <psmith@minotaur.        To:       Stephen
>>>> Pain/DMGGM/DMG UK/DeuBa@DMG UK
>>>>                      apache.org>              cc:
>>>>                                               Subject:  RE:
>>>> JMSReceiver - chainsaw
>>>>                      07/06/2004 02:29
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> If Rallisport Challenge 2 is really that good, maybe I should join
>>>>> the log4j-dev list and submit a patch myself.   Or go & buy an Xbox
>>>>> :)
>>>>
>>>> You should buy an XBox.... AND submit a patch... :)
>>>>
>>>> Still getting my head around this new job, so this week might be a
>>>> real
>>>> right-off.
>>>>
>>>> I'll let you know my progress, whenever that happens.
>>>>
>>>> Paul
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> This e-mail may contain confidential and/or privileged information. If
>>>> you are not the intended recipient (or have received this e-mail in
>>>> error) please notify the sender immediately and destroy this e-mail.
>>>> Any unauthorized copying, disclosure or distribution of the material
>>>> in this e-mail is strictly forbidden.
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> This e-mail may contain confidential and/or privileged information. If
>>> you are not the intended recipient (or have received this e-mail in
>>> error) please notify the sender immediately and destroy this e-mail. Any
>>> unauthorized copying, disclosure or distribution of the material in this
>>> e-mail is strictly forbidden.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>>
>>
>>
>>
>> --
>>
>> This e-mail may contain confidential and/or privileged information. If you
>> are not the intended recipient (or have received this e-mail in error)
>> please notify the sender immediately and destroy this e-mail. Any
>> unauthorized copying, disclosure or distribution of the material in this
>> e-mail is strictly forbidden.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org






--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


RE: JMSReceiver - chainsaw (webstart)

Posted by Paul Smith <ps...@apache.org>.

On Thu, 10 Jun 2004, Stephen Pain wrote:

>
> Hi Paul,
>
> Noticed your commit fixing the receiver restart issue... thanks for that.  Did you get a chance to check out why the duplicate receivers are being shown in the receiver panel again?
>

I have not been able to reproduce the the duplicate receivers issue yet (I 
did a while ago when I 'fixed' it, but haven't found a condition where it 
appears for me).

> Unfortunately JMS isn't going so well - I've messed around with adding weblogic.jar to the classpath, no luck.  To run it in eclipse, I have to specify the jar on the classpath defined within eclipse (in the Run settings); putting it on the system classpath doesn't seem to help.
>

Curses.

> I can run it from ant with the file on the system classpath, but that's to be expected.
>

It sounds like the weblogic.jar is relying or some other class.  If 
weblogic.jar is handled by the System Class loader, it only has access 
itself and the Bootstrap classloader to find any other class it needs, 
which could be why it's dying, but I thought we would have got a 
NoClassDefFoundError or something rather than a NPE.  Maybe weblogic is 
swallowing a exception somewhere and we see the effects of it in the NPE.

Hence why it works when you have the weblogic.jar file on a more 'normal' 
Classloader.  (Please, I am no Classloader expert, anyone with good 
expereience in this area, please help).

It looks like, for Web start reasons only, that we'll need to have a 
Custom class loader that load Jars from a local machine.  The class loader 
that web start uses will only be able to access the jars from the remote 
server where they were delivered from. It's not practical (or legal 
probably) to have the weblogic.jar on the Apache server.  It would need to 
be Signed anyway.

It's easy to create a Class loader that could load all the jars in the 
.chainsaw/plugins directory.  That is trivial.  The issue is that I 
suspect the Web start Security manager will intercept somewhere and go 
"Wait a minute, this classloader is trying to load an unsigned jar" and 
die with a NaughtyNaughtyError or something.

They only option I can think of is to try.  Given that the Web start 
version has a Java Policy that asks if it can do basically anythin 
(specified in the .jnlp file), I am going to cross my fingers that it's 
enough.

The WORST case I can see is going ahead with this custom class loader, and 
_requiring_ YOU to sign the weblogic.jar file.  That could be a way of 
handing the responsibility of verifying the jar I guess.  It's not a bad 
idea, it's just a bit more work for you the user, which is unfortunate.

Stephen, would you be able to help me and provide me with an Unsigned 
weblogic.jar file? (only if it doesn't violate any license stuff)  That 
way I can test it. You can contact me offline if you wish.

Thank you for your patience.  I really want Chainsaw to be as functional 
in Webstart as it is in Ant or Eclipse.

cheers,
Paul Smith

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


RE: JMSReceiver - chainsaw (webstart)

Posted by Paul Smith <ps...@apache.org>.
>
> Isn't trying to run JMS+chainsaw from webstart going too far?
>

I think being able to connect to a JMS Topic from Chainsaw is very 
important.  Web start (should) just be a way of getting access to 
Chainsaw.  Chainsaw won't be 'running' JMS, it'll just be trying to talk 
to it.

cheers,

Paul Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


RE: JMSReceiver - chainsaw (webstart)

Posted by Ceki Gülcü <ce...@qos.ch>.
Isn't trying to run JMS+chainsaw from webstart going too far?

At 07:43 PM 6/10/2004, you wrote:

>Hi Paul,
>
>Noticed your commit fixing the receiver restart issue... thanks for 
>that.  Did you get a chance to check out why the duplicate receivers are 
>being shown in the receiver panel again?
>
>Unfortunately JMS isn't going so well - I've messed around with adding 
>weblogic.jar to the classpath, no luck.  To run it in eclipse, I have to 
>specify the jar on the classpath defined within eclipse (in the Run 
>settings); putting it on the system classpath doesn't seem to help.
>
>I can run it from ant with the file on the system classpath, but that's to 
>be expected.
>
>Putting it in lib/ext is definitely not helping. My interpretation was 
>that putting it here means it gets loaded in preference to other some 
>other system libs and causes a problem that way... I get various errors, 
>ranging from the NPE I included in a previous email below, to a problem 
>deserializing the events.
>
>I've been looking around on google too, not found anything yet.  Just 
>about the only thing I have established so far is that lib/ext is *not* 
>the way to go.  Pretty much exhausted all my ideas so far though - my best 
>option might be to get grabCvs working a bit better and just build my own 
>jar. I'd like to avoid that if possible though.
>
>Cheers,
>Stephen
>
>Phone x59668
>
>
>
> 
>
>                       Paul 
> Smith 
>
>                       <psmith@apache.or        To:       Log4J Developers 
> List 
> <lo...@logging.apache.org> 
>
>                       g>                       cc: 
>
>                                                Subject:  RE: JMSReceiver 
> - 
> chainsaw 
>
>                       10/06/2004 
> 00:04 
>
>                       Please respond 
> to 
>
>                       "Log4J 
> Developers 
>
>                       List" 
>
> 
>
> 
>
>
>
>
>
> >From my googling this appears that it might be Classloader related.
>
>Ok, given that through Eclipse you can get it to work by simply having it
>on the general classpath, it should be possible to get this to work. What
>about if you try and put the Weblogic.jar file in the %CLASSPATH%
>environment variable, rather than having the jar in the ext dir.  Not sure 
>why, but
>some news group items on weblogic seem to think that this might help.
>
>I am pretty confident it is a Classloader issue.
>
>Paul
>
>On Wed, 9 Jun 2004, Paul Smith wrote:
>
> > Hmmm, I wonder if the weblogic.jar needs to be signed?  But then I don't
> > think it needs to be when just running outside Web start.
> >
> > I'll have to do some googling and get back to you.  Looks like JMS is going
> > to be my nemisis of the month.
> >
> > cheers,
> >
> > Paul Smith
> >
> > On Wed, 9 Jun 2004, Stephen Pain wrote:
> >
> >>
> >> Hi Paul,
> >>
> >> Putting the weblogic.jar in JAVA_HOME/lib/ext as you suggested allowed me
> >> to start chainsaw, but I wasn't getting any events via the JMSReceiver
> >> (not seeing any exceptions in the console log either).  So I tried running
> >> from eclipse, and got the nasty error below.
> >>
> >> I tried removing weblogic.jar from the classpath in eclipse and the system
> >> classpath and still get the same error whenever weblogic.jar is in
> >> JAVA_HOME/lib/ext.  If I remove weblogic.jar from there, I can get the
> >> JMSReceiver to work perfectly from the local eclipse build (after I put it
> >> back on the classpath), but this doesn't help with the webstart version.
> >>
> >> I think we need to find a different way of telling webstart about the jar
> >> file!
> >>
> >> Cheers,
> >> Stephen
> >>
> >> java.lang.NullPointerException
> >>      at
> >> 
> weblogic.rmi.internal.StubGenerator.getStubOnClient(StubGenerator.java:694)
> >>      at
> >> weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:666)
> >>      at
> >> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
> >>      at
> >> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
> >>      at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
> >>      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> >>      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> >>      at javax.naming.InitialContext.init(Unknown Source)
> >>      at javax.naming.InitialContext.<init>(Unknown Source)
> >>      at
> >> org.apache.log4j.net.JMSReceiver.activateOptions(JMSReceiver.java:199)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:887)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:769)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:718)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:703)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:796)
> >>      at org.apache.log4j.chainsaw.LogUI.createChainsawGUI(LogUI.java:272)
> >>      at org.apache.log4j.chainsaw.LogUI.main(LogUI.java:242)
> >> --------------- nested within: ------------------
> >> weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed to
> >> generate class for weblogic.jndi.internal.ServerNamingNode_WLStub ] - with
> >> nested exception:
> >> [java.lang.NullPointerException]
> >>      at
> >> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:716)
> >>      at
> >> weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
> >>      at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
> >>      at
> >> 
> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
> >>      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> >>      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> >>      at javax.naming.InitialContext.init(Unknown Source)
> >>      at javax.naming.InitialContext.<init>(Unknown Source)
> >>      at
> >> org.apache.log4j.net.JMSReceiver.activateOptions(JMSReceiver.java:199)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:887)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:769)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:718)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:703)
> >>      at
> >> org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:796)
> >>      at org.apache.log4j.chainsaw.LogUI.createChainsawGUI(LogUI.java:272)
> >>      at org.apache.log4j.chainsaw.LogUI.main(LogUI.java:242)
> >>
> >>
> >>
> >>
> >>
> >>                      Paul Smith
> >>                      <psmith@apache.or        To:       Log4J Developers
> >> List <lo...@logging.apache.org>
> >>                      g>                       cc:
> >>                                               Subject:  RE: JMSReceiver -
> >> chainsaw
> >>                      09/06/2004 10:07
> >>                      Please respond to
> >>                      "Log4J Developers
> >>                      List"
> >>
> >>
> >>
> >>
> >>
> >>
> >> ok, I am just applying your patch now (by hand, but that's just coz I
> >> can't work out why the patch doesn't work).
> >>
> >> Soon I will check in the change to cvs, will you be able to verify by
> >> trying it out with the ant version?
> >>
> >> cgheers,
> >> Paul
> >>
> >> On Wed, 9 Jun 2004, Stephen Pain wrote:
> >>
> >>>
> >>> here's the unified diff - sorry for the delay...
> >>>
> >>> Cheers,
> >>> Stephen
> >>>
> >>> $ diff -u JMSReceiver.java.old JMSReceiver.java
> >>> --- JMSReceiver.java.old        2004-06-07 10:38:01.186774200 +0100
> >>> +++ JMSReceiver.java    2004-06-07 10:35:27.096615800 +0100
> >>> @@ -7,6 +7,10 @@
> >>>
> >>> package org.apache.log4j.net;
> >>>
> >>> +import java.io.FileInputStream;
> >>> +import java.util.Hashtable;
> >>> +import java.util.Properties;
> >>> +
> >>> import javax.jms.Message;
> >>> import javax.jms.MessageListener;
> >>> import javax.jms.TopicConnection;
> >>> @@ -53,18 +57,21 @@
> >>>   protected String userId;
> >>>   protected String password;
> >>>   protected TopicConnection topicConnection;
> >>> +  protected String jndiPath;
> >>>
> >>>   private String remoteInfo;
> >>> +  private String providerUrl;
> >>>
> >>>   public JMSReceiver() { }
> >>>
> >>>   public JMSReceiver(String _topicFactoryName, String _topicName,
> >>> -    String _userId, String _password) {
> >>> +    String _userId, String _password, String _jndiPath) {
> >>>
> >>>       topicFactoryName = _topicFactoryName;
> >>>       topicName = _topicName;
> >>>       userId = _userId;
> >>>       password = _password;
> >>> +      jndiPath = _jndiPath;
> >>>   }
> >>>
> >>>   /**
> >>> @@ -125,6 +132,23 @@
> >>>   }
> >>>
> >>>   /**
> >>> +       * Sets the path to a properties file containing
> >>> +       * the initial context and jndi provider url
> >>> +       */
> >>> +  public void setJndiPath(String _jndiPath) {
> >>> +        jndiPath = _jndiPath;
> >>> +   }
> >>> +
> >>> +   /**
> >>> +       * Gets the path to a properties file containing
> >>> +       * the initial context and jndi provider url
> >>> +       */
> >>> +   public String getJndiPath() {
> >>> +        return jndiPath;
> >>> +   }
> >>> +
> >>> +
> >>> +  /**
> >>>    * Returns true if the receiver is the same class and they are
> >>>    * configured for the same properties, and super class also considers
> >>>    * them to be equivalent. This is used by PluginRegistry when
> >>> determining
> >>> @@ -165,8 +189,19 @@
> >>>     if (!isActive()) {
> >>>       try {
> >>>         remoteInfo = topicFactoryName + ":" + topicName;
> >>> -
> >>> -        Context ctx = new InitialContext();
> >>> +
> >>> +               Context ctx = null;
> >>> +               if (jndiPath == null || jndiPath.equals("")) {
> >>> +                       ctx = new InitialContext();
> >>> +               } else {
> >>> +                       Properties p = new Properties();
> >>> +                       p.load(new FileInputStream(jndiPath));
> >>> +                       ctx = new InitialContext(p);
> >>> +               }
> >>> +
> >>> +               // give some more flexibility about the choice of a tab
> >>> name
> >>> +               providerUrl =
> >>> (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
> >>> +
> >>>         TopicConnectionFactory topicConnectionFactory;
> >>>         topicConnectionFactory =
> >>>           (TopicConnectionFactory) lookup(ctx, topicFactoryName);
> >>> @@ -191,6 +226,7 @@
> >>>         topicConnection.start();
> >>>
> >>>         setActive(true);
> >>> +
> >>>       } catch(Exception e) {
> >>>         setActive(false);
> >>>         if (topicConnection != null) {
> >>> @@ -233,6 +269,7 @@
> >>>
> >>>        // store the known remote info in an event property
> >>>        event.setProperty("log4j.remoteSourceInfo", remoteInfo);
> >>> +               event.setProperty("log4j.jmsProviderUrl", providerUrl);
> >>>
> >>>        doPost(event);
> >>>       } else {
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>                      Paul Smith
> >>>                      <psmith@apache.or        To:       Log4J Developers
> >>> List <lo...@logging.apache.org>
> >>>                      g>                       cc:
> >>>                                               Subject:  RE: JMSReceiver
> >>> - chainsaw
> >>>                      08/06/2004 23:13
> >>>                      Please respond to
> >>>                      "Log4J Developers
> >>>                      List"
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> you couldn't do me a huge favour and do this as a 'diff -u' could you?
> >>> (Unified diff), that way I can easily do this on my windows box inside
> >>> the
> >>> ide.
> >>>
> >>> I won't be able to redo the webstart till tonight (another 12 hours from
> >>> now) because I forgot to email myself certificate from home so I can do
> >>> this sort of thing from work.
> >>>
> >>> I think your approach of being able to specify a path to the
> >>> jndi.properties file is the best one I can think of too, that doesn't
> >>> involve any Classloader+SecurityManager trickery (Classloaders get very
> >>> complicated in a Web start environment).
> >>>
> >>> Anyway, a Unified diff would help me a lot.
> >>>
> >>> cheers
> >>>
> >>> ,Paul
> >>>
> >>> On Tue, 8 Jun 2004, Stephen Pain wrote:
> >>>
> >>>>
> >>>> Here's the patch... still thinking about the Xbox!
> >>>>
> >>>> If you could get this in and then include JMSReceiver in the webstart
> >>>> jar it would be a big help (release notes now say that JMSReceiver is
> >>>> included, but I'm still getting class not found).
> >>>>
> >>>> Cheers,
> >>>> Stephen
> >>>>
> >>>> $ diff JMSReceiver.java.old JMSReceiver.java
> >>>> 9a10,13
> >>>>> import java.io.FileInputStream;
> >>>>> import java.util.Hashtable;
> >>>>> import java.util.Properties;
> >>>>>
> >>>> 55a60
> >>>>>   protected String jndiPath;
> >>>> 57a63
> >>>>>   private String providerUrl;
> >>>> 62c68
> >>>> <     String _userId, String _password) {
> >>>> ---
> >>>>>     String _userId, String _password, String _jndiPath) {
> >>>> 67a74
> >>>>>       jndiPath = _jndiPath;
> >>>> 127a135,151
> >>>>>       * Sets the path to a properties file containing
> >>>>>       * the initial context and jndi provider url
> >>>>>       */
> >>>>>   public void setJndiPath(String _jndiPath) {
> >>>>>        jndiPath = _jndiPath;
> >>>>>    }
> >>>>>
> >>>>>    /**
> >>>>>       * Gets the path to a properties file containing
> >>>>>       * the initial context and jndi provider url
> >>>>>       */
> >>>>>    public String getJndiPath() {
> >>>>>        return jndiPath;
> >>>>>    }
> >>>>>
> >>>>>
> >>>>>   /**
> >>>> 168,169c192,204
> >>>> <
> >>>> <         Context ctx = new InitialContext();
> >>>> ---
> >>>>>
> >>>>>               Context ctx = null;
> >>>>>               if (jndiPath == null || jndiPath.equals("")) {
> >>>>>                       ctx = new InitialContext();
> >>>>>               } else {
> >>>>>                       Properties p = new Properties();
> >>>>>                       p.load(new FileInputStream(jndiPath));
> >>>>>                       ctx = new InitialContext(p);
> >>>>>               }
> >>>>>
> >>>>>               // give some more flexibility about the choice of a
> >>>>> tab name
> >>>>>               providerUrl =
> >>>>> (String)ctx.getEnvironment().get(Context.PROVIDER_URL);
> >>>>>
> >>>> 193a229
> >>>>>
> >>>> 235a272
> >>>>>               event.setProperty("log4j.jmsProviderUrl",
> >>>>> providerUrl);
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>                      Paul Smith
> >>>>                      <psmith@minotaur.        To:       Stephen
> >>>> Pain/DMGGM/DMG UK/DeuBa@DMG UK
> >>>>                      apache.org>              cc:
> >>>>                                               Subject:  RE:
> >>>> JMSReceiver - chainsaw
> >>>>                      07/06/2004 02:29
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>
> >>>>> If Rallisport Challenge 2 is really that good, maybe I should join
> >>>>> the log4j-dev list and submit a patch myself.   Or go & buy an Xbox
> >>>>> :)
> >>>>
> >>>> You should buy an XBox.... AND submit a patch... :)
> >>>>
> >>>> Still getting my head around this new job, so this week might be a
> >>>> real
> >>>> right-off.
> >>>>
> >>>> I'll let you know my progress, whenever that happens.
> >>>>
> >>>> Paul
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>>
> >>>> This e-mail may contain confidential and/or privileged information. If
> >>>> you are not the intended recipient (or have received this e-mail in
> >>>> error) please notify the sender immediately and destroy this e-mail.
> >>>> Any unauthorized copying, disclosure or distribution of the material
> >>>> in this e-mail is strictly forbidden.
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> This e-mail may contain confidential and/or privileged information. If
> >>> you are not the intended recipient (or have received this e-mail in
> >>> error) please notify the sender immediately and destroy this e-mail. Any
> >>> unauthorized copying, disclosure or distribution of the material in this
> >>> e-mail is strictly forbidden.
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >>
> >> This e-mail may contain confidential and/or privileged information. If you
> >> are not the intended recipient (or have received this e-mail in error)
> >> please notify the sender immediately and destroy this e-mail. Any
> >> unauthorized copying, disclosure or distribution of the material in this
> >> e-mail is strictly forbidden.
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>
>
>
>
>
>--
>
>This e-mail may contain confidential and/or privileged information. If you 
>are not the intended recipient (or have received this e-mail in error) 
>please notify the sender immediately and destroy this e-mail. Any 
>unauthorized copying, disclosure or distribution of the material in this 
>e-mail is strictly forbidden.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-dev-help@logging.apache.org

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org