JBoss connection -- EJB3
I am implemented a entity bean and a session bean.
I am writing a client to test my session bean.
Also, I am using JBoss.
in my cleint class I am trying to connect to my database (local host) but I am having problems with JBoss connection.
I am using SQL server 2005. Any Help would be great so I can get this program to run.
When I start JBoss .. it says that SQL is not bound.
this is the error .. how can I fix that ..
Also, does this mean that I am missing some Jar files.
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:jar=Demo.jar,unitName=DemoPU
State: FAILED
Reason: javax.naming.NameNotFoundException: SQL not bound
I Depend On:
jboss.jca:service=DataSourceBinding,name=SQL
Depends On Me:
jboss.j2ee:jar=Demo.jar,name=CustomerBean,service=EJB3
jboss.j2ee:jar=Demo.jar,name=KBSessionBean,service=EJB3
Also this is the code I am trying to run..
public class Client {
/** Creates a new instance of Client */
public static void main(String[] args) throws Exception
Connection conn;
// Step 1: Load the JDBC driver.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
System.out.println("Driver Loaded.");
// Step 2: Establish the connection to the database.
String url = "jdbc:sqlserver://localhost:1433;database=jdocxpt";
conn = DriverManager.getConnection(url, "sa", "");
System.out.println("Got Connection.");
Context ctx = getInitialContext();
CustomerRemote c = (CustomerRemote) ctx.lookup("CustomerBean/remote");
TempCustomer first = new TempCustomer();
TempCustomer second = new TempCustomer();
first.setId(15);
first.setName("roro");
second.setId(9);
second.setName("jojo");
c.addCustomer(first);
c.addCustomer(second);
conn.close();
Thanks for your help in advance.
I don't think I totally understand what you are trying to do. If you are testing your session bean why do you get a database connection from your client isn't that the responsibility of the server side?
Anyway, to get JBoss to connect to a database you have to put your jdbc/connector driver in JBoss' server lib directory, (jboss/server/default/lib for example). Then you have to add a configuration file for your datasource in the deploy directory. Have a look here: http://www.onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html
I hope that is any help!
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> -
hi. i just upgraded from jboss 2.2.2 to jboss 2.4.1 and now all of my connection pools are shot.
here's my jboss.jcml:
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver</attribute>
<attribute name="Drivers">oracle.jdbc.driver.OracleDriver</attribute>
</mbean>
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=pcs/waseca/pcsread">
<attribute name="PoolName">pcs/waseca/pcsread</attribute>
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="URL">jdbc:oracle:thin:@ip:sigid</attribute>
<attribute name="JDBCUser">user</attribute>
<attribute name="Password">pass</attribute>
<attribute name="IdleTimeoutEnabled">true</attribute>
</mbean>
and here's the error:
[Configuration] at org.jboss.Main.main(Main.java:112)
[XADataSourceLoader] Starting
[XADataSourceLoader] Stopped
java.lang.ClassNotFoundException: org.opentools.minerva.jdbc.xa.wrapper.XADataSo
urceImpl
at javax.management.loading.MLet.findClass(MLet.java:800)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.jav
a:344)
at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
28)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(Conf
igurationService.java:836)
at $Proxy0.start(Unknown Source)
at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
28)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at org.jboss.Main.<init>(Main.java:210)
at org.jboss.Main$1.run(Main.java:116)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:112)
there's no documentation that the syntax has changed from 2.2.2 from 2.4.1, so what's up?sheesh. finally got an answer to this one.
documentation doesn't say it, but you have to use a different class in jboss.jcml
don't use this one:
org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
must use this class:
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
i hope this helps someone else out there! -
MySql with JBoss connection refused
hello,
I am using MYSql with JBOSS, but while running starting JBOSS it
gives
Connection refused error:
MySqlDB] at java.net.PlainSocketImpl.socketCon
MySqlDB] at java.net.PlainSocketImpl.doConnect
MySqlDB] at java.net.PlainSocketImpl.connectTo
MySqlDB] at java.net.PlainSocketImpl.connect(U
MySqlDB] at java.net.Socket.<init>(Unknown Sou
MySqlDB] at java.net.Socket.<init>(Unknown Sou
MySqlDB] at org.gjt.mm.mysql.MysqlIO.<init>(My
MySqlDB] at org.gjt.mm.mysql.jdbc2.IO.<init>(I
MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
159)
MySqlDB] at org.gjt.mm.mysql.Connection.connec
MySqlDB] at org.gjt.mm.mysql.jdbc2.Connection.
va:89)
MySqlDB] at org.gjt.mm.mysql.Driver.connect(Dr
MySqlDB] at java.sql.DriverManager.getConnecti
MySqlDB] at java.sql.DriverManager.getConnecti
MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
nnection(XADataSourceImpl.java:118)
MySqlDB] at org.opentools.minerva.jdbc.xa.wrap
nnection(XADataSourceImpl.java:151)
MySqlDB] at org.opentools.minerva.jdbc.xa.XACo
(XAConnectionFactory.java:246)
MySqlDB] at org.opentools.minerva.pool.ObjectP
ol.java:819)
MySqlDB] at org.opentools.minerva.pool.ObjectP
a:569)
MySqlDB] at org.opentools.minerva.pool.ObjectP
a:521)
MySqlDB] at org.opentools.minerva.jdbc.xa.XAPo
APoolDataSource.java:165)
MySqlDB] at org.jboss.jdbc.XADataSourceLoader.
der.java:330)
MySqlDB] at org.jboss.util.ServiceMBeanSupport
ava:93)
MySqlDB] at java.lang.reflect.Method.invoke(Na
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1628)
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1523)
MySqlDB] at org.jboss.util.ServiceControl.star
MySqlDB] at java.lang.reflect.Method.invoke(Na
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1628)
MySqlDB] at com.sun.management.jmx.MBeanServer
java:1523)
MySqlDB] at org.jboss.Main.<init>(Main.java:21
MySqlDB] at org.jboss.Main$1.run(Main.java:121
MySqlDB] at java.security.AccessController.doP
MySqlDB] at org.jboss.Main.main(Main.java:117)
I used the following tag in in JBOSS.jacml
<!-- MYSQL -->
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=MySqlDB">
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="PoolName">MySqlDB</attribute>
<attribute name="URL">jdbc:mysql://192.168.0.6/AccountingDb:3333</attribute>
<attribute name="Properties">DatabaseName=AccountingDb</attribute>
<attribute name="JDBCUser"></attribute>
<attribute name="Password"></attribute>
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">10</attribute>
<attribute name="GCEnabled">false</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
</mbean>
<!-- END MYSQL -->
and JDBC tag is
<!-- JDBC -->
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,com.pervasive.jdbc.v2.Driver,org.gjt.mm.mysql.Driver</attribute>
</mbean>
plz help me out
thanks
bhuwanI am just use that ...But it works...!!
MySQL is Runing good ...
the problem is that you must reset the defaultDS,
to be Mysql.
So,Jboss must have only one DefaultDS,
In My Setup...
1.standardjaws.xml
<?xml version="1.0" encoding="UTF-8"?>
<jaws>
<datasource>java:/mySQL</datasource>
2.jboss.jcml (must changed as followed)
<!-- JDBC -->
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
</mbean>
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL">
<attribute name="PoolName">mySQL</attribute>
<attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://localhost/j2ee</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">10</attribute>
<attribute name="Password" />
<attribute name="GCEnabled">false</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean> -
Which jboss Connection I should use? cluster jboss, one database
We use EJB in jboss cluster environment. We only have one oracle database.
our existed system use TXConnection(transactional connection) for the data insert, update and delete. Using the Connection for the data retriving.
I think TXConnection fits to use for the distributed database. So we should change our DAO layer to use only Connection.
Is that true?
Need help.
Thanks.
Jack TieHuh? Connection is an interface. You will have to use
any implementation anyway.It is not so simple. This is a legit question because he has asking if a specific implementation is required.
It would have been better posted in the JDBC forum. I don't know what the answer is for certain but I would lean towards yes it is required because of the clustered nature. -
I am trying to access a pooled connection through jndi,but i get the following exception
"javax.naming.NameNotFoundException java/MySQLDs not bound"
I'm using jboss 2.4.4 and jdk1.4.
My jboss.jcml file is like that
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
<attribute name="Database">eshopdb</attribute>
</mbean>
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL">
<attribute name="PoolName">mySQL</attribute>
<attribute name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://localhost/eshopdb</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">10</attribute>
<attribute name="Password" />
<attribute name="GCEnabled">false</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>
any help is welcome
thanksHi,
i have also been struggling with the same with Oracle9i as a data base.I have been trying
to configure with Jboss3.0.In that I am creating the oracle-service.xml which is like this :
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: hsqldb-service.xml,v 1.2 2002/04/14 04:31:56 d_jencks Exp $ -->
<server>
<!-- ==================================================================== -->
<!-- Oracle Data Source SetUp-->
<!-- ==================================================================== -->
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=OracleDS">
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=OracleDS">
<attribute name="JndiName">OracleDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc:oracle:[email protected]:1521:ORC1</config-property-value>
</config-property>
<config-property>
<config-property-name>DriverClass</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>oracle.jdbc.driver.OracleDriver</config-property-value>
</config-property>
<config-property>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>username</config-property-value>
</config-property>
<config-property>
<config-property-name>Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>mypassword</config-property-value>
</config-property>
</properties>
</attribute>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">
<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>
<!-- attribute name="SecurityDomainJndiName">java:/jaas/HsqlDbRealm</attribute -->
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>
Unfortunately the jboss forum is not avaiable from the last couple of weeks.....
What I can suggest you is to check the administrstion section and find whether the pool
service is started or not,for me it appears with the status Starting ,it should come as
started then the problem will get solved.
I also have downloaded the source of the jboss and am trying to understand the structure
of jboss,but finds it difficult.........
try http://localhost;8082/ from that you can go to jndilist and view button,there you check whether
your DataSource is started or starting.
Hope this gives you some idea......
regards vicky -
Hi
I am using Jboss AS ver -4.0.5.GA.
can anyone tell me how to make connection pool with mysql database.
thanks in advance.You do not have to worry about implementing a connection pool, as it has been taken care of by the application server itself, and works "under the covers".
What you can do is to eventually configure it by setting max and min pool size of the data source, if the defaults values do not suit your application. -
Hello,
I encountered some problems trying to use Mission Control with JBoss 4.2.3.GA (JDK 6).
JBoss and MC run on a Linux boxes with SLES11 and Ubuntu 10.04 and x86_64 architecture.
The JRockit Version is:
# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Oracle JRockit(R) (build R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-x86_64, compiled mode)
The JBoss server is just the standard installation with no custom applications deployed. I only added the following
settings to the startup file run.confI encountered some problems trying to use Mission Control with JBoss 4.2.3.GA (JDK 6).
JBoss and MC run on a Linux boxes with SLES11 and Ubuntu 10.04 and x86_64 architecture.
The JRockit Version is:
# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Oracle JRockit(R) (build R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-x86_64, compiled mode)
The JBoss server is just the standard installation with no custom applications deployed. I only added the following
settings to the startup file run.conf
-Xmanagement:ssl=false,authenticate=false,autodiscovery=true,port=1167
With this configuration everything works fine, I can use MemLeak and FlightRecorder.
Unfortunately I need another JBoss configuration change that makes JBoss use the platform MBean server instead
of its own server for its MBeans. The configuration line in run.conf is
-Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
With this configuration MC fails to connect to the VM running JBoss. When JBoss is started, the console log still contains the lines
[INFO ][mgmnt ] Remote JMX connector started at address <myhost>:1167
[INFO ][mgmnt ] Local JMX connector started
[INFO ][mgmnt ] JDP autodiscovery started at address 232.192.1.212:7095
but trying to start the Console leads to the following exception from MC:
Caused by: javax.management.InstanceNotFoundException: java.lang:type=Runtime is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:550)
The Runtime MBean is there and it is properly registered in the JBoss platform MBean server, as can be verified e.g. with
the JBoss JMX console. The MBean's attributes seam to be OK as well.
Does somebody know whether it is possible to use Mission Control together with JBoss? Besides the problem described above,
my JBoss application runs fine with JRockit VM.
Regards
Wolfgang -
JBoss 5 EJB3 MDB & Oracle AQ?
Has anyone had any success getting MDBs to work with Oracle AQ? Using oracleaq.rar I was able to receive some messages from Oracle AQ, but it wasn't reliable and the authors urge not use it.
We use JBoss 5.2.0 GA (community edition) and Oracle 11.1.0.7.
With oraclear.rar we managed to connect to the queue following instructions in this guide:
https://oracleaq.dev.java.net/userguide.html
However, main page for that project says: "Project cancelled. There are serious drawbacks and weaknesses when using this module.". There is also a link to an email which contains another adapter as attachment, but I'm afraid it's quite Glassfish specific.
So we are back to square one and there is really no code to share at the moment.
What I would like to see is an example JBoss MDB configuration, for example how to connect to an Oracle AQ queue called TEST_QUEUE in Oracle DB 127.0.0.1 scott/tiger. -
I'm maintaining a code wherein it uses JMS. I noticed that whenever a QueueConnectionFactory is invoked, a jndi lookup to the name "ConnectionFactory" is done.
Sample:
queueFactory_ = (QueueConnectionFactory)serviceLocator_.lookup("ConnectionFactory");
Question:
Where can I change that? So the next time around I can invoke a Connection factory with the name of "MyConnectionFactory".Use context.lookup("ConnectionFactory") or context.lookup("RMIConnectionFactory").
-
How to build and deploy EJB3.0 jar on JBoss Server
Hi:
I want to create web service using EJB3.0.
For that first i have created EJB project,in that i add following code:
package com.ejb;
import javax.ejb.Stateless;
import javax.jws.WebService;
@Stateless
@WebService
public class TemperatureConverter {
public double celsiusToFarenheit(double temp){
return ((temp*1.8) + 32);
public double farenheitToCelsius(double temp){
return ((temp-32)/1.8);
}Now i want to build and deploy the jar on server.
How can i do this?
Thank You.Hi AnupDesai,
I suggest you to have a read of the [*JBoss EJB3 Documentation*|http://www.jboss.org/ejb3/docs]. -
Configure UCP/FCF for oracle RAC 11g R2 in JBOSS
I am trying to configure UCP/FCF with Oracle RAC 11g R2.
Currently, I have configured oracle-ds.xml in Jboss in my deploy folder.
I have got this working using jboss connection pool
<xa-datasource>
<jndi-name>name1</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">
jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(address=(protocol=tcp)(host=sample1.oracle.com)(port=1521)))(connect_data=(service_name=ha1)))
</xa-datasource-property>
<xa-datasource-property name="User">dbo_9</xa-datasource-property>
<xa-datasource-property name="Password">dbo_9</xa-datasource-property>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<no-tx-separate-pools/>
<min-pool-size>100</min-pool-size>
<max-pool-size>100</max-pool-size>
<check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>
<new-connection-sql>SELECT 1 FROM DUAL</new-connection-sql>
</xa-datasource>
1. I have configured ONS on database server. (racnode1:6200,racnode2:6200)
2. I have copied ons.jar,ucp.jar,ojdbc6.jar in classpath.
Now, how do I enable UCP and configure FCF in jboss.
can anybody please help me?
Edited by: user10697869 on Dec 14, 2011 12:22 PMnot supported ..
-
Problema Crystal Reports and JBoss
Hi All!<br>
I'm developing a swing based that retrieves data from a JBoss connection and I need to add support for crystal reports.<br>
So here is my environment:<br>
Swing Application(JavaWEB using jnlp)(JAVA5)->Jboss 4.0.2->dataBase oracle or SQL Server.<br>
<br>
I can develop and run my report in report designer without any problem using JDBC(JNDI) connection, but when I open this <br>report in my application, if the JNDI Optional Name is not set, a connection box is opened and everything works fine.<br>
The problem occurs when I set JNDI Optional name to the jndi name of my connection(jdbc/FMSDataSource), and try to run the report I receive an error (UndeclaredThrowableException).<br>
<br>
I need to use JNDI connection because there are a lot of users that cannot connect directly to database.<br>
I can see in my JBoss logs that he received the JNDI connection to get the datasource and sucessfully created the proxy <br>classes, so the error seems to be in Crystal component!<br>
Someone can help me???<br>
<br>
To create the swing crystal interface, I'm using the java classes created by crystal plugin for eclipse.<br>
<br>
Here is the JBOSS Logs:<br>
19:47:42,679 DEBUG [WrapperDataSourceService] Created Connection proxy for invoker=jboss:service=invoker,type=jrmp, <br>targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=23801637
19:47:42,734 DEBUG [WrapperDataSourceService] Created DatabaseMetadata proxy for <br>invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=19017836<br>
19:47:42,761 DEBUG [WrapperDataSourceService] Created DatabaseMetadata proxy for <br>invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=19017836<br>
19:47:42,774 DEBUG [WrapperDataSourceService] Created DatabaseMetadata proxy for <br>invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=19017836<br>
19:47:42,786 DEBUG [WrapperDataSourceService] Created DatabaseMetadata proxy for <br>invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=19017836<br>
19:47:42,823 DEBUG [WrapperDataSourceService] Created DatabaseMetadata proxy for <br>invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=19017836<br>
19:47:46,088 DEBUG [WrapperDataSourceService] Created Statement proxy for invoker=jboss:service=invoker,type=jrmp, <br>targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=21097047
19:47:46,140 DEBUG [WrapperDataSourceService] Created ResultSet proxy for invoker=jboss:service=invoker,type=jrmp, <br>targetName=jboss.jca:service=DataSourceBinding,name=jdbc/FMSDataSource, cacheID=33408758
<br>
<br>
Here is the exception(in client):<br>
19:45:39,990 ERROR [JRCCommunicationAdapter] detected an exception: java.lang.reflect.UndeclaredThrowableException<br>
at $Proxy10.getStatement(Unknown Source)<br>
at com.crystaldecisions.reports.common.data.JdbcCrystalResultSet.getStatement(Unknown Source)<br>
at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCResultSet.close(Unknown Source)<br>
at com.crystaldecisions.reports.queryengine.ResultSetRecordReader.for(SourceFile:94)<br>
at com.crystaldecisions.reports.queryengine.Rowset.bK(SourceFile:584)<br>
at com.crystaldecisions.reports.queryengine.Rowset.zL(SourceFile:541)<br>
at com.crystaldecisions.reports.queryengine.RowsetBase.y9(SourceFile:119)<br>
at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1434)<br>
at com.crystaldecisions.reports.datalayer.a.do(SourceFile:1634)<br>
at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1404)<br>
at com.crystaldecisions.reports.dataengine.m.b(SourceFile:334)<br>
at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515)<br>
at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408)<br>
at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)<br>
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:114)<br>
at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:95)<br>
at com.crystaldecisions.reports.dataengine.j.case(SourceFile:1080)<br>
at com.crystaldecisions.reports.dataengine.h.<init>(SourceFile:108)<br>
at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:254)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4660)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4574)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2652)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2610)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.try(SourceFile:2282)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.int(SourceFile:2442)<br>
at com.crystaldecisions.reports.dataengine.DataProcessor2.I(SourceFile:1013)<br>
at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.fo(SourceFile:526)<br>
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.if(SourceFile:603)<br>
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(SourceFile:568)<br>
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.X(SourceFile:377)<br>
at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.moveToPageN(SourceFile:329)<br>
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:1090)<br>
at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.byte(SourceFile:218)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1909)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)<br>
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)<br>
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)<br>
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)<br>
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)<br>
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)<br>
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)<br>
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)<br>
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)<br>
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)<br>
at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(SourceFile:767)<br>
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(SourceFile:324)<br>
at com.businessobjects.crystalreports.viewer.core.rs.RSRecordSource.openInputStream(Unknown Source)<br>
at com.businessobjects.crystalreports.viewer.core.TSLVReader.a(Unknown Source)<br>
at com.businessobjects.crystalreports.viewer.core.TSLVReader.run(Unknown Source)<br>
at java.lang.Thread.run(Thread.java:595)<br>
<br>You would want to look at the Crystal Reports for Eclipse product which is a pure java solution. You can find more information on it [here|http://www.sdn.sap.com/irj/sdn/crystalreports-java]
-
JBoss/Hibernate/InstantClient/RAC
Hi,
First, I have no experience with RAC. I have RAC on two machines with one storage and want to use with load balancing and TAF. On next machine I have JBoss AS where I connect to Oracle via Hibernate whith thin client. All connection data I have in hibernate.cfg.xml file, where I point one database form RAC. I don't have full client on JBoss' host. Is it correct configuration? I saw, when full client is installed in tnsname.ora one sid points two hosts.
Thanx, JacekHere is stack trace: LocalManagedConnectionFactory.createManagedConnection crashes at line 160.
We believe that the problem is in hotdeployment: JBoss does not manage to undeploy the application and connections and that is why hotdeployment fails when Hibernate asks for a connection from JBoss connection manager. I use jTDS driver, but problems occur with MS JDBC Driver too.
09:15:50,995 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.lang.RuntimeException: No message resource found for message property prop.servertype)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:160)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:477)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:213)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:122)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72) -
No stack trace outpu on eclipse-jboss project
Good moring. I am facing a problem and after a few days of googling ia haven't found a solution so I am posting it here.
The problem is this.
We have a web portal built on jboss, seam, ejb3, jsf etc. The previous developer sent me an eclipse project folder, so I could work on the project. When I set it up, I have to change some classpath references (different jboss and jre version) and thats all.
But when i run the project and something wrong happens, there is no stack trace so I can locate the problem and fix it. I have built some other test projects and there is no problem.
So the question is: Is there any specific adjustment that could suppress the stack trace output? And how could I trim it?
Thanks.I would advise against reverting to very old versions just because you can't get the new versions to work. Try to read the installation instructions and manuals of the new versions and try to get those to work.
Maybe you are looking for
-
Need help in Report From SQL Query
Hi All, I am facing a problem with a report. I need your help. I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs
-
Install of apps 11.5.8 on Windows - Problems with PreReqs
Hello all, I've worked with Oracle database server for years, and installed it many times. I want to learn Oracle apps, and I'm attempting the install of 11.5.8 on Windows from the CDs. But I'm having some problems with the pre requisites. Unlike LIn
-
Error in generated init. package ZPAK_D4ZS8T2V8VZ4CT0S0O4742SEN for DSO ZDA
Hi all, i trying to load data from crm to bi i found that data are loaded sucussfully but if i open the requst in rsmo in details i found there is some red traffic led is on with that i found the below erroe Error in generated init. package ZPAK
-
TS4006 how can i find my stolen imac i do have cloud id
how can i find my stolen imac ? i do have cloud id.
-
I have the advanced calling on my galaxy note 4 but am not sure on how to use it or who I can call I watched video's that show me but it doesn't work please help!