Pim,

The code you point out looks kind of odd, I'm not sure if it needs to be that way or not, I haven't had a chance to dig very deep. But the code has been working for me as is.

The error:

java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSetBase


indicates that you are not getting all the required libraries in your class path.

I recommend adding the assembly plugin to the pom.xml so the <plugins> section looks like this

   <build>
       ...
       <plugins>
           <plugin>
               <artifactId>maven-site-plugin</artifactId>
               <configuration>
                   <locales>en</locales>
               </configuration>
           </plugin>
           <plugin>
               <!-- Usage: mvn assembly:assembly -->
               <artifactId>maven-assembly-plugin</artifactId>
               <configuration>
                   <descriptorRefs>
                       <descriptorRef>jar-with-dependencies</descriptorRef>
                   </descriptorRefs>
                   <archive>
                       <manifest>
<mainClass>org.apache.commons.pipeline.config.DigesterPipelineFactory</mainClass>
                       </manifest>
                   </archive>
               </configuration>
           </plugin>
       </plugins>
   </build>

Create a jar with dependencies with this command (in the trunk directory where the pom.xml file is)
mvn assembly:assembly

If that builds successfully, then you should have all the required libraries. Then run with

java -jar target/commons-pipeline-1.0-SNAPSHOT-jar-with-dependencies.jar target/test-classes/test_conf.xml

-Ken

Pim Tjeertes wrote:
Hello,

I'm trying out the Pipeline because the concept intriges me.
Ofcourse I'm starting with a really simple example using the
DigesterPipelineFactory(URL confURL).

But when I do I get a Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSetBase

I think I found out why;
    public DigesterPipelineFactory(URL confURL) {
        if (confURL == null) throw new
IllegalArgumentException("Configuration file URL may not be
null.");
        this.confURL = confURL;

        //PipelineRuleSet needs a reference to [EMAIL PROTECTED]
org.apache.commons.digester.RuleSet RuleSet}s
        //used to parse the configuration file in case configuration is
split up between multiple
        //files.
        ruleSets.add(new PipelineRuleSet(ruleSets));
    }


I think this is the problem: (Its setting itself to itself instead of the
new file I gave the Digestor)
ruleSets.add(new PipelineRuleSet(ruleSets));
I would have expected something like:
ruleSets.add(new PipelineRuleSet(this.confURL));

Can somebody verify whether my assumption is correct or that I'm doing
something stupid?

Kind regards,
Pim


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
= Enterprise Data Services Division ===============
| CIRES, National Geophysical Data Center / NOAA  |
| 303-497-6221                                    |
= [EMAIL PROTECTED] =============================


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to