[JBoss Tools] - Error when open SessionFacoty in Eclipse's Hibernate Perspective
by spring liao
spring liao [https://community.jboss.org/people/spring.liao] created the discussion
"Error when open SessionFacoty in Eclipse's Hibernate Perspective"
To view the discussion, visit: https://community.jboss.org/message/761046#761046
--------------------------------------------------------------
Hi,
Following is my application/development enviroment:
1.Eclipse 3.7.2/Indigo SR2
2.jboss tools 3.3.1.Final
3.hibernate-orm 4.1.7.Final
4.Joda Time 2.1
5.usertype 3.0.0.CR3
My domain class use joda time LocalDateTime type and UserType annotation:
@Column(name = "START")
@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime")
private org.joda.time.LocalDateTime start;
Both my application and development enviroment work properly except the only one issue:
When I open Hibernate Perspective in Eclipse then click SessionFactory to open it
, the following exception raised and failed to open.
I am not sure it is jboss tools or usertype problem ?
--------------------------------begin error log--------------------------------
!ENTRY org.hibernate.eclipse.console 4 4 2012-09-24 15:06:26.609
!MESSAGE Problems while creating sessionfactory
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2012-09-24 15:06:26.609
!MESSAGE java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
!STACK 0
java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.jadira.usertype.spi.shared.AbstractSingleColumnUserType.<init>(AbstractSingleColumnUserType.java:41)
at org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime.<init>(PersistentLocalDateTime.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.type.CustomType.<init>(CustomType.java:75)
at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:301)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:282)
at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:143)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:68)
at org.hibernate.mapping.Component.buildType(Component.java:183)
at org.hibernate.mapping.Component.getType(Component.java:176)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.Collection.validate(Collection.java:301)
at org.hibernate.mapping.Set.validate(Set.java:42)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1197)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2012-09-24 15:06:26.625
!MESSAGE java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
!STACK 0
java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.jadira.usertype.spi.shared.AbstractSingleColumnUserType.<init>(AbstractSingleColumnUserType.java:41)
at org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime.<init>(PersistentLocalDateTime.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.type.CustomType.<init>(CustomType.java:75)
at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:301)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:282)
at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:143)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:68)
at org.hibernate.mapping.Component.buildType(Component.java:183)
at org.hibernate.mapping.Component.getType(Component.java:176)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.Collection.validate(Collection.java:301)
at org.hibernate.mapping.Set.validate(Set.java:42)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1197)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
---------------------------------end error log---------------------------------
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761046#761046]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[jBPM] - Release task in LocalTaskService in jBPM5.2
by Rahul Agrawal
Rahul Agrawal [https://community.jboss.org/people/rahulamt] created the discussion
"Release task in LocalTaskService in jBPM5.2"
To view the discussion, visit: https://community.jboss.org/message/759580#759580
--------------------------------------------------------------
Hi all,
This is my use case: A task is pending with a Role. Some user with that role claims the task. Now the user do not want to work on that task. He want to release that task to role pool.
The above action can be achieved through org.jbpm.task.TaskService.release(taskId, idRef). But unfortunately this API is not working.
So I dug dip into the code details ,I could find the following in the LocalTaskService
public void release(long taskId, String userId) {
taskServiceSession.taskOperation(Operation.Release, taskId, userId, null, null, null);
}
and in the TaskServiceSession for this taskOperation
switch (operation) {
case Claim: {
taskClaimOperation(task);
break;
}
case Complete: {
taskCompleteOperation(task, data);
break;
}
case Fail: {
taskFailOperation(task, data);
break;
}
case Skip: {
taskSkipOperation(task, userId);
break;
}
case Remove: {
taskRemoveOperation(task, user);
break;
}
case Register: {
taskRegisterOperation(task, user);
break;
}
}
there is no switch case for release operation. The same for the postTaskOperations.
Can anyone explain? Am I not supposed to use release for the use case above described?
Please help!!!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759580#759580]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[jBPM] - jBPM 5.3 Final Installer Full : BIRT report works with ant start.jboss but not with standalone.bat
by Umesh Kant
Umesh Kant [https://community.jboss.org/people/umesh_kant] created the discussion
"jBPM 5.3 Final Installer Full : BIRT report works with ant start.jboss but not with standalone.bat"
To view the discussion, visit: https://community.jboss.org/message/762043#762043
--------------------------------------------------------------
Hi All,
I have installed jBPM 5.3 final Installer Full version. The build.xml has download.birt="true" and the birt was downloaded and installed.
In addition we made changes so that server talks to MS SQL Server instead of H2 database.
When I run the ant start.jboss, the server comes up and report works fine from jbpm-console.
But when I try to run the jboss AS 7.0.2 using the standalone.bat OR from eclipse where I have configured this jboss server instance, the report does not work and when I click on reports template under reports on jbpm-console, I get following error
12:09:04,131 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-5) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalStateException: Report server not initialized. Please check the server logs for further details.
at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:388) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at java.lang.Thread.run(Thread.java:722) [:1.7.0]
Caused by: java.lang.IllegalStateException: Report server not initialized. Please check the server logs for further details.
at org.jboss.bpm.report.ReportFacade.assertBirtAvailability(ReportFacade.java:124) [report-core-1.4.2.Final.jar:]
at org.jboss.bpm.report.ReportFacade.getReportConfig(ReportFacade.java:258) [report-core-1.4.2.Final.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]
... 24 more
Any idea as to why ant script makes report to work where as starting the jboss server using standalone.bat or eclipse does not work.
Thanks,
Umesh
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762043#762043]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[jBPM] - Waiting for events to occur in a flow?
by Jim Beam
Jim Beam [https://community.jboss.org/people/jamesbeam] created the discussion
"Waiting for events to occur in a flow?"
To view the discussion, visit: https://community.jboss.org/message/762276#762276
--------------------------------------------------------------
I'm a flow noob (...obviously) using 5.3.
I have a few examples working and am trying to integrate some rules. I think I have a fundamental misunderstanding of rule tasks (maybe flow). Basically, I want to have a more complicated process and I want to only advance to the next node when a certain set of conditions are met.
To set up a simple test, I have a flow, *start node->rule task->script task (writes "Done")-> end node*. I don't want to get to the script task until the process receives a message with text='hi' or text='yo'. I set up the following ruleflow group (I have a Message and MessageB class):
rule "waitforit rule"
ruleflow-group "waitforMessage"
dialect "mvel"
when
not ($m : Message())
then
System.out.println("no message yet");
end;
rule "dotone"
ruleflow-group "waitforMessage"
dialect "mvel"
when
$m : Message(text=='hi' || text=='yo')
then
System.out.println("got message:"+$m.text);
end;
I tried:
1) I start the process and insert a MessageB object (i see hibernate update the session). I expected the first rule to fire, but it does not. Then I insert a Message object and the process/app just exits (WITHOUT) giving me the "Done" message (i have a thread.sleep after the insert - and no dispose).
2) So, I start the process and do a fireallrules, wait 10 seconds then insert a Message object. But, as soon as I fireallrules, I get the "no message yet" message AND the "Done" message. Nothing happens for 10 seconds and then the process ends.
So, I have just one question....in 6 parts:
a) in #1, why doesn't the first rule fire?
b) and Why/How does the process exit without a "Done" message? (I don't dispose of the ksession in my code)
c) in #2, why does the fireallrules immediatly trigger the "Done" message?
d) as I read it in the documentation, the rule task should keep the process from advancing until all of the rules are no longer active. However, I thought the first rule would ensure that the group was active until a Message arives. Is that wrong?
e) what is the right way to do this sort of thing?
f) Can someone clue me into what I am doing wrong? Am I thinking about this in the wrong way?
Thanks very much for your thoughts/comments.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762276#762276]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[jBPM] - jbpm5 inside my own application
by barbosasalexand
barbosasalexand [https://community.jboss.org/people/barbosasalexand] created the discussion
"jbpm5 inside my own application"
To view the discussion, visit: https://community.jboss.org/message/733242#733242
--------------------------------------------------------------
Hi.
A few days ago I heard about jbpm5 and after reading some of the available documentation, I had some doubts on how to integrate jbpm5 in my own application.
The example I saw showed a preview of contents over Guvnor repository and showed too the editor/designer, in a specific web application (I think the example I saw was done in seam), but what Iwould like to know is how to integrate the process itself, eg, users make logging into the web application and see the tasks that need to run and clicking on them appears a form (form jbpm or something more specific of the application, for example with the graphical aspect of the same application) with the task information, fields to fill and instructions to perform in the step, etc... , as defined in the process.
Can anyone help me clarify this doubt.
Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/733242#733242]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month