Hi again !

It was something completely different :-) , the commons-beanutils-1.6.1.jar was missing in the .war-file.
After copying it manually into the extracted app folder in Tomcat and reloading the app it went fine.
Here's the respective part from the Tomcat-.log-file if thats important for you :-) :


2004-06-12 13:18:30 StandardContext[/myfirstapp-web-0.1]Servlet /myfirstapp-web-0.1 threw load() exception
javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1011)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
....
----- Root Cause -----
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)


Thanks much anyway,
regards Torsten

Wouter Zoons wrote:

hi Torsten,

try exploding your WAR bundle in JBoss, my guess is you're using Windows and the operating system cannot resolve paths longer than 255 characters
exploding the war will make it easier to resolve file paths because you will make them shorter


just a guess but try it and let me know

Wouter.

Torsten Bergeest wrote:

Thanks for that quick info it helped :-) ,

although its not explicitley said in the Howto its important to give every model-construct a good and clear
name ! I dont know which one it was but after I named eveything the generation went fine. And for the
MagicDraw-Users, its important to name the elements via the Specification-Dialog not just by double-clicking
the element in the diagram-view ;-) ...
I got the .war-file generated but ran into another problem. When I call the application Tomcat produces the following
error :


*type* Status report

*message* _/myfirstapp-web-0.1/AddAuction/AddAuction_

*description* _The requested resource (/myfirstapp-web-0.1/AddAuction/AddAuction) is not available.
_


AndroMDA generated an index.jsp with a redirect to the first use-case ( as it should be of course ) :

<logic:redirect action="/AddAuction/AddAuction"/>

So he looks up the action in the action-mappings which looks like this :

<action path="/AddAuction/AddAuction" type="bergeest.mda.AddAuction" name="addAuctionForm" scope="request" unknown="false" validate="true">
<forward name="initial.to.prompt.user.for.auction.data" path="/bergeest/mda/prompt-user-for-data.jsp" redirect="false" />
</action>


If I interpret the errors-message right it means he cant find the respective AddAuction.class but its definitley in the right place
(in the WEB-INF-dir under /classes/bergeest/mda/). Does the requested resource error mean that ? I'm not a Tomcat/Struts-Expert
and I know this is for AndroMDA problems not for Tomcat problems but if anyone got a quick hint I appreciate that, otherwise
I'll find the solution somewhere else :-)


Thanks Torsten





Wouter Zoons wrote:

yes this is correct,

the getForwardPath() problem is probably due to the trigger missing a name, or an action state not having a name (although it shows a label on screen, as Gabriela pointed out)

putting in the validation from OCL constraints is no little undertaking so it might take a while before we have it in (especially if I keep travelling like I did these last weeks), anyway I'll do my best

anyway, once you get the hang of it and realize what is needed to get things running (and that's not so much) it's basically a walk in the park :-)

let's get over the things to do for a single use-case with a single page:

  1. create a use-case
  2. give this use-case the FrontEndApplication and FrontEndUseCase
     stereotypes
  3. create an activity graph in this use-case
  4. add an initial state
  5. add an action state "Action1"
  6. add a transition from the initial state into this action state,
     this transition needs the FrontEndEvent stereotype
  7. add another action state "Action2"
  8. add a transition from "Action1" into "Action2"
  9. add the FrontEndView stereotype to "Action2" (doing this will make
     it a JSP page)
 10. add a final state and give it the name of the use-case to forward
     to (case-insensitive)
 11. add a transition from "Action2" into this final state, this
     transition needs the FrontEndEvent stereotype
 12. because this transition is going out of an action state with the
     FrontEndView stereotype it needs a trigger with a name and
     optionally with some parameters (this will be rendered as a
     submittable form)
 13. Create a controller class, "ActionController"
 14. Give this class the FrontEndController stereotype
 15. "assign" this controller class to the activity graph created in
     step 3. (using MagicDraw you can do that easily)
 16. optionally you can add operations to this controller and have an
     action state defer to any of these operations

that should be it, I always keep in mind these points:

   * the first transition (going out of the initial state) needs the
     FrontEndEvent stereotype
   * transitions going out of action states with the FrontEndView
     stereotype need the FrontEndEvent stereotype and they need a
     trigger with a non-empty name
   * do not forget to assign the controller class, and make sure it has
     the FrontEndController stereotype


that should be it :-)

hth

-- Wouter

Gabriela Chiribau wrote:

Torsten,
I got that error to at some point. You have to go through your model and check if you correctly set up all the names, stereotypes and tagged values. For example check if you actually gave names to your action states and transitions. Sometimes the user is tempted to give the names directly on the screen, which only sets a label but not the real name. Make sure you bring up the properties screen for every action state and transition and set the name there. Also, the signals associated with a front ent event must have names.
In an action state, bring up the properties dialogues, look at the relations tab and make sure all the relations are ok, especially you don't have relations with blank start or end point.
I was quite confused when I started to work with AndroMDA, but the team is working to bring in more user friendly error handling. I have realized that, after a little exercise, if I set the model up like documentation says, AndroMDA works fine.
The error is about getForwardPath so I would check the transitions going out of a FrontEndView.
Hope this helps,
Gabriela


*/Torsten Bergeest <[EMAIL PROTECTED]>/* wrote:

    Hi everybody,

I started with bpm4struts and modeled a very simple Use Case where
the
User can enter some data on one page (for an auction in this case)
so it
can
be processed later in a Controller-Class. I think I did everything as
required in the bpm4struts-Howto. However the generation stops
with the
following exception :


...
[andromda] 21:27:43,735 INFO [MetafacadeMappings] found
metafacades -->
'default'
[andromda] 21:27:44,957 ERROR [DefaultAndroMDACartridge] Error
performing DefaultAndroMDACartridge.processWithTemplate with template
'templ
tes/StrutsAction.vsl', template context '{securityEnabled=false,
class=org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogicImpl


7ed, [EMAIL PROTECTED],
securityRealm=other}' and cartridge 'bpm4struts'
[andromda] org.apache.velocity.exception.MethodInvocationException:
Invocation of method 'getForwardPath' in class org.andromda.cartridges
bpm4struts.metafacades.StrutsActionLogicImpl threw exception class
java.lang.NullPointerException : null
[andromda] at
org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:193)




[andromda] at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)




[andromda] at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)




[andromda] at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)


[andromda] at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166)
[andromda] at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)




[andromda] at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)




[andromda] ! at org.apache.velocity.Template.merge(Template.java:256)
....


    In the andromda-bpm4struts.log I found this :

2004-06-09 21:27:44,947 - metaobject stereotype names -->
'[FrontEndView]'
2004-06-09 21:27:44,947 - set context as -->
'org.andromda.cartridges.bpm4struts.metafacades.StrutsAction'
2004-06-09 21:27:44,947 - metaobject stereotype names --> '[]'
2004-06-09 21:27:44,947 - set context as -->
'org.andromda.cartridges.bpm4struts.metafacades.StrutsAction'
2004-06-09 21:27:44,947 - metaobject stereotype names -->
'[FrontEndController]'
2004-06-09 21:27:44,947 - set context as -->
'org.andromda.cartridges.bpm4struts.metafacades.StrutsAction'
2004-06-09 21:27:44,947 - Method getForwardPath threw exception for
reference $actionForward in template templates/StrutsAction.vsl at
[51,17]


So I guess he is missing a specified ForwardPath to be returned by
the
Controller-Class. In this case it is linked (th! e transition)
with the
Final State
of the Activity-Graph. From what i have understood from the Howto
that
if the Final State is named like the Use case itself the user will be
forwarded
back to the same page (in my case there is only one). I did that
but it
always produces the above exception. Am I missing something , is
there
another
way to tell it where to forward the user to ?


    Thanks in advance,
    greetings Torsten








------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to