yes, or nest the underlying exception ? - just checked in that change. Some of that code probably pre-dates java 5 where nesting exceptions became possible and common (from memory).
Thanks for the tip. Michael. On Wed, Sep 2, 2009 at 3:11 AM, Bernd Rücker<[email protected]> wrote: > Hey guys, > > just stumbled over this code, it swallowes the root exception (which was > some Classloading issue). Would be much better to throw it as root cause, > so the developer can get a clue what's wrong... > > Or file a JIRA for it? > > Cheers > Bernd > > -----Ursprüngliche Nachricht----- > > + private static void loadProvider() { > + try { > + // we didn't find anything in properties so lets try and us > reflection > + Class<DecisionTableProvider> cls = ( > Class<DecisionTableProvider> ) Class.forName( > "org.drools.decisiontable.DecisionTableProviderImpl" ); > + setDecisionTableProvider( cls.newInstance() ); > + } catch ( Exception e2 ) { > + throw new ProviderInitializationException( "Provider > org.drools.decisiontable.DecisionTableProviderImpl could not be set." ); > + } > > > [DEBUG] Trace > org.drools.ProviderInitializationException: Provider > org.drools.decisiontable.DecisionTableProviderImpl could not be set. > at > org.drools.compiler.DecisionTableFactory.loadProvider(DecisionTableFactory > .java:36) > at > org.drools.compiler.DecisionTableFactory.getDecisionTableProvider(Decision > TableFactory.java:25) > at > org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTable > Factory.java:16) > at > org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.jav > a:485) > at > org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java > :36) > at > com.oneandone.maven.plugins.CreateRulesPackageMojo.createDroolsPackage(Cre > ateRulesPackageMojo.java:130) > at > com.oneandone.maven.plugins.CreateRulesPackageMojo.execute(CreateRulesPack > ageMojo.java:75) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMana > ger.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLi > fecycleExecutor.java:558) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal( > DefaultLifecycleExecutor.java:512) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLif > ecycleExecutor.java:482) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFa > ilures(DefaultLifecycleExecutor.java:330) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(De > faultLifecycleExecutor.java:227) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecyc > leExecutor.java:142) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm > pl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > _______________________________________________ > rules-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-dev > -- Michael D Neale home: www.michaelneale.net blog: michaelneale.blogspot.com _______________________________________________ rules-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-dev
