[JBoss Seam] - Re: Remoting and java map to js map error conversion
by fguerzoni
Thanks Gavin.
Sadly I get the following exception on the first call (webapp is deployed without errors):
org.hibernate.SessionException: Session is closed!
Code is the same, hibernate.cfg.xml is the same too, components.xml is
<components>
|
| <component name="org.jboss.seam.core.init">
| <property name="myFacesLifecycleBug">false</property>
| <property name="debug">true</property>
| </component>
|
| <!-- 120 second conversation timeout -->
| <component name="org.jboss.seam.core.manager">
| <property name="conversationTimeout">120000</property>
| </component>
|
| <!-- Bootstrap Hibernate -->
| <component name="sessionFactory"
| class="org.jboss.seam.core.HibernateSessionFactory" />
| <component name="cbiFeDatabase"
| class="org.jboss.seam.core.ManagedHibernateSession">
| <property name="sessionFactoryJndiName">java:/cbiFeDatabase</property>
| </component>
|
| <component class="org.jboss.seam.core.Microcontainer"
| installed="true" />
|
| <component class="org.jboss.seam.core.Ejb" installed="false" />
|
| </components>
|
|
as suggested by docs.
Thanks in advance.
By the way, I'm very impressed by the dynamic generation of docs from xml. It's the first time I've generated the docs and I think it's very powerful.
Here the full stack trace:
org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:867)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:781)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.entityIdsToRefs(ManagedEntityIdentityInterceptor
.java:161)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.ja
va:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor
.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessIntercepto
r.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:26)
at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalIn
terceptor.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.EventInterceptor.aroundInvoke(EventInterceptor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.j
ava:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:103)
at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
at cbi.bean.config.ConfigBean$$EnhancerByCGLIB$$1db68214.equals()
at org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:860)
at org.jboss.seam.servlet.ServletSessionImpl.setAttribute(ServletSessionImpl.java:46)
at org.jboss.seam.contexts.WebSessionContext.flush(WebSessionContext.java:97)
at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:364)
at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:259)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:100)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:269)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979163#3979163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979163
19 years, 8 months
[JBoss jBPM] - Re: Ripping out identity component
by gigidn
maybe this can work?
I modified JpdlXmlReader to use definition of service in jbpm.cfg.xml
(still use original fix assignment if no value specified)
JpdlXmlReader
| if (expression!=null){
| assignmentDelegation.setProcessDefinition(processDefinition);
| if (JbpmConfiguration.getInstance().getServiceFactory("Identity") != null)
| assignmentDelegation.setClassName(JbpmConfiguration.getInstance().getServiceFactory("Identity"));
| else
| assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler");
| assignmentDelegation.setConfiguration("<expression>"+expression+"</expression>");
|
| } else {
|
jbpm.cfg.xml
| <jbpm-configuration>
| <jbpm-context>
| ...
| <service name="identity" factory="it.xxx.yyy.ExpressionAssignmentHandler" />
| </jbpm-context>
|
but I have a problem calling JbpmConfiguration.getInstance()
because I'm using jbpm inside spring and that call doesn't work!
there is a way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979154#3979154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979154
19 years, 8 months
[JNDI/Naming/Network] - InitialContext results in Directory listing
by jake142
Hi,
Im a newbie to EJB. Im trying to access a statless session bean. Im using eclipse with the j2ee plugin with xdoclet. The problem is I get is that I get a Directory listing when running this code:
<%
String s = "empty";
try {
TestLocalHome testLocalHome = (TestLocalHome)new InitialContext().lookup("java:TestLocal");
TestLocal testBean = testLocalHome. create();
s = testBean.sum(10,10);
}
catch (Exception e)
{
s=e.toString();
}
%>
The result is <%=s %>
The ejb-jar.xml:
<![CDATA[An EJB named Test]]>
<display-name>Test</display-name>
<ejb-name>Test</ejb-name>
se.tesella.ejb.TestHome
se.tesella.ejb.Test
<local-home>se.tesella.ejb.TestLocalHome</local-home>
se.tesella.ejb.TestLocal
<ejb-class>se.tesella.ejb.TestSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
the jboss.xml:
<ejb-name>Test</ejb-name>
<jndi-name>Test</jndi-name>
<local-jndi-name>TestLocal</local-jndi-name>
<method-attributes>
</method-attributes>
The jboss-web.xml:
<jboss-web>
<context-root>ReAdvertWebModule</context-root>
<ejb-ref>
<ejb-ref-name>Test</ejb-ref-name>
<jndi-name>Test</jndi-name>
</ejb-ref>
</jboss-web>
The web.xml:
<ejb-ref>
<ejb-ref-name>Test</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
se.tesella.ejb.TestHome
se.tesella.ejb.Test
<ejb-link>TestBean</ejb-link>
</ejb-ref>
Also, anothe question, are all these xml files neccessary?
Kind regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979153#3979153
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979153
19 years, 8 months