你在auth.properties 已经将name、password定为常量了...
....
default.principal.name = "guest"
default.principal.password = "guest123"
....
而在getConnection方法中con= ds.getConnection(dbId, dbPassword);
试着将参数为空.....或者是在auth.properties 中不定义name等

解决方案 »

  1.   

    先把auth.properties 中的
    default.principal.name = "guest"
    default.principal.password = "guest123"
    注释掉试试看。
      

  2.   

    to Aeonsun(Aeonsun)  java_alias(六翼黑猫) 按照你们说的方法,重启了cloudscape 、 j2ee 还是不行:提示如下RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Connect to DB failed:Application cannot override username/password specified in resource reference jdbc/ExampleDB; nested exception is: javax.ejb.EJBException: Connect to DB failed:Application cannot override username/password specified in resource reference jdbc/ExampleDB
      

  3.   

    请问这是什么意思(我在另外的论坛上问的答复):use "Application" instead of "Container" on <res-auth> field of resource reference
    可以试试看:)