Complete configuration of JAAS with JBOSS using database
JAAS Configuration
1. Database
Create following table:
a. Principals table consists of usernames (PrincipalID) and their passwords.
CREATE TABLE Principals (PrincipalID VARCHAR (64) PRIMARY KEY,
Password VARCHAR (64))
Insert data
INSERT INTO Principals VALUES ('java', 'echoman')
INSERT INTO Principals VALUES ('duke', 'javaman')
b. Roles table consists of usernames (PrincipalID) and their Role and the
RoleGroup they belong.
CREATE TABLE Roles (PrincipalID VARCHAR (64), Role
VARCHAR (64), RoleGroup VARCHAR (64))
Insert data
INSERT INTO Roles VALUES ('java', 'Echo', 'Roles')
INSERT INTO Roles VALUES ('java', 'caller_java', 'CallerPrincipal')
INSERT INTO Roles VALUES ('duke', 'Java', 'Roles')
INSERT INTO Roles VALUES ('duke', 'Coder', 'Roles')
INSERT INTO Roles VALUES ('duke', 'caller_duke', 'CallerPrincipal')
INSERT INTO Roles VALUES ('duke', 'Echo', 'Roles')
2. login-config.xml
This file is located in jboss-3.2.1\server\default\conf
a. add the following lines
<application-policy name="example2">
<authentication>
<login-module code="org.jboss.security.ClientLoginModule" flag="required">
</login-module>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=SybaseDB
</module-option>
<module-option name="dsJndiName">
java:/SybaseDB
</module-option>
<module-option name="principalsQuery">
Select Password from Principals where PrincipalID =?
</module-option>
<module-option name="rolesQuery">
Select Role 'Roles', RoleGroup 'RoleGroups' from Roles where PrincipalID =?
</module-option>
</login-module>
</authentication>
</application-policy>
3. jboss-web.xml
Create a file jboss-web.xml and place the following code
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>java:/jaas/example2</security-domain>
</jboss-web>
example2 is the name of the security domain which we specified in application policy of login-config.xml
Copy this file in your applications WEB-INF folder
4. auth.conf
Create a file auth.conf and place it in jboss-3.2.1\client.
client-login
org.jboss.security.ClientLoginModule required;
example2
org.jboss.security.ClientLoginModule required;
org.jboss.security.auth.spi.DatabaseServerLoginModule required;
5. auth.conf
Create another auth.conf and place it in jboss-3.2.1\server\default\conf
// The JBoss server side JAAS login config file for the examples
client-login
org.jboss.security.ClientLoginModule required;
example2
org.jboss.security.ClientLoginModule required;
org.jboss.security.auth.spi.DatabaseServerLoginModule
required
dsJndiName="java:/SybaseDB"
principalsQuery="Select Password from Principals where PrincipalID =?"
rolesQuery="Select Role 'Roles', RoleGroup 'RoleGroups' from Roles where PrincipalID =?"
5. jndi
Path jboss-3.2.1\server\default\conf
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
# Do NOT uncomment this line as it causes in VM calls to go over
# RMI!
java.naming.provider.url=localhost:1099
#localhost
6. web.xml
Place the following code in your web.xml.(Change it according to your application requirements).
<security-constraint>
<web-resource-collection>
<web-resource-name>action</web-resource-name>
<description>Declarative security tests</description>
<url-pattern>*.do</url-pattern>
<http-method>HEAD</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
// the role which can access these resources
<auth-constraint>
<role-name>Echo</role-name>
<!--<role-name>Java</role-name>-->
</auth-constraint>
<user-data-constraint>
<description>no description</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
//the login page in case of Basic authentication
<!--<login-config>
<auth-method>BASIC</auth-method>
<realm-name>JAAS Tutorial Servlets</realm-name>
</login-config>-->
//the login page in case of form based authentication
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/logon.do</form-login-page> //path to login page
<form-error-page>/logoff.do</form-error-page> //path in case login fails
</form-login-config>
</login-config>
<security-role>
<description>A user allowed to invoke echo methods</description>
<role-name>Echo</role-name>
</security-role>
<!--
<security-role>
<description>A user allowed to invoke echo methods</description>
<role-name>Java</role-name>
</security-role>
-->
7. login.jsp
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page language="java" %>
<html >
<HEAD>
<TITLE></TITLE>
<!-- To prevent caching -->
<%
response.setHeader("Cache-Control","no-cache"); // HTTP 1.1
response.setHeader("Pragma","no-cache"); // HTTP 1.0
response.setDateHeader ("Expires", -1); // Prevents caching at the proxy server
%>
<SCRIPT>
function submitForm() {
var frm = document. logonForm;
// Check if all the required fields have been entered by the user before
// submitting the form
if( frm.j_username.value == "" ) {
alert("blank");
frm.j_username.focus();
return ;
if( frm.j_password.value == "" ) {
alert("blank");
frm.j_password.focus();
return ;
frm.submit();
</SCRIPT>
</HEAD>
<BODY>
<FORM name="logonForm" action="logon.do" METHOD=POST>
<TABLE width="100%" border="0" cellspacing="0" cellpadding=
"1" bgcolor="white">
<TABLE width="100%" border="0" cellspacing=
"0" cellpadding="5">
<TR align="center">
<TD align="right" class="Prompt"></TD>
<TD align="left">
<INPUT type="text" name="j_username" maxlength=20>
</TD>
</TR>
<TR align="center">
<TD align="right" class="Prompt"> </TD>
<TD align="left">
<INPUT type="password"
name="j_password" maxlength=20 >
<BR>
<TR align="center">
<TD align="right" class="Prompt"> </TD>
<TD align="left">
<input type="submit" onclick="javascript:submitForm();" value="Login">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</html>
8. Your action class should contain the following code
a. Pacakages to be imported
import java.util.Set;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.auth.callback.SecurityAssociationHandler;
try
SecurityAssociationHandler handler = new
SecurityAssociationHandler();
user = new SimplePrincipal(username);
handler.setSecurityInfo(user, password.toCharArray());
LoginContext loginContext = new LoginContext("example2",
(CallbackHandler)handler);
loginContext.login();
Subject subject = loginContext.getSubject();
Set principals = subject.getPrincipals();
principals.add(user);
}catch(LoginException e)
{ errors.add("loginerror", new ActionError("Wrong Username or Password")); saveErrors(request, errors);
//other login related code
Hi,
Can I just first of all say how useful I found this article.
It has been a great help in explaining what I need to do.
I just had a couple of questions about the details...
1) The jndi.properties file appears to be much the same except for the line...
java.naming.provider.url=jnp://localhost:1099
Are you saying we need to add that line to the jndi.properties or else all calls will go through rmi ?
2) Should the line be java.naming.provider.url=jnp://localhost:1099 or url=localhost:1099 ?
Thanks again for the article
Dave
Similar Messages
-
Please anybody tell me how to configure JAAS in JBOSS
I have included in my code . while i am runnin that code with JBOSS it is throwing the following exception:
09:45:21,484 ERROR [STDERR] javax.security.auth.login.FailedLoginException: Pass
word Incorrect/Password Required
09:45:21,484 ERROR [STDERR] at org.jboss.security.auth.spi.UsernamePasswordL
oginModule.login(UsernamePasswordLoginModule.java:213)
09:45:21,500 ERROR [STDERR] at org.jboss.security.auth.spi.UsersRolesLoginMo
dule.login(UsersRolesLoginModule.java:152)
09:45:21,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
09:45:21,500 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(U
nknown Source)
09:45:21,500 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(Unknown Source)
09:45:21,500 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Sourc
e)
Please respond me how to configure it in JBOSSHow did you packaged the web application - Is it a WAR file?i didnt make any war file I just worked with JBilderX which makes WEB MODULE and i think that is the WAR file??
Where you put the web archive on the JBoss (Path please)?no where....:(
hay! i just configured JBoss with JBuilderX and then started using it right away.
is there any thing else to be done
please tell me
waiting... -
Implemention of JAAS+servlet+jboss+sql database
Hi,
I am trying to implement JAAS for login module using code and CallbackHandler( ie lc = logincontext(...).), but i got a sample code which is used for commandline execution, but i need to implement in web application, what all are the files that i need to configure to implement JAAS in web application?, so that i can check the user name and password which is entered by the user against the value that inside my sql database. it would be appreciated if anyone send some sample code to start work on JAAS.
Regards
kumarKumar,
i am trying to do the same thing, but i am having a slight problem, maybe between the two of us we can figure it out. here is what i have come up with so far:
1. edit web.xml to specifiy which directories and pages are secured and accessed only by specific user roles (Optional)
2. edit login-config.xml which is found in JBOSS_directory/server/default/conf or JBOSS_directory/server/all/conf depending on which version of the server you are using. you need to add the following to login-config.xml file, to include the JAAS DatabaseServerLoginModule, the configuration is as follows:
<application-policy name = "testDB"> <! -- this is the name of the secrurity policy which you refer to in jboss-web.xml
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "dsJndiName">java:/testDB</module-option> <! -- this is the datasource the is used to connect to your database
<module-option name = "principalsQuery">SELECT password from Principals where PrincipalID =?</module-option>
<module-option name = "rolesQuery">SELECT Role, Rolegroup FROM roles WHERE principalid=?</module-option>
</login-module>
</authentication>
</application-policy>3. you edit jboss-web.xml with the following code
<jboss-web>
<security-domain>java:/jaas/testDB</security-domain>
<context-root>/testJBOSSsecurity</context-root>
</jboss-web>4. Create a Login Form with the action pointing to the servlet you will create in the next step
5. create the servlet that handles logging the user in
****loginservlet.java*****
import java.security.Principal;
import java.security.PrivilegedAction;
import java.util.Locale;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.Set;
import javax.security.*;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.auth.callback.SecurityAssociationHandler;
try {
SecurityAssociationHandler handler = new
SecurityAssociationHandler();
Principal user = new SimplePrincipal(request.getParameter("j_username"));
handler.setSecurityInfo(user, request.getParameter("j_password"));
LoginContext loginContext = new LoginContext("testDB",(CallbackHandler)handler);
loginContext.login();
Subject subject = loginContext.getSubject();
Set principals = subject.getPrincipals();
principals.add(user);
out.println(subject.toString());
//response.sendRedirect("securepage.java");
}6. create two database tables: one to hold the principalid (primary key) and password. this table is called pricipals. create another table to hold the user roles. call this table roles, and it has three fields. principalid as a primary key and a foreign key from the principals table, role and rolegroup
this is what i have so far, but it's not working, i have posted my problem in this link [http://forum.java.sun.com/thread.jspa?threadID=5293266|http://forum.java.sun.com/thread.jspa?threadID=5293266] as well an other forums since two nights ago, but so far no replies. so read the post and you will get a better picure and try it out, if you have luck wiith it, please let me know
Sam -
Oracle JAAS with roles from database tables and Oracle SSO integration
I have the following requirement for user authentication and authorization. The applications are build using ADF Faces and BC4J. User authentication should be done using Oracle SSO. User roles and functions will be stored in custom tables. These roles will be used on ADF application pages to restrict access to the UI components on a page. Example: User will "Employee" role cannot create a new employee; however, user with "HR" role can create a new employee.
In this case, "Create" button will be visible on the ADF page.
1. How can we use Oracle JAAS to use custom tables for roles instead of using flat XML files?
2. How does ADF applications use these roles to restrict components on a page?
3. For authentication, I guess we should be able to use SSO and integrate with Oracle JAAS?
Thanks.Hi,
I can give you the answers to 1 and 2 but haven't tried 3.
1) Oracle OC4J since 10.1.3.1 has a database LoginModule that is explained in the OC4J security guide.
I have a how-to document in review that will be published probaby next week and that explains how to set this LogiNModule up for JDeveloper and stand alone OC4J, though the OC4J documentation is pretty good as well
http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28957/loginmod.htm#BABCDDAI
2) Create a managed bean with boolan methods like isUserManager, isUserEmployee, isUserTechnician etc. In this methods check for the security role on teh request object's isUserInRole() method. Then access this methods from the disabled or rendered property using ExpressionLanguage
A custom Login ModuleDoesn't use Oracle JAAS but plugs into it. So I am not sure if SSO would work with this because the custom LoginModule wouldn't get a username password pair but only a username that it has to trust.
Frank -
Error configuring shared services with Oracle 11g database
I've installed Hyperion EPM 11.1.1.3 and orale 11g successfully. My problem though is that when i tried to do the configuration,
the error message states 'Unable to check Shared Services database existence: an error occured.'
---------My Environment:--------
EPM Server: Windows Server 2003 SP1 32-bit
RDBMS: Oracle Enterprise Edition 11g (running on same server 2003)
Oracle Client: 11g (full client install)
SID name :- orcl
------------Here are the components that I've installed--------
- V17397-01(EPM Foundation Services p-1)
- V17369-01(EPM Foundation Services p-2)
- V17370-01(EPM Foundation Services p-3)
- V17371-01(EPM Foundation Services p-4)
- V17389-01(server)
- V17388-01(Client)
- V17390-01(Provider Service)
- V17378-01(Financial Reporting)
- V17380-01(Web Analysis)
- V17398-01(EPM Architect)
- V17402-01(Smart View for Office)
all files are extracted in a single folder using winrar tool.
I can't proceed with the shared services configuration because in just the first page of it, I'm encountering the error Unable to check Shared Services database existence: an error occured.'
I believed the shared services is bundled with the foundation if I'm not mistaken, because I can't find any download related to it on edelivery site.
I tried to configure only the Foundation components but the '*Comman setting*' & '*configure database*' are grayed out so I have no option but to figure out first this shared services configuration.
below are the logs
---------------configtool.log--------------
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState$1, DEBUG, validate
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, connect test
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, driver set
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, server= hyperion
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, whiteSpace remove
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, begin test cycle
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, define driver
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, make connection
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState, DEBUG, set URL
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState$1, DEBUG, connection is NOT null
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.DBConnectionForm, DEBUG, DB type string = Oracle
(Jul 04, 2010, 02:53:29 AM), com.hyperion.cis.config.AbstractProductDBConfigurator, DEBUG, JDBC driver class is hyperion.jdbc.oracle.OracleDriver
(Jul 04, 2010, 02:53:29 AM), com.hyperion.cis.config.AbstractProductDBConfigurator, DEBUG, Connection URL: jdbc:hyperion:oracle://hyperion:1521;SID=orcl
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState$1, DEBUG, validate CREATE_NEW, no registry DB exists, create it
(Jul 04, 2010, 02:53:29 AM), com.hyperion.hit.registry.RegistryConnection, ERROR, SQL Exception [Hyperion][Oracle JDBC Driver][Oracle]ORA-01031: insufficient privileges CAUSE null
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState$1, ERROR, com.hyperion.hit.registry.exceptions.RegistryException: Unable to create registry.
(Jul 04, 2010, 02:53:29 AM), com.hyperion.cis.config.wizard.adapter.WizardFormAdapterPanel, ERROR, Unable to check Shared Services database existence: an error occured.
------------configtool_err.log------------
(Jul 04, 2010, 02:53:29 AM), com.hyperion.hit.registry.RegistryConnection, ERROR, SQL Exception [Hyperion][Oracle JDBC Driver][Oracle]ORA-01031: insufficient privileges
CAUSE null
(Jul 04, 2010, 02:53:29 AM), com.hyperion.config.wizard.impl.RegistryWizardState$1, ERROR, com.hyperion.hit.registry.exceptions.RegistryException: Unable to create registry.
(Jul 04, 2010, 02:53:29 AM), com.hyperion.cis.config.wizard.adapter.WizardFormAdapterPanel, ERROR, Unable to check Shared Services database existence: an error occured.
Hope to here from Some one.
Any help would be appreciated. Thank you.Thanx John for your kind reply. i reffred your other posts and those are very helpfull for me.
I don't have any previous ver. of Hyperion. and i created a new database 'Orcl' for configuring the shared services and given the user name as 'hss'. i also tried to delete my old database and and reg.properties file from Hyperion Dir u suggested in some other post. but still its not working.
Today I have started again with fres installation of Windows Server 2003 oracle 11g EPM 11.1.3.
Also I m Installing this on VMware. I hope this is not the issue as i already installed Microsoft Loopback Adapter.
I will let you know the updates.
but still looking forward for your Kind help.
Edited by: Gaurav_Choudhari on Jul 5, 2010 12:37 AM -
Configuring BPEL PM with Oracle XE database
Hi,
I have been using my BPEL PM with default olite db quite a days ago and it was running fine. Now I have changed the dehydration to Oracle XE database and chnaged the corresponding data-source.xml files.
I can access the default domain from BPEL console and I can see the processes.
But I am getting the error when am creating an instance of the process and also I am not able to login to the worklist application.
The error I got is shown below.
<2005-12-26 12:38:57,375> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cu
be delivery": Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "loc/BPELServerDat
aSource". The exception reported is: Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "loc/BPELServerDat
aSource". The exception reported is: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
152.69.213.27:1521:xe
Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that th
e datasource connection parameters (user/password) is currently valid.
Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that th
e datasource connection parameters (user/password) is currently valid.
<2005-12-26 12:38:57,515> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to hand
le dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeI
nstanceMessage"; the exception is: Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "loc/BPELServerDataSource". The exception reported is: Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "loc/BPELServerDataSource". The exception reported is: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
152.69.213.27:1521:xe
Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that th
e datasource connection parameters (user/password) is currently valid.
Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that th
e datasource connection parameters (user/password) is currently valid.
Waiting for any idea to solve this issue.
Thanks in advance
AkiSimilar problems, in my case I was trying out the DatabaseServer on an Oracle XE database using the Embedded OC4J A/S bundled with RC3; this combination turns out explosive :)
The service was simply doing a select statement and the number of connections kept growing and growing during my tests; you can see them from the command line when typing `netstat -t` - eventually it just stopped working while I was testing; in the web service it reported:
ORA-12519, TNS:no appropriate service handler found
But my listner was running !!! I tried the connection from JDS and it complained about the same thing - then eventually I tried it from sqlplus and it showed:
ORA-00020: maximum number of processes (%s) exceeded
So now finally we're getting somewhere - after googling I found this web site; a good laugh:
http://it.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/
So basically I did from the command line the following:
lsnrctl stop;
sqlplus "/as sysdba"
shutdown immediate;
startup;
alter system set processes=150 scope=spfile;
shutdown immediate;
startup;
lsnrctl start;
Now hopefully this will solve it; I'd still like to know how to change the OC4J connection pool settings for the SOA stuff - is this possible at all or does it have some kind of minimum requirement ?
After restarting and testing a few times; my service is actually working so I'm very pleased :)
Regards -
How to configure file server with portal using KM
Hi
i have some word documents,excel documents in my computer.i want to integrate these documents into portal using KM.how to do that?can anybody suggest the steps involved or tutorial to do this configuration.thanks for your help in advance
PrasadHi,
It´s very simple to do that.
1.You must create repository. (I gave you this information).
2.Create portal users. (in portal or read from ldap)
3.Create KM navigation iview to point folders in your repository.
4.Create roles.
5.Assing roles to users.
For you that is new in this tools, perhaps needs 3 or 4 days.
Patricio. -
How to do jaas with out using call back handler classes
hi
i successfully executed jaas under weblogic 6.1 now i wanted
to implement it in our project, for that i wanted to use
some GUI screens to ask for user name/password and to show error messages
so my questions are
1)where i have to call GUI screens in Login module or some where else
2)if in i am calling in client then i have to pass user name and password to
login module.
how can i pass this to loginmodule..?
3)or what i am thinking is not the properway..?
thanx in advanceHi Nivas,
You can pass the security credentials via a URL, please refer to http://e-docs.bea.com/wls/docs61/security/prog.html#1043462.
Regards,
Richard Wallace
Senior Developer Relations Engineer
BEA Support.
"nivas" <[email protected]> wrote:
>
hi
i successfully executed jaas under weblogic 6.1 now i wanted
to implement it in our project, for that i wanted to use
some GUI screens to ask for user name/password and to show error messages
so my questions are
1)where i have to call GUI screens in Login module or some where else
2)if in i am calling in client then i have to pass user name and password
to
login module.
how can i pass this to loginmodule..?
3)or what i am thinking is not the properway..?
thanx in advance -
Hi,
We have configured the BAM with B2B using EMS based on the steps detailed here:
http://docs.oracle.com/cd/E15586_01/integration.1111/e10229/b2b_bam.htm
The problem is that the BAM data object is not getting populated. Any ideas?
Irshad.Hi Shankar,
Make sure that the Data Source which you created is for B2B database and you are using SOAINFRA user in the datasource.
Regards,
Anuj -
Possible deadlocks with in-memory database using Java
I've written a completely in-memory database using the Java API on BDB 4.6 and 4.7 for Windows and Linux (x86). The completely in-memory database means the database content and logs are entirely in-memory and the overflow pages will not be written to a disk file.
The database environment and the database are configured to be transactional. All database access methods are specified to be auto-commit by setting the transaction argument to null. The environment is configured to be multi-threaded (which is the default when using the Java API).
When run with a single-threaded client, the application works correctly on both Windows and Linux for BDB 4.6 and 4.7.
When run with a multi-thread client that uses two thread for the database access, I run into a deadlock inside the call to the Database.delete method about half the time.
I am assuming that in the "auto-commit" mode, a deadlock should not be possible.
Any reported problems with using Java with in-memory database?
Thanks.
HisurHi Hisur,
If you are using transactions and multiple threads, you will have to deal with deadlock. In this particular case, it's likely that a delete is causing two btree pages to be merged (called a "reverse split"). Auto-commit makes no difference in this case -- the application must retry the operation.
Regards,
Michael Cahill, Oracle. -
BPEL 10.1.2.0.2 with JBOSS deployment descriptor of database adapter
We use Oracle BPEL Process Manager 10.1.2.0.2 with JBOSS v3.2.6 . In our BPEL processes we use also the DatabaseAdapter.
We deploy our processe manually with obant, because we are only able to access our productiv-system about putty(ssh).
For that we have to manually adapt our DatabaseConnectionData,which were created on our development enviroment, in the apropriate wsdl files.
On our productiv-system we see in the domain-log files following lines:
<2006-11-08 04:52:44,465> <INFO> <condis.collaxa.cube.ws> <AdapterFramework::Outbound>
file:/opt/etmn/jboss_bpel/domains/condis/tmp/.bpel_WF_Notifikation_1.0.jar/SetFaultedWS.wsdl [ SetFaultedWS_ptt::SetFaultedWS(InputParameters) ] - Using JCA Connection Pool -
max size = <unbounded>
<2006-11-08 04:52:44,468> <WARN> <condis.collaxa.cube.ws> <AdapterFramework::Outbound>
file:/opt/etmn/jboss_bpel/domains/condis/tmp/.bpel_WF_Notifikation_1.0.jar/SetFaultedWS.wsdl [ SetFaultedWS_ptt::SetFaultedWS(InputParameters) ] - JNDI lookup of
'java:/eis/DB/DBL_WFMODUL' failed due to: DBL_WFMODUL not bound
<2006-11-08 04:52:44,469> <INFO> <condis.collaxa.cube.ws> <AdapterFramework::Outbound> Since unable to locate the JCA Resource Adapter deployed at 'java:/eis/DB/DBL_WFMODUL',
will then attempt to instantiate ManagedConnectionFactory oracle.tip.adapter.db.DBManagedConnectionFactory directly.
After some reading in the "Adapters UserGuide" you can find some lines about necessary configuration of the "deployment descriptor of the database adapter"
concerning the "<jca:address location=..." used in the apropriate wsdl files:
The adapter service WSDL refers to the run-time connection configured in the
deployment descriptor of the database adapter. (In Oracle Application Server, it is
oc4j-ra.xml). The relevant code example for the service WSDL follows:
<jca:address location="eis/DB/DBL_WFMODUL" UIConnectionName="DBL_WFMODUL"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
The questions are now:
What is the apropriate file for the "deployment descriptor of the database adapter" for Oracle BPEL Process Manager 10.1.2.0.2 with JBOSS 3.2.6 ??
Exist there a description for that?
What are really the consequences if you configure the "deployment descriptor of the database adapter" or not ?Hi Martin,
Thanks for sharing valuable information of bpel install .
We are stuck installing bpel pm 10.1.2.0.2 on linux from past one week ,can u plz help us in giving some pointers.
We downloaded mrca utility from otn and tried to upload the repository into 10g database but we got "ultra search schema not found" error and few other errors.
Can we use any 10g database or is there any version that we need to use.Can you plz specify the database version that u used for ur install.
Then we tried to create a repository while installing Oracle Application Server 10.1.2.0.2(J2EE and Web Cache with new OID), which creates a new dbase with a repository loaded into it.
we tried to run the ldap search command to get the encrypted password but failed to execute that command successfully.finally we tried to change orabpel pwd with alter command. And when we finally started with BPEL PM install and pointed to the above AS home it didnt recognize it and giving error as "plz point to the appropriate Application Server(AS) home and it cant find the AS home in folder in which we specified."
Can u plz help us and give some pointers in resolving our issues.
Thanks a lot in advance.
Vandana. -
Is it possible to use jdbcappender with jboss's logger?
Hi
Is it possible to use JDBCAppender with org.jboss.logging.Logger instead of org.apache.log4j.Logger? secondly can i also use jboss.logging.logger to send my logs to the database (not manually, using configuration file as with apache.log4j) ?
TIA.Back in my days, when you were new to Java, you wrote all sorts of stupid console programs and crapplets to get the hang of it.
Anyway, without seeing JBoss' logging framework, I'm gonna say "no, you can't" unless they've actually bothered to make it compatible with commons-logging (or was that log4j). However, you probably could write your own JDBCAppender for their framework or at least a small adapter that would forward the logging requests to log4j. -
Hi,
The subject says my question completely. I just registered a new ipod, and it will not sync with the itunes database that I've exported / synced to
my other ipods for years. I used a different Apple ID to register it, since both my husband and I forgot the password to the account created years
ago. Please recommend a solution.
Thank you.
Karen WestThe Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
Content is forever tied to the Apple ID used to buy it. Apple does not merge Apple IDs and Apple does not transfer content from one Apple ID to another. You will only be able to update the content bought with the old Apple ID by using the old Apple ID. Otherwise you will need to abandon everything from the old ID and biy it again with the new ID. -
How can i create a new and tableless database using database configuration
How can i create a new and tableless database using database configuration
How can i create a new and tableless database using database configuration
Just don't install the sample schemas. See the installation guide
http://docs.oracle.com/cd/E11882_01/server.112/e10831/installation.htm
Using the Database Configuration Assistant
When you install Oracle Database with the Oracle Universal Installer, the sample schemas are installed by default if you select the Basic Installation option. Selecting the sample schemas option installs all five schemas (HR, OE, PM, IX, and SH) in the database. If you choose not to install the sample schemas at that time, you can add them later by following the instructions in section "Manually Installing Sample Schemas".
Choose a custom install and don't install the sample schemas.
All other schems/tables installed are REQUIRED by Oracle -
Database link from Oracle to MySQL with the use of unixODBC
Hi,
I have 2 servers.
Server A:
- CentOS_5.1 x386
- MySQL 5.1
- unixODBC
- mysql-connector-odbc
Server B:
- CentOS_5.1 x86_64
- Oracle 11g
- unixODBC
- mysql-connector-odbc
I've configured ODBC, so I am able to do "isql <DSN> oracle oracle -v" sucessfully with "root" and "oracle" user on Oracle server. I've configured listener.ora and tnsnames.ora
I added below lines to listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=mysqlware)
(ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/u01/app/oracle/product/11.1.0/db_1/hs/lib:/usr/lib64/:$ORACLE_HOME/lib)
and lines below to tnsnames.ora
mysqlware=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<server's FQDN>)
(PORT=1521)
(CONNECT_DATA=
(SID=mysqlware))
(HS=OK))
The content of $ORACLE_HOME/hs/admin/initmysqlware.ora is
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = mysqlware
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc3.so
# ODBC specific environment variables
set ODBCINI=/home/oracle/.odbc.ini
# Environment variables required for the non-Oracle system
set <envvar>=<value>
tnsping mysqlware returns.....
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=<server's FQDN>)) (PORT=1521)) (CONNECT_DATA= (SID=mysqlware)) (HS=OK))
OK (10 msec)
when I login to oracle and create PUBLIC DATABASE LINK with command....
create public database link link2mysqlware connect to
2 "oracle" identified by "oracle" using 'mysqlware';
Database link created.
THIS IS WHAT I GET.....
SQL> select * from "emp"@link2mysqlware;
select * from "emp"@link2mysqlware
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from LINK2MYSQLWARE
There is "emp" table in MySQL, from where I can even select with the use of isql command and from this Oracle server.
I would really appreciate some help here.
Thanks in advance.
Tomaz BracicEvening Ed,
I changed to debug and repeated the select ....... The output below is for one select that I did. (select * from "emp"@link1)
Oracle Corporation --- WEDNESDAY MAR 19 2008 21:50:51.371
Version 11.1.0.6.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
Exiting hgosdip, rc=0
ORACLE_SID is "mysqlware"
Product-Info:
Port Rls/Upd:6/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.1.0.6.0_0006, Instance:mysqlware
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=110000
Entered hgolofn at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libodbc.so"
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2082a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208330
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208af0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a209d60
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2117d0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a211c70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a214480
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a215930
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a216130
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b50
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a219270
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c410
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c7b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21e250
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21eea0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21f1a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a220fd0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2213a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222ee0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222d30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a227dc0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2295b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a229be0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b030
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b8f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22d550
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22daa0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22e2f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a230c30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a231770
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232190
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232c20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233110
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233a10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233f20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2344c0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a234b10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2350a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236640
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236380
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2374e0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2380b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Exiting hgolofn, rc=0 at 2008/03/19-21:50:51
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
Exiting hgoinit, rc=0 at 2008/03/19-21:50:51
Entered hgolgon at 2008/03/19-21:50:51
reco:0, name:oracle, tflag:0
Entered hgosuec at 2008/03/19-21:50:51
Exiting hgosuec, rc=0 at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using oracle as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2008/03/19-21:50:51
HS_FDS_CONNECT_INFO = "mysqlware"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2008/03/19-21:50:51
dsn:mysqlware, name:oracle
optn:
##>Connect Parameters (len=35)<##
## DSN=mysqlware;
#! UID=oracle;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2008/03/19-21:50:51
Entered hgopoer at 2008/03/19-21:50:51
hgopoer, line 159: got native error 0 and sqlstate I; message follows...
Exiting hgopoer, rc=0 at 2008/03/19-21:50:51
hgocont, line 1903: calling SqlDriverConnect got sqlstate I
Exiting hgocont, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgocont.c LINE:1923 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgolgon.c LINE:612 FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2008/03/19-21:50:51
Kind regards,
Tomaz
Maybe you are looking for
-
I realize this may be a naive question, but is there any way to know whether/when Apple will update iCal to address some of the major issues it faces? The two issues that bug me the most are: Multiple email updates sent to attendees when editing an e
-
CUMULATIVE& NON CUMULATIVE KF'S
hello all, 1. what is the difference between Cumulative& Non Cumulative Key figures? what is the use & where &when we used these kf's ? 2.what is Virtual kf's ? wt is the use &where , when we used ? pls any body explain ,,,thnks
-
Does anyone have any experience with publishing Arabic Books on iBooks? Is it even possible to change the 'flip' from rgith to left?
-
Is it possible to deploy Websites/Cloud services using Releasemanagement
Hi, I am trying to implement continuous integration and delivery using VSO and RM for my web sites with Sql azure. But I didn't find the way to deploy the Azure PaaS Services. Please guide me how can I achieve this. I can deploy the website
-
I want to return goods due to some quality reason. Can anybody describe the standard process ? I guess.. QA02 - reject material - mvt 322 MIGO - return delivery - mvt ...... (with tick on 'via delivery') MRP increases the requirement to compensate r