Retrieving JDBC connection from datasource in JAAS login module

Hi,
I have a custom JAAS login module which calls a DAO for accessing user login details. The DAO looks up the datasource to retrieve connections from when the LoginModule is initialized. The datasource is simply defined through the admin interface. When a user tries to login (through the web container) an exception is thrown as shown below:
com.sun.enterprise.InvocationException
     at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:134)
     at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:241)
     at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:154)
     at com.dmdsecure.mobile.security.store.impl.JDBCUserStore.fetchUser(JDBCUserStore.java:330)
     at com.dmdsecure.mobile.security.impl.LocalUserManager.authenticate(LocalUserManager.java:70)
     at com.dmdsecure.mobile.security.adapter.sunone.DMDLoginModule.authenticate(DMDLoginModule.java:66)
     at com.dmdsecure.mobile.security.adapter.sunone.DMDLoginModule.authenticate(DMDLoginModule.java:38)
     at com.iplanet.ias.security.auth.login.PasswordLoginModule.login(PasswordLoginModule.java:163)
     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)
     at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
     at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
     at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
     at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
     at com.sun.enterprise.security.auth.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:382)
     at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:307)
     at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:116)
     at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:201)
     at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:140)
     at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:263)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:496)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
     at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
     at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
It seems the datasource is valid but trying to retrieve connections from it will fail.
Anyone had any similar problems??

Nope, sorry ... I am also having other troubles with JNDI lookups, this time from within the init method of a filter ... Seems there may still be some issues here for Sun to iron out ...
-Johan

Similar Messages

  • Error retrieving JDBC connection from remote client (WLS 10.0)

    Hallo,
    I get an error when I try to retrieve a JDBC connection from a WLS datasource using a remote client. My Weblogic server version is: WebLogic Server 10.0 MP1 Thu Oct 18 20:17:44 EDT 2007 1005184
    I use the following code to retrieve the JDBC connection:
    Hashtable<String,String> ctxEnv = null;
    InitialContext ctx = null;
    DataSource dataSource = null;
    Connection con = null;
    ctxEnv = new Hashtable<String,String>();
    ctxEnv.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ctxEnv.put(InitialContext.PROVIDER_URL, "t3://localhost:7001");
    ctx = new InitialContext(ctxEnv);
    dataSource = (DataSource) ctx.lookup("datasources/XXX");
    con = dataSource.getConnection();
    When I execute this code with the weblogic.jar in the classpath everything works fine. However, when I put the wlfullclient.jar in the classpath which I created using the JAR Builder Tool I get the follwoing error:
    weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception
    at weblogic.jdbc.common.internal.RmiDataSource_1001_WLStub.getConnection(Unknown Source)
    at net.schufa.enterprise.utilities.database.test.JDBCSupportTest.test_getConnection_manually(JDBCSupportTest.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Caused by: weblogic.rjvm.PeerGoneException: ; nested exception is:
    weblogic.utils.NestedException: java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/InstrumentationDebug
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:221)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
    ... 17 more
    Caused by: weblogic.utils.NestedException: java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/InstrumentationDebug
    at weblogic.rjvm.RJVMImpl.gotExceptionReceiving(RJVMImpl.java:938)
    at weblogic.rjvm.ConnectionManager.gotExceptionReceiving(ConnectionManager.java:1009)
    at weblogic.rjvm.MsgAbbrevJVMConnection.gotExceptionReceiving(MsgAbbrevJVMConnection.java:452)
    at weblogic.rjvm.t3.MuxableSocketT3.hasException(MuxableSocketT3.java:373)
    at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:755)
    at weblogic.socket.SocketMuxer.deliverHasException(SocketMuxer.java:708)
    at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:307)
    at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
    Caused by: java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/InstrumentationDebug
    at weblogic.diagnostics.instrumentation.rtsupport.InstrumentationSupportImpl.getMonitor(InstrumentationSupportImpl.java:54)
    at weblogic.diagnostics.instrumentation.InstrumentationSupport.getMonitor(InstrumentationSupport.java:201)
    at weblogic.jdbc.rmi.SerialConnection.<clinit>(SerialConnection.java)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
    at java.lang.reflect.Field.getLong(Field.java:527)
    at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1586)
    at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
    at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
    at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1292)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at weblogic.rjvm.ClassTableEntry.readExternal(ClassTableEntry.java:36)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at weblogic.rjvm.InboundMsgAbbrev.readObject(InboundMsgAbbrev.java:65)
    at weblogic.rjvm.InboundMsgAbbrev.read(InboundMsgAbbrev.java:37)
    at weblogic.rjvm.MsgAbbrevJVMConnection.readMsgAbbrevs(MsgAbbrevJVMConnection.java:223)
    at weblogic.rjvm.MsgAbbrevInputStream.init(MsgAbbrevInputStream.java:174)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:435)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
    at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:383)
    at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:872)
    at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:808)
    at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:283)
    ... 4 more
    Can please anyone tell me what's going on there? What really astonishes me is that the class mentioned in the stacktrace is neither present in the wlfullclient.jar nor in the weblogic.jar, but using the weblogic.jar everything works fine. Any hint would be appreciated so much ...
    Here is the log written when is created the wlfullclient.jar:
    C:\Programme\bea\weblogic10.0\server\lib>java -jar ../../../modules/com.bea.core.jarbuilder_1.0.1.0.jar
    Setting Manifest:Class-Path = schema/weblogic-container-binding.jar schema/weblogic-domain-binding.jar schema/diagnostic
    s-binding.jar schema/diagnostics-image-binding.jar schema/kodo-conf-binding.jar wlcipher.jar xmlx.jar ojdbc14.jar jconn2
    .jar jConnect.jar EccpressoAsn1.jar EccpressoCore.jar EccpressoJcae.jar mysql-connector-java-commercial-5.0.3-bin.jar w
    lbase.jar wlutil.jar wlsqlserver.jar wldb2.jar wlsybase.jar wloracle.jar wlinformix.jar wlw-langx.jar ../../common/lib/p
    dev.jar debugging.jar wlw-system.jar ../../javelin/lib/javelinx.jar jcom.jar weblogic-L10N.jar
    Setting Manifest:Implementation-Vendor = BEA Systems
    Setting Manifest:Implementation-Title = Client jar for WebLogic Server 10.0 Thu Oct 18 20:17:44 EDT 2007 1005184
    Setting Manifest:Implementation-Version = 10.0.1.0
    Creating new jar file: wlfullclient.jar
    Integrating jar -->(0)/(0)/C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(0)/(31337)/(31337)/C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar -->(0)/(31337)/C:\Programme\bea\modules\features\weblogic.client.modules_10.0.1.0.jar
    Integrating jar <--(0)/(31337)/(0)/C:\Programme\bea\modules\features\weblogic.client.modules_10.0.1.0.jar
    Integrating jar -->(1)/(31337)/C:\Programme\bea\modules\features\weblogic.client.modules.L10N_10.0.1.0.jar
    Integrating jar <--(1)/(31337)/(0)/C:\Programme\bea\modules\features\weblogic.client.modules.L10N_10.0.1.0.jar
    Ignoring unresolved jarC:\Programme\bea\modules\features\weblogic.client.modules.ja_10.0.1.0.jar
    Ignoring unresolved jarC:\Programme\bea\modules\features\weblogic.client.modules.ko_10.0.1.0.jar
    Ignoring unresolved jarC:\Programme\bea\modules\features\weblogic.client.modules.zh.CN_10.0.1.0.jar
    Ignoring unresolved jarC:\Programme\bea\modules\features\weblogic.client.modules.zh.TW_10.0.1.0.jar
    Integrating jar -->(1)/(31337)/C:\Programme\bea\modules\com.bea.core.antlr.runtime_2.7.5.jar
    Integrating jar <--(1)/(31410)/(73)/C:\Programme\bea\modules\com.bea.core.antlr.runtime_2.7.5.jar
    Integrating jar -->(1)/(31410)/C:\Programme\bea\modules\com.bea.core.logging_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(31487)/(77)/C:\Programme\bea\modules\com.bea.core.logging_1.0.1.0.jar
    Integrating jar -->(1)/(31487)/C:\Programme\bea\modules\com.bea.core.xml.staxb.runtime_1.0.1.0.jar
    Integrating jar <--(1)/(32047)/(560)/C:\Programme\bea\modules\com.bea.core.xml.staxb.runtime_1.0.1.0.jar
    Integrating jar -->(1)/(32047)/C:\Programme\bea\modules\com.bea.core.annogen_1.0.1.0.jar
    Integrating jar <--(1)/(32265)/(218)/C:\Programme\bea\modules\com.bea.core.annogen_1.0.1.0.jar
    Integrating jar -->(1)/(32265)/C:\Programme\bea\modules\com.bea.core.process_5.3.0.0.jar
    Integrating jar <--(1)/(32277)/(12)/C:\Programme\bea\modules\com.bea.core.process_5.3.0.0.jar
    Integrating jar -->(1)/(32277)/C:\Programme\bea\modules\com.bea.core.common.engine.impl_2.0.1.0.jar
    Integrating jar <--(1)/(32294)/(17)/C:\Programme\bea\modules\com.bea.core.common.engine.impl_2.0.1.0.jar
    Integrating jar -->(1)/(32294)/C:\Programme\bea\modules\com.bea.core.common.engine.api_2.0.1.0.jar
    Integrating jar <--(1)/(32321)/(27)/C:\Programme\bea\modules\com.bea.core.common.engine.api_2.0.1.0.jar
    Integrating jar -->(1)/(32321)/C:\Programme\bea\modules\com.bea.core.common.security.api_2.0.1.0.jar
    Integrating jar <--(1)/(32446)/(125)/C:\Programme\bea\modules\com.bea.core.common.security.api_2.0.1.0.jar
    Integrating jar -->(1)/(32446)/C:\Programme\bea\modules\com.bea.core.common.security.impl_2.0.1.0.jar
    Integrating jar <--(1)/(32895)/(449)/C:\Programme\bea\modules\com.bea.core.common.security.impl_2.0.1.0.jar
    Integrating jar -->(1)/(32895)/C:\Programme\bea\modules\com.bea.core.common.security.jdkutils_2.0.1.0.jar
    Integrating jar <--(1)/(32908)/(13)/C:\Programme\bea\modules\com.bea.core.common.security.jdkutils_2.0.1.0.jar
    Integrating jar -->(1)/(32908)/C:\Programme\bea\modules\com.bea.core.common.security.utils_2.0.1.0.jar
    Integrating jar <--(1)/(32963)/(55)/C:\Programme\bea\modules\com.bea.core.common.security.utils_2.0.1.0.jar
    Integrating jar -->(1)/(32963)/C:\Programme\bea\modules\com.bea.core.common.security.providers.utils_2.0.1.0.jar
    Ignoring Duplicate Entry com/bea/common/security/ProvidersLogger$LoggableMessageSpiImpl.class also in C:\Programme\bea\modules\com.bea.core.common.security.api_2.0.1.0.jar
    Ignoring Duplicate Entry com/bea/common/security/ProvidersLogger.class also in C:\Programme\bea\modules\com.bea.core.common.security.api_2.0.1.0.jar
    Integrating jar <--(1)/(33817)/(854)/C:\Programme\bea\modules\com.bea.core.common.security.providers.utils_2.0.1.0.jar
    Integrating jar -->(1)/(33817)/C:\Programme\bea\modules\com.bea.core.common.security.providers.env_2.0.1.0.jar
    Integrating jar <--(1)/(33901)/(84)/C:\Programme\bea\modules\com.bea.core.common.security.providers.env_2.0.1.0.jar
    Integrating jar -->(1)/(33901)/C:\Programme\bea\modules\javax.activation_1.1.jar
    Integrating jar <--(1)/(33945)/(44)/C:\Programme\bea\modules\javax.activation_1.1.jar
    Integrating jar -->(1)/(33945)/C:\Programme\bea\modules\javax.annotation_1.0.jar
    Integrating jar <--(1)/(33958)/(13)/C:\Programme\bea\modules\javax.annotation_1.0.jar
    Integrating jar -->(1)/(33958)/C:\Programme\bea\modules\javax.interceptor_1.0.jar
    Integrating jar <--(1)/(33964)/(6)/C:\Programme\bea\modules\javax.interceptor_1.0.jar
    Integrating jar -->(1)/(33964)/C:\Programme\bea\modules\javax.ejb_3.0.jar
    Integrating jar <--(1)/(34022)/(58)/C:\Programme\bea\modules\javax.ejb_3.0.jar
    Integrating jar -->(1)/(34022)/C:\Programme\bea\modules\javax.jdo_2.0.jar
    Integrating jar <--(1)/(34119)/(97)/C:\Programme\bea\modules\javax.jdo_2.0.jar
    Integrating jar -->(1)/(34119)/C:\Programme\bea\modules\javax.enterprise.deploy_1.2.jar
    Integrating jar <--(1)/(34162)/(43)/C:\Programme\bea\modules\javax.enterprise.deploy_1.2.jar
    Integrating jar -->(1)/(34162)/C:\Programme\bea\modules\javax.jms_1.1.jar
    Integrating jar <--(1)/(34221)/(59)/C:\Programme\bea\modules\javax.jms_1.1.jar
    Integrating jar -->(1)/(34221)/C:\Programme\bea\modules\javax.jsp_1.0.1.0_2-1.jar
    Integrating jar <--(1)/(34319)/(98)/C:\Programme\bea\modules\javax.jsp_1.0.1.0_2-1.jar
    Integrating jar -->(1)/(34319)/C:\Programme\bea\modules\javax.jws_2.0.jar
    Integrating jar <--(1)/(34335)/(16)/C:\Programme\bea\modules\javax.jws_2.0.jar
    Integrating jar -->(1)/(34335)/C:\Programme\bea\modules\javax.mail_1.4.0.2.jar
    Integrating jar <--(1)/(34602)/(267)/C:\Programme\bea\modules\javax.mail_1.4.0.2.jar
    Integrating jar -->(1)/(34602)/C:\Programme\bea\modules\javax.management.j2ee_1.0.jar
    Integrating jar <--(1)/(34637)/(35)/C:\Programme\bea\modules\javax.management.j2ee_1.0.jar
    Integrating jar -->(1)/(34637)/C:\Programme\bea\modules\javax.persistence_1.0.1.0_1-0.jar
    Integrating jar <--(1)/(34730)/(93)/C:\Programme\bea\modules\javax.persistence_1.0.1.0_1-0.jar
    Integrating jar -->(1)/(34730)/C:\Programme\bea\modules\javax.resource_1.5.jar
    Integrating jar <--(1)/(34799)/(69)/C:\Programme\bea\modules\javax.resource_1.5.jar
    Integrating jar -->(1)/(34799)/C:\Programme\bea\modules\javax.servlet_1.0.1.0_2-5.jar
    Integrating jar <--(1)/(34869)/(70)/C:\Programme\bea\modules\javax.servlet_1.0.1.0_2-5.jar
    Integrating jar -->(1)/(34869)/C:\Programme\bea\modules\javax.transaction_1.1.jar
    Integrating jar <--(1)/(34889)/(20)/C:\Programme\bea\modules\javax.transaction_1.1.jar
    Integrating jar -->(1)/(34889)/C:\Programme\bea\modules\javax.xml.bind_2.0.jar
    Integrating jar <--(1)/(34989)/(100)/C:\Programme\bea\modules\javax.xml.bind_2.0.jar
    Integrating jar -->(1)/(34989)/C:\Programme\bea\modules\javax.xml.soap_1.3.0.0.jar
    Integrating jar <--(1)/(35019)/(30)/C:\Programme\bea\modules\javax.xml.soap_1.3.0.0.jar
    Ignoring unresolved jarC:\Programme\bea\modules\jaxp-api.jar
    Ignoring unresolved jarC:\Programme\bea\modules\jax-qname.jar
    Ignoring unresolved jarC:\Programme\bea\modules\activation.jar
    Ignoring unresolved jarC:\Programme\bea\modules\servlet.jar
    Integrating jar -->(1)/(35019)/C:\Programme\bea\modules\javax.xml.stream_1.0.1.0_1-0.jar
    Integrating jar <--(1)/(35063)/(44)/C:\Programme\bea\modules\javax.xml.stream_1.0.1.0_1-0.jar
    Integrating jar -->(1)/(35063)/C:\Programme\bea\modules\javax.xml.ws_2.0.jar
    Integrating jar <--(1)/(35110)/(47)/C:\Programme\bea\modules\javax.xml.ws_2.0.jar
    Integrating jar -->(1)/(35110)/C:\Programme\bea\modules\javax.xml.rpc_1.1.jar
    Ignoring Duplicate Entry javax/xml/namespace/QName.class also in C:\Programme\bea\modules\javax.xml.stream_1.0.1.0_1-0.jar
    Integrating jar <--(1)/(35167)/(57)/C:\Programme\bea\modules\javax.xml.rpc_1.1.jar
    Integrating jar -->(1)/(35167)/C:\Programme\bea\modules\com.bea.core.jsafe_3.5.0.jar
    Integrating jar <--(1)/(35423)/(256)/C:\Programme\bea\modules\com.bea.core.jsafe_3.5.0.jar
    Integrating jar -->(1)/(35423)/C:\Programme\bea\modules\com.bea.core.apache_1.0.1.0.jar
    Integrating jar <--(1)/(36825)/(1402)/C:\Programme\bea\modules\com.bea.core.apache_1.0.1.0.jar
    Integrating jar -->(1)/(36825)/C:\Programme\bea\modules\com.bea.core.beangen_1.0.1.0.jar
    Integrating jar <--(1)/(36964)/(139)/C:\Programme\bea\modules\com.bea.core.beangen_1.0.1.0.jar
    Integrating jar -->(1)/(36964)/C:\Programme\bea\modules\com.bea.core.beaninfo_1.0.1.0.jar
    Integrating jar <--(1)/(36976)/(12)/C:\Programme\bea\modules\com.bea.core.beaninfo_1.0.1.0.jar
    Integrating jar -->(1)/(36976)/C:\Programme\bea\modules\com.bea.core.datasource_1.0.1.0.jar
    Ignoring Duplicate Entry utils/Schema.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry utils/dbping.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCConnectionPoolParamsBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCDataSourceBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCDataSourceParamsBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCDriverParamsBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCPropertiesBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCPropertyBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/j2ee/descriptor/wl/JDBCXAParamsBean.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(37133)/(157)/C:\Programme\bea\modules\com.bea.core.datasource_1.0.1.0.jar
    Integrating jar -->(1)/(37133)/C:\Programme\bea\modules\com.bea.core.descriptor_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/descriptor/SettableBean.class also in C:\Programme\bea\modules\com.bea.core.datasource_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/descriptor/beangen/LegalChecks.class also in C:\Programme\bea\modules\com.bea.core.beangen_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/descriptor/beangen/StringHelper.class also in C:\Programme\bea\modules\com.bea.core.beangen_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/descriptor/beangen/XMLHelper.class also in C:\Programme\bea\modules\com.bea.core.beangen_1.0.1.0.jar
    Integrating jar <--(1)/(37226)/(93)/C:\Programme\bea\modules\com.bea.core.descriptor_1.0.1.0.jar
    Integrating jar -->(1)/(37226)/C:\Programme\bea\modules\com.bea.core.diagnostics.core_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/diagnostics/type/UnexpectedExceptionHandler.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(37264)/(38)/C:\Programme\bea\modules\com.bea.core.diagnostics.core_1.0.1.0.jar
    Integrating jar -->(1)/(37264)/C:\Programme\bea\modules\com.bea.core.i18n_1.0.1.0.jar
    Integrating jar <--(1)/(37289)/(25)/C:\Programme\bea\modules\com.bea.core.i18n_1.0.1.0.jar
    Integrating jar -->(1)/(37289)/C:\Programme\bea\modules\com.bea.core.i18n.generator_1.0.1.0.jar
    Integrating jar <--(1)/(37335)/(46)/C:\Programme\bea\modules\com.bea.core.i18n.generator_1.0.1.0.jar
    Integrating jar -->(1)/(37335)/C:\Programme\bea\modules\com.bea.core.management.core_1.0.1.0.jar
    Integrating jar <--(1)/(37343)/(8)/C:\Programme\bea\modules\com.bea.core.management.core_1.0.1.0.jar
    Integrating jar -->(1)/(37343)/C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Integrating jar <--(1)/(37389)/(46)/C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Integrating jar -->(1)/(37389)/C:\Programme\bea\modules\com.bea.core.mbean.support_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/AbstractCommoConfigurationBean$Helper.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/AbstractCommoConfigurationBean.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/AbstractCommoConfigurationBeanBinder.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/AbstractCommoConfigurationBeanImplBeanInfo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/BaseModelMBean.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/Commo$Pair.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/Commo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoMBean.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoMBeanInstance.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoModelMBeanAttributeInfo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoModelMBeanConstructorInfo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoModelMBeanInfoSupport.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoModelMBeanNotificationInfo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoModelMBeanOperationInfo.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CommoOperationsException.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DescriptorSupport$1.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DescriptorSupport$Pair.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DescriptorSupport$VoidValue.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DescriptorSupport.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DescriptorSupportBase.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/RequiredModelMBeanWrapper.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/SecurityMBeanData.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/StandardInterface.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/TypedMBeanData.class also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/ant/taskdefs/management/commo/antlib.xml also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/CustomMBeanImpl.j also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/DiabloCustomMBeanIntf.j also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/commo/commo.dtd also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/management/internal/mbean/SecurityReadOnlyMBean.template also in C:\Programme\bea\modules\com.bea.core.mbean.maker_1.0.1.0.jar
    Integrating jar <--(1)/(37389)/(0)/C:\Programme\bea\modules\com.bea.core.mbean.support_1.0.1.0.jar
    Integrating jar -->(1)/(37389)/C:\Programme\bea\modules\com.bea.core.messaging.kernel_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(37548)/(159)/C:\Programme\bea\modules\com.bea.core.messaging.kernel_1.0.1.0.jar
    Integrating jar -->(1)/(37548)/C:\Programme\bea\modules\com.bea.core.resourcepool_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(37583)/(35)/C:\Programme\bea\modules\com.bea.core.resourcepool_1.0.1.0.jar
    Integrating jar -->(1)/(37583)/C:\Programme\bea\modules\com.bea.core.weblogic.rmi.client_1.0.1.0.jar
    Ignoring Duplicate Entry weblogic/rmi/extensions/server/_HeartbeatHelper_Stub.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(37612)/(29)/C:\Programme\bea\modules\com.bea.core.weblogic.rmi.client_1.0.1.0.jar
    Integrating jar -->(1)/(37612)/C:\Programme\bea\modules\com.bea.core.weblogic.security.wls_2.0.1.0.jar
    Integrating jar <--(1)/(38016)/(404)/C:\Programme\bea\modules\com.bea.core.weblogic.security.wls_2.0.1.0.jar
    Integrating jar -->(1)/(38016)/C:\Programme\bea\modules\com.bea.core.weblogic.saaj_1.0.1.0.jar
    Integrating jar <--(1)/(38217)/(201)/C:\Programme\bea\modules\com.bea.core.weblogic.saaj_1.0.1.0.jar
    Integrating jar -->(1)/(38217)/C:\Programme\bea\modules\com.bea.core.weblogic.stax_1.0.1.0.jar
    Integrating jar <--(1)/(38543)/(326)/C:\Programme\bea\modules\com.bea.core.weblogic.stax_1.0.1.0.jar
    Integrating jar -->(1)/(38543)/C:\Programme\bea\modules\com.bea.core.store_1.0.1.0.jar
    Skipping native/aix/ppc64/libwlfileio2.so
    Skipping native/aix/ppc/libwlfileio2.so
    Skipping native/hpux11/IPF32/libwlfileio2.so
    Skipping native/hpux11/IPF64/libwlfileio2.so
    Skipping native/hpux11/PA_RISC64/libwlfileio2.sl
    Skipping native/hpux11/PA_RISC/libwlfileio2.sl
    Skipping native/linux/i686/libwlfileio2.so
    Skipping native/linux/ia64/libwlfileio2.so
    Skipping native/linux/x86_64/libwlfileio2.so
    Skipping native/solaris/sparc64/libwlfileio2.so
    Skipping native/solaris/sparc/libwlfileio2.so
    Skipping native/solaris/x64/libwlfileio2.so
    Skipping native/solaris/x86/libwlfileio2.so
    Skipping native/win/32/wlfileio2.dll
    Skipping native/win/64/wlfileio2.dll
    Skipping native/win/x64/wlfileio2.dll
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(38695)/(152)/C:\Programme\bea\modules\com.bea.core.store_1.0.1.0.jar
    Integrating jar -->(1)/(38695)/C:\Programme\bea\modules\com.bea.core.store.gxa_1.0.1.0.jar
    Integrating jar <--(1)/(38728)/(33)/C:\Programme\bea\modules\com.bea.core.store.gxa_1.0.1.0.jar
    Integrating jar -->(1)/(38728)/C:\Programme\bea\modules\com.bea.core.transaction_2.0.1.0.jar
    Ignoring Duplicate Entry weblogic/i18n/i18n.properties also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(38943)/(215)/C:\Programme\bea\modules\com.bea.core.transaction_2.0.1.0.jar
    Integrating jar -->(1)/(38943)/C:\Programme\bea\modules\com.bea.core.utils.full_1.0.1.0.jar
    Skipping native/aix/ppc64/libterminalio.so
    Skipping native/aix/ppc/libterminalio.so
    Skipping native/hpux11/IPF32/libterminalio.so
    Skipping native/hpux11/IPF64/libterminalio.so
    Skipping native/hpux11/PA_RISC64/libterminalio.sl
    Skipping native/hpux11/PA_RISC/libterminalio.sl
    Skipping native/linux/i686/libterminalio.so
    Skipping native/linux/ia64/libterminalio.so
    Skipping native/linux/s3990/libterminalio.so
    Skipping native/linux/x86_64/libterminalio.so
    Skipping native/macosx/pps/libterminalio.jnilib
    Skipping native/solaris/sparc64/libterminalio.so
    Skipping native/solaris/sparc/libterminalio.so
    Skipping native/solaris/x64/libterminalio.so
    Skipping native/solaris/x86/libterminalio.so
    Skipping native/win/32/terminalio.dll
    Skipping native/win/64/terminalio.dll
    Skipping native/win/x64/terminalio.dll
    Ignoring Duplicate Entry weblogic/utils/StackTraceUtilsClient.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(39367)/(424)/C:\Programme\bea\modules\com.bea.core.utils.full_1.0.1.0.jar
    Integrating jar -->(1)/(39367)/C:\Programme\bea\modules\com.bea.core.utils.classloaders_1.0.1.0.jar
    Integrating jar <--(1)/(39415)/(48)/C:\Programme\bea\modules\com.bea.core.utils.classloaders_1.0.1.0.jar
    Integrating jar -->(1)/(39415)/C:\Programme\bea\modules\com.bea.core.utils.expressions_1.0.1.0.jar
    Integrating jar <--(1)/(39429)/(14)/C:\Programme\bea\modules\com.bea.core.utils.expressions_1.0.1.0.jar
    Integrating jar -->(1)/(39429)/C:\Programme\bea\modules\com.bea.core.utils.wrapper_1.0.1.0.jar
    Integrating jar <--(1)/(39550)/(121)/C:\Programme\bea\modules\com.bea.core.utils.wrapper_1.0.1.0.jar
    Integrating jar -->(1)/(39550)/C:\Programme\bea\modules\com.bea.core.timers_1.0.1.0.jar
    Ignoring Duplicate Entry commonj/timers/CancelTimerListener.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/timers/StopTimerListener.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/timers/Timer.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/timers/TimerListener.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/timers/TimerManager.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Integrating jar <--(1)/(39581)/(31)/C:\Programme\bea\modules\com.bea.core.timers_1.0.1.0.jar
    Integrating jar -->(1)/(39581)/C:\Programme\bea\modules\com.bea.core.weblogic.workmanager_1.0.1.0.jar
    Ignoring Duplicate Entry commonj/work/RemoteWorkItem.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/work/Work.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/work/WorkCompletedException.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/work/WorkEvent.class also in C:\Programme\bea\weblogic10.0\server\lib\weblogic.jar
    Ignoring Duplicate Entry commonj/work/WorkExcep

    Dirk Ludwig wrote:
    Joe Weinstein wrote:[...]
    Hi. You should open an official support case,
    but it may be that we do not support
    external client JDBC with the client jar.Actually, I misspoke. I think we do supply a client
    jar, and that may be true
    what I said, but I see you're making your own. Can
    you find out what jar you're
    loading the InstrumentationSupport class from? That's
    the original location of
    the error, and that class doesn't exist in 10.0.Hi Joe, thanks for your reply.
    First of all, let me clarify what we did and why we did it: We have a stand-alone client application that needs to communicate with a Weblogic server using the t3 protocol (we don't want IIOP or HTTP tunneling). According to the official BEA documentation (see http://e-docs.bea.com/wls/docs100/client/basics.html and http://e-docs.bea.com/wls/docs100/client/t3.html) we needed to create the wlfullclient.jar file. We did this using the Weblogic JAR Builder Tool (see http://e-docs.bea.com/wls/docs100/client/jarbuilder.html). Unfortunatley we discovered the problem mentioned in my original post when we tried to run the client with that wlfullclient.jar.
    Regarding your classloading question: The InstrumentationSupportImpl class is located in the wlfullclient.jar, so it does exist in WLS 10.0 (it is also contained in the weblogic.jar). Unfortunately this JAR does not contain the required class "weblogic.diagnostics.instrumentation.InstrumentationDebug". I searched for this class and found it in the OSGI module "com.bea.core.diagnostics.instrumentor_1.0.1.0.jar" shipped with the Weblogic server. Obviously the JAR Builder Tool did not include the contents of this OSGI bundle into the wlfullclient.jar. I tried to include this OSGI bundle into the classpath of the client app manually (just for testing purposes), but this onyl resultet in another NoClassDefFoundError. This time the class "com.bea.objectweb.asm.Constants" could not be found.
    What astonishes me is the fact that the connection retrieval works fine when we only have the weblogic.jar in the client applications classpath, but fails when we have the wlfullclient.jar in the classpaht. It seems that the t3 communication is handled completely different, depending on what JARs I have in the classpath. Also, JMS communication works fine in both cases (i.e. for the weblogic.jar and the wlfullclient.jar). The only thing that causes problems (at least as far as we have discovered) is getting a JDBC connection from a datasource. I simply fail to see why this is the case.
    Best regards,
    DirkInteresting. I hope the official support case solves your problem.
    I would like to dig further, but it's too far afield for me with
    the workload I have at the moment.
    Joe

  • "HttpServletRequest" from ContextHandler in JAAS Login Module

    Hi All. I've developed a custom authenticator in WL 9.1. This CA has a custom JAAS Login Module. Inside this module I use weblogic.security.auth.callback.ContextHandlerCallback in order to get javax.http.servlet.HttpServletRequest using the key HttpServletRequest.
    This component works properly in WL 9.1 but using the same component with the same configuration in WL 9.2 I'm experiencing a null pointer getting HttpServletRequest from context handler.
    Any idea about this issue ?
    Regards.

    i am new to JAAS. I am trying to write a custom authenticator in weblogic 9.2. how did u get the handle to ContextHandler to get the httpservletrequest.
    Edited by anishek at 07/23/2007 4:16 AM

  • JAAS Login Module Redirect to Iview

    I am having some difficulty getting a redirect to an Iview to work in our custom JAAS Login Module.  This code works in our current production environment, using Portal version EP6.0 SP2 Patch 35:
    callbacks[0] = new com.sap.security.api.logon.WebCallback();
    HttpServletResponse rsp = ((WebCallback) callbacks[0]).getResponse();
    rsp.sendRedirect(this.changepasswordurl + this.username);  //get url from property
    But this nearly identical code is not working in our development environment, running NetWeaver:
    WebCallback wcb = new WebCallback ();
    this.callbackHandler.handle(new Callback [] {wcb});
    HttpServletResponse rsp = wcb.getResponse();
    myLoc.infoT("URL: " + this.changepasswordurl + this.username);
    rsp.sendRedirect(this.changepasswordurl + this.username); //get url from property
    When the rsp.sendRedirect statement is executed, I get a stack dump:
    #1.5#00306EF4D7AD0048000000550000576000040C5F45EBE199#1139503241315#com.nike.portal.auth.PortalLoginModule#sap.com/irj#com.nike.portal.auth.PortalLoginModule#Guest#192####cd56b800998a11da8f7300306ef4d7ad#SAPEngine_Application_Thread[impl:3]_9##0#0#Info##Plain###URL: https://dev.XXXXX.com/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fnikeconnect!2fiviews!2fcommon!2fMyInfo!2f1-com-nike-iv_b2s-change-password?userid=ncportal02@yahoo.com#on!2fMyInfo!2f1-com-nike-iv_b2s-change-password?userid=ncportal02@yahoo.com#
    #1.5#00306EF4D7AD0048000000570000576000040C5F45EC2971#1139503241326#com.sap.engine.services.security#sap.com/irj#com.sap.engine.services.security#Guest#192####cd56b800998a11da8f7300306ef4d7ad#SAPEngine_Application_Thread[impl:3]_9##0#0#Error##Java###Error in some of the login modules.
    [EXCEPTION]
    #1#com.sap.engine.services.security.exceptions.BaseLoginException: Error in some of the login modules.
            at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:149)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:153)
            at com.sap.engine.system.SystemLoginModule.login(SystemLoginModule.java:90)
            at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
    When I cut the exact URL being redirected to from the trace log and paste it into a browser, it goes to the page just fine.
    Can anyone suggest a different method of performing a redirect from withing my JAAS Login Module in NetWeaver?  I'm thinking maybe I'm not getting the response object properly - any ideas?
    Thank you...
    Dave

    Thanks for the pointers.  We were able to get an SAP developer to take a look at this and he coded up this solution, which takes what you suggested and filled in all the blanks.  I am baffled as to how I would have figured this out on my own (like the RESPONSE_CODE value of 302), given the limited documentation around the HttpCallback.  We haven't had the opportunity to try this yet - I'll respond with a new post either way to let you know.  Anyway, here's the code snippet for how to perform a redirect:
    In the custom JAAS Login Module:
    setRedirect(callbackHandler, this.changepasswordurl);
    This is the setRedirect method:
    private void setRedirect(CallbackHandler ch, String redirectURL)
          throws IOException, UnsupportedCallbackException
        HttpSetterCallback setRCodeCB = new HttpSetterCallback();
        setRCodeCB.setType(HttpCallback.RESPONSE_CODE);
        setRCodeCB.setName("Moved Temporarily");
        setRCodeCB.setValue("302");
        HttpSetterCallback setRedirCB = new HttpSetterCallback();
        setRedirCB.setType(HttpCallback.HEADER);
        setRedirCB.setName("Location");
        setRedirCB.setValue(redirectURL);
        Callback[] cbSetter = new Callback[2];
        cbSetter[0] = setRCodeCB;
        cbSetter[1] = setRedirCB;
        ch.handle(cbSetter);

  • Help me understand JDBC connections using DataSource objects

    I'm writing a simple Java server application that accepts connections from multiple clients via RMI, connects to a SQL Server 2000 database via Microsoft's SQL 2000 JDBC driver, gets some data, and returns it to the client. The server application will handle every SQL database connection. However, it must be able to establish multiple simultaneous connections, since multiple clients may connect at the same time and request data.
    Sounds like a simple multi-threaded server that utilizes a connection pool for database connectivity, right? Well, if I want to do that, I have to register a PooledDataSource object with JNDI. My server threads that are handling requests will simply grab connections out of the pool to retrieve data (presumably).
    This seems like a fairly simple server application; however, all the information and tutorials I've read on using DataSource objects for database connections rather than DriverManager.getConnection() mention XML config files, J2EE application servers, Tomcat, WebSphere, etc. I really don't want to have to deal with all that just to get connection pooling and not have to use the DriverManager.getConnection() method.
    Is there a simple way to use DataSource objects without installing a lot of extra junk on my server?

    Thanks, diazlara. Your response was exactly what I needed to know. All the information I've read prior to this suggested that I had to have a J2EE server running, and that I had to register the DataSource object with JNDI. If you ladies and gents could take a quick look at this and let me know if I'm doing it correctly, I'd appreciate it.
    As proflux suggested, I wrote a connection manager:
    import java.sql.*;
    import javax.sql.*;
    import com.microsoft.jdbcx.sqlserver.*;
    public class SQLConnectionManager {
       private static ConnectionPoolDataSource connectionPool;
       // Initialize the connection manager
       public SQLConnectionManager() {
          init();
       // Retrieve a connection from the connection pool and return it
       public static Connection getConnection() {
          Connection connection = null;
          try {
             connection = connectionPool.getPooledConnection("myUsername", "myPassword").getConnection();
          catch (SQLException ex) {
             System.err.println("A problem occurred while getting a connection from the pool.");
             ex.printStackTrace();
          return connection;
       // Initialize the datasource and connection pool
       private static void init() {
          SQLServerDataSource mds = new SQLServerDataSource();
          mds.setDescription("MS SQLServerDataSource");
          mds.setServerName("127.0.0.1");
          mds.setPortNumber(1433);
          mds.setDatabaseName("SomeTable");
          mds.setSelectMethod("cursor");
          connectionPool = (ConnectionPoolDataSource) mds;
    }As you can see, I'm hard-coding the username and password for testing purposes. I'll incorporate a login/authentication system for any production code that I use this in.
    Once the SQLConnectionManager is created, connections can be retrieved as follows:
          Connection connection = null;
          try {
             connection = SQLConnectionManager.getConnection();
             System.out.println("** Got a SQL database connection from the pool");
             DatabaseMetaData metaData = connection.getMetaData();
             ResultSet rs = metaData.getCatalogs();
             while (rs.next()) {
                System.out.println("\tcatalog: " + rs.getString(1));
             rs.close();
             connection.close();
          catch (SQLException ex) {
             System.out.println("An exception occurred while connecting to the SQL Database:");
             ex.printStackTrace();
          }So, how does that look? I tested it out, and it seems to work just fine. Using this code, I am getting a connection from a pool, correct? I want to make sure of that. Also, are there any inherent weaknesses or flaws with this method that I need to be aware of?
    Thanks so much for all the helpful responses.

  • Cannot commit or rollback  a JDBC Connection from CAF project

    Hi Everybody,
    I'm working in CE 7.10. I have a CAF Project that gets a JDBC connection from a Custom Datasource to an external Database.
    Here is the code:
      try
        Context ctx = new InitialContext();
        DataSource ds = (DataSource) ctx.lookup("jdbc/MYDATABASE");               
        con = ds.getConnection();
        con.setAutoCommit(false);
        Statement statement = con.createStatement();
        String updateStatement = "UPDATE TABLE...";
        statement.executeUpdate(updateStatement);
        con.commit();
        catch(SQLException sqle){
             con.rollback();
    I got the following exception on line "con.setAutoCommit(false);":  --> "Cannot begin JDBC transaction from this connection of "MYDATABASE" DataSource. JTA transaction has already started."
    and the following on line "con.commit() / con.rollback()" : --> "Cannot commit JDBC transaction from this connection of "MYDATABASE" DataSource. This resource participates in a JTA transaction."
    If I run the same code from a webDynpro or a J2EE project it works ok, but not from a CAF Application Service. I tried to do it in a simple Class in the CAF Project and call this clas from the Application service, but I get the same error.
    Any Ideas??
    Thanks a lot!
    Regards.

    Solved with   "SessionContext.setRollbackOnly()" instruccion.
    Regards.

  • Retrieving JDBC Destinations from CE Server

    Hi,
    I am developing a Java Application ( Web Module) on NW CE 7.2 App Server via NWDS. This Application also uses a custom Oracle Database.
    I have added a Destination of type JDBC in the CE server for the custom Oracle Database to CE using NWA.
    under ConfigurationManagement->Destinations
    Now the API  com.sap.security.core.server.destinations.api I was not able to find a class for JDBCDestination. Below were the classes:
    Destination      A destination represents all the information required at the client side to make a connection to a backend system.
    DestinationService       The J2EE destination service is used for obtaining connections to backend systems.
    HTTPDestination      An HTTP destination is a special type of destination that addresses an HTTP endpoint at a target system.
    RFCDestination       Externally visible RFC Destination interface.
    AT the following javadocs link:
    http://help.sap.com/javadocs/nwce/current/se/com.sap.se/com/sap/security/core/server/destinations/api/package-summary.html
    Now my question is how do you retrieve JDBC destinations from CE? And what is the class for it?
    Below is a sample to get HTTP destination:
    import com.sap.security.core.server.destinations.api.DestinationException;
    import com.sap.security.core.server.destinations.api.DestinationService;
    import com.sap.security.core.server.destinations.api.HTTPDestination;
        DestinationService dstService = (DestinationService)
        ctx.lookup(DestinationService.JNDI_KEY);
        if (dstService == null)
            throw new NamingException("Destination Service not available");
        Destination destination = dstService.getDestination("HTTP","dst-1");
        //for HTTP destination: cast
        HTTPDestination httpDestination = (HTTPDestination) destination;
        //obtain a HTTPUrlConnection from the destinationHttpURLConnection
        httpConnection = httpDestination.getURLConnection();
    How do I do the same for JDBC connection type? Any idea on this would be great
    Thanks,
    Dhananjay

    Thanks for the help.
    I was suspecting there was a problem with the driver. Microsoft's Driver worked perfectly for SQL 2000, but my target database is SQL 7 and the driver is not reverse compatible.
    I am looking for a Free liscenced JDBC driver that will work with SQL 7 (other than the sun.jdbc.odbc.JdbcOdbcDriver)
    Nothing fancy needs to be supported, just scrollable result sets, and basic insert, update, select, exec commands.

  • Native JDBC connection from BO Explorer to HANA

    Hello.
    Could you please give me the step-by-step instructions to set up the native HANA JDBC connection from BO Explorer?
    I followed the steps in P.12-13 of 'SAP BusinessObjects Explorer Administrator's Guide for BO BI 4.0 SP02', but I could not see the "SAP High-Performance Analytic Appliance (SAP HANA) 1.0" in 'Manage Spaces' in BO Explorer.
    I did as follows:
    1. Log on to the BusinessObjects Enterprise CMC as Administrator.
    2. Click "Servers".
    3. Expand "Service Categories", right-click on "Explorer Services", then select 'Stop Server'.
    4. Return to CMC's home screen, and click "Applications".
    5. Right-click "Explorer", and select "Properties".
    6. Within "Advanced Configuration", set the following parameters, and save them.
    newdb.system.alias = NEWDBHANA
    newdb.url = jdbc:sap://HANA_ADDRESS:30015
    newdb.authentication.mode = ConfiguredIdentity
    newdb.user = system
    newdb.password = manager
    newdb.connections.enabled = true
    7. Return to CMC's home screen, and click "Users and Groups".
    8. Click "User List", right-click on "Administrator", and select "Properties".
    9. Check "Enable Database Credentials", and enter Windows' administrator and its password, and save them.
    10. Return to CMC's home screen, and click "Servers".
    11. Expand "Service Categories", right-click on "Explorer Services", then select 'Start Server'.
    12. Log on to the BO Explorer as Administrator.
    13. Click "Manage Spaces".
    14. "SAP High-Performance Analytic Appliance (SAP HANA) 1.0"  is not shown in "Sources".
    Thank you very much,
    -mamoru

    Hello,
    Never give up, never surrender!
    Quote from Galaxy Quest
    Here is our maxdb.sbo file before the adjustment:
              <DataBase Active="Yes" Name="SAP High-Performance Analytic Appliance (SAP HANA) 1.0">
          <JDBCDriver>
                 <!--  Uncomment and edit the following lines
                      to define java classes required by JDBC driver
                    &lt;ClassPath&gt;
                        &lt;Path&gt;your jar or class files directory&lt;/Path&gt;
                    &lt;/ClassPath&gt;
                  -->
            <Parameter Name="JDBC Class">com.sap.db.jdbc.Driver</Parameter>
            <Parameter Name="URL Format">jdbc:sap://$DATASOURCE$</Parameter>
          </JDBCDriver>
          <Parameter Name="Extensions">newdb,jdbc</Parameter>
          <Parameter Name="SQL Parameter File">newdb</Parameter>
          <Parameter Name="Description File">jdbc2</Parameter>
          <Parameter Name="Force Execute">Always</Parameter>
          <Parameter Name="Catalog Separator">.</Parameter>
          <Parameter Name="Array Fetch Size">10</Parameter>
        </DataBase>
    And here is same file after adjustment:
              <DataBase Active="Yes" Name="SAP High-Performance Analytic Appliance (SAP HANA) 1.0">
          <JDBCDriver>
            <ClassPath>
              <Path>/usr/sap/hdbclient/ngdbc.jar</Path>
            </ClassPath>
            <Parameter Name="JDBC Class">com.sap.db.jdbc.Driver</Parameter>
            <Parameter Name="URL Format">jdbc:sap://$DATASOURCE$</Parameter>
          </JDBCDriver>
          <Parameter Name="Extensions">newdb,jdbc</Parameter>
          <Parameter Name="SQL Parameter File">newdb</Parameter>
          <Parameter Name="Description File">jdbc2</Parameter>
          <Parameter Name="Force Execute">Always</Parameter>
          <Parameter Name="Catalog Separator">.</Parameter>
          <Parameter Name="Array Fetch Size">10</Parameter>
        </DataBase>
    Tomas

  • Accessing LDAP in a custom JAAS login module

    Hi,
    I have developed a custom jaas login module in CE 7.1. I created a java dc which contains a class extending AbstractLoginModule. This DC is deployed on to the server using an EAR DC. I am trying to access LDAP in the custom login module. I am trying to establish an SSL connection to LDAP. For this purpose i have created a custom socket factory class which extends SSLSocketFactory. I used the code below to establish the connection.
              Hashtable<String,String> env=new Hashtable<String,String>();
              DirContext dirContext=null;
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL,ldapURL);
                    env.put(Context.SECURITY_PROTOCOL,"ssl");
                    env.put("java.naming.ldap.factory.socket", "com.test.ldap.MySSLSocketFactory");
                    dirContext=new InitialDirContext(env);
    MySSLSocketFactory is the name of custom socket factory.
    During a login process, the above code results in error because the connection to LDAP server could not be established. However the same code when executed in a webdynpro DC is working without any problem. What could be the reason for this?
    This is the error i could see in defaultTrace
    javax.naming.CommunicationException: js24.na.domain.net:636 [Root exception is java.lang.ClassNotFoundException: com.test.ldap.MySSLSocketFactory
    Loader Info -
    ClassLoader name: [service:security]
    Living status: alive
    Direct parent loaders:
       [system:Frame]
       [library:j2eeca]
       [service:timeout]
       [service:com.sap.security.core.ume.service]
       [service:adminadapter]
    Resources:
       /usr/sap/SV3/J10/j2ee/cluster/bin/services/security/lib/private/sap.comtcjesecurityimpl.jar
    at com.sun.jndi.ldap.Connection.<init>(Connection.java:205)
    at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
    at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1579)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2681)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:299)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
    at com.sap.engine.system.naming.provider.DefaultInitialContext._getDefaultInitCtxt(DefaultInitialContext.java:64)
    at com.sap.engine.system.naming.provider.DefaultInitialContext.<init>(DefaultInitialContext.java:45)
    at com.sap.engine.system.naming.provider.DefaultInitialContextFactory.getInitialContext(DefaultInitialContextFactory.java:41)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)

    Hi,
    I used an EJB to perform the LDAP search and called the EJB from the login module. It is working as expected.
    Regards,
    Shabeer

  • Problems deploying custom JAAS login module (ClassNotFound)

    Hi,
    I've developed a custom made JAAS login module that filters on IP addresse which I am moving from 6.20 to 6.40.
    I've pretty much followed the procedures from http://help.sap.com/saphelp_nw04/helpdata/de/46/3ce9402f3f8031e10000000a1550b0/content.htm , the only major difference is that I needed a reference to WebCallback and therefore a reference to com.sap.security.api.sda from my library project.
    I've especially followed the step with "Adding a Reference to the Classloader of the Security Provider" (http://help.sap.com/saphelp_nw04/helpdata/de/2b/23e4407211732ae10000000a155106/content.htm) , but I think its this step that fails. This has been set to library:<library name> , where <library name> is what is written on the right hand side of visual admin under library. I see that the library is deployed under the folder bin\ext\customer.com~com.customer.portal.login.IPRuleLibrary   , so maybe I will try that name tomorrow morning.
    The exceptions I get are
    #1.5#001321B3B106005C0000000800002E380004039375E59BA6#1129831779936#com.sap.engine.services.security#sap.com/irj#com.sap.engine.services.security#Guest#1####ae7c5500419411daa7fd001321b3b106#SAPEngine_Application_Thread[impl:3]_17##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.security.exceptions.BaseSecurityException: Cannot load a login module.
         at com.sap.engine.services.security.login.LoginContextFactory.init(LoginContextFactory.java:95)
         at com.sap.engine.services.security.login.LoginContextFactory.getLoginContext(LoginContextFactory.java:133)
         at com.sap.engine.services.security.server.AuthenticationContextImpl.getLoginContext(AuthenticationContextImpl.java:227)
         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)
         at com.sap.engine.system.SystemLoginModule.initialize(SystemLoginModule.java:72)
         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)
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:662)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:534)
         at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.getLoggedInUser(SAPJ2EEAuthenticator.java:86)
         at com.sapportals.portal.prt.service.authenticationservice.AuthenticationService.getLoggedInUser(AuthenticationService.java:305)
         at com.sapportals.portal.prt.connection.UMHandler.handleUM(UMHandler.java:96)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:186)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:295)
         at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:351)
         at com.sap.portal.navigation.Gateway.service(Gateway.java:68)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    Caused by: java.lang.ClassNotFoundException: com.customer.portal.login.IPRuleLoginModule
    Found in negative cache
    - Loader Info -
    ClassLoader name: [common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore]
    Parent loader name: [Frame ClassLoader]
    References:
       library:com.sap.ip.basecomps
       library:core_lib
       common:library:IAIKSecurity;library:activation;library:mail;library:tcsecssl
       library:servlet
       library:sapxmltoolkit
       library:com.sap.mw.jco
       library:com.sap.util.monitor.jarm
       library:j2eeca
       library:opensql
       interface:security
       interface:log
       interface:shell
       interface:keystore_api
       library:ejb20
       interface:webservices
       library:com.sap.guid
       interface:appcontext
       interface:endpoint_api
       interface:resourceset_api
       interface:resourcecontext_api
       common:service:iiop;service:naming;service:p4;service:ts
       interface:ejbcomponent
       interface:container
       interface:visual_administration
       interface:transactionext
       interface:dsr_ejbcontext_api
       service:timeout
       library:tc~jmx
       library:tcSLUTIL
       service:memory
       library:antlr
       library:jdbdictionary
       library:opensqlextensions
       interface:cross
       service:locking
       service:file
    Resources:
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_toolkit_api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    adminadapter
    adminadapter.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    com.sap.security.core.ume.service
    com.sap.security.core.ume.service.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    webservices_lib
    jaxrpc-api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    com.sap.security.api.sda
    com.sap.security.api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    dbpool
    opensqllib.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    jmx
    jmx_sec.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    webservices_lib
    jaxm-api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    keystore
    keystore.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    security
    security.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    basicadmin
    jstartupapi.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_jaas.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    connector
    connectorimpl.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    webservices_lib
    webservices_lib.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_jaas.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_service_api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_userstore_lib.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    webservices_lib
    saaj-api.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    com.sap.security.core.sda
    com.sap.security.core.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    com.sap.security.core.sda
    com.sap.security.core.tpd.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_csi.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_ssf.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    userstore
    userstore.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    dbpool
    sqljimpl.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_xmlbind.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_util.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    dbpool
    dbpool.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    deploy
    deploy.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_saml_toolkit_core.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    jmx
    jmx.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_compat.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    jmx_notification
    jmx_notification.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    configuration
    configuration.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    basicadmin
    jstartupimpl.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_https.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    services
    basicadmin
    basicadmin.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    security.class
    tc_sec_jaas_test.jar
       C:
    usr
    sap
    EQ2
    J13
    j2ee
    cluster
    server1
    bin
    ext
    com.sap.security.api.sda
    com.sap.security.api.perm.jar
    Loading model: {parent,local,references}
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:348)
         at com.sap.engine.services.security.Util.loadClass(Util.java:262)
         at com.sap.engine.services.security.Util.loadClassFromAdditionalLoaders(Util.java:204)
         at com.sap.engine.services.security.login.LoginContextFactory.init(LoginContextFactory.java:92)
         ... 45 more
    #1.5#001321B3B106005C0000000900002E380004039375E5A109#1129831779936#com.sap.engine.services.security#sap.com/irj#com.sap.engine.services.security#Guest#1####ae7c5500419411daa7fd001321b3b106#SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Java###Cannot load login module class .#1#com.customer.portal.login.IPRuleLoginModule#

    Hi,
    The problem was solved by using the name customer.com~com.customer.portal.login.IPRuleLibrary for the library (so basically look at the name of your library folder under cluster\j2ee\serverx\bin\ext , not the name reported by visual admin).
    Also I was able to modify the properties of the login module runtime, which made me very happy
    Dagfinn

  • JDEV deployment of web app with custom JAAS login module fails

    For the first time, I am trying to implement a custom JAAS login module.
    JDEV deployment to standalone OC4J only fails when my orion-application.xml is included. The deployment fails with a java.lang.InstantiationException.
    This what I have done:
    1) Wrote a custom LoginModule called com.whirlpoool.sjtc.jaas.gpa.LDAPLoginModule.
    2) Put it and its dependent classes in a jar named sjtcjaas.jar.
    3) Put the jar in $ORACLE_HOME\j2ee\home\lib
    4) Changed library_path in $ORACLE_HOME\j2ee\home\config\application.xml to
    <library path="../../home/lib/scheduler.jar;../../home/lib/sjtcjaas.jar" />
    5) Added an orion-application.xml to the JDEV project. (I used an Oracle How-to as a pattern, see below.)
    I think I'm close but no cigar, yet. Any help would be appreciated.
    Regards,
    Al Malin
    =============== orion-application.xml ========================================
    <?xml version="1.0"?>
    <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.0.0" default-data-source="jdbc/OracleDS" schema-major-version="10" schema-minor-version="0" >
    <security-role-mapping name="sr_manager">
    <group name="managers" />
    </security-role-mapping>
    <security-role-mapping name="sr_developer">
    <group name="developers" />
    </security-role-mapping>
    <log>
    <file path="application.log" />
    </log>
    <!-- Configuring a Login Module in an Application EAR file. -->
    <jazn-loginconfig>
    <application>
    <name>customjaas</name>
    <login-modules>
    <login-module>
    <class>com.whirlpoool.sjtc.jaas.gpa.LDAPLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    <option>
    <name>debug</name>
    <value>true</value>
    </option>
    </options>
    </login-module>
    </login-modules>
    </application>
    </jazn-loginconfig>
    </orion-application>

    Starting OC4J from c:\oc4j\j2ee\home ...
    2006-09-07 13:45:28.484 NOTIFICATION JMS Router is initiating ...
    06/09/07 13:45:29 Oracle Containers for J2EE 10g (10.1.3.0.0) initialized
    2006-09-07 13:45:58.609 NOTIFICATION Application Deployer for aam STARTS.
    2006-09-07 13:45:58.640 NOTIFICATION Copy the archive to C:\oc4j\j2ee\home\applications\aam.ear
    2006-09-07 13:45:58.656 NOTIFICATION Initialize C:\oc4j\j2ee\home\applications\aam.ear begins...
    2006-09-07 13:45:58.656 NOTIFICATION Auto-unpacking C:\oc4j\j2ee\home\applications\aam.ear...
    2006-09-07 13:45:58.687 NOTIFICATION Unpacking aam.ear
    2006-09-07 13:45:58.687 NOTIFICATION Unjar C:\oc4j\j2ee\home\applications\aam.ear in C:\oc4j\j2ee\home\applications\aam
    2006-09-07 13:45:58.750 NOTIFICATION Done unpacking aam.ear
    2006-09-07 13:45:58.750 NOTIFICATION Finished auto-unpacking C:\oc4j\j2ee\home\applications\aam.ear
    2006-09-07 13:45:58.750 NOTIFICATION Auto-unpacking C:\oc4j\j2ee\home\applications\aam\aam.war...
    2006-09-07 13:45:58.750 NOTIFICATION Unpacking aam.war
    2006-09-07 13:45:58.765 NOTIFICATION Unjar C:\oc4j\j2ee\home\applications\aam\aam.war in C:\oc4j\j2ee\home\applications\aam\aam
    2006-09-07 13:45:58.765 NOTIFICATION Done unpacking aam.war
    2006-09-07 13:45:58.765 NOTIFICATION Finished auto-unpacking C:\oc4j\j2ee\home\applications\aam\aam.war
    2006-09-07 13:45:58.812 NOTIFICATION Initialize C:\oc4j\j2ee\home\applications\aam.ear ends...
    2006-09-07 13:45:58.828 NOTIFICATION Starting application : aam
    2006-09-07 13:45:58.828 NOTIFICATION Initializing ClassLoader(s)
    2006-09-07 13:45:58.828 NOTIFICATION Initializing EJB container
    2006-09-07 13:45:58.828 NOTIFICATION Loading connector(s)
    2006-09-07 13:45:58.843 NOTIFICATION application : aam is in failed state
    06/09/07 13:45:58 WARNING: Application.setConfig Application: aam is in failed state as initialization failedjava.lang.InstantiationException
    Sep 7, 2006 1:45:58 PM com.evermind.server.Application setConfig
    WARNING: Application: aam is in failed state as initialization failedjava.lang.InstantiationException
    06/09/07 13:45:58 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException
    06/09/07 13:45:58 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:510)
    06/09/07 13:45:58 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:191)
    06/09/07 13:45:58 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    06/09/07 13:45:58 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    06/09/07 13:45:58 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    06/09/07 13:45:58 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
    06/09/07 13:45:58 at java.lang.Thread.run(Thread.java:595)
    06/09/07 13:45:58 Caused by: java.lang.InstantiationException
    06/09/07 13:45:58 at com.evermind.server.ApplicationStateRunning.initDataSources(ApplicationStateRunning.java:1424)
    06/09/07 13:45:58 at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:195)
    06/09/07 13:45:58 at com.evermind.server.Application.setConfig(Application.java:391)
    06/09/07 13:45:58 at com.evermind.server.Application.setConfig(Application.java:308)
    06/09/07 13:45:58 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
    06/09/07 13:45:58 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:507)
    06/09/07 13:45:58 ... 6 more
    2006-09-07 13:45:58.890 NOTIFICATION Application Deployer for aam FAILED.
    2006-09-07 13:45:58.890 NOTIFICATION Application UnDeployer for aam STARTS.
    2006-09-07 13:45:58.906 NOTIFICATION Removing all web binding(s) for application aam from all web site(s)
    2006-09-07 13:45:59.015 NOTIFICATION Application UnDeployer for aam COMPLETES.
    06/09/07 13:45:59 WARNING: DeployerRunnable.run java.lang.InstantiationExceptionoracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.InstantiationException
    at com.evermind.server.ApplicationStateRunning.initDataSources(ApplicationStateRunning.java:1424)
    at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:195)
    at com.evermind.server.Application.setConfig(Application.java:391)
    at com.evermind.server.Application.setConfig(Application.java:308)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:507)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:191)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    ... 4 more
    2006-09-07 13:45:59.031 WARNING java.lang.InstantiationException

  • Opinions on implementing a JAAS login module to achieve SSO

    We are looking at implementing SSO from a sharepoint website to the portal.  The users who are accessing the Sharepoint site are using their own computers and are not members of the AD Domain, so they could theoretically be using any computer in the world to access Sharepoint.
    the desired user experience looks something like this.
    user--login> sharepoint site -no login--
    >portal
    One of the methods we are looking at to achieve this is to implement a custom JAAS login module that would authenticate the user if they are coming from the Sharepoint site.
    I would like to get your opinions on how viable you think this method is.  One of the goals of this method is ease of implementation, so if you can think of an easier way to implement this please let us know.
    the method is basically this.
    1. User logs into sharepoint using their AD username and password and establish an active session with sharepoint
    2. user navigates to a link in sharepoint that points to a resource in the SAP Portal
    3. we don't want the user to have to login to access the resource when they click on the link
    4. to facilitate this, sharepoint has constructed the link in the following way
    5. the link is an https link
    6. the link has two additional parameters in addition to whatever is necessary to navigate to the resource
    7. the parameters are
    8. un = the users AD username
    9. uh = sha1("secret_password_known_to_both_the_login_module_and_sharepoint" + "username")
    10. the user clicks the link and is directed to the SAP portal
    11. the sap portal has a custom JAAS login module which performs it's checks before the other login modules
    12. the custom module computes ( sha1("secret_password_known_to_both_the_login_module_and_sharepoint" + un)) and then compares the result with uh, if they are equal, the custom login module authenticates the user bypassing any further need for authentication, otherwise authentication passes to the original authentication modules as normal.
    If you think there is an easier way, please let us know.  We are essentially looking for the easiest/fastest way to implement this functionality that is still secure.

    Hey Gary,
      I'm currently using Apache running on RedHat that leverage Apache's mod_rewrite module. I've got a bank of 6 reverse proxies sitting in front of an SAP Portal and each proxy runs on a host with dual 3.33GHz processors and 8Gb or RAM. I know... they're waaay over-sized and they pretty much snooze all day.
      This is the sole entry point for all SAP users and we sized them to accommodate the "worst case" of about 5000 (potential) named users, concurrently. Realistically, we've only ever had about 1500 unique users hitting the systems in a day (following an upgrade go-live, everybody is curious and wants to log on) and a typical load of about 500 to 750 users in a day.
      Never had a real performance problem to speak of. As long as the proxies are tuned properly (ssl cache, sessions, etc.), you should be fine.
      Setting header variables and some other "custom stuff" is handled in Perl (need Apache's mod_perl active). We've got a script that's called by all users before being passed to the Portal.
      We used IISProxy.dll with an IIS web server a long time ago (5 years maybe?) but opted to can it in favor of the approach described above.
      If you ask SAP, they'll recommend you use a WebDispatcher... and that's certainly an option as well.
    -Kevin

  • Looking for example: JAAS login module using ADF BC

    Hello all,
    I have seen the article at http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm by Frank and Duncan detailing how to put together a login module that uses the database for authentication. Great idea. I would like to take it to the next level and use an ADF BC View Object to do the authentication and role assignment for users, but am stuck on a few points. First of all, is there anyone out there who has done this and would care to share? If not:
    1). How do I get a reference to the AM so that I can look up a view object in the login module?
    2). I assume that I am going to need to add my model project classes to the system classpath, correct?
    3). What are the other gotchas?
    4). Or should this be the first question, is this even possible?

    Hi John,
    I am trying to find a relevant example on JAAS login module with ADF BC,
    i have this application that is ready to go in production deployed on a test application server
    everything seems to work fine but it is totally deprived of security :o(
    i have sent post to get some information i read most of it i even came across your blog on the matter
    i am sort of understanding the things needed to do but i would need a working example to get a better grasp on the this subject. I need i think to built a custom login module but i dont know what exactly can be coded inside the jar file that is read from the application and that forces the authentification so if you could help in my research for an example you OR anyONE
    it would be appreciated
    Carl

  • Custom JAAS Login Module 9.0.4 configuration problems

    Hello,
    We have created a custom JAAS Login Module on OC4J 9.0.4 and are having some sort of configuration problem
    We always get this error:
    Caused by: javax.security.auth.login.LoginException: Login Failure: all modules ignored
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:779)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
         at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:535)
    The Login Module is configured for a specific deployed application in the global jazn-data.xml and is being run as I have attached a debugger to the app server.
    Our authentication process succeeds and we return a "true" from the login() method. No exceptions are thrown from our Login Module.
    our ORACLE_HOME/j2ee/home/config/jazn-data.xml has this added
    <application>
    <name>helloworld</name>
    <login-modules>
    <login-module>
    <class>com.test.JaasLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    </options>
    </login-module>
    </login-modules>
    </application>
    The j2ee/home/application-deployments/helloworld/jazn-data.xml looks like this:
    <?xml version="1.0" encoding="UTF-8" standalone='yes'?>
    <!DOCTYPE jazn-data PUBLIC "JAZN-XML Data" "http://xmlns.oracle.com/ias/dtds/jazn-data.dtd">
    <jazn-data />
    and we added this into the j2ee/home/application-deployments/helloworld/orion-applicaton.xml
    <jazn provider="XML" location="jazn-data.xml" >
    <property name="role.mapping.dynamic" value="true"/>
    <property name="custom.loginmodule.provider" value="true"/>
    <property name="jaas.username.simple" value="true" />
    </jazn>
    Are we missing anything? Our code runs, it seems like there is something lacking in the configuration on the OC4J side of things.
    Anyone know what we are missing?
    Thanks....

    Hi,
    if you are on 9.0.4 then <property name="custom.loginmodule.provider" value="true"/> shouldn't work because its a parameter of 10.1.3
    Frank

  • Configure JAAS login module stack to support x.509 certificates without SSL

    I want to use x.509 certificates for authentication against a EP 7.0 but I don’t want to have SSL traffic on the network segment where the portal resides. Obviously the SSL must be terminated in an application gateway that sends the certificate to the portal in the header.
    I know that AcceptClientCertWithoutSSL must be set to true in the http provider and that ClientCertificateHeaderName is the name of the header variable that contains the user’s certificate, default is SSL_CLIENT_CERT.
    What I don’t know is how to configure my JAAS login module stack, my suggestion would be this:
    EvaluateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    ClientCertLoginModule OPTIONAL {Rule1.getUserFrom=SSL_CLIENT_CERT}
    CreateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    BasicPasswordLoginModule REQUISITE {}
    CertPersisterLoginModule OPTIONAL {Rule1.getUserFrom=SSL_CLIENT_CERT}
    CreateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    My concern is does the ClientCertLoginModule and the CertPersisterLoginModule read from the header variable? If they don’t, is there another login module that should be used in this case?

    Hi Claus,
    you got the flags right but the options of the login modules (LM) are wrong, so the certificate authentication won't work.
    There's two problems I see: (1) Rule1.getUserFrom is not a valid option for the LM CertPersisterLoginModule, and (2) SSL_CLIENT_CERT is not a valid value for the option Rule1.getUserFrom of the ClientCertLoginModule.
    Looking at this topic:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ea/301e3e6217b40be10000000a114084/content.htm
    the header variable used to pass the certificate is maintained in the HTTP provider service properties but since you use the default you don't need to maintain that part of the config. You also don't need the CertPersisterLoginModule in the config because it is used for automatic certificate mapping, which doesn't work when you don't have SSL to the portal.
    So with the above said your LM stack config should look like this:
    EvaluateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    ClientCertLoginModule OPTIONAL {Rule1.getUserFrom=wholeCert}
    CreateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    BasicPasswordLoginModule REQUISITE {}
    CreateTicketLoginModule SUFFICIENT {ume.configuration.active=true}
    If this doesn't work I'd suggest opening a support ticket.
    Regards,
    Yonko

Maybe you are looking for