aanchal mathur

+ Follow
since Sep 13, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by aanchal mathur


I have my application running on WAS v5.1 and i need to connect the same to DB2 v7.2 . I created the datasource etc succesfully using the WAS Admin and when i test i.e "Test Connection" for the datasource , it says successfully connected. I am using "DB2 Universal JDBC Driver-compliant Provider" and have made sure that the jar files are all in place .
The Datasource Class name --> com.ibm.db2.jcc.DB2ConnectionPoolDataSource

The db2 server is on a different machine and i have no db2 client etc installed on the machine which contains the Application server.

When i run my application using above defined Datasource i get the following error :

B]ConnectionMan E J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: javax.resource.spi.ResourceAllocationException: DSRA8100E: Unable to get a PooledConnection from the DataSource.[/B]

Am also getting the follwoing error:

B]com.ibm.db2.jcc.b.SQLException: null user name not allowed with security mechanism
at com.ibm.db2.jcc.a.b.a(b.java:426)
at com.ibm.db2.jcc.a.b.a(b.java:293)
at com.ibm.db2.jcc.a.b.<init>(b.java:224)
at com.ibm.db2.jcc.a.c.<init>(c.java:31)
at com.ibm.db2.jcc.DB2PooledConnection.connect(DB2PooledConnection.java:107)
at com.ibm.db2.jcc.DB2PooledConnection.<init>(DB2PooledConnection.java:70)
at com.ibm.db2.jcc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:77)
at com.ibm.db2.jcc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:55)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)

What could be the reason for it to show success in WAS Admin and not working when i run the datasource using my application?

So i need to install the db2 client on the same machine as WAS v5.1?

Please help..

aanchal ..
[ July 08, 2004: Message edited by: aanchal mathur ]
17 years ago

I have successfully installed Websphere MQ (v5.3) and WAS 5.1 . I have created a MDB in my ear which basically is supposed to lookup a queue in the WebSphereMQ , and just print the message to screen.
I created the queue, it connectionfactory etc using JMSAdmin.
Next i then created a Listener Port in WAS5.1 which i called as "MQSeriesJMS" which bascially had the
Connection factory JNDI name as jms/ivtQCF
Destination JNDI name as jms/ivtQ.

Next i created the Websphere JMS Provider as follows :
WebSphere Queue Connection Factories -->
Name --> ivtOCF
JNDI Name --> jms/ivtQCF

Simialrly the WebSphere Queue Destination Factories -->
Name --> ivtQ
JNDI Name --> jms/ivtQ

Also in the web.xml i defined the follwing:

< resource-ref id="ResourceRef_1034735563261" >
< res-ref-name > jms/ivtQCF </ res-ref-name >
< res-type > javax.jms.QueueConnectionFactory </ res-type >
< res-auth > Application </ res-auth >
</ resource-ref >
< resource-ref id="ResourceRef_1034735563281" >
< res-ref-name > jms/ivtQ </ res-ref-name >
< res-type > javax.jms.Queue </ res-type >
< res-auth > Application </ res-auth >
</ resource-ref >

And in the ejb-jar.xml its as follows :

< message-driven id="SalesMDB" >
< display-name > SalesMDB </ display-name >
< ejb-name > SalesMDB </ ejb-name >
< ejb-class > com.infocorpnow.a2g.messageobjects.SalesMDB </ ejb-class >
< transaction-type > Container </ transaction-type >
< message-driven-destination >
< destination-type > javax.jms.Queue </ destination-type >
</ message-driven-destination >
</ message-driven >

I then restarted my server, deployed the ear and in the option for Listener Port Name during my ear deployment i gave it the name "MQSeriesJMS".

The code i use in my SessionBean to send the messaeg to the queue is :

String QMGR = "QM_aanchal";
String QUEUE= "anchal" ;
String qcfLookup = "ivtQCF";
String qLookup= "ivtQ";
javax.jms.Queue ioQueue = null;
QueueSession session= null;
QueueConnection connection = null;
QueueConnectionFactory factory = null;
Context ctx = null;
String icf = "com.sun.jndi.fscontext.RefFSContextFactory";
String url = null;
String outString="TESTING QM via JMS with CustomerSBIMPL";
boolean transacted = false;

ctx = new InitialContext();
factory = (QueueConnectionFactory)ctx.lookup("java:comp/env/jms/ivtQCF");
connection = factory.createQueueConnection();
session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = session.createSender(ioQueue);
TextMessage outMessage = session.createTextMessage();
System.out.println("Adding Text");
catch(Exception e)


When i call the above method in my application i get the follwoing error:

javax.naming.NameNotFoundException: Context: aanchal/nodes/aanchal/servers/server1, name: jms/ivtQCF: First component in name jms/ivtQCF not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0]


Not sure what is it that i am missing out on.
Incase anyone can help me please let me know.

17 years ago
Thanx Chopra

Got it installed and Runnning after choosing Custom Install.
17 years ago

I downloaded the Websphere MQ v5.3 which was earlier (MQSeries) . I needed to run the JMSAdmin , but my Java folder only had a lib folder and no bin folder with the batch file to run JMSAdmin as used to be in MQSeriesv5.2
I read on the net that the v5.3 has the "Webpshere MQ classes for Java and JMS " installed along with the v5.3 installation. We dont have to use the supportpac MA088. So how come i still dont have the classes for Java and JMS. Have i missed out on any supporting files which were needed for running the JMSAdmin. Please could anyone give me the url where I can download the "WebSphere MQ classes for Java and WebSphere MQ classes for Java Message Service" for Websphere MQ v5.3

17 years ago
Hi Kyle,

Thanx for a quick Reponse. Since i am new with Webservices you may need to guide me a little further with the WS-I compliancy. The Java Webservice was already existin and working with the Oracle9ias App server. i.e VB 6.0 Client was talkin to the Webservice deployed on Oracle9ias App server successfully. I made no changes to the WebService and instead using the EJB2WebService tool provided by IBM generated the various files needed by Websphere inorder to deploy it as a Webservice.
The Deployment shows success on Webpshere with the following message "And now the Servcies..." , so i am assuming from this message that the Servcie has been deployed successully.

When i access the Service frmo a Java Client using Apache Soap i can c the correct response on TCPMON , but on the comman prompt i get the followin error :

[SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a ' <a href="http://soap.ejb.businessobjects.a2g.infocorpnow.com:querySessionBean</b rel="nofollow">" target="_blank">http://soap.ejb.businessobjects.a2g.infocorpnow.com:querySessionBean

Next when i call the same service from a VB utility runnin MS Soap toolkit 3.0 , i get the following error on TCPMON :

[CDATA[org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfffe) was found in the prolog of the document.[/B]

And in the Websphere System.out log file i get the following error :

faultCode: Server.generalException
faultString: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfffe) was found in the prolog of the document.
faultActor: null

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfffe) was found in the prolog of the document.
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:150)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:773)
at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:640)
at com.ibm.ws.webservices.engine.Message.getSOAPEnvelope(Message.java:451)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.checkSOAPSemantics(JAXRPCSOAPHandler.java:218)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.invokeServerRequestHandler(JAXRPCSOAPHandler.java:188)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:214)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:195)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:253)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:840)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfffe) was found in the prolog of the document.
at sax.SAX2DocumentEntityParserBase.reportFatalError(Unknown Source)
at com.ibm.xml.b2b.scan.WFCDocumentScannerSupport.reportFatalError(Unknown Source)
at com.ibm.xml.b2b.scan.latin.LatinWFCDocumentScanner.scanDocument(Unknown Source)
at sax.latin.LatinWFCSAX2DocumentEntityParser.scanDocument(Unknown Source)
at util.DocumentEntityParserBase.parse(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parseEntity(Unknown Source)
at sax.SAX2DocumentEntityParserBase.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:251)
at com.ibm.ws.webservices.engine.SOAPPart.getSOAPEnvelope(SOAPPart.java:742)
... 34 more

Please help me in identifyin wats the problem and how can it be rectified.
17 years ago

I have been trying to urgently find out if MS Soap is compatible with Websphere 5.1 . I have a vb client which needs to access the Java Web Service deployed under my Websphere 5.1 Application Server. I tried but on TCPMON i could c all garbage values in the request. does this mean i cannot use MSSoap client with the Websphere based webservice.

[ June 01, 2004: Message edited by: aanchal mathur ]
17 years ago

I have an application deployed on Websphere 5.1 Application Server and i have a webservice successfully deployed in my EAR file. Now since i need to test the Service i have an exsiting java standalone client which makes use of Apache Soap . But i keep gettin an error when i run the client program on Webshpere. But please note that the same clicnt program works fine with the Webservice deployed on the Oracle9ias Application Server. I cant understand wat is it that i've done incorrect. below i've pasted all the details.

I am using Apache SOAP 2.3.1 . The error i get is as follows :

[SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to deserialize a ' http://soap.ejb.businessobjects.a2g.infocorpnow.com:querySessionBean
Return' using encoding style 'null'.; targetException=java.lang.IllegalArgumentException: No Deserializer found to deserialize a 'http://soap.ejb
.businessobjects.a2g.infocorpnow.com:querySessionBeanReturn' using encoding style 'null'.]

But when i c the request and response on the TCPMON utility , itgives the following :


<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ns1:querySessionBean xmlns:ns1="A2GWebServiceBean" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<myrequest xsi:type="xsd:string"><propertyBag><employeeid>SUPER</employeeid><password>MTliMjg3ZGYyM2NkZmJhYjdiYTZmMzJmNTU5ZGNhNTc=</password><javaSessionBean>A2G_OrganizationsSB</javaSessionBean><function><readDynamicQuery><Query dataTag="Department" maxRecords="1"/></readDynamicQuery></function></propertyBag></myrequest>


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><querySessionBeanResponse xmlns="A2GWebServiceBean"><querySessionBeanReturn xmlns="http://soap.ejb.businessobjects.a2g.infocorpnow.com"><ReplyInformation><ReturnObject><Department address="82 Westmorland Street" city="Fredericton" country="Canada" departmentid="SNB" description="Service New Brunswick" enterpriseid="PNB" postalcode="E3B 5G4" province="New Brunswick"/><Department address2=" " departmentid="WEBDEP" description="Web Department" enterpriseid="PNB"/></ReturnObject><ErrorObject code="0" message="Success"/></ReplyInformation></querySessionBeanReturn></querySessionBeanResponse></soapenv:Body></soapenv:Envelope>

I'm pasting part of my java soap client used for SOAP Requests and Responses :

org.apache.soap.rpc.Call call = new org.apache.soap.rpc.Call();

org.apache.soap.transport.http.SOAPHTTPConnection conn = new org.apache.soap.transport.http.SOAPHTTPConnection();

org.apache.soap.encoding.SOAPMappingRegistry smr = new SOAPMappingRegistry ();

StringDeserializer sd = new StringDeserializer ();
smr.mapTypes (Constants.NS_URI_SOAP_ENC,new QName ("", "querySessionBeanReturn"), null, null, sd);

Below i'm pasting my WSDL file :

< xml version="1.0" encoding="UTF-8" ?>
< wsdl efinitions targetNamespace="http://soap.ejb.businessobjects.a2g.infocorpnow.com"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://soap.ejb.businessobjects.a2g.infocorpnow.com"; xmlns:intf="http://soap.ejb.businessobjects.a2g.infocorpnow.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; >
< wsdl:types >
< schema elementFormDefault="qualified" targetNamespace="http://soap.ejb.businessobjects.a2g.infocorpnow.com"; xmlns="http://www.w3.org/2001/XMLSchema"; >
< element name="querySessionBean" >
< complexType >
< sequence >
< element name="arg_0_0" nillable="true" type="xsd:string" />
< /sequence >
</ complexType >
</ element >
< element name="querySessionBeanResponse" >
< complexType >
< sequence >
< element name="querySessionBeanReturn" nillable="true" type="xsd:string" />
</ sequence >
</ complexType >
</ element >
</ schema >
</ wsdl:types >
< wsdl:message name="querySessionBeanRequest" >
< wsdl art element="impl:querySessionBean" name="parameters" />
</ wsdl:message >
< wsdl:message name="querySessionBeanResponse" >
< wsdl art element="impl:querySessionBeanResponse" name="parameters" />
</ wsdl:message >
< wsdl ortType name="A2GWebService" >
< wsdl peration name="querySessionBean" >
< wsdl:input message="impl:querySessionBeanRequest" name="querySessionBeanRequest" />
< wsdl utput message="impl:querySessionBeanResponse" name="querySessionBeanResponse" />
</ wsdl peration >
</ wsdl ortType >
< wsdl:binding name="A2GWebServiceBeanSoapBinding" type="impl:A2GWebService" >
< wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"; />
< wsdl peration name="querySessionBean" >
< wsdlsoap peration soapAction="" />
< wsdl:input name="querySessionBeanRequest" >
< wsdlsoap:body use="literal" />
</ wsdl:input >
< wsdl utput name="querySessionBeanResponse" >
< wsdlsoap:body use="literal" />
</ wsdl utput >
</ wsdl peration >
</ wsdl:binding >
< wsdl:service name="A2GWebServiceService" >
< wsdl ort binding="impl:A2GWebServiceBeanSoapBinding" name="A2GWebServiceBean" >
< wsdlsoap:address location="http://aanchal:9080/a2g/services/A2GWebServiceBean"; />
</ wsdl ort >
</ wsdl:service >
</ wsdl efinitions >

Please help and tell me where i'm goin wrong...

[ May 31, 2004: Message edited by: aanchal mathur ]
17 years ago

I have my application deployed on Websphere 5.1 and my Soap Webservice is part of my EAR. But i'm not sure how to deploy Webservices , in WAS. I dont have Websphere Studio , so please give me any information about how to deploy Webservices and how do i get about all it in Websphere.

17 years ago

My application is finally up and runnin but i still have a few doubts which i need to be cleared.
As mentioned earlier i have 1 Role defined in the ejb-jar.xml file which is globally used for websphere authorization. Hence while deployin the Application , in websphere , on the "Select UserRole page i check the "AllAuthenticated" checkbox i.e it shuld authorize the Role for all Authentciated Users.

Since i have a web-based application i am making use of Basic Authentciation . So since i wanted only a few action files (*.do files of struts framework) to be as the protected pages so i added only them to the web.xml file.
e.g < url-pattern > /tree.do < /url-pattern >
But the jsp pages which were the called by the "Forward" method of the same protected Action file , seemed to always fire the "UnAuthorized Exception" i.e /UnAuthenticated user . When on the jsp page it would check the request.getRemoteUser() , it will always show as "Null".
But when in the web.xml i would put the entire application as "protected" i.e
< url-pattern > /* < /url-pattern >

Then in this case my application would work fine and give no UnAuthnticated Exception etc.
Can anyone tell me why?
17 years ago
Thnax guys..

I'm done with the Security part of my application with Websphere.

But now i have a question about the JNDI naming for which i'll open a new post.

17 years ago

I agree with both of u , but Kyle its true at times Customers can be unresonable and we just have to do it.

So now what i am goin to do is define a Role in the ejb-jar.xml file which will be used to authorize all users who log into the application . And then anyways progarmmatically in all methods we get tthe Roles from the database based on the PRincipal of that user.
Am i correct or am i missin out on smethin.

I'm not sure wat u mean by

Doesn't hook into J2EE security, leaving the app server unsecured and open for intrusion

Can u give me more details.. i've read about it , but not sure of leaving the app server unsecured or the applications deployed in it as unsecured?
i.e For example, if i do implement programtic security will it affect the entire app server secuirty or just the applications security. Also i'm talkin terms of a general J2EE app server and not just Websphere.
Please give me you comments about the same.

Could you elaborate more on what u mentioned about Caching a user's session. I wasnt clear so if you could tell me which method to modify in File implementing the USerRegistry for implementing what you mentioned.Or wat procedure do proceed with instead of addding the Role in the ejb-jar.xml file.

[ May 20, 2004: Message edited by: aanchal mathur ]
17 years ago

Websphere mentioned that it is following the J2ee declarative manner for Authorization of Users. In my application deployed on
Websphere v5.1 my requirement is to Authenticate as well as Authorize users using a Programmatic manner i.e i dont want to define the
Roles etc in the Deployment Descriptor and instead will define it programmatically in my EAR. Is this possible in Websphere and if yes
the how ?
My requirement is to generate Roles dynamically when the application is deployed. If I make use of the Declarative manner for defining
roles etc in the deployment descriptor , then each time i have a new Role to be added to my application , i'll haev to re-deploy my
application . Instead if i do the same programmatically then i dont need to worry of re-deploying my application each time and instead
just use the Database tables in my case Oracle9i for the list of Roles , Users etc defined for the application.
Is this possible?

17 years ago
Hi Kyle,

I am working on Websphere v5.1 and the Redbook link u sent me was for v5.0 . Am not sure if there is much of a difference between the
2 versions.
I did go thru the doc but am very confused with the few things related to the Security model.

1). If i have multiple applications installed on websphere, i need to setup the Application Level Security . But from the many sites and
the Redbook i read, all i could figure out was that Websphere uses a "GLobal Security" and all Applications deployed on that server
have to make use of that Security which is defined on a global level ? Can u confirm the same for me.Incase i'm wrong then wat is the
rite way.

2).Why is it that i have to have the security related Class file i.e incase of CustomRegistry to be part of the Classpath.My security
related class file which implements the CustomRegistry of Websphere is part of the EAR then cant Webphere grab that file from the
installed folders instead of the ear or jar file being part of the classpath?

3). Can i have application level security enabled and global security disabled?

4). I have my jar file copied in the %WAS_HOME%/lib directory , after which WAS could get the USERRegistry file. But that UserREGISTRY file
is calling internal application level files which are part of the jar file also. But each time i start up the server it keeps giving a message
that "com/test/testSecurityEngine" not found. i.e the files packaged in with the UserRegitry file and being imported in the UserRegistry
cannot be found? Why am i gettin this error.

5). Also to get rid of this error i added an extra line in the setupCmdLine.bat file i.e a line to the WAS_CLASSPATH which basically is
pointing to my applications 'jar' file in the WAS lib dir. But inspite of doing so i still get "File not found" problem as mentioned
above in pt.no 4.Why?

This is it for now. More questions as I more ahead .

17 years ago
I have a web application with needs it authentication and authorization to be done using the Oracle9ias database. Hence i am making use of the UserRegistry class. I wrote my own class which implements the User Registry class. My doubts are as follows :
1). My implementation class "com.testexample.UserRegistryExample" is part of the ear. Now i read at many sites that the same class file should also be available in the class path. So what i did was , i put a copy of the jar part from the ear into the WASHOME/lib/ext directory. Do you think its correct to do that or we need to do it another way.
2). I have to implement Basic Authentication in my example. So i put in the configuration for Basic Authentication in the web.xml. Now i have my application deployed successfully and my CustomRegistry file in place, but each time i access my application from the browser , it doesnt bring up the authentication window at all , instead just brings up the jsp page with a few JSP Compilation error.
The contents of my web.xml file is as follows :

< security-constraint >
< web-resource-collection >
< web-resource-name >Bean Test Site< /web-resource-name >
< description >beantest directory</ description >
< url-pattern >/beantest/RobotEJBTest.jsp</ url-pattern >
< http-method >POST</ http-method >
< http-method >GET</ http-method >
</ web-resource-collection >
< web-resource-collection >
< web-resource-name >Administration</ web-resource-name >
< url-pattern >/tree.do</ url-pattern >
</ web-resource-collection >
< auth-constraint >
< role-name >a2g.supervisor< /role-name >
< role-name >a2g.admin</ role-name >
< role-name >a2g.depart-admin</ role-name >
< role-name >a2g.subdepart-admin</ role-name >
< role-name >a2g.cashier</ role-name>
</ auth-constraint >

< user-data-constraint>
< description >SSL not required</ description >
< transport-guarantee >NONE</ transport-guarantee >
</ user-data-constraint >
</ security-constraint >

The above is a listing as it exists in the web.xml file. So hope you can help me in finding out why i am not gettin the web based based authentication window in the browser each time i click on /tree.do


[ May 13, 2004: Message edited by: aanchal mathur ]

[ May 14, 2004: Message edited by: aanchal mathur ]
[ May 14, 2004: Message edited by: aanchal mathur ]
17 years ago
thanx Edy i finally figured out why it was giving me that error. But no i'm gettin the error "Invalid username/password". I created 2 properties in the Custom properties where in i entered the username and password as the 2 properties. But still i was getting "Invalid username/password".
I couldnt understand the "Mapping-Configuration Alias" . Each time i would set it to null and it would still defualt it to "defualtPrinicipalMapping".
Wasnt sure whats to be done there. If you could tell me i'd move 1 step ahead .
17 years ago