Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

NikhilN Kumar

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

Recent posts by NikhilN Kumar

Also, to add to my earlier request, I noticed that IBM and I am sure other companies are recommending that we dont use caching in Service locators, after J2EE 1.3 (or is this just a WebSphere feature)...

http://www-128.ibm.com/developerworks/websphere/techjournal/0410_woolf/0410_woolf.html
The point still is, shouldn't the Service Locator encapsulate the invoker from the nature of the service? And how is the invoker to know which to use? Shouldn't the lookup be encapsulated, and a setting be made available, so that in a sticky situation with the service and the service requestor being local you can call the service while being unaware that a local lookup is being used, and when the application becomes distributed, equally unimpacted by that change as the Service Locator does what it says, i.e. finds the service.

From a responsibilities perspective, who should be aware if the interface is local or remote - the Business delegate or the Service Locator?

Looking for input as I am implementing this right now....
All,

Thanks fo the help. The problem was with the Jar file. For some reason it was saved as source and not bin, and thus was not accssible. Once that was fixed, all worked fine...

Nikhil
15 years ago
I am using JBOSS 3.2.3/ Tomcat 4.1.29.

I need to include some of my own packages, so I jarr'd them up into aptsi.jar and put them into the WEB-INF/lib directory. I then used the <%@page import="myimport.*" %> directive. It did not work. So, I tried with something that works elsewhere, and put in commons-lang.jar, commons-fileupload.jar and commons-fileupload-io.jar, and put in
<%@page language="java" import="java.io.*,java.sql.*,java.lang.*,java.util.*,org.apache.commons.io.FileUtil" %>

I am still getting errors (shown below).

Help!
Nikhil

I still get the following error:
Generated servlet error:
[javac] Compiling 1 source file
[javac] C:\aptsi_home\jboss\jboss-3.2.3\server\default\work\MainEngine\localhost\aes_web-app\register_jsp.java:11: package org.apache.commons.io does not exist
[javac] import org.apache.commons.io.FileUtil;
[javac] ^
[javac] 1 error



at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:534)
15 years ago
One more query. Why does it route me to an access denied rather than the login error page?
Regards,
Nikhil
16 years ago
I am trying to implement form-based authentication in a JBOSS 3.2.3/ Embedded Tomcat/ Firebird database environment. I have tested that I can login into Firebird using isql for the user id/ password combination that I have. It seems to go past any jdbc connection errors (no stack/ failures). However, Tomcat chokes with a "HTTP Status 403 - Access to the requested resource has been denied" message.
My login-config.xml has the following entries:
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/IAL-AUTH-DS</module-option>
<module-option name="principalsQuery">select pr_password from principals where principal_id=?</module-option>
<module-option name="rolesQuery">select user_role, role_group from roles where principal_id=?</module-option>
</login-module>
</authentication>
My firebird..-xa-ds.xml has

<connection-factories>
<tx-connection-factory>
<jndi-name>IAL-AUTH-DS</jndi-name>
<xa-transaction/>
<adapter-display-name>Firebird Database Connector</adapter-display-name>
<config-property name="Database" type="java.lang.String">localhost/3050:/home2/niprdev/db/niprdev_auth.GDB</config-property>
<user-name>test</user-name>
<password>test</password>
<!--additional properties. only use one way of setting tx isolation, please
<config-property name="TransactionIsolation"></config-property>
<config-property name="TransactionIsolationName">TRANSACTION_READ_COMMITTED</config-property>
<config-property name="BlobBufferLength"></config-property>
<config-property name="Encoding">UNICODE_FSS</config-property>
-->
<min-pool-size>0</min-pool-size>
<max-pool-size>50</max-pool-size>
</tx-connection-factory>
</connection-factories>
My web.xml has:
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted</web-resource-name>
<description>Declarative security</description>
<url-pattern>*.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>ial</role-name>
</auth-constraint>
<user-data-constraint>
<description>No descrp</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>ial</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.htm</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>ial</role-name>
</security-role>
My jboss-web.xml defines the application security domain JNDI namespace as:
<jboss-web>
<context-root>/ial/web-app</context-root>
<!-- Uncomment this element to add security for the application -->
<security-domain>java:/jaas/ial</security-domain>
</jboss-web>
I cant see why it does not connect completely. There is no JDBC error thrown.
Any suggestions? Help!
16 years ago
I am trying to implement form-based authentication in a JBOSS 3.2.3/ Embedded Tomcat/ Firebird database environment. I have tested that I can login into Firebird using isql for the user id/ password combination that I have. It seems to go past any jdbc connection errors (no stack/ failures). However, Tomcat chokes with a "HTTP Status 403 - Access to the requested resource has been denied" message.
My login-config.xml has the following entries:
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/IAL-AUTH-DS</module-option>
<module-option name="principalsQuery">select pr_password from principals where principal_id=?</module-option>
<module-option name="rolesQuery">select user_role, role_group from roles where principal_id=?</module-option>
</login-module>
</authentication>
My firebird..-xa-ds.xml has

<connection-factories>
<tx-connection-factory>
<jndi-name>IAL-AUTH-DS</jndi-name>
<xa-transaction/>
<adapter-display-name>Firebird Database Connector</adapter-display-name>
<config-property name="Database" type="java.lang.String">localhost/3050:/home2/niprdev/db/niprdev_auth.GDB</config-property>
<user-name>test</user-name>
<password>test</password>
<!--additional properties. only use one way of setting tx isolation, please
<config-property name="TransactionIsolation"></config-property>
<config-property name="TransactionIsolationName">TRANSACTION_READ_COMMITTED</config-property>
<config-property name="BlobBufferLength"></config-property>
<config-property name="Encoding">UNICODE_FSS</config-property>
-->
<min-pool-size>0</min-pool-size>
<max-pool-size>50</max-pool-size>
</tx-connection-factory>
</connection-factories>
My web.xml has:
<security-constraint>
<web-resource-collection>
<web-resource-name>Restricted</web-resource-name>
<description>Declarative security</description>
<url-pattern>*.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>ial</role-name>
</auth-constraint>
<user-data-constraint>
<description>No descrp</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>

</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>ial</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.htm</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>ial</role-name>
</security-role>

My jboss-web.xml defines the application security domain JNDI namespace as:
<jboss-web>
<context-root>/ial/web-app</context-root>
<!-- Uncomment this element to add security for the application -->
<security-domain>java:/jaas/ial</security-domain>

</jboss-web>
I cant see why it does not connect completely. There is no JDBC error thrown.
Any suggestions? Help!
We are using the Oracle thin driver. The issue is that the Oracle connection pools do not serialize and do not cluster. WebLogic connection pools do, but they do not seem to work with VARRAYs. Which is why we are looking for another best practice/ recommendation.
What are the options that we have??
We are using weblogic JDBC connection pools in a clustered environment. The stored procs are taking VARRAY's as parms. There seems to be an issue with BEA 7.0 spk2 and earlier - according to our vendors who are working on the project, there seem to be issues with the binding of VARRAY types with WLS drivers.

The question is:
1. Could we use Table/ Tablesets instead of VARRAYs?
2. What are the issues with BEA (7.0 spk2) and VARRAYs?
Any comments/ suggestions?