JBoss TxConnectionManager problem
Hi!
I'm trying the latest version of Kodo (as a JCA connector) with JBoss 3.2.x,
but the following error occurs:
17:56:36,168 INFO [TxConnectionManager] Could not enlist XAResource!
javax.transaction.RollbackException: Already marked for rollback
at
org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:588)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
at
org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
Any ideas?
Claudio-
Could you post the complete stack trace, as well as your Kodo
configuration, details about the JDBC drivers you are using, and
information about when the error occurs (e.g., during the commit
process)?
In article <c9kuho$149$[email protected]>, Claudio Tasso wrote:
Hi!
I'm trying the latest version of Kodo (as a JCA connector) with JBoss 3.2.x,
but the following error occurs:
17:56:36,168 INFO [TxConnectionManager] Could not enlist XAResource!
javax.transaction.RollbackException: Already marked for rollback
at
org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:588)
at
org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
at
org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
Any ideas?--
Marc Prud'hommeaux
SolarMetric Inc.
Similar Messages
-
Mysql, Jboss connecting problem
Hello,
I am having problem with mysql database. I am trying to run AccountEJB application from SUN with mysql as my backend.
PLEASE DO NOT FORGET I AM NOT EXPERT IN JBOSS OR EJB BUT I AM TRYING TO LEAN WITH A EXAMPLE.
HERE IS MY SETUP UP TO THIS POINT.
I am running jboss-3.03.0_tomcat-4.0.3
I am including
1. AccountBean
2. ejb-jar.xml
3. web.xml
4. jboss.xml
6. mysql-service.xml ( I add my database name, username, password and i copy it to ..server/default/deploy dir.)
I only modified mysql-service.xml. Do i have to modify any other jboss files. Some people are saying i have to modify "standardjaws.xml, standardjbosscmp.xml"
My AccountBean code is
Please take a look at "setEntityContext" and "makeConnection" that is where problem comes.
Here is the error
10:43:19,950 INFO [Engine] AccountServlet: init
10:43:19,950 INFO [STDOUT] AccountServlet: init()
10:43:20,101 INFO [STDOUT] Got context
10:43:20,311 INFO [STDOUT] Got referance
10:43:20,371 INFO [STDOUT] Got referance to home object
10:43:20,501 INFO [STDOUT] setEntityContext call....
10:43:20,501 INFO [STDOUT] makeConnection call...
10:43:20,501 INFO [STDOUT] Something went wrong within makeConnction call ....
javax.naming.NameNotFoundException: MySqlDS not bound
10:43:20,501 INFO [STDOUT] Came back from makeConnction call ...
10:43:20,501 INFO [STDOUT] ejbCreate call
10:43:20,501 INFO [STDOUT] insertRow call...
10:43:20,511 ERROR [STDERR] Caught an exception.
10:43:20,511 ERROR [STDERR] java.rmi.ServerException: ejbCreate: null; nested ex
ception is:
javax.ejb.EJBException: ejbCreate: null
package com.ps.impl;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import java.sql.*;
import javax.sql.*;
import javax.ejb.*;
import javax.naming.*;
import java.util.*;
import java.rmi.*;
public class AccountBean implements EntityBean
private EntityContext context;
private String id;
private String firstName;
private String lastName;
private double balance;
private Connection con;
//private String dbName = "java:/MySqlDS";
public void debit (double amount)
if (balance - amount < 0)
else
balance = balance - amount;
public void credit (double amount)
balance = balance + amount;
public String getFirstName()
return firstName;
public String getLastName()
return lastName;
public double getBalance()
return balance;
public String ejbCreate(String id, String firstName, String lastName, double balance)
throws CreateException
System.out.println("ejbCreate call");
if (balance < 0.00) {
throw new CreateException
("A negative initial balance is not allowed.");
try {
insertRow(id, firstName, lastName, balance);
} catch (Exception ex) {
throw new EJBException("ejbCreate: " +
ex.getMessage());
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.balance = balance;
return id;
public void ejbPostCreate(String id, String firstname, String lastname, double blance)
public String ejbFindByPrimaryKey(String primaryKey)
throws FinderException
System.out.println("ejbFindPrimaryKey call...");
boolean result;
try {
result = selectByPrimaryKey(primaryKey);
} catch (Exception ex) {
throw new EJBException("ejbFindByPrimaryKey: " +
ex.getMessage());
if (result) {
return primaryKey;
else {
throw new ObjectNotFoundException
("Row for id " + primaryKey + " not found.");
public Collection ejbFindByLastName(String lastName)
throws FinderException
System.out.println("ejbFindByLastName call...");
Collection result;
try {
result = selectByLastName(lastName);
} catch (Exception ex) {
throw new EJBException("ejbFindByLastName " +
ex.getMessage());
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
else {
return result;
public Collection ejbFindInRange(double low, double high)
throws FinderException
System.out.println("ejbFindRange call ....");
Collection result;
try {
result = selectInRange(low, high);
} catch (Exception ex) {
throw new EJBException("ejbFindInRange: " +
ex.getMessage());
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
else {
return result;
public void ejbActivate()
System.out.println("ejbActivate call ...");
id = (String)context.getPrimaryKey();
public void ejbLoad()
System.out.println("ejbLoad call ...");
try {
loadRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
public void ejbPassivate()
id = null;
public void ejbRemove()
System.out.println("ebjRemove call ...");
try {
deleteRow(id);
} catch (Exception ex) {
throw new EJBException("ejbRemove: " +
ex.getMessage());
public void ejbStore()
System.out.println("ejbStore call ...");
try {
storeRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
public void setEntityContext(EntityContext context)
this.context = context;
System.out.println("setEntityContext call....");
try {
makeConnection();
System.out.println("Came back from makeConnction call ...");
} catch (Exception ex) {
throw new EJBException("Unable to connect to database " +
ex.getMessage());
public void unsetEntityContext()
System.out.println("unsetEntityContext call ...");
try {
con.close();
} catch (SQLException ex) {
throw new EJBException("unsetEntityContext: " + ex.getMessage());
/*********************** Database Routines *************************/
private void makeConnection() throws NamingException, SQLException
System.out.println("makeConnection call...");
try
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:/MySqlDS");
con = ds.getConnection();
catch (Exception ex)
System.out.println("Something went wrong within makeConnction call .... " + ex);
private void insertRow (String id, String firstName, String lastName,
double balance) throws SQLException {
System.out.println("insertRow call...");
String insertStatement =
"insert into account values ( ? , ? , ? , ? )";
PreparedStatement prepStmt =
con.prepareStatement(insertStatement);
prepStmt.setString(1, id);
prepStmt.setString(2, firstName);
prepStmt.setString(3, lastName);
prepStmt.setDouble(4, balance);
prepStmt.executeUpdate();
prepStmt.close();
private void deleteRow(String id) throws SQLException {
System.out.println("deleteRow call ...");
String deleteStatement =
"delete from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(deleteStatement);
prepStmt.setString(1, id);
prepStmt.executeUpdate();
prepStmt.close();
private boolean selectByPrimaryKey(String primaryKey)
throws SQLException {
System.out.println("selectByPrimaryKey call...");
String selectStatement =
"select id " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, primaryKey);
ResultSet rs = prepStmt.executeQuery();
boolean result = rs.next();
prepStmt.close();
return result;
private Collection selectByLastName(String lastName)
throws SQLException {
System.out.println("selectByLastName call...");
String selectStatement =
"select id " +
"from account where lastname = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, lastName);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
prepStmt.close();
return a;
private Collection selectInRange(double low, double high)
throws SQLException {
System.out.println("selectInRange call ....");
String selectStatement =
"select id from account " +
"where balance between ? and ?";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setDouble(1, low);
prepStmt.setDouble(2, high);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
prepStmt.close();
return a;
private void loadRow() throws SQLException {
System.out.println("loadRow call ....");
String selectStatement =
"select firstname, lastname, balance " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, this.id);
ResultSet rs = prepStmt.executeQuery();
if (rs.next()) {
this.firstName = rs.getString(1);
this.lastName = rs.getString(2);
this.balance = rs.getDouble(3);
prepStmt.close();
else {
prepStmt.close();
throw new NoSuchEntityException("Row for id " + id +
" not found in database.");
private void storeRow() throws SQLException {
System.out.println("storeRow call ...");
String updateStatement =
"update account set firstname = ? ," +
"lastname = ? , balance = ? " +
"where id = ?";
PreparedStatement prepStmt =
con.prepareStatement(updateStatement);
prepStmt.setString(1, firstName);
prepStmt.setString(2, lastName);
prepStmt.setDouble(3, balance);
prepStmt.setString(4, id);
int rowCount = prepStmt.executeUpdate();
prepStmt.close();
if (rowCount == 0) {
throw new EJBException("Storing row for id " + id + " failed.");
2. ejb-jar.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<description>Entity Bean ( BMP )</description>
<display-name>Account</display-name>
<ejb-name>Account</ejb-name>
<home>com.ps.AccountHome</home>
<remote>com.ps.Account</remote>
<ejb-class>com.ps.impl.AccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>
3. web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>AccountServlet</servlet-name>
<servlet-class>com.ps.AccountServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AccountServlet</servlet-name>
<url-pattern>/accountservlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
4. jboss.xml (i am not sure this is righ maybe this is the problem)
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
<jboss>
<resource-managers>
<resource-manager res-class="">
<res-name>MySqlDS</res-name>
<res-jndi-name>java:/MySqlDS</res-jndi-name>
</resource-manager>
</resource-managers>
</jboss>
5. mysql-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<server>
<!-- ==================================================================== -->
<!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- ==================================================================== -->
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=MySqlDS">
<!-- Include a login module configuration named MySqlDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>
NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--uncomment out this line if you are using the MySqlDbRealm above
<attribute name="SecurityDomainJndiName">MySqlDbRealm</attribute>
-->
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=MySqlDS">
<attribute name="JndiName">MySqlDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/pac</config-property>
<config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">t100</config-property>
<config-property name="Password" type="java.lang.String">t200</config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=MySqlDS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>In /JBoss/server/default/conf/standardjaws.xml.
Set
<datasource>java:/mySqlDS</datasource>
<type-mapping>mySql</type-mapping>
In /JBoss/server/default/conf/standardjbosscmp-jdbc.xml.
Set
<defaults>
<datasource>java:/mySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping></defaults> -
JBoss install problem - nothing is installed
Hello,
I have installed aur/jboss package
aur/jboss 5.1.0.GA-1 [installed] (53)
JBoss Application Server
But there is no /opt/jboss directory, no service added, nothing. When I try to uninstall it, it says:
Packages (1): jboss-5.1.0.GA-1
Total Removed Size: 0,00 MiB
zip file with jboss is installed correctly, all additional files (build, service..) are too.
What is the problem with this process ?Moving to AUR Issues...
-
Hi all,
Although Log4J is not exactly about Java, but it is kind of related, so please don't mind me posting this message.
I am having problems stoping JBoss from reloading the log4j.properties file. Is there anyway to stop it from polling the log4j.properties file every now and then..
Thx for your help
KevinLook at ${JBOSS_HOME}/server/default/jboss-service.xml. It has a section with the following code:
<mbean code="org.jboss.logging.Log4jService"
name="jboss.system:type=Log4jService,service=Logging">
<attribute name="ConfigurationURL">resource:log4j.xml</attribute>
<attribute name="Log4jQuietMode">true</attribute>
<!-- How frequently in seconds the ConfigurationURL is checked for changes -->
<attribute name="RefreshPeriod">60</attribute>
</mbean>You could try setting the refresh periode to 0, but I don't know to what kind of behaviour that will result in. -
Hi all
i am using jboss - UsernamepasswordLoginModule for username and password authentication. I want to know the way to restrict users after 3 bad logins.
if user uses wrong password for three times successively then something should happen like he should not be able to login for next 30 minutes.
It can be done in weblogic, but how to do it in jboss?
thanx in advance.thanx but its not specified thereDid you read this part?:
How do I configure security with JBoss ?
JBoss uses JAAS for security. JBoss includes several JAAS login modules allowing applications to get their user info from LDAP servers, databases or property files (the last to simplify testing). There are also login modules for clients, so that they can send security information to the JBoss server. Note that an application that logs into JBoss must use JAAS to give user name and password. It is not possible to use the JNDI lookup information for that in JBoss. How to configure this is shown in chapter 8 of the free getting started guide.
Did you check the "getting started guide"?
Did you familiarize yourself with JAAS?
Did you implement/configure a login module?
Did you have a specific problem with the login module (errors, etc.)?
Did you post this question at the JBoss Forum?
Did you get an answer?
Did you try anything at all about which you can post the details?
Are you getting my point? -
I am connecting to JBoss application server from a signed applet,
my code is like this
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory" ) ;
env.put("java.naming.provider.url", "SERVER_NAME") ;
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces" ) ;
env.put("java.naming.security.principal", CBGlobals.USER_NAME);
env.put("java.naming.security.credentials", CBGlobals.PASSWORD);
Context ic = new InitialContext (env);
now it gives me an error message
java.lang.ExceptionInInitializerError
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at ChrBrowser.ChrBrowser.connectToServer(ChrBrowser.java:609)
at ChrBrowser.ChrBrowser.<init>(ChrBrowser.java:127)
at ChrBrowser.CBMain.init(CBMain.java:111)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any hits or help will be cordially appreciated
Renjith.thanks,
I used the same link
the problem occured becase i didnt sign jbossclient.jar with the same key with which other required jar files are signed -
I have try to deploy my ADF application project to Jboss application server 4.2.2 and 5.0.1 and I have the same problem, when i add jboss in jdevelopper and i want to deploy my
project to jboss this message will appear :
Presentation not available: JSR-88, Interface: javax.enterprise.deploy.spi.DeploymentManager
someone can help me!!!!.Hi!
I have the same problem, when I try to deploy to Tomcat. Does any one have a solution to this problem, or a work around for deploying an application to a tomcat server.
Br
Casper -
E:\jboss\jboss-4.0.5.GA\bin>run -c spend
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: E:\jboss\jboss-4.0.5.GA\bin\\..
JAVA: C:\Program Files\java\jsdk1.4\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.g
cInterval=3600000
CLASSPATH: C:\Program Files\java\jsdk1.4\lib\tools.jar;E:\jboss\jboss-4.0.5.GA\bin\\run.jar;E:\jboss\jboss-4.0.5.GA\server\
spend\deploy;E:\jboss\jboss-4.0.5.GA\server\spend\conf;E:\jboss\jboss-4.0.5.GA\server\spend\conf\config;
===============================================================================
log4j:ERROR Could not instantiate class [org.apache.log4j.xml.DOMConfigurator].
java.lang.ClassNotFoundException: org.apache.log4j.xml.DOMConfigurator
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:449)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:77)
at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:338)
at org.jboss.logging.Logger.<init>(Logger.java:96)
at org.jboss.logging.Logger.getLogger(Logger.java:309)
at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:166)
at org.jboss.system.server.ServerImpl.init(ServerImpl.java:147)
at org.jboss.Main.boot(Main.java:197)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:536)
log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
log4j:WARN No appenders could be found for logger (org.jboss.system.server.Server).
log4j:WARN Please initialize the log4j system properly.
please can any body tell me how to solve this problemProblems like this don't cease to amaze me.
We are in the year of 2009 and this problem is most probably caused because jboss is started from a path which contains one or more space.
Try move your jboss installation or eclipse installation (i am not familiar how jboss in installed inside eclipse) to a folder with no spaces and the problem should go away.
It is sad that nice software like jboss has stupid bugs like this. Oh and it migh not be jboss but the JVM. It is silly in any case... -
JMS - MDB, jboss deployment problem
Hi everybody,
I'm new to JMS/MDB and have following problem while deploying MDB under JBOSS:
22:58:47,735 INFO [EjbModule] Deploying MyPublisher
22:58:47,745 INFO [EjbModule] Deploying topicMessageBean
22:58:47,795 WARN [StatelessSessionContainer] message-destination 'PhysicalTopic' has no jndi-name in jboss.xml
22:58:47,845 INFO [ProxyFactory] Bound EJB Home 'MyPublisher' to jndi 'ejb/MyEj
bReference'
22:58:47,865 INFO [EJBDeployer] Deployed: file:/D:/DownLoads/ejb/JBoss/jboss-4.
0.3/jboss-4.0.3/server/default/deploy/simplemessage.jar
jboss.xml
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>topicMessageBean</ejb-name>
<destination-jndi-name>topic/MyMDBTopic</destination-jndi-name>
<mdb-connection-factory>
<jndi-name>jms/MyTopicConnectionFactory</jndi-name>
</mdb-connection-factory>
</message-driven>
<message-destination>
<message-destination-name>PhysicalTopic</message-destination-name>
<jndi-name>topic/MyMDBTopic</jndi-name>
</message-destination>
<session>
<ejb-name>MyPublisher</ejb-name>
<jndi-name>ejb/MyEjbReference</jndi-name>
<resource-ref>
<res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
<jndi-name>jms/TopicConnectionFactory</jndi-name>
<default-resource-principal>
<name>guest</name>
<password>guest</password>
</default-resource-principal>
</resource-ref>
</session>
</enterprise-beans>
</jboss>
ejb-jar.xml
<ejb-jar>
<display-name>MessageJAR</display-name>
<enterprise-beans>
<message-driven>
<display-name>Topic Message Bean</display-name>
<ejb-name>topicMessageBean</ejb-name>
<ejb-class>MessageBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<message-selector></message-selector>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<message-destination-link>PhysicalTopic</message-destination-link>
</message-driven-destination>
<activation-config>
<activation-config-property>
<activation-config-property-name>messageSelector</activation-config-property-name>
<activation-config-property-value>NewsType = 'Sports' OR NewsType = 'Opinion'</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>subscriptionDurability</activation-config-property-name>
<activation-config-property-value>NonDurable</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
<session>
<display-name>MyPublisher</display-name>
<ejb-name>MyPublisher</ejb-name>
<home>PublisherHome</home>
<remote>Publisher</remote>
<ejb-class>PublisherBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<message-destination-ref>
<!--message-destination-ref-name>topic/TopicName</message-destination-ref-name-->
<message-destination-ref-name>topic/MyMDBTopic</message-destination-ref-name>
<message-destination-type>javax.jms.Topic</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>PhysicalTopic</message-destination-link>
</message-destination-ref>
<security-identity>
<use-caller-identity/>
</security-identity>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>topicMessageBean</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>MyPublisher</ejb-name>
<method-intf>Remote</method-intf>
<method-name>publishNews</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<message-destination>
<message-destination-name>PhysicalTopic</message-destination-name>
</message-destination>
</assembly-descriptor>
</ejb-jar>
can somebody help???
ZahidHi,
if possible, try with "max-bean-in-free-pool=1".
note: it would be performance impact, as there would be single bean instance.
Thanks,
Qumar Hussain -
I created a ear file wich contains a jar and war file. The jar contains an entity and session bean. The war file contains my junitee test case.
When I deploy the file I can surf to the url and my test goes fine. When I move the file from the deploy dir to someplace else (jboss starts undeploying) and move it back couple seconds later (jboss deploys again) I get this error while doing the same test again:
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293) ...........
The error appears at the line where I try to narrow cast the object to my home interface.
When I restard jboss , the test runs fine again.
Anyone ideas ?When I move the file from the deploy dir to someplace else (jboss starts undeploying) and move it back couple seconds later (jboss deploys again)
This feature is called hot redeploy, the deploy directory is a place where you keep the files you want to deploy on the server. Whenever there are any changes in this directory .. moving files etc, the JBoss redeploys the new files, or undeploys the files removed from that place.
This is needed, because practically the servers are supposed to be up all the time, so if you need to make any updates etc, you could just paste the new files(or new versions) and they are redeployed.
I get this error while doing the same test again
When I restard jboss , the test runs fine again
This is happening because your test case is typically looking at the old version of your beans. But then why are you moving the files ... testing ? or do u really need to do that ?
If you are changing some implementation, just redploy the bean class and leave the interfaces like that. You should be fine
Regards
Meka Toka -
I am not sure if this issue belongs to this forum. If not, please let me know and I will post it in the appropriate forum.
My application has clustered remote SLSBs with "FirstAvaliable" policy.
The BMP Entity Beans are set for cache invalidation as they exist at local level only. They is no clustering of entity beans.
I am using Commit Option A.
I want cache to invalidate bean on all nodes except the node it was accessed from.
Here the cache is being cleared even on the node it was last accessed from.
I executed a business method on the same node (due to FirstAvailable) and here is the list of methods encountered.
setEntityContext
ejbFindByPrimaryKey
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
My expectation is that second and third time, in addition to my business method, only ejbLoad and ejbStore should be executed.
After info from guides and forum topics, I have configured as under :
cluster-service.xml
============
I am using the default behaviour of JBoss-Cluster based bridge
jboss.cache:service=InvalidationManager
${jboss.partition.name:DefaultPartition}
DefaultJGBridge
jboss:service=${jboss.partition.name:DefaultPartition}
jboss.cache:service=InvalidationManager
standardjboss.xml
============
Container Configuration is defined as under : (Commit Option is A)
<container-configuration>
<container-name>Standard BMP 2.x EntityBean with cache invalidation</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>false</insert-after-ejb-post-create>
<container-interceptors>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
org.jboss.ejb.plugins.LogInterceptor
org.jboss.ejb.plugins.SecurityInterceptor
org.jboss.ejb.plugins.TxInterceptorCMT
org.jboss.ejb.plugins.EntityCreationInterceptor
org.jboss.ejb.plugins.EntityLockInterceptor
org.jboss.ejb.plugins.EntityInstanceInterceptor
org.jboss.ejb.plugins.EntityReentranceInterceptor
org.jboss.resource.connectionmanager.CachedConnectionInterceptor
org.jboss.ejb.plugins.EntitySynchronizationInterceptor
org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
<instance-cache>org.jboss.ejb.plugins.InvalidableEntityInstanceCache</instance-cache>
<persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000000</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
100
</container-pool-conf>
<commit-option>A</commit-option>
</container-configuration>
jboss.xml
======
<?xml version="1.0"?>
<security-domain>java:/jaas/defaultLdap</security-domain>
<enterprise-beans>
<ejb-name>ejb/ApplicationService</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
True
<cluster-config>
<home-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</home-load-balance-policy>
<bean-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</bean-load-balance-policy>
</cluster-config>
<ejb-name>ejb/ApplicationEntity</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
<configuration-name>Standard BMP 2.x EntityBean with cache invalidation</configuration-name>
<cache-invalidation>True</cache-invalidation>
cache-invalidation.xml (No Change)
==============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- $Id: cache-invalidation-service.xml,v 1.4 2003/08/27 04:31:54 patriot1burke Exp $ -->
<!-- ===================================================================== -->
<!-- -->
<!-- Cache Invalidation Service -->
<!-- -->
<!-- ===================================================================== -->
<!--
Uncomment if you want to activate the cache invalidation mechanism accross
nodes using the JMS bridge
PropagationMode can be : IN_OUT = 1, IN_ONLY = 2, OUT_ONLY = 3
You can also set the ProviderUrl attribute to another IP:port setting if you
must lookup your JMS information in other JMS trees i.e.
MyOtherNode:1099
-->
<!--
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
jboss.cache:service=InvalidationManager
jboss.mq.destination:service=Topic,name=JMSCacheInvalidationBridge
jboss.cache:service=InvalidationManager
java:/ConnectionFactory
topic/JMSCacheInvalidationBridge
1
-->
Thanks.hi ,
In this scenario u can use the load balancer instead of fail over clustering .
I would suggest u to create apache proxy for redirect the request for many jboss instance.
Rgds
kathir -
I get a classNotFound in my ejb session class when calling web application class.
The following is my structures:
+harvester.ear
---ejb.harvester.jar
--------Session.class
--------Object.class
--------Home.class
--------Manifest.mf ****
--------ejb-jar.xml
--------jboss.xml
---Manifest.mf
---harvester.war
--------WEB-INF/lib/harvester.jar
---application.xml
In the Manifest.mf file labeled with *** I have the following entry:
Class-Path: WEB-INF/lib/harvester.jar
So from my Session.class I try to call a class located in harvester.jar. I deploy the application and I get an ClassNotFoundException in the Session.class when trying to call a class in harvester.jar
Did I specify an incorrect class-path in the manifest? ...
ThanksI would package your app this way:
+harvester.ear
---lib/harvester.jar
---ejb.harvester.jar
---harvester.war
in this case no entry in manifest is required...
--lukas -
Hi,
I have now used a fair amount of time debugging, but am not able to find out what causes this problem. I am getting the old "No managed connection available within blocking timeout" error. The thing is that I have set up minimum of 5 and maximum of 30 connections in oracle-ds.xml. I am using oracle. When I check in TOAD(app. development environment for oracle) it shows that almost all of my connections' state is inactive. I was thinking this would mean that I do not close a connection somewhere. I have now gone through all SQLs that have inactive state and I it seems like I am closing all of them. ALso tried to
<track-statements>true</track-statements> in that xml. It reports all result sets that have not been closed. However, I found one place where I try to close connection before preparedstatement. I have changed that but still getting the same error after a while.
Checking in jmx-console did not help. The thing is that I do not know what configuration parameter I am looking for. Mostly the Mbean ( ManagedConnectionPool) has the parameters from oracle-ds.xml.
Any tips would be appreciated.
Thanks in advance.
-Canyone?
-
I am receiving an error when I try to get the JBoss Getting Started Guide for 3.2.x (PDF), located at http://www.jboss.org/docs/index
Is anyone else receiving this error?
Just wondering if it is me.
TIAAny e-mail addresses I post are patently false. But I thank you, anyway :).
Perhaps it is the company proxy server.
Thanks for the help , tout le monde. -
I am running with the latest version of JBoss. I have tried to deployee the generated
.war file as per the instruction listed on this forum. When I start JBoss with
the run command I get the following error. What could be the cause of this?
11:34:23,535 WARN [Tomcat5] Failed to parse descriptors for war(file:/C:/jboss-
4.0.2/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml;
- nested throwable: (org.jboss.deployment.DeploymentException: resource-ref jdb
c/localOracleDatabase found in jboss-web.xml but not in web.xml)
at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer
.java:689)
at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:328
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:848)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
The jboss-web.xml is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 2.3V2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<jndi-name>java:/DefaultDS</jndi-name>
</resource-ref>
</jboss-web>
The applicable part of the web.xml is as follows:
<resource-ref>
<description>Rave generated DataSource Reference</description>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
This all runs fine in the sun app server.Good afternoon,
Dongmei's article (http://wiki.java.net/bin/view/Javatools/UsingEJBsDeployedInJBoss) is very helpful. However, our goal is to deploy both the EJB and the .war file in the JBoss server. Could somebody tell me how to deploy both the EJB and the .war file in a JBoss Application Server? I tried deploying the EJB and the .war file separately, or wrapping both in a .ear file, but I still did not get it.
Thank you very much in advance.
Daniel
Maybe you are looking for
-
Can i return my I phone 5 to apple because the color at the edges are gone already after 2 month?
-
RH 7 - How can I get .swf movies to work inside CHM output on Windows 7
Hi RHelpers, I'm using RoboHelp Html (RH 7, latest patch) on my Win 7 64-bit machine to provide a HtmlHelp (CHM) output. Now that we're close to releasing, I've been doing some testing, and I've noticed that my SWF movie files do not play inside of W
-
Deleting failed request from DSO leading to delete of INIT of DSO to Cube
data flows from ds1, ds2 and ds3 to dso1 as delta. the data is then taken from dso1 to cube1 via delta data flows from ds3 to dso2 as delta. the data is then taken from dso2 to cube 2 via delta. when a data is loaded from ds1 or ds2 or ds3 to dso1..
-
AccessControlException -- Where is it looking for my file?
I developed part of my program using WebGain, but at my house I'm using NetBeans. My program (which consists of three .java class files) is using a FileReader to read in a file called "courses.txt". Example code: BufferedReader inStream = new Buffere
-
PSE8 for Mac. Where is the slide show option in the Mac version?
I just watched an Adobe TV video on how to do a slide show in PSE8, but when I go to my CREATE tab, the only slide show option is "PDF Slide Show" and when I click it, it bounces me back to Adobe Bridge and gives me a very limited set of Playback opt