[JBoss Seam] - Error with "seam setup" for Seam 2.0.0 CR2
by indyJones
Download latest build from web site. Explode is, open a command box and go to the root directory and type "seam setup".
Get the following error...
anonymous wrote :
|
| C:\jboss-seam-2.0.0.CR2>seam setup
| Buildfile: C:\jboss-seam-2.0.0.CR2\seam-gen\build.xml
|
| init:
| [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jbo
| ss-seam-gen-2.0.0.CR2.pom
| [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jbo
| ss-seam-gen-2.0.0.CR2.jar
| [artifact:dependencies] An error has occurred while processing the Maven artifac
| t tasks.
| [artifact:dependencies] Diagnosis:
| [artifact:dependencies]
| [artifact:dependencies] Unable to resolve artifact: Missing:
| [artifact:dependencies] ----------
| [artifact:dependencies] 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
| [artifact:dependencies]
| [artifact:dependencies] Try downloading the file manually from the project web
| site.
| [artifact:dependencies]
| [artifact:dependencies] Then, install it using the command:
| [artifact:dependencies] mvn install:install-file -DgroupId=org.jboss.seam
| -DartifactId=jboss-seam-gen \
| [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/pa
| th/to/file
| [artifact:dependencies] Alternatively, if you host your own repository you can d
| eploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -Dar
| tifactId=jboss-seam-gen \
| [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/pa
| th/to/file \
| [artifact:dependencies] -Durl=[url] -DrepositoryId=[id]
| [artifact:dependencies]
| [artifact:dependencies] Path to dependency:
| [artifact:dependencies] 1) unspecified:unspecified:jar:0.0
| [artifact:dependencies] 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
| [artifact:dependencies]
| [artifact:dependencies] ----------
| [artifact:dependencies] 1 required artifact is missing.
| [artifact:dependencies]
| [artifact:dependencies] for artifact:
| [artifact:dependencies] unspecified:unspecified:jar:0.0
| [artifact:dependencies]
| [artifact:dependencies] from the specified remote repositories:
| [artifact:dependencies] central (http://repo1.maven.org/maven2)
| [artifact:dependencies]
| [artifact:dependencies]
|
| BUILD FAILED
| C:\jboss-seam-2.0.0.CR2\seam-gen\build.xml:14: Unable to resolve artifact: Missi
| ng:
| ----------
| 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
|
| Try downloading the file manually from the project website.
|
| Then, install it using the command:
| mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-
| gen \
| -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
| Alternatively, if you host your own repository you can deploy the file there:
| mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen
| \
| -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
| -Durl=[url] -DrepositoryId=[id]
|
| Path to dependency:
| 1) unspecified:unspecified:jar:0.0
| 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
|
| ----------
| 1 required artifact is missing.
|
| for artifact:
| unspecified:unspecified:jar:0.0
|
| from the specified remote repositories:
| central (http://repo1.maven.org/maven2)
|
|
| Total time: 1 second
|
|
Any ideas?
Thanks
indy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094089#4094089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094089
18Â years, 9Â months
[JBoss jBPM] - [HOW-TO] Programmatically create and cancel Timers
by sonicfab
I spent some time on finding out how to programmatically create and cancel timers, so I thought it might be a good idea to share this with you.
(Note : this works with jBPM-jPDL 3.2.1 and 3.2.2).
1- Define a scheduler service in jbpm.cfg.xml :
<service name="scheduler"
| factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
2- Start a job executor thread (we do it via Spring) :
<!-- Jbpm job executor -->
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
| <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
| <field name="name"><string value="JbpmJobExector" /></field>
| <field name="nbrOfThreads"><int value="1" /></field>
| <field name="idleInterval"><int value="5000" /></field>
| <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
| <field name="historyMaxSize"><int value="20" /></field>
| <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
| <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
| <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
| </bean>
The job executor is instantiated by a Spring listener :
<!-- Bean responsible for starting and stopping the JBPM JobExecutor -->
| <bean id="jbpmLifeCycleListener"
| class="com.acme.jbpm.helpers.JbpmLifeCycleListener"
| init-method="start" destroy-method="stop">
| <property name="configuration" value="classpath:jbpm.cfg.xml" />
| <property name="sessionFactory" ref="jbpmSessionFactory" />
| </bean>
3- Create a timer :
public static void createNotificationTimer(ExecutionContext context,
| Date dueDate, String timerName, String nodeName) {
|
| try {
| // getting data from the context
| long processId = context.getProcessInstance().getId();
| Token token = context.getToken();
| String orderOrigin = (String) context
| .getVariable(ContextVariable.orderOrigin);
| String externalOrderId = (String) context
| .getVariable(ContextVariable.externalOrderId);
| Node myNode = context.getProcessDefinition().getNode(nodeName);
|
| // creating the action
| Action timedAction = new Action();
| Delegation timedDelegation = new Delegation(
| "com.acme.businesslayer.jbpm.timers.NotificationAction");
| timedDelegation
| .setConfiguration(String
| .format("<tokenId>%d</tokenId><externalOrderId>%s</externalOrderId><orderOrigin>%s</orderOrigin>",
| token.getId(), externalOrderId, orderOrigin));
| timedAction.setActionDelegation(timedDelegation);
|
| // creating the timer
| Timer timer = new Timer(token);
| String completeTimerName = String.format("%s-%d", timerName,
| processId);
| timer.setName(completeTimerName);
| timer.setAction(timedAction);
| timer.setDueDate(dueDate);
|
| // setting the execution context
| context.setTimer(timer);
|
| // scheduling the timer
| myNode.fireEvent("timer-create", context);
| JbpmConfiguration conf = (JbpmConfiguration) SpringHelper
| .getBean("jbpmConfiguration");
| JbpmContext myContext = conf.createJbpmContext();
| myContext.setSessionFactory((SessionFactory) SpringHelper
| .getBean("jbpmSessionFactory"));
| SchedulerService schedulerService = (SchedulerService) myContext.getServices().getService(Services.SERVICENAME_SCHEDULER);
| SchedulerService.createTimer(timer);
| myContext.close();
|
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
4- Cancel a timer :
public static void cancelTimer(String timerName, Token token) {
| JbpmConfiguration conf = (JbpmConfiguration) SpringHelper
| .getBean("jbpmConfiguration");
| JbpmContext testContext = conf.createJbpmContext();
| myContext.setSessionFactory((SessionFactory) SpringHelper
| .getBean("jbpmSessionFactory"));
|
| SchedulerService schedulerService = (SchedulerService) myContext.getServices().getService(Services.SERVICENAME_SCHEDULER);
| String completeTimerName = String.format("%s-%d", timerName, token.getProcessInstance().getId());
| schedulerService.deleteTimersByName(completeTimerName, token);
| myContext.close();
| }
|
Hope this will help save time for some of you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094084#4094084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094084
18Â years, 9Â months