[JBoss jBPM] - HibernateLazyInitializer..ERROR
by jobu
I have configured JBPM with my struts application and deployed it in tomcat
Some times workflow engine throws this exception.... and can not executing any workflow method..
Caused by: java.lang.NoSuchMethodError: org.jbpm.graph.exe.Token.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
| at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$74c28d1.getHibernateLazyInitializer(<generated>)
| at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
| at org.hibernate.type.EntityType.resolve(EntityType.java:303)
| at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
| at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
| at org.hibernate.loader.Loader.doQuery(Loader.java:717)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.doList(Loader.java:2150)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
| at org.hibernate.loader.Loader.list(Loader.java:2024)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.jbpm.db.GraphSession.findProcessInstances(GraphSession.java:347)
| at com.brainscript.workflow.service.WorkflowService.inUsersRealisationLevel(WorkflowService.java:633)
| at com.brainscript.hrm.grade.service.GradeRegisterService.update(GradeRegisterService.java:179)
| at com.brainscript.hrm.grade.presentation.action.GradeRegisterAction.updateGraderegistration(GradeRegisterAction.java:647)
| ... 26 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127365#4127365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127365
18 years, 2 months
[EJB/JBoss] - log4j configuration for different filelogs
by Anna_Lut
In my session bean I use object of Parent class:
| public class Parent{
| protected static Logger log;
|
| public Parent(String log4jCategory){
| log =Logger.getLogger(log4jCategory);
| }
|
| ....
| }
|
| public class ChildA extends Parent {
| ....
| }
|
| public class ChildB extends Parent {
| ....
| }
|
|
|
|
| public class MyBean implements javax.ejb.SessionBean {
| private Parent obj;
| ....
| public void initParentObject(String paramValue){
| if (paramValue.equals("A"))
| obj = new ChildA("CategoryA");
| else
| obj = new ChildB("CategoryB");
| }
| ....
| }
|
|
Is it possible to get log data to diferrent file depending on Child class realization.
Of course, it can be done in such way in log4j.xml:
|
| <appender name="CHILD_A"
| .....
| </appender>
|
| <appender name="CHILD_B"
| .....
| </appender>
|
|
| <category name="mypack.ChildA">
| <appender-ref ref="CHILD_A"/>
| </category>
|
| <category name="mypack.ChildB">
| <appender-ref ref="CHILD_B"/>
| </category>
|
|
But in reallife realization, there are a lot of classes in ChildA and ChildB
from different packs, which has their Loggers and they have to write to the same file. That's why I cannot use many different categories in log4j.xml putting only classpath like "mypack.ChildB"
As I see in wiki "Separating Application Logs", I can use CLFilter:
| <filter class="org.jboss.logging.filter.TCLFilter>
| <param name="AcceptOnMatch" value="true">
| <param name="DeployURL" value="app1.ear">
|
But here I have to put a EAR name// but in my examle - I want to have 2 different logs in same bean.
We use JBOSS 3.2.1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127350#4127350
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127350
18 years, 2 months
[JBoss Seam] - Re: Seam Design Question
by tony.herstell@gmail.com
Going back to 1/
I need to initialise the "allocations" and this is generally done by a @Factory.
This causes a stack Overflow...
| @SuppressWarnings("serial")
| @Scope(ScopeType.SESSION)
| @Name("allocations")
| public class Allocations implements Serializable {
|
| private List<Day> indoorArenaDays;
| private List<Day> dressageArenaDays;
| private List<Day> sjArenaDays;
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| @Factory(scope=ScopeType.SESSION, value="allocations")
| public void init() {
|
| List<DaySlot> indoorArenaDaySlots = new ArrayList<DaySlot>();
| DaySlot daySlot = new DaySlot();
| daySlot.setBooked(true);
| daySlot.setBooker("Billy");
| daySlot.setBookingId(1l);
| daySlot.setReason(BookingReasonsKind.ONE_HOUR_PRIVATE);
| daySlot.setTitle("This is a test");
| indoorArenaDaySlots.add(daySlot);
|
| Day day = new Day();
| day.setDate(new GregorianCalendar());
| day.setDaySlots(indoorArenaDaySlots);
| indoorArenaDays = new ArrayList<Day>();
| this.indoorArenaDays.add(day);
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public List<Day> getIndoorArenaDays() {
| //init();
| return indoorArenaDays;
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void setIndoorArenaDays(List<Day> indoorArenaDays) {
| this.indoorArenaDays = indoorArenaDays;
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public List<Day> getDressageArenaDays() {
| return dressageArenaDays;
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void setDressageArenaDays(List<Day> dressageArenaDays) {
| this.dressageArenaDays = dressageArenaDays;
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public List<Day> getSjArenaDays() {
| return sjArenaDays;
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void setSjArenaDays(List<Day> sjArenaDays) {
| this.sjArenaDays = sjArenaDays;
| }
|
| }
|
This little class started as a POJO (used by my ResourceAllocationController) as it really didn't need to be a Seam Object (or so I though).... Anyhow now its a fully grown up Seam object.
So... How do I get the Factory to work?
Do I need and Interface and make this a body (impl)?
This is the .xthml that calls it.... (and as such expects allocations to be set up - by the factory).
| <h:panelGrid class="left" id="day_slots_choices" width="20%">
| <rich:dataTable var="eachDayForIndoorArena" value="#{allocations.indoorArenaDays}"
| rendered="#{not empty allocations.indoorArenaDays}">
| <rich:column width="10%">
| <f:facet name="header">
| <h:outputText id="resource_date"
| value="#{messages.allocation_day}" />
| </f:facet>
| <div class="centre">
| <h:outputText value="#{eachDayForIndoorArena.date}">
| <s:convertDateTime type="date" dateStyle="full"/>
| </h:outputText>
| </div>
| </rich:column>
| </rich:dataTable>
| </h:panelGrid>
|
If I hack the getXXX then the init will be called, but then it gets called every time.
CONFUSED....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127342#4127342
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127342
18 years, 2 months
[JBoss Seam] - Re: <s:selectItems> label and value
by nickarls
"pete.muir(a)jboss.org" wrote : Dan is correct. However 2.0.1 allows you two options to customize the value. If you don't use the entity converter, use the itemValue attribute on s:selectItems. If you do, you need to implement a custom entity loading strategy. I'll blog about that soon.
What do you mean by the "If you don't use the entity converter, use the itemValue attribute on s:selectItems"?
I'm trying to do a case of an entity
| @Entity
| public class User {
| @Id @GeneratedValue
| private Integer id;
| private String code;
| private String name
| ... getters/setters/hashCode/equals
|
and would like to do something like
| <f:selectOneMenu value="#{userBean.user.code}" required="true">
| <s:selectItems
| value=#{userBean.userList}
| var="user"
| label="#{user.name}"
| itemValue="#{user.code}"
| >
| <s:convertEntity/>
| </selectItems>
| </f:selectOneMenu>
|
where userBean.userList is a List
should this be doable (displaying name, selecting code) with convertEntity?
I keep getting "Value is required" on it despite of equals/hashcode...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127339#4127339
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127339
18 years, 2 months