If you're running a version of Torque that has codebase similar to version 3.0, I may know the issue. In Torque version 3.0, Line 240 retrieves the iterator for "mapBuilders", a STATIC Map. Then Line 246 sets "mapBuilders" to <code>null</code>. I believe the problem is with JBoss's UnifiedClassLoader (unified class repository). If I am correct the scenario would run like this:
1) You access App1.ear, so JBoss loads Torque.class into the unified class repository. Torque.class initializes just fine (Line 240 retrieves the iterator for "mapBuilders" and Line 246 sets "mapBuilders" to <code>null</code>. 2) You then access App2.ear. JBoss uses Torque.class that is already in the unified class repository, so it uses the Class instance from step #1 to initialize Torque. "mapBuilders" has already been set to <code>null</code>, so when JBoss reaches line 240, a NullPointerException is thrown. I found a problem that is similar to your's: http://www.mail-archive.com/[EMAIL PROTECTED]/msg38686 .html Try using scoped classloaders with your EAR's JBoss deployment descriptors to isolate each Torque instance. Hope this helps. Best Regards, Tom -----Original Message----- From: Mujahid Malaysia [mailto:[EMAIL PROTECTED] Sent: Monday, January 12, 2004 10:57 PM To: [EMAIL PROTECTED] Subject: Two EAR and two Torque.properties Hi all, I have two different J2EE applications in two .EAR in a single JBoss. Each application is going to connect to its' own database through Torque. So, each application has its' own Torque.properties etc. Let's name these two applications with App1.ear and App2.ear. Now, if I connect to App1.ear first, the db connection in App2.ear can't be initialized. So does vice-versa. Does that means I can't have two Torques running in two separate applications? Thanks. ============================= The error message is as follows [LogInterceptor] TransactionRolledbackLocalException, causedBy: java.lang.NullPointerException at org.apache.torque.Torque.initialize(Torque.java:240) at org.apache.torque.Torque.init(Torque.java:406) at com.xcompany.api.dao.DAOFactory.getInstance(DAOFactory.java:55) at com.xcompany.security.xdoclet.security.bean.UserMapSBean.searchUserMap(Unkno wn Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) ----------------------------- Mujahid Malaysia "Kembalikan Keagungan Islam" -- http://www.fastmail.fm - One of many happy users: http://www.fastmail.fm/docs/quotes.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
