[jBPM Users] - [jbpm 4.2] My first simple application doesn't work :(
by -Silver-
I'm trying to develop my first workflow with jbpm 4.2 and netbeans but it doesn't works.
I created a new project called "displayproject" and imported as libraries the file jbpm.jar that is in the root jbpm's folder and all the files that are in the "lib" folder.
The project contains only those two files:
Display.java
| package displayproject;
|
| import java.util.List;
| import java.util.Map;
| import java.util.Set;
| import org.jbpm.api.Execution;
| import org.jbpm.pvm.internal.model.Activity;
| import org.jbpm.pvm.internal.model.ObservableElement;
| import org.jbpm.pvm.internal.model.OpenProcessDefinition;
| import org.jbpm.pvm.internal.model.Transition;
|
| public class Display implements Activity{
| String message;
|
| public Display(String message){
| this.message=message;
| }
|
| public void execute(Execution execution){
| System.out.println(message);
| }
| }
|
Main.java
| package displayproject;
|
| import org.jbpm.api.Execution;
| import org.jbpm.api.ProcessDefinition;
|
| public class Main{
|
| public static void main(String[] args) {
| ProcessDefinition processDefinition = ProcessFactory.build().node("a")
| .initial.behaviour(new Display("hello")).transition().to("b")
| .node("b").behaviour(new Display("world")).done();
| Execution execution = processDefinition.startExecution();
| }
| }
|
in Main.java netbeans tell me that it's unable to find the object ProcessFactory and the method startExecution() .
What'is wrong?
What libraries have I to import in a process project? In what folder of jbpm4.2 could I find them?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268885#4268885
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268885
14 years, 7 months
[EJB 3.0 Users] - Re: NotBound ERRoR
by amira88
"Wolfgang Knauf" wrote : Hi,
|
| Do you have a "jndi.properties" file? If not, you have to provide some properites to "InitialContext":
| Properties props = new Properties();
| | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
| | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
| | props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML");
| |
| | InitialContext initialContext = new InitialContext(props);
|
| What is the value of "HotelTestBean.RemoteJNDIName"?
| It should be "EARName/EJBName/remote" if your app is bundled as EAR file, or "EJBName/remote" if you deploy only an EJB jar.
|
| Hope this helps
|
| Wolfgang
Hi i ried to use this code without editing it but i still have this error:Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
But after a reaserch i found that i have to install jars
"So Just adding the "appserv-rt.jar" in sun server lib folder to the classpath does the trick for providing the corba properties" :tih is what i found is this a solution!!
Thank u for help
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268879#4268879
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268879
14 years, 7 months
[EJB 3.0 Users] - Re: NotBound ERRoR
by amira88
Hi Mr wolfgang,
i'm just using u property code:
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML");
InitialContext initialContext = new InitialContext(props);
But i'm having an exception and this is it:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.et.GestionDeStockClient.main(GestionDeStockClient.java:29)
Thank you so much
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268878#4268878
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268878
14 years, 7 months
[JBoss Portal Users] - warnings over and over in jboss 5.1
by deanhiller
We come from tomcat where we could prevoiusly search logs for WARN to see if anything went bad for the day(our log files are about 1 Gig for 1 day of operation). BUT now we are in jboss and I keep seeing these logs over and over...(preventing us for searching on warn)....
| 2009-12-03 13:38:38,041 WARN [com.arjuna.ats.jts.logging.loggerI18N] (http-0.0.0.0-8080-7) [co
| m.arjuna.ats.internal.jts.resources.errsavefail] ExtendedResourceRecord.doSave failed. Returnin
| g default value: true
| 2009-12-03 13:38:38,043 WARN [jacorb.poa.controller] (RequestController-1) rid: 3186 opname: s
| aveRecord request rejected with exception:
| 2009-12-03 13:38:38,050 WARN [jacorb.poa.controller] (RequestController-1) rid: 3188 opname: c
| ommit cannot process request, because object doesn't exist
| 2009-12-03 13:38:38,052 WARN [jacorb.poa.controller] (RequestController-1) rid: 3188 opname: c
| ommit request rejected with exception:
|
Anyway to fix this? In tomcat, we had no warnings so we could easily search on WARN for any problems when launching a new version of our software. With jboss, it sucks because bad problems are lost in the noise with the amount of traffic we get. How do I get around these warnings?
I am trying to avoid going back to tomcat. yes, we could configure logging but then we may miss true warnings from the jboss platform that we need to know about.
thanks,
Dean
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268877#4268877
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268877
14 years, 7 months
[JBoss Tools Users] - Re: Web Resources folder is empty
by nickboldt
Just FYI, you don't have to add, select, install, restart, add, select, install, restart, add, select, install, restart to get JBT installed. Add the three update sites (in steps 6, 8, 10), pick the stuff you want from JBT (step 10), and let p2 resolve all the dependencies.
Then the process becomes much simpler: add, add, add, select, install, restart
See also: http://jboss.org/tools/download/update.html#fromzip
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268871#4268871
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268871
14 years, 7 months
[jBPM Users] - Problem to run jBPM under jBoss and searching for PVM docume
by -Silver-
Hi all and nice to meet you!
I'm new here but I think that I'll write many many posts!
I started work of my master thesis based on jBPM so I hope to find support here :) !
To start I've two questions:
1) I installed manually jBPM version 4.2 on jBoss 5.1.0GA then I went to folder "C:\jboss-5.1.0GA\bin\" and typed "run -c jbpm". I received the follow error message:
Calling C:\jboss-5.1.0.GA\bin\run.conf.bat
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: C:\jboss-5.1.0.GA
|
| JAVA: c:\program files (x86)\java\JDK1.6.0_17\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun
| .rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg
| .jboss.resolver.warning=true -server
|
| CLASSPATH: C:\jboss-5.1.0.GA\bin\run.jar
|
| ===============================================================================
|
| 20:58:52,953 INFO [ServerImpl] Starting JBoss (Microcontainer)...
| 20:58:52,956 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build:
| SVNTag=JBoss_5_1_0_GA date=200905221634)
| 20:58:52,957 INFO [ServerImpl] Bootstrap URL: null
| 20:58:52,959 INFO [ServerImpl] Home Dir: C:\jboss-5.1.0.GA
| 20:58:52,960 INFO [ServerImpl] Home URL: file:/C:/jboss-5.1.0.GA/
| 20:58:52,961 INFO [ServerImpl] Library URL: file:/C:/jboss-5.1.0.GA/lib/
| 20:58:52,962 INFO [ServerImpl] Patch URL: null
| 20:58:52,963 INFO [ServerImpl] Common Base URL: file:/C:/jboss-5.1.0.GA/common/
|
| 20:58:52,964 INFO [ServerImpl] Common Library URL: file:/C:/jboss-5.1.0.GA/comm
| on/lib/
| 20:58:52,965 INFO [ServerImpl] Server Name: jbpm
| 20:58:53,019 INFO [ServerImpl] Server Base Dir: C:\jboss-5.1.0.GA\server
| 20:58:53,020 INFO [ServerImpl] Server Base URL: file:/C:/jboss-5.1.0.GA/server/
|
| 20:58:53,022 INFO [ServerImpl] Server Config URL: file:/C:/jboss-5.1.0.GA/serve
| r/jbpm/conf/
| 20:58:53,023 INFO [ServerImpl] Server Home Dir: C:\jboss-5.1.0.GA\server\jbpm
| 20:58:53,024 INFO [ServerImpl] Server Home URL: file:/C:/jboss-5.1.0.GA/server/
| jbpm/
| 20:58:53,026 INFO [ServerImpl] Server Data Dir: C:\jboss-5.1.0.GA\server\jbpm\d
| ata
| 20:58:53,027 INFO [ServerImpl] Server Library URL: file:/C:/jboss-5.1.0.GA/serv
| er/jbpm/lib/
| 20:58:53,032 INFO [ServerImpl] Server Log Dir: C:\jboss-5.1.0.GA\server\jbpm\lo
| g
| 20:58:53,033 INFO [ServerImpl] Server Native Dir: C:\jboss-5.1.0.GA\server\jbpm
| \tmp\native
| 20:58:53,089 INFO [ServerImpl] Server Temp Dir: C:\jboss-5.1.0.GA\server\jbpm\t
| mp
| 20:58:53,091 INFO [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.1.0.GA\server
| \jbpm\tmp\deploy
| 20:58:54,137 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/j
| boss-5.1.0.GA/server/jbpm/conf/bootstrap.xml
| Failed to boot JBoss:
| java.lang.RuntimeException: Error unmarshalling file:/C:/jboss-5.1.0.GA/server/j
| bpm/conf/bootstrap.xml
| at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:60
| )
| at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java
| :123)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
| 450)
| at org.jboss.Main.boot(Main.java:221)
| at org.jboss.Main$1.run(Main.java:556)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/
| C:/jboss-5.1.0.GA/server/jbpm/conf/bootstrap.xml
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
| er.java:177)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java
| :119)
| at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:53
| )
| ... 5 more
| Caused by: java.io.FileNotFoundException: C:\jboss-5.1.0.GA\server\jbpm\conf\boo
| tstrap.xml
| at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnecti
| on.java:105)
| at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLC
| onnection.java:112)
| at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
| urce)
| at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
| Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
| ce)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
| er.java:173)
| ... 7 more
| 20:58:54,314 INFO [ServerImpl] Runtime shutdown hook called, forceHalt: true
| 20:58:54,343 INFO [ServerImpl] Shutdown complete
| Shutdown complete
| Halting VM
| Press a key to continue . . .
|
I know that I probably have a problem with my java path (I'm running java 32 under windows 7 64bit and something is wrong with path) could be this the problem?
2)Where could I find detailed PVM developer's documentation?
Thanks a lot!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268864#4268864
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268864
14 years, 7 months