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]
