commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: SCXML Library
Date Tue, 29 May 2007 02:38:20 GMT
On 5/28/07, Aaron Freeman <> wrote:
> Ok I walked through the stack trace, and as you suggested it couldn't find:
> org/apache/commons/scxml/env/stopwatch.xml
> So I just removed the path and saved that file to the directory where I am
> running the app.  That worked but now it is dying here:
> INFO: Current States: [reset]
> Uncaught error fetching image:
> java.lang.NullPointerException
>     at sun.awt.image.URLImageSource.getConnection(
>     at sun.awt.image.URLImageSource.getDecoder(
>     at
> sun.awt.image.InputStreamImageSource.doFetch(
> )
>     at sun.awt.image.ImageFetcher.fetchloop(
>     at
> Did I overlook installing another Jar that contains the XML, images,
> StopWatch and StopWatchDisplay classes?  I copied the XML and source files
> from the example page, as I didn't see anywhere to download it.  But now
> that I see I need two images in the same package I assume there is a
> download I didn't see?

Sorry, getting the UI going was never really documented. The source
(and images) happen to be part of the Commons SCXML test suite:

so if you put the test-classes directory (if you use the maven build)
on classpath, you should be OK.

However, if you're just starting out please try out the standalone
classes, see this page of the user guide:

See notes on "RUNNING" in the Javadoc, for example:

Finally, please feel free to suggest what would have helped you get
started easier and how we can improve the site towards that end.

> Since I have never used SCXML and am just trying to evaluate it, I have a
> quick question: Will I be able to use JSTL tags like <sql:update > within
> XML blocks like you can with JSP?  If not, how do you make database calls?
> Am I back to hardcoding SQL inside Java classes?

You won't be able to use JSP tags since there is really no assumption
about a JSP container. But there are similar concepts, and which one
is used depends on whether the application tends to perceive these
accesses as synchronous or asynchronous, short or long-standing etc.
-- for example, say we have this <sql:update> in a JSP:

<sql:update dataSource="${ds}" sql="${statement}"/>

we could draw on some level of equivalence between that and the
following SCXML constructs:

a) "send" the database an update request

<scxml:send targettype="x-sql:update" target="ds" namelist="statement"/>

b) "invoke" a database operation

<scxml:invoke targettype="x-sql:update" src="ds">
  <scxml:param name="sql" expr="statement"/>

c) Author a custom action

<my:sql-update dataSource="ds" sql="statement" />

etc. (see spec for details)

In all of these, one would have to implement the targettype (or custom
action) once, and use it any number of times (much like a JSP tag, in
that respect).


> Thanks,
> Aaron

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message