[Clustering] - JBoss 4.2.3 with JBossMQ and SQL Server
by vadi2007
15:03:15,118 WARN [JDBCStateManager] Error initialising state manager db
org.jboss.mq.SpyJMSException: Could not commit/rollback a transaction with the transaction manager.; - nested throwable: (javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state)
at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:632)
at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:484)
at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:392)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy51.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:627)
... 112 more
15:03:15,227 INFO [A] Bound to JNDI name: queue/A
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254047#4254047
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254047
15 years, 4 months
[Clustering] - Hot deply new version of a webapp
by jdcmember
JBoss configuration:
* JBoss/Tomcat with a web app, clustered using ehcache (not JBoss caching -- but that's not important). 5 JBoss instances in the cluster.
* Apache mod_jk-based loadbalancing with sticky sessions
The problem:
How to deply a new version of the webapp *without bringing down JBoss*. We'd like to upgrade webapp so that
* New sessions get routed to the upgraded version of the webapp
* Existing sessions stay routed to older version of the webapp
* Clients are essentially unaware that upgrade is going on -- URLs to the webapp don't change, existing sessions continue without interruption, new sessions can be started, app never appears to come down from a client POV.
Any advise on which load balancer to use to achieve this? Particular brand of hardware or software? We think we got a handle on JBoss configuration and management, and management of the distributed caches, but getting we don't have any experience on involving the load balancer in the mix.
Thanks in advance for any advise, wisdom, revelations, or knowledge!
Best regards,
Brian Maso
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254044#4254044
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254044
15 years, 4 months
[JBoss Portal Users] - Re: ava.lang.ClassCastException: org.jboss.portal.portlet.im
by guenther.herndl@softcon.de
To day I tried a more seam like way:
/**
*
*/
package de.softcon.ivory.invserver.action.report;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Import;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.core.Manager;
import org.jboss.seam.document.ByteArrayDocumentData;
import org.jboss.seam.document.DocumentData;
import org.jboss.seam.document.DocumentStore;
import org.jboss.seam.log.Log;
/**
* @author mbaumgar
*
*/
@Name("downloadComponent")
@Import("org.jboss.seam.pdf")
public class DownloadComponent
{
@In private Manager manager;
@In(create = true, value = "#{org.jboss.seam.document.DocumentStore}") private DocumentStore documentStore;
@In(value = "#{facesContext.externalContext}")
private ExternalContext externalContext;
/*
@In(value = "#{org.jboss.seam.faces.facesContext}")
private FacesContext facesContext;
*/
@Logger
private Log log;
public void download(String filename, File reportFile)
{
int read = 0;
byte[] bytes = new byte[1000];
// ActionResponseImpl res = (ActionResponseImpl)FacesContext.getCurrentInstance().getExternalContext().getResponse();
// HttpServletResponseWrapper response =(HttpServletResponseWrapper)FacesContext.getCurrentInstance().getExternalContext().getResponse();
ActionResponseImpl res = (ActionResponseImpl) externalContext.getResponse();
// HttpServletResponseWrapper response = res.getRealResponse();
// response.setContentType("application/xls");
// response.setContentLength((int) reportFile.length());
// response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\";");
// log.info("Content-Disposition attachment; filename=\"" + filename + "\";");
// log.error("Content-Disposition attachment; filename=\"" + filename + "\";");
try
{
// ServletOutputStream os = response.getOutputStream();
ByteArrayOutputStream os = new ByteArrayOutputStream();
FileInputStream fis = new FileInputStream(reportFile);
while ((read = fis.read(bytes)) != -1)
{
os.write(bytes, 0, read);
}
fis.close();
//
// os.flush();
// os.close();
byte[] binaryData = os.toByteArray();
DocumentData data = new ByteArrayDocumentData("report",
new DocumentData.DocumentType("pdf", "application/pdf"),
binaryData);
String docId = documentStore.newId();
documentStore.saveData(docId, data);
String documentUrl =
documentStore.preferredUrlForContent(
data.getBaseName(),
data.getDocumentType().getExtension(),
docId);
FacesContext.getCurrentInstance().getExternalContext().redirect(
manager.encodeConversationId(documentUrl));
// FacesContext.getCurrentInstance().getExternalContext().redirect(reportFile.toURI().toString());
// FacesContext.getCurrentInstance().responseComplete();
// facesContext.responseComplete();
}
catch (Exception e)
{
if (log.isErrorEnabled())
{
log.error(DownloadComponent.class, e);
}
}
}
}
But the injections did not succed. I got:
org.jboss.seam.RequiredException: @In attribute requires non-null value: downloadComponent.#{org.jboss.seam.document.DocumentStore}
at org.jboss.seam.Component.getValueToInject(Component.java:2335)
I use PorteltBridge Version CR2 with SEAM jboss-seam-2.1.2.CR2
Any hints how to correct generate PDF an XLS Files and download them with correct filename and extension (.pdf and .xls) are welcome.
Kind regards
Günther Herndl
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254029#4254029
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254029
15 years, 4 months
[JNDI and Naming] - EJB 3 and JNDI error
by bouroy
hi,
I have deployed the EJB3 jar(having 1 stateless session EJB) in the EAR in JBOSS 5.1.0. The log file and the JNDI dump(from the JMX admin screen) show that the EJB has been deployed. But when I try to lookup the EJB from a java class I get the following exception,
| javax.naming.CannotProceedException; remaining name 'TestBean/remote'
| at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:43)
| at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:832)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
| at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
| at test.ejb3.TestApp..java:50)
|
My lookup code:
1. Spring config:
| <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
| <property name="environment">
| <props>
| <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
| <prop key="java.naming.provider.url">localhost</prop>
| <prop key="java.naming.factory.url.pkgs">org.jnp.interfaces:org.jboss.naming</prop>
| </props>
| </property>
| </bean>
|
2. The EJB 3 remote interface
| @Remote
| public interface Test {
| void test();
| }
|
3. The Stateless Session bean implementation
| public abstract TestParent implements Test {
| ....
| }
|
| @Stateless
| public TestBean extends TestParent {
| public void test() {
| System.out.println("Test");
| }
| }
|
|
4. EJB Session bean is deployed in an EAR file named: myear.ear
5. The TestApp.java
| ...
| public void doIt() {
| try {
| Test test = (Test)jndiTemplate.lookup("myear/TestBean/remote", Test.class);
| test.test();
| } catch (NamingException e) {
| e.printStackTrace();
| throw e;
| }
| }
|
What am i doing wrong?
Please any help will be appreciated.
bouroy
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253754#4253754
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253754
15 years, 4 months
[EJB] - JNDI Error EJB 3
by bouroy
hi,
I have deployed the EJB3 jar(having 1 stateless session EJB) in the EAR in JBOSS 5.1.0. The log file and the JNDI dump(from the JMX admin screen) show that the EJB has been deployed. But when I try to lookup the EJB from a java class I get the following exception,
| javax.naming.CannotProceedException; remaining name 'TestBean/remote'
| at javax.naming.spi.ContinuationContext.getTargetContext(ContinuationContext.java:43)
| at javax.naming.spi.NamingManager.getContinuationContext(NamingManager.java:770)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:832)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
| at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:153)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
| at test.ejb3.TestApp..java:50)
|
My lookup code:
1. Spring config:
| <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
| <property name="environment">
| <props>
| <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
| <prop key="java.naming.provider.url">localhost</prop>
| <prop key="java.naming.factory.url.pkgs">org.jnp.interfaces:org.jboss.naming</prop>
| </props>
| </property>
| </bean>
|
2. The EJB 3 remote interface
| @Remote
| public interface Test {
| void test();
| }
|
3. The Stateless Session bean implementation
| public abstract TestParent implements Test {
| ....
| }
|
| @Stateless
| public TestBean extends TestParent {
| public void test() {
| System.out.println("Test");
| }
| }
|
|
4. EJB Session bean is deployed in an EAR file named: myear.ear
5. The TestApp.java
| ...
| public void doIt() {
| try {
| Test test = (Test)jndiTemplate.lookup("myear/TestBean/remote", Test.class);
| test.test();
| } catch (NamingException e) {
| e.printStackTrace();
| throw e;
| }
| }
|
What am i doing wrong?
Please any help will be appreciated.
bouroy
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253753#4253753
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253753
15 years, 4 months