[jboss-user] [JCA/JBoss] - java.sql.SQLException: The statement is closed.

2007-12-20 Thread paulpark
I'm getting a java.sql.SQLException: The statement is closed. error in Jboss. 
Do you notice any problem in the code or config file?

server.log:

2007-12-20 18:00:08,025 TRACE 
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning 
connection to pool org.jboss.resource.connectionman
[EMAIL PROTECTED] [EMAIL PROTECTED] handles=0 l
astUse=1198191608025 permit=false trackByTx=false [EMAIL PROTECTED] 
context=org.jboss.resou
[EMAIL PROTECTED] [EMAIL PROTECTED] txSy
nc=null] [InUse/Available/Max]: [6/88/100]
2007-12-20 18:00:08,041 INFO  [STDOUT] Exception in processReading 
java.sql.SQLException: The statement is closed.
2007-12-20 18:00:08,041 INFO  [STDOUT] Test 6

oracle-ds.xml:

  
OracleDS
false
jdbc:oracle:thin:@ldcdevl:1521:
oracle.jdbc.driver.OracleDriver
x
x
10
100
200
0
5
30
true

 Oracle9i

  




public class BillingResponseDAO {
private DBConnection dbCon = null;
private List billingReadList = new ArrayList();
private BillingRead billingRead = null;
private com.th.commonUtil.intface.Context ctx = null;
public String premCode = null;
public String servNum = null;

public static final String billingResponseString = 
"INSERT INTO UXBSRRS values (?,?,?,?,?,?,?,SYSDATE,USER)";
public static final String billingResponseDetailString = 
"INSERT INTO UXRSRRS values (?,?,?,?,?)";

AppContext appCtxt = null;

public BillingResponseDAO() {
}

public BillingResponseDAO(String test) {
}

public

void init(Context ctx) {
System.out.println("Inside BillingResponseDAO 1");
try {
dbCon = ctx.getDBConMDB();
dbCon.getConnectionMDB();
} catch (Exception e) {
System.out.println("Exception in BillingResponseDAO init" + e);
}
}


public void processReading(BillingResponse bResponse) throws Exception {

PreparedStatement stmt = null;
PreparedStatement stmt1 = null;
String premCodeLocal = null;
String noData = null;
String validationStatus = null;
String status = "N";
String dateStr = null;
String dateStr1 = null;
String dateStr2 = null;
String dateStr3 = null;

try {
if (dbCon == null) {
dbCon = ctx.getDBConMDB();
dbCon.getConnectionMDB();
}
stmt = 
(PreparedStatement)dbCon.getCachedStatement(billingResponseString);
stmt1 = 

(PreparedStatement)dbCon.getCachedStatement(billingResponseDetailString);
if (stmt != null) {
DBUtil.setString(stmt, 1, bResponse.getTransactionID());

/** Commented on May 21 JCH *
parseSDP(bResponse.getSDP());

premCodeLocal = removeLeadingZeros(premCode);
DBUtil.setString(stmt, 2, premCodeLocal);

DBUtil.setLong(stmt, 3, Long.parseLong(servNum));

DBUtil.setString(stmt, 4, bResponse.getMeterNum());
*/
/* Added the code Below May 21**/

Long localServNum=null;
String tempSDP = null;
   tempSDP = bResponse.getSDP();
System.out.println("Temp SDP ="+tempSDP);
if ( (tempSDP == null) ||
 (tempSDP.equals(""))
   ) 
{
DBUtil.setString(stmt, 2, premCode);
DBUtil.setLong(stmt, 3,localServNum);
}
else{
 parseSDP(bResponse.getSDP());
 premCodeLocal = removeLeadingZeros(premCode);

 DBUtil.setString(stmt, 2, premCodeLocal);
 DBUtil.setLong(stmt, 3, Long.parseLong(servNum));
}
/* End the code Below May 21**/
DBUtil.setString(stmt, 4, bResponse.getMeterNum());

String tempReadDate   = bResponse.getReadDate();
if ( (tempReadDate ==null)||
 (tempReadDate.equals(""))
   ) 
{
DBUtil.setDate(stmt, 5,null);
}
else
{
dateStr = bResponse.getReadDate();
dateStr1 = new String(dateStr.substring(0, 10));
dateStr2 = new String(dateStr.substring(11, 19));
dateStr3 = dateStr1 + " " + dateStr2;
System.out.println("dateStr =" + dateStr3);
String testString = getDateTime(dateStr3);
SimpleDateFormat df = 
new SimpleDateFormat("-MM-dd HH:mm:ss");

DBUtil.setDate(stmt, 5, df.parse(testString));
}

DBUtil.setString(stmt,

[jboss-user] [Messaging, JMS & JBossMQ] - HELP! JBoss JMS cluster - cannot get a connection factory

2007-05-11 Thread paulpark
I tried to configure my client to access queues in a clustered JBoss 
environment.

JBoss errors out and says that "ConnectionFactory" cannot be found. I have 
tried java:/JmsXA, JmsXA, java:/ConnectionFactory and XAConnectionFactory, 
java:/XAConnectionFactory, QueueConnectionFactory as well many other 
configurations for connectionFactoryJndiName. For the life of me, Mule cannot 
get a connectionFactory. BTW, my app works fine in JBoss if it is not clustered 
ie "default" mode as opposed to "all" mode. 

Client snippet
==


public void myJMS(){
  try {
Properties p = new Properties(); 
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory"); 
p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces"); 
p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port. 
InitialContext iniCtx = new InitialContext(p);
Object ConnFactory = iniCtx.lookup("ConnectionFactory"); 
  } catch (Exception e) {
e.printStackTrace();
fail();
  }
}  

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044945#4044945

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044945
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user