[JNDI and Naming] - Fail to get tables by a remote Datasource deployed in JBOSS
by poweryoung
Hi, all:
I try to use DatabaseMetaData to get all tables and views from a Oracle database. But exception is thrown at the red line. You can see that I look up a remote DataSource and get connection from the data source. But if I use DriverManager.getConnection(url, user, pwd) way to get connection. This issue does not exist. I can get all the tables and views successfully...
Any help from you will be much appreciated!
public class Test {
|
| public static void main(String[] args) throws Exception {
|
| Properties props = new Properties();
|
| props.put(Context.PROVIDER_URL, "jnp://10.111.3.161:1099");
|
| props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
|
| Context ctx = new InitialContext(props);
|
| DataSource ds = (DataSource)ctx.lookup("OracleDS");
|
| Connection conn = ds.getConnection();
|
| DatabaseMetaData dbmd = conn.getMetaData();
|
| ResultSet rs = dbmd.getTables(null, "%", "%", new String[] { "TABLE", "VIEW" });
|
| }
|
| }
Exception:
Exception in thread "main" java.lang.ClassCastException: $Proxy3
at $Proxy2.getTables(Unknown Source)
at Test.main(Test.java:62)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251946#4251946
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251946
16 years, 8 months
[jBPM Users] - JobScheduler going crazy - ignoring wait
by rachel.primrose
Hi guys,
I've got the same code (EXACTLY the same code) running on my windows machine, and on Ubuntu.
On windows, my java version is 1.6.0_13 on ubuntu it's 1.6.0_06.
My problem is that even using identical code, the scheduler on the ubuntu box goes crazy.
Here's my debug logs from the windows machine:
| 2009-08-27 14:35:37,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:35:37,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-28 09:31:00.0
| 2009-08-27 14:35:37,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread will wait for max 5000ms on org.jbpm.pvm.internal.jobexecutor.JobExecutor@127e2ee
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread woke up
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-28 09:31:00.0
| 2009-08-27 14:35:42,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread will wait for max 5000ms on org.jbpm.pvm.internal.jobexecutor.JobExecutor@127e2ee
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread woke up
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-28 09:31:00.0
| 2009-08-27 14:35:47,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread will wait for max 5000ms on org.jbpm.pvm.internal.jobexecutor.JobExecutor@127e2ee
| 2009-08-27 14:35:52,947 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.DispatcherThread - DispatcherThread woke up
|
As you can see, it is running the default three threads, with each one waiting politely for around 5 seconds.
Here's the log from the ubuntu box:
| 2009-08-27 14:25:26,438 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,439 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,440 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,441 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,441 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,441 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,441 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,442 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,442 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,442 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,442 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,443 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,444 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,445 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - next due date is 2009-08-17 10:48:36.0
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - start querying first acquirable job...
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd - locking jobs []
| 2009-08-27 14:25:26,446 [DispatcherThread] DEBUG org.jbpm.pvm.internal.jobexecutor.GetNextDueDateCmd - getting next due date...
|
It's not waiting!
The only difference between the two is that on windows I'm running this in Eclipse, and on the Ubuntu box it's nicely jar'd up etc. However, all the required files are still on the classpath, and every other aspect of the workflow engine runs like clockwork.
If you have any ideas, I'd be very grateful.
Thanks.
- Rachel (Kit)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251936#4251936
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251936
16 years, 8 months