Hi Dan, the order seems not to be the problem. What I did in the muse.xml is the following
<capability> <capability-uri>http://java.sun.com/products/oss/xml/WsnOssj</capability-uri> <java-capability-class> com.ascom.ossj.wsn.producer.muse.capability.JmsProducerCapabilityImpl </java-capability-class> <persistence> <java-persistence-class> org.apache.muse.ws.notification.impl.NotificationProducerFilePersistence </java-persistence-class> <persistence-location>subscriptions</persistence-location> </persistence> </capability> <capability> <capability-uri>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer</capability-uri> <java-capability-class> org.apache.muse.ws.notification.impl.SimpleNotificationProducer </java-capability-class> <persistence> <java-persistence-class> org.apache.muse.ws.notification.impl.NotificationProducerFilePersistence </java-persistence-class> <persistence-location>subscriptions</persistence-location> </persistence> </capability> As you can see in both capabilities there is the same <persistence-location> When I either remove one of those persistence entries or name the location differently, then it works as designed ;-) So my suggestion is to name the files stored on the file system after the resource that saved the file and not after the <persistence-location> value. THX for the quick reply and for solving this issue. Best regards, Matthias -----Ursprüngliche Nachricht----- Von: Daniel Jemiolo [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 22. März 2007 13:56 An: [email protected] Betreff: Re: [EMAIL PROTECTED] I think it might just be an issue of <resource-type/> order in muse.xml. The resources are reloaded in the order they're specified, so if you try and reload a producer resource before the subscription resource(s), I can see how that line of code could fail (we should add a proper fault message, though). If it's not already, put the <resource-type/> that declares the subscription resource as the first entry in muse.xml - your producer resource type(s) can then be listed below in any order. Dan "Beil, Matthias" <[EMAIL PROTECTED]> wrote on 03/22/2007 08:20:13 AM: > Hi, > > > > I'm getting a NullPointerException > > > > java.lang.NullPointerException > > at > org.apache.muse.ws.notification.impl.NotificationProducerFilePersistence > .reloadResource(NotificationProducerFilePersistence.java:111) > > at > org.apache.muse.core.AbstractFilePersistence.reloadResources(AbstractFil > ePersistence.java:410) > > at > org.apache.muse.core.AbstractFilePersistence.reload(AbstractFilePersiste > nce.java:351) > > at > org.apache.muse.core.AbstractCapability.initializeCompleted(AbstractCapa > bility.java:158) > > at > com.ascom.ossj.wsn.producer.muse.capability.JmsProducerCapabilityImpl.in > itializeCompleted(JmsProducerCapabilityImpl.java:80) > > > > This happens each time when I start Tomcat again and an available > subscription will be loaded. > > > > The cycle I do is: > > > > Delete all subscription on the file system, start Tomcat. Make a > subscribe call, get my notify message. Then I restart Tomcat. To get > Muse initialize I call GetCurrentMessage, where I get this > NullPointerException. When I delete the subscription-1.xml file, then I > can restart Tomcat, make a GetCurrentMessage call and there is no > NullPointerException. > > > > I defined the NotificationProducer like this: > > > > <capability> > > > <capability-uri>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer > </capability-uri> > > <java-capability-class> > > > org.apache.muse.ws.notification.impl.SimpleNotificationProducer > > </java-capability-class> > > <persistence> > > <!-- saves the actual subscription data, not just the EPR --> > > <java-persistence-class> > > > org.apache.muse.ws.notification.impl.NotificationProducerFilePersistence > > </java-persistence-class> > > <!-- the location can be any directory name --> > > > <persistence-location>subscriptions</persistence-location> > > </persistence> > > </capability> > > > > Is this a valid way, or what should be the exact way of defining a > persistence for the subscription? > > Mit freundlichen Gruessen / With kind regards > > Matthias Beil > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
