[JBoss-user] [Beginners Corner] - Re: log4j:ERROR Could not instantiate class [org.apache.log4

2005-10-21 Thread normanfung
not yet sorry.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3902709


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Newbie: admin page access

2005-09-10 Thread normanfung
hey Thanks...

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893991


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Newbie: admin page access

2005-09-10 Thread normanfung
Hi, just downloaded JBoss Portal, started JBoss application server no problem 
here. Then I navigated to:

http://localhost:8080/Portal

No sweat. Now, I clicked on "Admin" on "Page Menu" portlet (trying to access 
Admin CMS), only to be presented with error message "Sorry, you do not have 
access to this function. "

I scanned thru both User Guide and Reference Doc, can't find anything that 
tells you how to configure an Admin account. Any hint?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893910


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - Re: JBoss Portal - fail to start JBoss...

2005-09-09 Thread normanfung
By the way, this is what I downloaded:

JBoss Portal + JBoss AS 4.0.2

http://www.jboss.com/products/jbossportal/downloads

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893745


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - JBoss Portal - fail to start JBoss...

2005-09-09 Thread normanfung
I just downloaded JBoss Portal and trying to start JBoss - I'm running into 
this situation:anonymous wrote : 
  | 
  | 
  | C:\jboss\jboss-portal-2.0-jboss-4.0.2\bin>run
  | 
===
  | .
  |   JBoss Bootstrap Environment
  | .
  |   JBOSS_HOME: C:\jboss\jboss-portal-2.0-jboss-4.0.2\bin\\..
  | .
  |   JAVA: C:\Program Files\Java\jdk1.5.0_04\bin\java
  | .
  |   JAVA_OPTS:  -Dprogram.name=run.bat -Xms128m -Xmx512m
  | .
  |   CLASSPATH: C:\Program 
Files\Java\jdk1.5.0_04\lib\tools.jar;C:\jboss\jboss-port
  | al-2.0-jboss-4.0.2\bin\\run.jar
  | .
  | 
===
  | .
  | 15:56:03,368 INFO  [Server] Starting JBoss (MX MicroKernel)...
  | 15:56:03,368 INFO  [Server] Release ID: JBoss [Zion] 4.0.2 (build: 
CVSTag=JBoss_
  | 4_0_2 date=200505022023)
  | 15:56:03,368 INFO  [Server] Home Dir: C:\jboss\jboss-portal-2.0-jboss-4.0.2
  | 15:56:03,368 INFO  [Server] Home URL: 
file:/C:/jboss/jboss-portal-2.0-jboss-4.0.
  | 2/
  | 15:56:03,368 INFO  [Server] Library URL: 
file:/C:/jboss/jboss-portal-2.0-jboss-4
  | .0.2/lib/
  | 15:56:03,383 INFO  [Server] Patch URL: null
  | 15:56:03,383 INFO  [Server] Server Name: default
  | 15:56:03,383 INFO  [Server] Server Home Dir: 
C:\jboss\jboss-portal-2.0-jboss-4.0
  | .2\server\default
  | 15:56:03,383 INFO  [Server] Server Home URL: 
file:/C:/jboss/jboss-portal-2.0-jbo
  | ss-4.0.2/server/default/
  | 15:56:03,415 INFO  [Server] Server Data Dir: 
C:\jboss\jboss-portal-2.0-jboss-4.0
  | .2\server\default\data
  | 15:56:03,415 INFO  [Server] Server Temp Dir: 
C:\jboss\jboss-portal-2.0-jboss-4.0
  | .2\server\default\tmp
  | 15:56:03,415 INFO  [Server] Server Config URL: 
file:/C:/jboss/jboss-portal-2.0-j
  | boss-4.0.2/server/default/conf/
  | 15:56:03,415 INFO  [Server] Server Library URL: 
file:/C:/jboss/jboss-portal-2.0-
  | jboss-4.0.2/server/default/lib/
  | 15:56:03,415 INFO  [Server] Root Deployment Filename: jboss-service.xml
  | 15:56:03,415 INFO  [Server] Starting General Purpose Architecture (GPA)...
  | 15:56:04,368 INFO  [ServerInfo] Java version: 1.5.0_04,Sun Microsystems Inc.
  | 15:56:04,368 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 
1.5.0_04-b05
  | ,Sun Microsystems Inc.
  | 15:56:04,368 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
  | 15:56:05,321 INFO  [Server] Core system initialized
  | 15:56:05,571 ERROR [MainDeployer] Could not initialise deployment: 
file:/C:/jbos
  | s/jboss-portal-2.0-jboss-4.0.2/server/default/conf/jboss-service.xml
  | org.jboss.deployment.DeploymentException: 
C:\jboss\jboss-portal-2.0-jboss-4.0.2\
  | server\default\lib; - nested throwable: (java.io.FileNotFoundException: 
C:\jboss
  | \jboss-portal-2.0-jboss-4.0.2\server\default\lib)
  | at org.jboss.deployment.SARDeployer.init(SARDeployer.java:188)
  | at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
  | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
  | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
  | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  | java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  | sorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
  | er.java:141)
  | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
  | at 
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
  | or.java:121)
  | at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
  | at 
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
  | BeanOperationInterceptor.java:127)
  | at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
  | at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
  | java:249)
  | at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
  | at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
  | at $Proxy5.deploy(Unknown Source)
  | at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
  | at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
  | at org.jboss.Main.boot(Main.java:195)
  | at org.jboss.Main$1.run(Main.java:463)
  | at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.io.FileNotFoundException: 
C:\jboss\jboss-portal-2.0-jboss-4.0.2\
  | server\default\lib
  | at 
org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.j
  | ava:38)
  | at 
org.jboss.net.protocol.URLListerBase.listMembers(U

[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc

2004-10-28 Thread normanfung
Thanks Raist, I will try it in a few hours. Appreciate it.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853057


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - EJB Deployment Decriptors

2004-10-27 Thread normanfung
I'm newbie in J2EE, having read a bunch of stuff I'm still in the wood. Please bear 
with me.

Here's an example descriptor:


  | 
  |  
  |   
  |beanA
  |...
  |
  | jdbc/dbname
  | jdbc/dbname
  | javax.sql.DataSource
  | Container
  | Shareable
  |
  |
  |
  | Var1
  | java.lang.String
  | Some value
  |
  |...
  | 
  | 
  |
  | ejb/ses1 QUESTION 1: ejb/ses1??? Is it "SS1" JNDI 
name? Why isn't JNDI name declared in "ejb-jar.xml"??
  | session
  | tests.SS1Home
  | tests.SS1
  |
  | 
  |
  | ejb/locses1
  | session
  | tests.LocalSS1Home
  | tests.LocalSS1
  |
  |...
  | 
  |   
  | 
  |   
  |SS1
  |tests.SS1Home
  |tests.LocalSS1Home
  |tests.SS1
  |tests.LocalSS1
  |tests.SS1Bean
  |...
  |   
  |   ...
  |  
  | 
  | 

QUESTION 2.  What's the purpose of "ejb-ref", "ejb-local-ref" in EJB deployment 
descriptor? Is it that if one EJB (ejb/beanA) depends on another, say (ejb/ses1) (by 
virtue of having the dependency declared in deployment descriptor) - deployment of 
"ejb/beanA" would fail if "ejb/ses1" was not deployed on the target server? That 
DEPLOYMENT of an EJB (depending on a particular resource) would FAIL if that resource 
it depends on is absent on the destination server? Is this the only purpose?

QUESTION 3.  Should I specify JNDI names for  tag?

QUESTION 4.  Is "fully qualified" JNDI name (for the above bean):
 JNDI name = "java:comp/" + 
 example: "java:comp/ejb/beanA"

   OR just:
  JNDI name = "java:" + 
 example: "java:ejb/beanA"

   Is this true for all application servers? JBoss? Or does it depends on "ejb-name" 
to "jndi-name" mapping as specified in "jboss.xml" (see below)

QUESTION 5. For JBoss EJB's, "ejb-name" to "jndi-name" mapping is done in "jboss.xml":


  | 
  |
  |   
  |  beanB
  |  ejb/beanB
  |   
  |   
  |  beanA
  |  ejb/beanA
  |   
  |
  | 
  | 

Does it mean if "jndi-name" is NOT specified, then by default, "jndi-name" of the bean 
would equal "ejb-name"?

 "java:com/" + 

   EQUALS:

 "java:com/" + 

   EQUALS:

 "java:com/beanA"

  
QUESTION 6. Why "java:comp/"? What's that for? Is it:
   a. "java:comp/"
   b. "java:comp"
   c. "java:"

   I think I've seen different versions, getting really confused.

QUESTION 7. For environment variables, it seems:

   JNDI name="java:comp/env" +

   In this case, 
"java:comp/env/Var1"

   Is this true for all servers?

QUESTION 8. For data sources (JBoss), you need to put "mysql-ds.xml" under "Deploy" 
folder:


  | 
  |   
  | jdbc/exampleDS  
jdbc:mysql://127.0.0.1:3306/DBName
  | ...
  | xxx
  | xxx
  |   
  | 
  | 

6a. I dont understand why we need to append "java:" in context.lookup:


  | context=new InitialContext();
  | dataSource=(DataSource) context.lookup("java:jdbc/exampleDS");
  | 

6b. Can we rename the file name "mysql-ds.xml" to anything we like as long as it 
remains in "Deploy" folder? (Tested this on JBoss)

Thanks.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852881


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Beginners Corner] - log4j:ERROR Could not instantiate class [org.apache.log4j.xm

2004-10-26 Thread normanfung
Hi, I got this following error message when I started JBoss server - it doesn't seems 
to affect anything though... should I be concerned about this? If so, how can I fix it?

[EMAIL PROTECTED] bin]# ls
  | classpath.sh  jboss_init_suse.sh  run.shspy.log
  | deployer.bat  run.bat shutdown.bat  twiddle.bat
  | deployer.sh   run.confshutdown.jar  twiddle.jar
  | jboss_init_redhat.sh  run.jar shutdown.sh   twiddle.sh
  | [EMAIL PROTECTED] bin]# ./run.sh
  | =
  | 
  |   JBoss Bootstrap Environment
  | 
  |   JBOSS_HOME: /usr/local/jboss-4.0.0RC1
  | 
  |   JAVA: /usr/java/j2sdk1.4.2_05/bin/java
  | 
  |   JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh
  | 
  |   CLASSPATH: /usr/local/jboss-4.0.0RC1/bin/run.jar:/usr/java/j2sdk1.4.2_05/lib/t 
ools.jar:/usr/local/jboss-4.0.0RC1/server/default/conf
  | 
  | =
  | 
  | 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:199)
  | at java.security.AccessController.doPrivileged(Native Method)
  | at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
  | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
  | at java.lang.Class.forName0(Native Method)
  | at java.lang.Class.forName(Class.java:141)
  | at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160)
  | at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(Optio 
nConverter.java:309)
  | at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionCon 
verter.java:449)
  | at org.apache.log4j.LogManager.(LogManager.java:113)
  | at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63)
  | at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:320)
  | at org.jboss.logging.Logger.(Logger.java:78)
  | at org.jboss.logging.Logger.getLogger(Logger.java:291)
  | at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:152)
  | at org.jboss.system.server.ServerImpl.init(ServerImpl.java:126)
  | at org.jboss.Main.boot(Main.java:146)
  | at org.jboss.Main$1.run(Main.java:405)
  | at java.lang.Thread.run(Thread.java:534)
  | log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigur 
ator].
  | 

Thanks in advance.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852785


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc

2004-10-26 Thread normanfung
"Raist_Majere" wrote : I've seen an error in your code: you try to retrieve a local 
home interface in the same way you retrieve a remote home interface.
  | Your code is:
  | 
  |   | context = new InitialContext();
  |   | Object ref = context.lookup(groupJNDI); 
  |   | home = (GroupLocalHome)PortableRemoteObject.narrow(ref, groupLocalHome.class);
  |   | 
  | When you use Local Interfaces, you don't need to narrow the references, just cast 
them directly, like this:
  | 
  |   | context = new InitialContext(); 
  |   | GroupLocalHome home = (GroupLocalHome) context.lookup(groupJNDI); 
  |   | 
  | 
  | I don't know why aren't you getting any exception about this, but I think that 
this was the reason your app is not working.
  | 

I've just tried correcting my code as suggested, but:


  | Collection groups=null;
  | GroupLocalHome home=null;
  | ...
  | ...
  | try {
  | ...
  | context = new InitialContext();
  | home = (GroupLocalHome) context.lookup(groupJNDI);
  | groups=home.findAllGroups();  //STILL NOTHING RETRIEVED 
  | ...
  | } catch(Exception e) {
  |//AND NOTHING CAUGHT HERE!?
  | }
  | 

According to www.p6spy.com, nothing (SQL queries) was sent to database. Help! I'm 
deparate!

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852711


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc

2004-10-26 Thread normanfung
"darranl" wrote : Is the finder method returning you an empty collection?
  | 
  | If there is no data to be returned returning an empty collection is a valid 
response as it says that there are no entities.

No, there's data in the table. I created it by submitting SQL to target MySQL Instance 
using MySQL Control Center SQL editor panel. I have also tried to intercept SQL to 
database using http://www.p6spy.com/ - which tells me my CMP isn't sending anything to 
database.

Anyway, I'm going first try what anonymous wrote : Raist suggested.[/url]

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852704


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc

2004-10-26 Thread normanfung
Thanks guys! I didn't get any notification (email) from your reply (Didnt set the 
message option - silly me). Sorry for the late response and thanks a lot for the help.

I'm going to try fix it now, will let update the post as soon as I'm done, probably in 
a few hours.


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852702


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - This may help...

2004-10-21 Thread normanfung
This may help...

23:15:41,553 INFO  [RequestProcessor] Processing a 'POST' for path 
'/prepareLoginAction'
23:15:48,368 INFO  [STDOUT] 461330 [http-0.0.0.0-8080-Processor25] DEBUG 
com.aa.samples.actions.PrepareLoginAction  - PrepareLoginAction invoked
ERROR: invalid console appender config detected, console stream is looping23:15:53,559 
INFO  [STDOUT] 466521 [http-0.0.0.0-8080-Processor25] DEBUG 
com.aa.samples.beans.GroupBean  - GroupBean.setEntityContext invoked.
23:15:53,561 INFO  [STDOUT] 466521 [http-0.0.0.0-8080-Processor25] DEBUG 
com.aa.samples.beans.GroupBean  - GroupBean.setEntityContext invoked.
23:15:53,566 INFO  [STDOUT] 466528 [http-0.0.0.0-8080-Processor25] DEBUG 
org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupEJB#findAllGroups  - Executing SQL: 
SELECT t0_g.UIN FROM GROUPEJB t0_g
23:15:53,568 INFO  [STDOUT] 466528 [http-0.0.0.0-8080-Processor25] DEBUG 
org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.GroupEJB#findAllGroups  - Executing SQL: 
SELECT t0_g.UIN FROM GROUPEJB t0_g

... nothing related to JDBC/exceptions...

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852226


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - CMP - failed to retrieve data from database - but NO excepti

2004-10-21 Thread normanfung
CMP - failed to retrieve data from database - but NO exception..

Hi, I've developed this simple CMP to retrieve user Group information from database. 
It failed to retrieve data from database but no exception is thrown (Yes, I stepped 
through the code, nothing happenned). And now I'm kind of stuck without any error 
message to start debuggin with. So, I'm just asking for general advice/direction...

1. CLIENT side
Here's the Strut's action class ** ie. the CLIENT ** (yes, that's where they retrieve 
local proxy to CMP directly, as opposed to doing it thru a session bean):

try {
...
...
BasicConfigurator.configure();
logger.debug("PrepareLoginAction invoked");

context = new InitialContext();
Object ref = context.lookup(groupJNDI);
home = (GroupLocalHome)PortableRemoteObject.narrow(ref, GroupLocalHome.class);

 THAT's MY CMP local proxy: GroupLocal, Nothing is retrieved here by NO 
EXCEPTION 
groups=home.findAllGroups(); 
... 
return mapping.findForward("success");
...
} catch(Exception e) {
  * NO EXCEPTION CAUGHT *
}

2. The CMP GroupBean:

/**
 *  @author [EMAIL PROTECTED]
 *
 *  @ejb.bean   
 *  name="GroupEJB"
 *  local-jndi-name="ejb/UserGroup"
 *  display-name="User Group EJB"
 *  description="User Group EJB"
 *  cmp-version="2.x"
 *  type="CMP"
 *  view-type="local"
 *  schema="Group"
 *  reentrant="false"
 *  primkey-field="UIN"
 * 
 *  @ejb.persistence
 *  table-name="GROUPS"
 * 
 *  @ejb.finder
 *  query="SELECT OBJECT(g) FROM Group AS g"
 *  signature="java.util.Collection findAllGroups()"
 * 
 *  @ejb.interface
 *  local-class="com.aa.samples.interfaces.GroupLocal"
 * 
 *  @ejb.home
 *  local-class="com.aa.samples.interfaces.GroupLocalHome"
 * 
  * @jboss.persistence 
 *  datasource="java:/jdbc/dev01"
 *  datasource-mapping="mySQL"
 *  create-table="False"
 *  remove-table="False"
 *  table-name="GROUPS"
 * 
 */
public abstract class GroupBean implements EntityBean {
  
  protected EntityContext etx;
  protected Logger logger =Logger.getLogger(GroupBean.class);
  
  /*
   * 1. Implementing Home interface
   */
  
  /**
   * @param name
   * @ejb.create-method
   */
  public Integer ejbCreate(String name, String description) throws CreateException {
BasicConfigurator.configure();
logger.debug("GroupBean.ejbCreate invoked.");

if(name==null) {
throw new CreateException("name null");
}

setName(name);
setDescription(description);

return null;
  }
  
  public void ejbPostCreate(String name, String description) throws CreateException {
BasicConfigurator.configure();
logger.debug("GroupBean.ejbPostCreate invoked.");

return;
  }
  
  /*
   * 2. Persistence methods:
   */  
  
  /**
   * @ejb.persistent-field
   * @ejb.persistence
   *column-name="UIN"
   *sql-type="INTEGER"
   * @ejb.pk-field
   * @ejb.interface-method
   */
  public abstract   Integer getUIN();
  
  /**
   * @ejb.interface-method
   */
  public abstract void setUIN(Integer UIN);
  
  /**
   * @ejb.persistent-field
   * @ejb.persistence
   *column-name="name"
   *sql-type="VARCHAR"
   * @ejb.interface-method
   */
  public abstract String getName();
  
  /**
   * @ejb.interface-method
   */
  public abstract void setName(String name);
  
  /**
   * @ejb.persistent-field
   * @ejb.persistence
   *column-name="description"
   *sql-type="VARCHAR"
   * @ejb.interface-method
   */
  public abstract String getDescription();
  
  /**
   * @ejb.interface-method
   */
  public abstract void setDescription(String description);
  
  /**
   * @ejb.persistent-field
   * @ejb.persistence
   *column-name="isSuspended"
   *sql-type="TINYINT"
   * @ejb.interface-method
   */
  public abstract Boolean getIsSuspended();
  
  /**
   * @ejb.interface-method
   */
  public abstract void setIsSuspended(Boolean isSuspended);
  
  
  /*
   * 3. Implementing EntityBean interface:
   */
  public void ejbRemove() throws RemoveException {
BasicConfigurator.configure();
logger.debug("GroupBean.ejbRemove invoked.");

return;
  }  
  
  public void ejbLoad() {
BasicConfigurator.configure();
logger.debug("GroupBean.ejbLoad invoked.");

return;
  }

  public void ejbStore() {
BasicConfigurator.configure();
logger.debug("GroupBean.e