[JBoss ESB Development] - Re: JBoss auto reconnect issue with Websphere MQ
by forum khan
forum khan [https://community.jboss.org/people/forum.khan] created the discussion
"Re: JBoss auto reconnect issue with Websphere MQ"
To view the discussion, visit: https://community.jboss.org/message/745619#745619
--------------------------------------------------------------
After analysis I found that in *wmq.jmsra.rar\META-INF\ra.xml* file there is reconnectionRetryCount = 5 and reconnectionRetryInterval = 300000 that is causing the server to auto reconnect to MQ every 5 mins.
Using RAR software, I extracted the ra.xml file and modified those properties. Again packaged to .rar file.
After the deployment of .rar file and restarting the server the deployment of .rar fails due to the below errors.
Please let me know how to resolve this.
12:22:25,231 ERROR [ProfileDeployAction] Failed to add deployment: wmq.jmsra.rar
org.jboss.deployers.spi.DeploymentException: Error determining structure: wmq.jmsra.rar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure.determineStructure(DeclaredStructure.java:89)
at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1001)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:437)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:387)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:297)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.jboss.virtual.plugins.context.AbstractExceptionHandler.handleZipEntriesInitException(AbstractExceptionHandler.java:39)
at org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler.handleZipEntriesInitException(NamesExceptionHandler.java:63)
at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:636)
at org.jboss.virtual.plugins.context.zip.ZipEntryContext.checkIfModified(ZipEntryContext.java:786)
at org.jboss.virtual.plugins.context.zip.ZipEntryContext.getChild(ZipEntryContext.java:830)
at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.createChildHandler(ZipEntryHandler.java:195)
at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:690)
at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:169)
at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:107)
at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:492)
at org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure.determineStructure(DeclaredStructure.java:64)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.ensureZipFile(ZipFileWrapper.java:173)
at org.jboss.virtual.plugins.context.zip.ZipFileWrapper.acquire(ZipFileWrapper.java:250)
at org.jboss.virtual.plugins.context.zip.ZipEntryContext.initEntries(ZipEntryContext.java:485)
at org.jboss.virtual.plugins.context.zip.ZipEntryContext.ensureEntries(ZipEntryContext.java:629)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/745619#745619]
Start a new discussion in JBoss ESB Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[JBoss AS 7 Development] - jboss as7 clustering - need help with setting up maven and finding documentation
by Radai Rosenblatt
Radai Rosenblatt [https://community.jboss.org/people/hatchetman82] created the discussion
"jboss as7 clustering - need help with setting up maven and finding documentation"
To view the discussion, visit: https://community.jboss.org/message/746836#746836
--------------------------------------------------------------
Hi.
I'm trying to set up a new demo project to do some jboss clustering PoC based on the latest and greatest (as 7.1.1 right now).
I basically need 3 things (that i know of) in my build - a dependency on the j2ee6 spec, a dependency on the jboss ejb3 ext api, and some dependency to allow me to write jboss services - because they seem to be the only way to do clustered singletons? (see https://community.jboss.org/message/646537#646537 https://community.jboss.org/message/646537)
for the j2ee specs, i already know i can do this in my parent pom:
this will allow me to add dependencies on various j2ee6 specs with the exact versions taken from the above pom.
is there a similar aggregation for jboss extensions?
for the ejb-ext-api, for example, i know i can do this:
but thats just a single jar, and i have no idea what the proper dependency is for the service API (s ?).
also, how do i keep these consistent with each other and with the particular jboss version i plan to deploy on?
for example, jboss-javaee-6.0:3.0.1 is under jboss-parent:0 while jboss-ejb3-ext-api:2.0.0 is under jboss-parent:7 - which might cause issues?
how do i tie the spec versions im building against to the spec versions supported by the jboss version im to deploy on?
and a last question - where do i go to to learn how to write jboss services?
thanks in advance for any pointers,
Radai.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746836#746836]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[EJB3 Development] - Exception thrown while @Timeout is invoked
by Arnab Ghosh
Arnab Ghosh [https://community.jboss.org/people/arnosgh] created the discussion
"Exception thrown while @Timeout is invoked"
To view the discussion, visit: https://community.jboss.org/message/746747#746747
--------------------------------------------------------------
Hi All,
I have implemented a statlessBean with Timer service. The timer is getting created without any issue, but when the @Timeout method is getting invoked I am getting the below excetion:
ERROR [org.jboss.ejb.txtimer.TimerImpl] (EJB-Timer-ee98a936-c65a-4bbb-b697-93f88ca37f1c[target=jboss.j2ee:ear=app.ear,jar=app.backend.jar,name=AssetCreationCompleteTimer,service=EJB3]) Error invoking ejbTimeout
java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:682)
at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:199)
at org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.java:44)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:664)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
My looks like:
@Stateless
@LocalBinding(jndiBinding = "com.app.backend.maintenance.AssetCreationCompleteTimerLocal")
public class AssetCreationCompleteTimer implements AssetCreationCompleteTimerLocal {
@PersistenceContext(unitName = "unitName")
private EntityManager entityManager;
@Resource(mappedName = "java:/JmsXA")
private QueueConnectionFactory queueConnectionFactory;
private final Logger log = LoggerFactory.getLogger(getClass());
@Resource
private SessionContext sessionContext;
@Override
public void scheduleNextExecution(Date dateToExecute, boolean isCancelExisting) {
TimerService timerService = sessionContext.getTimerService();
for (Object o : timerService.getTimers()) {
if (o instanceof Timer) {
Timer timer = (Timer) o;
// if current Date is greater than or after the existing timers next run date, cancel inactive timer
if (new Date().after(timer.getNextTimeout())) {
timer.cancel();
continue;
}
// if date to schedule next run is less than or before the existing timers next run date, cancel the current timer
// only if isCancelExisting is set to true. This done to ensure that timers don't get re-scheduled on an earlier date unless specifically intended.
if (dateToExecute.before(timer.getNextTimeout())) {
log.info(String.format("%s job is already scheduled for %tc", getClass().getSimpleName(), timer.getNextTimeout()));
if (isCancelExisting) {
log.info(String.format("Cancelling the timer for %s which was scheduled to run at %tc ...", getClass().getSimpleName(), timer.getNextTimeout()));
timer.cancel();
}
}
}
}
if (timerService.getTimers().isEmpty()) {
log.info("Creating Timer with Date {} : Class {}", dateToExecute, getClass().getSimpleName());
timerService.createTimer(dateToExecute, null);
log.info("Timer created for Class : {}", getClass().getSimpleName());
}
}
@Timeout
public void onTimeOut(Timer timer) {
log.info("Timeout triggered ....");
Calendar nextRun = Calendar.getInstance();
nextRun.add(Calendar.MINUTE, 0);
nextRun.add(Calendar.SECOND, getExecutionIntervalSeconds());
//String message = String.format("Next execution scheduled for %tc", nextRun);
log.info("Starting execution of {}", getClass().getSimpleName());
execute(); // exceute logic
}
}
My application is deployed in JBOSS 5.1.
Please help.
Regards
Arnab
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746747#746747]
Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months
[Clustering Development] - Session Scope (war project without EJB) bean does not replicate but @Stateful (Ear project with EJB)
by Mahadev Sawale
Mahadev Sawale [https://community.jboss.org/people/mahadev_sawale] created the discussion
"Session Scope (war project without EJB) bean does not replicate but @Stateful (Ear project with EJB)"
To view the discussion, visit: https://community.jboss.org/message/746009#746009
--------------------------------------------------------------
Hi,
I have a seam web application(war project) with one session scoped bean:
@Name("crudAction")
@Scope(ScopeType.SESSION)
public class CrudActionBean implements Serializable{
private String msg; //with getter and setter methods
public String crudAction(){
msg= "Content to be displayed on crudAction page after this action"; // this will be displyed in <h:outputText../> on crudAction page.
return "/crudAction.xhtml";
}
}
web.xml has <distributable/> tag defined.
components.xml has distributable="true" defined in <core:init.../> tag.
I am using Seam 2.2, Jboss 5.1 server and JDK 1.6 and Windows XP OS.
After killing jboss of node1, if I try to reload page or do some action, I get following error message on jboss console of node2:
And does not replicate session.
+ClassNotFoundException occurred unmarshalling value java.lang.ClassNotFoundException: org.domain.seamdemo.session.CrudAction+
Detailed stack trace has been attached here with this post.
But replication works successfully, if I try above by creating Ear project and modifying the bean to SFSB like:
@Stateful
@Name("crudAction")
@Scope(ScopeType.SESSION)
@Clustered
public class CrudActionBean implements CrudAction,Serializable{ "same code as above"} //CrudAction is @Local interface.
The value of msg variable were displyed even after realoding page.
Can someone please help me for the above.
Let me know if additional information is needed.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746009#746009]
Start a new discussion in Clustering Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 6 months