Tis exception says that you try to acces to a non populated field in a partial
BuildResult object.
You can get the full object with that:
continuum.getBuildResult( partialBuildResult.getId() )
Emmanuel
Kolodziej, Maciej a écrit :
Emmanuel,
I'm also creating a custom notifier for my project. I created a test version by copying the original mail notifier to a different package, created my own jar file and put it into apps/continuum/lib. I also copied the proper fragment of application.xml, changing only the roleHint and class name.
When I run a build on my local continuum install, I get a NullPointerException from the code where it uses
the "continuum" field (calls continuum.getChangesSinceLastSuccess()). So it seems continuum object
is not injected. But the original email notifier was working without it. When I add a "requirement"
tag with continuum class name (copied from "load-on-start" tag) I get the following exception after
the build status changes from FAILURE to SUCCESS:
2007-05-15 14:30:58,130 [Thread-2] ERROR ContinuumNotificationDispatcher - Error
while trying to use the custom-mailnotifier.
org.codehaus.plexus.notification.NotificationException: Error while generating m
ail contents.
at com.sabre.hotels.tools.continuum.notification.mail.MailContinuumNotif
ier.buildComplete(MailContinuumNotifier.java:296)
at com.sabre.hotels.tools.continuum.notification.mail.MailContinuumNotif
ier.sendNotification(MailContinuumNotifier.java:211)
at org.apache.maven.continuum.notification.DefaultContinuumNotificationD
ispatcher.sendNotification(DefaultContinuumNotificationDispatcher.java:173)
at org.apache.maven.continuum.notification.DefaultContinuumNotificationD
ispatcher.buildComplete(DefaultContinuumNotificationDispatcher.java:96)
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.bui
ld(DefaultBuildController.java:378)
at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.e
xecuteTask(BuildProjectTaskExecutor.java:47)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$Exe
cutorRunnable.run(ThreadedTaskQueueExecutor.java:103)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jdo.JDODetachedFieldAccessException: You have just attempted to
access field "scmResult" yet this field was not detached when you detached the
object. Either dont access this field, or detach the field when detaching the ob
ject.
at org.apache.maven.continuum.model.project.BuildResult.jdoGetscmResult(
BuildResult.java)
at org.apache.maven.continuum.model.project.BuildResult.getScmResult(Bui
ldResult.java:202)
at org.apache.maven.continuum.DefaultContinuum.getChangesSinceLastSucces
s(DefaultContinuum.java:656)
at com.sabre.hotels.tools.continuum.notification.mail.MailContinuumNotif
ier.buildComplete(MailContinuumNotifier.java:254)
... 7 more
Any ideas how to make it work?
Thanks,
Maciek.
-----Original Message-----
From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 05, 2006 9:55
To: [EMAIL PROTECTED]
Subject: Re: Custom Notifier
You can look at continuum-notifier-mail
Emmanuel
Bob Herrrmann a écrit :
I would like to use my own Custom Notifier for sending email. Our
build/test process generates 10mb of output (we have a
fairly large project
with over 3000 tests.) I would like to write a customer
Notifier which
summarizes this output to just a few lines (usually we are
only interested
in what changed and what broke - failing tests.) Is there
an obvious way
to do this?
A crude way would be to email the output to a email address
that pipes the
email into a shell script which uses java or sed or grep or
something to
respin the email. It could then forward the resulting
message to the proper
people, I was hoping for something like plugging in a new
class or some
such.
Thanks
-bob