[JBoss jBPM] - Re: How to use the Example Database?
by JimKnopf
Sorry, now the correct jbpm.cfg.xml File
| - <jbpm-configuration>
| - <!--
| This configuration is used when there is no jbpm.cfg.xml file found in the
| root of the classpath. It is a very basic configuration without persistence
| and message services. Only the authorization service installed.
| You can parse and create processes, but when you try to use one of the
| unavailable services, you'll get an exception.
|
| -->
| - <jbpm-context>
| <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| </jbpm-context>
| - <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar
| -->
| <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
| <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
| <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
| <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
| <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
| <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
| <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
| <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
| <long name="jbpm.msg.wait.timout" value="5000" singleton="true" />
| <int name="jbpm.byte.block.size" value="1024" singleton="true" />
| <string name="mail.smtp.host" value="localhost" />
| <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
| <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
| <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
| </jbpm-configuration>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983737#3983737
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983737
19Â years, 6Â months
[JBoss Seam] - Re: [JDBCExceptionReporter] Table not found in statement ???
by abchilla
hi group,
maybe this can be also of help for you guys.
after starting my crud application i get following information, that some xml files can not be found.
| 14:26:35,904 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 21s:102ms
| 14:28:56,876 INFO [Events] no events.xml file found
| 14:28:56,936 INFO [Pages] no pages.xml file found
| 14:29:00,291 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
| 14:29:00,291 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
| 14:29:00,291 INFO [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
| 14:29:00,311 INFO [RendererUtils] Unable to find component 'id' (calling findComponent on component '_idJsp2:_idJsp14'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.
| 14:29:00,331 INFO [RendererUtils] Unable to find component 'name' (calling findComponent on component '_idJsp2:_idJsp16'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.
| 14:29:00,341 INFO [RendererUtils] Unable to find component 'zipcode' (calling findComponent on component '_idJsp2:_idJsp18'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.
| 14:29:00,341 INFO [RendererUtils] Unable to find component 'country' (calling findComponent on component '_idJsp2:_idJsp20'). We'll try to return a guessed client-id anyways - this will be a problem if you put the referenced component into a different naming-container. If this is the case, you can always use the full client-id.
| 14:29:00,452 INFO [ExceptionInterceptor] no exceptions.xml file found
|
so when i now try to insert a city or something else it goes wrong and i get the error, showed above.
thanks in advance
asad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983736#3983736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983736
19Â years, 6Â months
[JBoss Seam] - javax.servlet.ServletException: Error calling action method
by JoviJojo
i modified jboss-seam booking example, created a new booking application to fit our needs. everything works fine until the last step, confirm booking. when i press the confirm button, i got the error message like below:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error calling action method of component with id _id16:_id54
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.faces.FacesException: Error calling action method of component with id _id16:_id54
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
javax.faces.component.UICommand.broadcast(UICommand.java:106)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
can you give me some tip on this one please...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983733#3983733
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983733
19Â years, 6Â months
[JBoss jBPM] - How to use the Example Database?
by JimKnopf
Hi, I am new in Jbpm and still at learning it.
How can i use the Database from the Starter-Kit-Example from my own test-code?
I allready wrote a little Code to deploy some Process-Definitions and get all of them from the Engine (they are not persistent).
Now I want to but them in the Database so that i can use the Web-Application from the Starter-Kit to test and monitoring them. But I don`t know how to do that (I allready read the manual and even Chapter 7-9).
| ArcaViaController avc = ArcaViaController.getInstance();
|
| String processDefinition = "<process-definition name='Timos die erste'>" +
| " <start-state>" +
| " <transition to='Timo 1' />" +
| " </start-state>" +
| " <state name='Timo 1'>" +
| " <transition to='Timo 2' />" +
| " </state>" +
| " <state name='Timo 2'>" +
| " <transition to='end' />" +
| " </state>" +
| " <end-state name='end' />" +
| "</process-definition>";
|
| avc.deploy( processDefinition );
|
| processDefinition = "<process-definition name='hello world'>" +
| " <start-state>" +
| " <transition to='s' />" +
| " </start-state>" +
| " <state name='s'>" +
| " <transition to='end' />" +
| " </state>" +
| " <end-state name='end' />" +
| "</process-definition>";
|
| avc.deploy( processDefinition );
|
|
| for( Object o : avc.getProcessDefinitions() ){
| System.err.println( o );
| }
| System.err.println(avc.getLatestProcessDefinition("hello world"));
|
| avc.commitAndCloseSession();
|
The config-file i am using is the default config-file
| <project name="jbpm.deploy" basedir="." default="create.jbpm.configuration">
|
| <description>jbpm deployment build file</description>
|
| <!-- ================== -->
| <!-- === PROPERTIES === -->
| <!-- ================== -->
| <property file="${user.home}/jbpm/build/build.local.properties" />
| <property file="build.properties" />
|
| <!-- ================= -->
| <!-- === CLASSPATH === -->
| <!-- ================= -->
| <path id="classpath.ant">
| <pathelement path="build/classes.identity" />
| <pathelement path="build/classes.jbpm" />
| <pathelement path="build/classes.webapp" />
| <pathelement path="src/config.files" />
| <fileset dir="lib" includes="**/*.jar" />
| </path>
|
| <path id="classpath.hsqldb">
| <fileset dir="${jboss.home}/server/default/lib" includes="hsqldb.jar" />
| </path>
|
| <!-- ============= -->
| <!-- === CLEAN === -->
| <!-- ============= -->
| <target name="delete.jbpm.configuration" description="removes the jbpm configuration from jboss">
| <delete dir="${jboss.home}/server/jbpm" />
| <delete dir="${jboss.home}/server/data" />
| <delete dir="${jboss.home}/server/log" />
| <delete dir="${jboss.home}/server/tmp" />
| <delete dir="${jboss.home}/server/work" />
| </target>
|
| <target name="clean" description="removes all generated files">
| <delete dir="build" />
| </target>
|
| <!-- ============== -->
| <!-- === SERVER === -->
| <!-- ============== -->
| <target name="create.db" depends="declare.jbpm.tasks, db.clean, db.start" description="creates a hypersonic database with the jbpm tables and loads the processes in there">
| <jbpmschema actions="create"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml"
| properties="${basedir}/src/resources/hsqldb/create.db.hibernate.properties"/>
| <loadidentities file="${basedir}/src/resources/hsqldb/identity.db.xml"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml"
| properties="${basedir}/src/resources/hsqldb/create.db.hibernate.properties"/>
| <ant antfile="build.xml" target="build.processes" inheritall="false" />
| <deployprocess cfg="${basedir}/src/config.files/hibernate.cfg.xml"
| properties="${basedir}/src/resources/hsqldb/create.db.hibernate.properties">
| <fileset dir="build" includes="*.process" />
| </deployprocess>
| <antcall target="db.stop" />
| </target>
|
| <target name="create.jbpm.configuration" depends="delete.jbpm.configuration, build.webapp, build.service.archive, create.db" description="creates a jbpm configuration">
| <mkdir dir="${jboss.home}/server/jbpm" />
| <copy todir="${jboss.home}/server/jbpm">
| <fileset dir="${jboss.home}/server/${jboss.source.configuration}">
| <exclude name="data/**" />
| <exclude name="log/**" />
| <exclude name="tmp/**" />
| <exclude name="work/**" />
| <exclude name="jms/jbossmq-destination-service.xml" />
| <exclude name="deploy/jboss-aop.deployer/**" />
| <exclude name="deploy/jboss-ws4ee.sar/**" />
| <exclude name="deploy/management/**" />
| <exclude name="deploy/bsh-deployer.xml" />
| <exclude name="deploy/jboss-ha-local-jdbc.rar" />
| <exclude name="deploy/jboss-ha-xa-jdbc.rar" />
| <exclude name="deploy/jboss-ha-local-jdbc.rar" />
| <exclude name="deploy/mail*" />
| <exclude name="deploy/monitoring-service.xml" />
| <exclude name="deploy/properties-service.xml" />
| <exclude name="deploy/schedule*" />
| <exclude name="deploy/uuid-key-generator.sar" />
| </fileset>
| </copy>
| <!-- copy the prefabricated resources -->
| <copy todir="${jboss.home}/server/jbpm" overwrite="true">
| <fileset dir="src/resources/jboss-${jboss.version}" />
| </copy>
| <!-- deploy the jbpm service archive -->
| <ant antfile="build.xml" target="build" inheritall="false" />
| <mkdir dir="${jboss.home}/server/jbpm/deploy/jbpm.sar" />
| <unzip src="build/jbpm.sar" dest="${jboss.home}/server/jbpm/deploy/jbpm.sar" />
| <!-- deploy the jbpm web application -->
| <antcall target="build.webapp" />
| <copy todir="${jboss.home}/server/jbpm/deploy" file="build/jbpm.war" />
| <!-- copy the jbpm database -->
| <mkdir dir="${jboss.home}/server/jbpm/data/hypersonic" />
| <copy todir="${jboss.home}/server/jbpm/data/hypersonic">
| <fileset dir="build/db" />
| </copy>
| </target>
|
| <target name="redeploy">
| <antcall target="stop.jboss" />
| <sleep seconds="5" />
| <antcall target="create.jbpm.configuration" />
| <exec dir="${jboss.home}/bin"
| executable="${jboss.home}/bin/run.bat"
| os="Windows XP, Windows 95, Windows 98, Windows 2000, Windows NT" >
| <arg line="-c jbpm" />
| </exec>
| </target>
|
| <!-- ============= -->
| <!-- === BUILD === -->
| <!-- ============= -->
| <target name="build.webapp" description="builds jbpm.war">
| <ant antfile="build.xml" target="build.webapp" />
| <mkdir dir="build/jbpm.war.dir" />
| <copy todir="build/jbpm.war.dir">
| <fileset dir="src/resources/jbpm.war" />
| </copy>
| <copy todir="build/jbpm.war.dir/WEB-INF/lib">
| <fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" />
| <fileset dir="lib/jsf" includes="*.jar" />
| <fileset dir="lib/dom4j" includes="*.jar" />
| <fileset dir="lib/hibernate" includes="jaxen-*.jar" />
| <fileset dir="lib/commons" includes="commons-digester-*.jar, commons-beanutils-*.jar, commons-fileupload-*.jar" />
| </copy>
| <jar destfile="build/jbpm.war">
| <fileset dir="build/jbpm.war.dir" />
| </jar>
| </target>
|
| <target name="build.service.archive" description="builds jbpm.sar">
| <ant antfile="build.xml" target="build.service.archive" />
| </target>
|
| <!-- ============== -->
| <!-- === DEPLOY === -->
| <!-- ============== -->
| <target name="deploy.webapp" depends="build.webapp" description="deploys the jbpm webapp">
| <ant antfile="build.xml" target="build.jbpm" />
| <get dest="build/deployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&n..." />
| </target>
|
| <target name="undeploy.webapp" description="undeploys the jbpm webapp">
| <get dest="build/undeployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&n..." />
| </target>
|
| <target name="deploy.service.archive" depends="build.service.archive" description="deploys jbpm.sar">
| <get dest="build/deployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&n..." />
| </target>
|
| <target name="undeploy.service.archive" description="undeploys the service archive">
| <get dest="build/undeployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&n..." />
| </target>
|
| <target name="deploy.processes" depends="declare.jbpm.tasks" description="deploys the jbpm processes">
| <ant antfile="build.xml" target="build.processes" inheritall="false" />
| <deployprocess cfg="src/config.files/hibernate.cfg.xml"
| properties="${basedir}/src/resources/hsqldb/create.db.hibernate.properties">
| <fileset dir="build" includes="*.process" />
| </deployprocess>
| </target>
|
|
| <!-- =========== -->
| <!-- === RUN === -->
| <!-- =========== -->
| <target name="start.jboss" depends="declare.jbpm.tasks">
| <startjboss configuration="jbpm" />
| </target>
|
| <target name="stop.jboss" depends="declare.jbpm.tasks">
| <exec dir="${jboss.home}/bin"
| executable="${jboss.home}/bin/shutdown.bat"
| os="Windows XP, Windows 95, Windows 98, Windows 2000, Windows NT" >
| <arg line="-S" />
| </exec>
| </target>
|
| <property name="hsqldb.database" value="${basedir}/build/db/localDB" />
| <property name="hsqldb.port" value="1701" />
|
| <target name="db.start" depends="declare.jbpm.tasks">
| <starthsqldb lib="${jboss.home}/server/default/lib/hsqldb.jar"
| database="${hsqldb.database}"
| port="${hsqldb.port}" />
| </target>
|
| <target name="db.start.mgr">
| <java classname="org.hsqldb.util.DatabaseManager" fork="true">
| <classpath refid="classpath.hsqldb"/>
| <arg line="-url jdbc:hsqldb:hsql://localhost:${hsqldb.port}"/>
| </java>
| </target>
|
| <target name="db.stop">
| <java classname="org.hsqldb.util.ShutdownServer" fork="true">
| <classpath refid="classpath.hsqldb"/>
| <arg line="-url jdbc:hsqldb:hsql://localhost:${hsqldb.port} -user sa"/>
| </java>
| </target>
|
| <target name="db.clean">
| <delete dir="build/db" />
| <mkdir dir="build/db" />
| </target>
|
|
| <!-- ================= -->
| <!-- TASK DECLARATIONS -->
| <!-- ================= -->
| <target name="declare.jbpm.tasks">
| <ant antfile="build.xml" target="build" />
| <taskdef file="src/java.jbpm/org/jbpm/ant/jbpm.ant.tasks.properties" format="properties">
| <classpath refid="classpath.ant" />
| </taskdef>
| </target>
|
| </project>
|
|
Thanks for ur help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983731#3983731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983731
19Â years, 6Â months
[JBoss Seam] - DB-Updates already happening in updateModelValues?
by m_hess
Hi there,
I think I currently have a problem of basic understanding what actually is ment to happen in what phase of the JSF Lifecycle when Seam is involved.
What I would expect is as follows:
When a ActionMethod is triggered through a commandlink, the JSF Lifecycle is started. Especially in UpdateModelValues the values from the html-form are transfered into the backing bean. Then afterwards in my actionMethod (called during invokeApplication phase), my application gets to decide wether the updatedModel is ment to be persisted or not.
So - that´s what I thought until about an hour ago, when I realized that something was "off" in my application. Turning on lifecycle-Debugging as well as hibernates "show_sql", I can find the following in my log:
[13:04:29] [tr1] [DEBUG] [...yfaces.lifecycle.LifecycleImpl:287 ] >> entering updateModelValues in org.apache.myfaces.lifecycle.LifecycleImpl
| Hibernate: update TimeRecordInput set total=? where id=?
| [13:04:29] [tr1] [DEBUG] [...yfaces.lifecycle.LifecycleImpl:314 ] >> exiting updateModelValues in org.apache.myfaces.lifecycle.LifecycleImpl
So I now know, that the new values actually get persisted in updateModelValues already.
Questions:
1. Is this the correct and expected behaviour? What about .persist() and .merge()? Do I not need to call them in my actionBeans?
2a. If so, where can/should I implement complex validation routines? My actionbeans seam to be the wrong spot, since this occurs too late. Or is it correct there, and I just have to use @rollback on it?
2b. If not, what might cause this behauviour (maybe some specific settings for example)?
Thanks for any advise you can give me.
Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983730#3983730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983730
19Â years, 6Â months