[JBoss Tools] - Deployment problems
by Johannes Krämer
Johannes Krämer [http://community.jboss.org/people/johannesk] created the discussion
"Deployment problems"
To view the discussion, visit: http://community.jboss.org/message/542643#542643
--------------------------------------------------------------
Hi,
I'm using JBoss AS 5.1 and ESB 4.8 together with the JBoss Tools Server Adapter for controlling the server in Eclipse (JBoss 5.1 Runtime Server). The adapter works fine for starting and stopping the server, however, there are some strange problems when it comes to deployments:
- Dynamic Web Projects and ESB projects are not updated when I choose incremental publish. Although they are marked as "Synchronized" after an incremental publish, any changes at the code would only work after I do a full publish.
- With EJB projects (without EAR) things are even worse, as any code changes after the first deployment would only be effective after removing and republishing the project (incremental as well as full publish simply does nothing in that case).
- But the biggest problem are jBPM projects, because they don't publish at all. It doesn't depend on the type of publishing (full or incremental), the process just doesn't show up in the jBPM console. However, if I deploy an exported .par file manually, it works fine.
Am I doing anything wrong or could this be some bug?
Kind regards
Johannes Krämer
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542643#542643]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
[jBPM Development] - Update Deployment Resource
by Maurizio Trifici
Maurizio Trifici [http://community.jboss.org/people/trifix81] created the discussion
"Update Deployment Resource"
To view the discussion, visit: http://community.jboss.org/message/542639#542639
--------------------------------------------------------------
Hi,
I have to update a deployment resource. I build my new jdpl string, but when I use the updateDeploymentResource method of RepositoryService, I have this error:
[12/05/10 18.16.47:795 CEST] 00000026 AbstractFlush E org.hibernate.event.def.AbstractFlushingEventListener performExecutions Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.lob.Lob#0]
at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:88)
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter$1.invoke(WebSphereExtendedJTATransactionLookup.java:209)
at $Proxy72.beforeCompletion(Unknown Source)
at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.beforeCompletion(SynchronizationCallbackWrapper.java:65)
at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2409)
at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1642)
at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1613)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1548)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:241)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:165)
at com.ibm.ws.Transaction.JTA.UserTransactionImpl.commit(UserTransactionImpl.java:292)
at org.jbpm.pvm.internal.tx.jta.JtaTransaction.commit(JtaTransaction.java:96)
at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:89)
at org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:66)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
at org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at org.jbpm.pvm.internal.repository.RepositoryServiceImpl.updateDeploymentResource(RepositoryServiceImpl.java:113)
at org.jbpm.integration.console.ProcessEnginePluginImpl.updateDeployment(ProcessEnginePluginImpl.java:177)
at org.jboss.bpm.console.server.EngineFacade.updateProcess(EngineFacade.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1103)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1038)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:834)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:682)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
I'm using JBPM 4.2. This is my jpdl string:
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns=" http://jbpm.org/4.0/jpdl http://jbpm.org/4.0/jpdl" name="Invia avvisi">
<end g="372,123,48,48" name="EndEvent_1"/>
<java class="it.iside.task.StampaMessaggio" g="210,107,100,80" method="stampa" name="Invia avvisi">
<arg>
<object expr="#{execution.id}"/>
</arg>
<arg>
<string value="Messaggio"/>
</arg>
<field name="instanceId">
<object expr="#{execution.id}"/>
</field>
<field name="paramId">
<object expr="#{paramId}"/>
</field>
<field name="procedureId">
<object expr="#{procedureId}"/>
</field>
<transition name="SequenceFlow_2" to="EndEvent_1"/>
</java>
<start g="106,123,48,48" name="StartEvent_1">
<transition name="SequenceFlow_1" to="Invia avvisi"/>
</start>
</process>
Can anyone help me?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542639#542639]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months
[EJB 3.0 Development] - EJB 3.1 Embedded EJBContainer in AS
by Andrew Rubinger
Andrew Rubinger [http://community.jboss.org/people/ALRubinger] created the discussion
"EJB 3.1 Embedded EJBContainer in AS"
To view the discussion, visit: http://community.jboss.org/message/542619#542619
--------------------------------------------------------------
I'm tracking integration of the Embedded EJB3 "EJBContainer" APIs into AS here:
https://jira.jboss.org/jira/browse/JBAS-7964 https://jira.jboss.org/jira/browse/JBAS-7964
The task for the "embedded" component is:
https://jira.jboss.org/jira/browse/EJBTHREE-2083 https://jira.jboss.org/jira/browse/EJBTHREE-2083
We now have a passing test in my development branch of AS. It:
* Deploys a Servlet into AS
* Issues an HTTP request to the Servlet
* Servlet then starts a new EJBContainer and deploys a ShrinkWrap archive into it (which is a JBoss-specific extension)
* Looks up the EJB proxy using EJBContainer.getContext() and invokes upon it
* Returns the result to the caller
Pending is still to split the ShrinkWrap-specific stuff out into an extension module, but it proves we're on the way to something working from inside AS. It's essentially spec API wrappers to our existing runtime.
http://anonsvn.jboss.org/repos/jbossas/branches/TEMP_EJB3_EMBEDDABLE_JBAS... http://anonsvn.jboss.org/repos/jbossas/branches/TEMP_EJB3_EMBEDDABLE_JBAS...
/*
* JBoss, Home of Professional Open Source.
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.jbossas.embedded.testsuite.servlet;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import javax.ejb.embeddable.EJBContainer;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jboss.ejb3.embedded.api.JBossEJBContainer;
import org.jboss.jbossas.embedded.testsuite.ejb3.slsb.OutputBean;
import org.jboss.jbossas.embedded.testsuite.ejb3.slsb.OutputLocalBusiness;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
/**
* Servlet which forwards calls upon an EJB
* via the {@link EJBContainer} API.
*
* @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a>
* @version $Revision: $
*/
public class EmbeddedEjbCallingServlet extends HttpServlet
{
//-------------------------------------------------------------------------------------||
// Class Members ----------------------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
* Logger
*/
private static final Logger log = Logger.getLogger(EmbeddedEjbCallingServlet.class.getName());
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
* Content type to use in forwarding
*/
private static final String CONTENT_TYPE_TEXT_PLAIN = "text/plain";
//-------------------------------------------------------------------------------------||
// Overridden Implementations ---------------------------------------------------------||
//-------------------------------------------------------------------------------------||
/**
* Returns the value {@link OutputLocalBusiness#OUTPUT} by invoking via an EJB
*
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
IOException
{
// Log
log.info("Request: " + request);
// Set the content-type to text
response.setContentType(CONTENT_TYPE_TEXT_PLAIN);
// Create the EJB Container
final Map<String, String> ejbContainerProps = new HashMap<String, String>();
ejbContainerProps.put(EJBContainer.MODULES, ""); // Deploy no modules and do no scanning by default
final JBossEJBContainer ejbContainer = (JBossEJBContainer) EJBContainer.createEJBContainer(ejbContainerProps);
// Define the EJB JAR
final JavaArchive archive = ShrinkWrap.create("outputSlsb.jar", JavaArchive.class).addClasses(OutputBean.class,
OutputLocalBusiness.class);
// Deploy the JAR
ejbContainer.deploy(archive);
// Look up the EJB
final Context context = ejbContainer.getContext();
final OutputLocalBusiness bean;
try
{
bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
}
catch (final NamingException e)
{
throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
}
// Invoke
final String value = bean.getOutput();
// Undeploy
ejbContainer.undeploy(archive);
// Shut down EJBContainer
ejbContainer.close();
// Write out
log.info("Got value from EJB: " + value);
response.getWriter().write(value);
}
}
S,
ALR
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542619#542619]
Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 11 months