Domain logic in the database
Hi.
Don't know if this fits the topic, but I need some feedback.
My company is relativly new to J2EE. We are currently moving our existing application portfolio to J2EE from a two tier client-server architecture developed on Centura and Oracle. Our data model is pretty strong, and much of the domain logic of the application has been moved to the database over the course of the last few years, so there is quite a bit of PL/SQL code in there.
Now there is a heated discussion internally about the validity of making the transition to J2EE with the databases intact and reusing this PL/SQL based domain logic. We have individual proclaiming that every operation on data is domain logic and all domain logic should reside on the application server with J2EE.
I personally feel that J2EE fully allows for keeping domain logic in the database, and that one should always apply the principle of the "best technology for the job" in each case. For instance data intensive transformations and calculations belong on the database.
Please provide me with some support to use in our internal discussions as I feel overpowered by the "darker forces", and would very much like to know how the industry at large feels about this issue.
Regards,
Jorn Olmheim
Senior Java Developer
Hey Jorn.
Sorry, but I would have to side with the dark forces you mention. In moving to an 'n' tier architecture, the Business logic should be contained in server side components, not the database. This will allow re-use of componenents across other applications(think Enterprise here), as well as providing a layer of abstraction for accessing the database.
Also, What if you change db vendors? All your pl/sql code will need to be ported. Very messy.
Similar Messages
-
Hi.
I know this is off topic, but I need some feedback.
My company is relativly new to J2EE. We are currently moving our existing application portfolio to J2EE from a two tier client-server architecture developed on Centura and Oracle. Our data model is pretty strong, and much of the domain logic of the application has been moved to the database over the course of the last few years, so there is quite a bit of PL/SQL code in there.
Now there is a heated discussion internally about the validity of making the transition to J2EE with the databases intact and reusing this PL/SQL based domain logic. We have individual proclaiming that every operation on data is domain logic and all domain logic should reside on the application server with J2EE.
I personally feel that J2EE fully allows for keeping domain logic in the database, and that one should always apply the principle of the "best technology for the job" in each case. For instance data intensive transformations and calculations belong on the database.
Please provide me with some support to use in our internal discussions as I feel overpowered by the "darker forces", and would very much like to know how the industry at large feels about this issue.
Regards,
Jorn Olmheim
Senior Java DeveloperThe purpose of getting the license and joining local and national Realtor associations is to get closer to the target audience. In order to build an effective marketing strategy, a business must learn as much as possible about their target audience. As a Realtor I will be able to easily network with potential clients. Another benefit of getting the license is that it greatly supports the business requirements gathering process for the applications. Actually, many of the features that we are building into the application will enable the broker to streamline business operations and reduce transaction costs. They could then feasilbly reduce the number of sales agents and maintain steady profit margins.
Very interesting.
Whatever happens in the markets, real estate is here to stay and there will always be land and property to buy and sell. Brokers that operate smartly and utilize technology efficiently will survive. Brokers that still maintain antiquated business models and still are in "legal pad" mode might experience difficulties with their business.
Good points, and a good attitude. I only asked because the bursting of the bubble will result in realtors leaving the field, not entering. But in your case it sounds like you've got a plan and a backup.
>
In regards to the math, there are equations for :
calculating the capitalization rate on income-generating properties
calculating annual taxes, monthly taxes and assessed value
finding a sellers net proceeds and sales price of property to meet specificed goals
rent per square foot
determining front footage and find the sales price off of these measurements
amortization of specified loan numbersThis one is usually a problem for folks.
>
measuring lot size and room dimensions with odd shapes
/>You can handle the rest. Not much more than multiplication and addition.
PS - Take these if you think they'll help:
AmortizationCalculatorForm.java
package finance.model;
import java.util.List;
import java.util.ArrayList;
* AmortizationCalculator
* User: Michael
* Date: Jul 16, 2007
* Time: 10:38:16 PM
public class AmortizationCalculator
private static final int INITIAL_BUILDER_CAPACITY = 2048;
private double principle;
private double ratePercentage;
private int numberOfPayments;
private double payment;
private List<AmortizationLineItem> amortizationLineItems;
* Constructor
* @param principle to start; must be greater than zero.
* @param ratePercentage interest rate as a percentage (e.g., 10% interest means a value of 10.0)
* @param numberOfPayments to be made. A thirty-year mortgage with monthly payments would have 30*12 = 360 payments
public AmortizationCalculator(double principle, double ratePercentage, int numberOfPayments)
this.principle = principle;
this.ratePercentage = ratePercentage;
this.numberOfPayments = numberOfPayments;
this.calculateAmortizationSchedule();
private void calculateAmortizationSchedule()
this.payment = calculatePayment(this.principle, this.ratePercentage, this.numberOfPayments);
this.amortizationLineItems = calculateAmortizationTable(this.principle, this.ratePercentage, this.numberOfPayments, this.payment);
public static List<AmortizationLineItem> calculateAmortizationTable(double principle, double ratePercentage, int numberOfPayments, double payment)
List<AmortizationLineItem> amortizationLineItems = new ArrayList<AmortizationLineItem>(numberOfPayments);
double balance = principle;
for (int i = 0; i < numberOfPayments; ++i)
int period = i+1;
double interest = balance*ratePercentage/100.0;
double principleReduction = payment-interest;
amortizationLineItems.add(new AmortizationLineItem(period, balance, payment, principleReduction, interest));
balance -= principleReduction;
return amortizationLineItems;
* Calculate the periodic payment
* @param principle to be paid; should be a currency type; must be greater than zero
* @param ratePercentage interest rate as a percentage (e.g., 10% rate means a value of 10.0 here)
* @param numberOfPayments to complete payment; must be greater than zero.
* @return periodic payment amount
* @link http://en.wikipedia.org/wiki/Amortization_schedule
public static double calculatePayment(double principle, double ratePercentage, int numberOfPayments)
if (principle < 0.0)
throw new IllegalArgumentException("Principle must be greater than zero");
if (numberOfPayments <= 0)
throw new IllegalArgumentException("Number of payments must be greater than zero");
double rate = ratePercentage/100.0;
double mult = Math.pow((1.0 + rate), numberOfPayments);
return rate*mult*principle/(mult-1.0);
public double getPrinciple()
return principle;
public void setPrinciple(double principle)
this.principle = principle;
public double getRatePercentage()
return ratePercentage;
public void setRatePercentage(double ratePercentage)
this.ratePercentage = ratePercentage;
public int getNumberOfPayments()
return numberOfPayments;
public void setNumberOfPayments(int numberOfPayments)
this.numberOfPayments = numberOfPayments;
public double getPayment()
return payment;
* Given a period number, return the AmortizationLineItem
* @param period, starting with 1 and going up to numberOfPayments
* @return AmortizationLineItem for the given period
public AmortizationLineItem getLineItem(int period)
return this.amortizationLineItems.get(period-1);
public String toString()
StringBuilder builder = new StringBuilder(INITIAL_BUILDER_CAPACITY);
String newline = System.getProperty("line.separator");
for (AmortizationLineItem amortizationLineItem : amortizationLineItems)
builder.append(amortizationLineItem).append(newline);
return builder.toString();
}AmortizationCalculatorTest.java
package finance.model;
import org.junit.Assert;
import org.junit.Test;
* AmortizationCalculatorTest
* User: Michael
* Date: Jul 16, 2007
* Time: 11:09:37 PM
public class AmortizationCalculatorTest
public static final double TOLERANCE = 1.0E-3;
@Test
public void testCalculatePayment()
double principle = 100.0;
double ratePercentage = 10.0;
int numberOfPayments = 5;
double expected = 26.38;
double actual = AmortizationCalculator.calculatePayment(principle, ratePercentage, numberOfPayments);
Assert.assertEquals("Wrong period payment returned", expected, actual, TOLERANCE);
@Test(expected = IllegalArgumentException.class)
public void testNegativePrinciple()
double principle = -100.0;
double ratePercentage = 10.0;
int numberOfPayments = 5;
AmortizationCalculator.calculatePayment(principle, ratePercentage, numberOfPayments);
@Test(expected = IllegalArgumentException.class)
public void testNegativeNumberOfPayments()
double principle = 100.0;
double ratePercentage = 10.0;
int numberOfPayments = -5;
AmortizationCalculator.calculatePayment(principle, ratePercentage, numberOfPayments);
@Test
public void testAmortizationTable()
double principle = 100.0;
double ratePercentage = 10.0;
int numberOfPayments = 5;
AmortizationLineItem [] expected =
new AmortizationLineItem(1, 100.0, 26.38, 16.38, 10.0),
new AmortizationLineItem(2, 83.62, 26.38, 18.02, 8.36),
new AmortizationLineItem(3, 65.60, 26.38, 19.82, 6.56),
new AmortizationLineItem(4, 45.78, 26.38, 21.80, 4.58),
new AmortizationLineItem(5, 23.98, 26.38, 23.98, 2.40),
AmortizationCalculator calculator = new AmortizationCalculator(principle, ratePercentage, numberOfPayments);
for (int i = 0; i < expected.length; ++i)
Assert.assertEquals("Expected " + i + " does not equal actual", expected, calculator.getLineItem(i+1));
AmortizationLineItem.java
package finance.model;
import java.text.NumberFormat;
* AmortizationLineItem
* User: Michael
* Date: Jul 17, 2007
* Time: 11:40:38 AM
public class AmortizationLineItem
public static final double TOLERANCE = 5.0e-3;
private final int period;
private final double outstandingBalance;
private final double payment;
private final double principle;
private final double interest;
public AmortizationLineItem(int period, double outstandingBalance, double payment, double principle, double interest)
this.period = period;
this.outstandingBalance = outstandingBalance;
this.payment = payment;
this.principle = principle;
this.interest = interest;
public int getPeriod()
return period;
public double getOutstandingBalance()
return outstandingBalance;
public double getPayment()
return payment;
public double getPrinciple()
return principle;
public double getInterest()
return interest;
public boolean equals(Object o)
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
AmortizationLineItem that = (AmortizationLineItem) o;
if (Math.abs(that.interest - interest) > TOLERANCE)
return false;
if (Math.abs(that.outstandingBalance - outstandingBalance) > TOLERANCE)
return false;
if (Math.abs(that.payment - payment) > TOLERANCE)
return false;
if (period != that.period)
return false;
if (Math.abs(that.principle - principle) > TOLERANCE)
return false;
return true;
public int hashCode()
int result;
long temp;
result = period;
temp = outstandingBalance != +0.0d ? Double.doubleToLongBits(outstandingBalance) : 0L;
result = 31 * result + (int) (temp ^ (temp >>> 32));
temp = payment != +0.0d ? Double.doubleToLongBits(payment) : 0L;
result = 31 * result + (int) (temp ^ (temp >>> 32));
temp = principle != +0.0d ? Double.doubleToLongBits(principle) : 0L;
result = 31 * result + (int) (temp ^ (temp >>> 32));
temp = interest != +0.0d ? Double.doubleToLongBits(interest) : 0L;
result = 31 * result + (int) (temp ^ (temp >>> 32));
return result;
public String toString()
return
"period=" + period +
", balance=" + NumberFormat.getCurrencyInstance().format(outstandingBalance) +
", payment=" + NumberFormat.getCurrencyInstance().format(payment) +
", principle=" + NumberFormat.getCurrencyInstance().format(principle) +
", interest=" + NumberFormat.getCurrencyInstance().format(interest);
}SimpleInterestCalculator.java
package finance.model;
import java.text.DecimalFormat;
* A simple interest calculator
* @link http://mathforum.org/dr.math/faq/faq.interest.html
public class SimpleInterestCalculator
public static final double DEFAULT_PRINCIPAL = 6000.0;
public static final double DEFAULT_AMOUNT = 7680.0;
public static final double DEFAULT_PERCENT = 0.04;
public static final int DEFAULT_PERIODS = 7;
public static final DecimalFormat DEFAULT_FORMAT = new DecimalFormat("0.00");
* Command line driver
* @param args command line
public static void main(String [] args)
try
double principal = ((args.length > 0) ? Double.parseDouble(args[0]) : DEFAULT_PRINCIPAL);
double amount = ((args.length > 1) ? Double.parseDouble(args[1]) : DEFAULT_AMOUNT);
double percent = ((args.length > 2) ? Double.parseDouble(args[2]) : DEFAULT_PERCENT);
int numPeriods = ((args.length > 3) ? Integer.parseInt(args[3]) : DEFAULT_PERIODS);
System.out.println("amount : " + DEFAULT_FORMAT.format(SimpleInterestCalculator.calcAmount(principal, percent, numPeriods)));
System.out.println("principal: " + DEFAULT_FORMAT.format(SimpleInterestCalculator.calcPrincipal(amount, percent, numPeriods)));
System.out.println("interest : " + DEFAULT_FORMAT.format(SimpleInterestCalculator.calcInterest(principal, amount, numPeriods)));
System.out.println("# periods: " + DEFAULT_FORMAT.format(SimpleInterestCalculator.calcNumPeriods(principal, amount, percent)));
catch (Exception e)
e.printStackTrace();
* Calculate the amount after a number of periods for a given
* starting principal and interest rate
* @param principal at start
* @param percent interest rate (e.g., percent = 0.10 for 10% interest)
* @param numPeriods number of periods
* @return amount accumulated after numPeriods
* @throws IllegalArgumentException if the number of periods is negative
public static double calcAmount(double principal, double percent, int numPeriods)
if (numPeriods < 0)
throw new IllegalArgumentException("Scalar of periods must be positive");
// A = P(1+ni)
return principal*(1.0 + percent*numPeriods);
* Calculate the principal to start with given a desired amount,
* interest rate, and number of periods
* @param amount at end
* @param percent interest rate (e.g., percent = 0.10 for 10% interest)
* @param numPeriods number of periods
* @return principal at start
* @throws IllegalArgumentException if the number of periods is negative
public static double calcPrincipal(double amount, double percent, int numPeriods)
if (numPeriods < 0)
throw new IllegalArgumentException("Scalar of periods must be positive");
// P = A/(1+ni)
return amount/(1.0 + percent*numPeriods);
* Calculate the interest rate for a given amount, principal, and number of periods
* @param principal at start
* @param amount at end
* @param numPeriods number of periods
* @return interest rate
* @throws IllegalArgumentException if the number of periods is non-positive
public static double calcInterest(double principal, double amount, int numPeriods)
if (numPeriods <= 0)
throw new IllegalArgumentException("Scalar of periods must be greater than zero");
// i = ([A/P]-1)/n.
return ((amount/principal) - 1.0)/numPeriods;
* Calculate the number of periods for a given amount, principal, and rate
* @param principal at start
* @param amount at end
* @param percent rate
* @return number of periods
public static double calcNumPeriods(double principal, double amount, double percent)
//n = ([A/P]-1)/i
return ((amount/principal) - 1.0)/percent; -
Any one provide logical structure of the database
Hi,
Can any one tell me the logical structure of the database.
Thanks,http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref53
-
What is the logic behind the oracle database connections....
Hi,
We have crontab alerts are enabled for the oracle database client connection.
For Production databases the alerts are coming continuously until it gets connected.
For QA databases it will throw the message that the oracle client connection fails and again it will prompt whenever it gets connected.
Please let me know the logic behind these scnerions.
Pavan..
Edited by: dm_ptldba on Feb 14, 2012 6:45 AMHi,
Thanks for the update, Sorry the question was not clear. let me put it in a clear way.
Following is our crontab which alerts us if any database/listener goes down. But it alerts us only once for one successful/unsuccessful connection. For Eg: If the crontab not able to connect to the database for once then it throws an alert only once and waits for a successful connection.
I would like to change the logic in this crontab in such a way that, it should keep on alerting us for all the unsuccessful connections and once or twice for successful connection.
. /home/oracle/.bash_profile
. /opt/oracle/cron/cron_email
sidfile=/home/oracle/scripts/db-list.txt
dboutfile=/home/oracle/scripts/dboutfile.tmp
echo $ORACLE_HOME
TNS_DIR=$ORACLE_HOME/network/admin
ORA_BIN=$ORACLE_HOME/bin
cat $sidfile | while read SIDNAME
do
$ORA_BIN/sqlplus -s system/******@$SIDNAME 2> /dev/null >> $dboutfile <<EOF
@/home/oracle/scripts/db_up.sql
EOF
if [ $? -eq 0 ]
then
STATUS=1
if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]
then
/bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is up & connected..." [email protected] </dev/null
rm -rf /home/oracle/scripts/${SIDNAME}-down.txt
fi
else
if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]; then
echo "";
else
touch /home/oracle/scripts/${SIDNAME}-down.txt
echo ${SIDNAME} "not Connected ..."
/bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is down......" [email protected] </dev/null
fi
fi
done
Thank you.
PTLDBA -
How to save the CLOB domain data in to database fron page fragment
Hi ,
Am using Jdev 11.1.1.2.1.
In the database am using i have a CLOB Domain Data. I want to Edit it.
Am displaying it in <af:richTextEditor> , But when i Edit it and save, it will throw an error saying that the String cannot be converted to CLOB Domain data.
Please let me know how to save it.
Thanks,
hariCheck this blog post:
http://baigsorcl.blogspot.com/2010/05/adding-boolean-checkbox-to-table.html
af:selectBooleanCheckbox can't submit value to VO?
Thanks,
Navaneeth -
Setup problem - sql server 2014 - "could not find the database engine startup handle" - 0x851a0019
I tried to install ,deleted and re-installed several times and no help at all.
visual studio 2013 with update 2 rc and adk installed in my computer.
error code: 0x851a0019
error messege in setup: could not find the database engine startup handle
edition: Microsoft SQL Server 2014 Enterprise (Evaluation)
logs:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061893607
Start time: 2014-04-03 13:53:29
End time: 2014-04-03 14:47:48
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for RS: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for DQ: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for FullText: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: ARIELUBA-PC
Machine processor count: 8
OS version: Windows 8
OS service pack:
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered Configured
SQL Server 2012 SQLEXPRESS MSSQL11.SQLEXPRESS Database Engine Services 1033
Express Edition 11.1.3128.0 No Yes
SQL Server 2012 SQLEXPRESS MSSQL11.SQLEXPRESS SQL Server Replication 1033
Express Edition 11.1.3128.0 No Yes
SQL Server 2012 ADK MSSQL11.ADK Database Engine Services
1033 Express Edition 11.0.2100.60 No Yes
SQL Server 2012 ADK MSSQL11.ADK SQL Server Replication
1033 Express Edition 11.0.2100.60 No Yes
SQL Server 2012 LocalDB
1033 Express Edition 11.1.3412.0 No Yes
Package properties:
Description: Microsoft SQL Server 2014
ProductName: SQL Server 2014
Type: RTM
Version: 12
SPLevel: 0
Installation location: C:\Users\Arie Luba\Downloads\WS2012R2DC\SQLServer2014-x64-ENU\x64\setup\
Installation edition: Evaluation
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: true
AGTSVCACCOUNT: NT Service\SQLSERVERAGENT
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Backup
ASCOLLATION: Hebrew_CI_AS
ASCONFIGDIR: C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Config
ASDATADIR: C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Data
ASLOGDIR: C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT: NT Service\MSSQLServerOLAPService
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: ARIELUBA-PC\Arie Luba
ASTEMPDIR: C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Temp
BROWSERSVCSTARTUPTYPE: Automatic
CLTCTLRNAME:
CLTRESULTDIR: C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir\
CLTSTARTUPTYPE: Manual
CLTSVCACCOUNT: NT Service\SQL Server Distributed Replay Client
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir\
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140403_135327\ConfigurationFile.ini
CTLRSTARTUPTYPE: Manual
CTLRSVCACCOUNT: NT Service\SQL Server Distributed Replay Controller
CTLRSVCPASSWORD: <empty>
CTLRUSERS: ARIELUBA-PC\Arie Luba
ENABLERANU: false
ENU: true
ERRORREPORTING: false
FEATURES: SQLENGINE, REPLICATION, FULLTEXT, DQ, AS, RS, RS_SHP, RS_SHPWFE, DQC, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, DREPLAY_CTLR, DREPLAY_CLT, MDS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: NT Service\MSSQLFDLauncher
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: true
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT Service\MsDtsServer120
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
NPENABLED: 0
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: SharePointFilesOnlyMode
RSSVCACCOUNT: NT Service\ReportServer
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: <empty>
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: Hebrew_CI_AS
SQLSVCACCOUNT: NT Service\MSSQLSERVER
SQLSVCPASSWORD: <empty>
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: ARIELUBA-PC\Arie Luba
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: false
TCPENABLED: 1
UIMODE: Normal
UpdateEnabled: true
UpdateSource: MU
USEMICROSOFTUPDATE: false
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140403_135327\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Client Tools SDK
Status: Passed
Feature: Client Tools Backwards Compatibility
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: Reporting Services - Native
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
Feature: Data Quality Services
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
Feature: Full-Text and Semantic Extractions for Search
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
Feature: SQL Server Replication
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
Feature: Master Data Services
Status: Passed
Feature: Distributed Replay Client
Status: Passed
Feature: Distributed Replay Controller
Status: Passed
Feature: Integration Services
Status: Passed
Feature: Data Quality Client
Status: Passed
Feature: Analysis Services
Status: Passed
Feature: Reporting Services - SharePoint
Status: Passed
Feature: Reporting Services Add-in for SharePoint Products
Status: Passed
Feature: SQL Browser
Status: Passed
Feature: Documentation Components
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: Setup Support Files
Status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140403_135327\SystemConfigurationCheck_Report.htm
2014-04-03 14:14:28.01 Server Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Feb 20 2014 20:04:26
Copyright (c) Microsoft Corporation
Enterprise Evaluation Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
2014-04-03 14:14:28.01 Server UTC adjustment: 3:00
2014-04-03 14:14:28.01 Server (c) Microsoft Corporation.
2014-04-03 14:14:28.01 Server All rights reserved.
2014-04-03 14:14:28.01 Server Server process ID is 7148.
2014-04-03 14:14:28.01 Server System Manufacturer: 'Dell Inc.', System Model: 'Inspiron N5110'.
2014-04-03 14:14:28.01 Server Authentication mode is WINDOWS-ONLY.
2014-04-03 14:14:28.01 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2014-04-03 14:14:28.01 Server The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.
2014-04-03 14:14:28.01 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2014-04-03 14:14:28.01 Server Command Line Startup Parameters:
-s "MSSQLSERVER"
-m "SqlSetup"
-Q
-q "Hebrew_CI_AS"
-T 4022
-T 4010
-T 3659
-T 3610
-T 8015
2014-04-03 14:14:28.28 Server SQL Server detected 1 sockets with 4 cores per socket and 8 logical processors per socket, 8 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message;
no user action is required.
2014-04-03 14:14:28.28 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2014-04-03 14:14:28.28 Server Detected 8099 MB of RAM. This is an informational message; no user action is required.
2014-04-03 14:14:28.28 Server Using conventional memory in the memory manager.
2014-04-03 14:14:28.31 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2014-04-03 14:14:28.34 Server Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
2014-04-03 14:14:28.36 Server Query Store settings initialized with enabled = 1,
2014-04-03 14:14:28.36 Server The maximum number of dedicated administrator connections for this instance is '1'
2014-04-03 14:14:28.36 Server Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message
only. No user action is required.
2014-04-03 14:14:28.38 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2014-04-03 14:14:28.39 Server Database Mirroring Transport is disabled in the endpoint configuration.
2014-04-03 14:14:28.39 spid8s Warning ******************
2014-04-03 14:14:28.39 spid8s SQL Server started in single-user mode. This an informational message only. No user action is required.
2014-04-03 14:14:28.40 spid8s Starting up database 'master'.
2014-04-03 14:14:28.42 Server Software Usage Metrics is disabled.
2014-04-03 14:14:28.48 Server CLR version v4.0.30319 loaded.
2014-04-03 14:14:28.56 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2014-04-03 14:14:28.62 spid8s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2014-04-03 14:14:28.63 spid8s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2014-04-03 14:14:28.64 spid8s SQL Trace ID 1 was started by login "sa".
2014-04-03 14:14:28.64 spid8s Server name is 'ARIELUBA-PC'. This is an informational message only. No user action is required.
2014-04-03 14:14:28.65 spid16s Password policy update was successful.
2014-04-03 14:14:28.66 spid16s Error: 17190, Severity: 16, State: 1.
2014-04-03 14:14:28.66 spid16s Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0.
2014-04-03 14:14:28.66 spid16s Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
2014-04-03 14:14:28.66 spid16s Error: 17182, Severity: 16, State: 1.
2014-04-03 14:14:28.66 spid16s TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
2014-04-03 14:14:28.66 spid16s Error: 17182, Severity: 16, State: 1.
2014-04-03 14:14:28.66 spid16s TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
2014-04-03 14:14:28.66 spid16s Error: 17826, Severity: 18, State: 3.
2014-04-03 14:14:28.66 spid16s Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2014-04-03 14:14:28.67 spid16s Error: 17120, Severity: 16, State: 1.
2014-04-03 14:14:28.67 spid16s SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
________________________________________________________________________________________________Is it okay? (see below)
;SQL Server 2014 Configuration File
[OPTIONS]
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
ACTION="Install"
; Detailed help for command line argument ROLE has not been defined yet.
ROLE="AllFeatures_WithDefaults"
; Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system.
ENU="True"
; Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block.
UIMODE="Normal"
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only, without any user interaction.
QUIETSIMPLE="False"
; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found.
UpdateEnabled="True"
; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
ERRORREPORTING="False"
; If this parameter is provided, then this computer will use Microsoft Update to check for updates.
USEMICROSOFTUPDATE="False"
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature
will install Management Tools, Books online components, SQL Server Data Tools, and other shared components.
FEATURES=SQLENGINE,REPLICATION,FULLTEXT,DQ,AS,RS,RS_SHP,RS_SHPWFE,DQC,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,DREPLAY_CTLR,DREPLAY_CLT,MDS
; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update
or a Windows Update service through the Window Server Update Services.
UpdateSource="MU"
; Displays the command line parameters usage
HELP="False"
; Specifies that the detailed Setup log should be piped to the console.
INDICATEPROGRESS="False"
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
X86="False"
; Specify the root installation directory for shared components. This directory remains unchanged after shared components are already installed.
INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
; Specify the root installation directory for the WOW64 shared components. This directory remains unchanged after WOW64 shared components are already installed.
INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services
(RS).
INSTANCENAME="MSSQLSERVER"
; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature.
SQMREPORTING="False"
; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance.
INSTANCEID="MSSQLSERVER"
; The computer name that the client communicates with for the Distributed Replay Controller service.
CLTCTLRNAME="SQLDRC"
; The Windows account(s) used to grant permission to the Distributed Replay Controller service.
CTLRUSERS="ARIELUBA-PC\Arie Luba"
; The account used by the Distributed Replay Controller service.
CTLRSVCACCOUNT="NT Service\SQL Server Distributed Replay Controller"
; The startup type for the Distributed Replay Controller service.
CTLRSTARTUPTYPE="Manual"
; The account used by the Distributed Replay Client service.
CLTSVCACCOUNT="NT Service\SQL Server Distributed Replay Client"
; The startup type for the Distributed Replay Client service.
CLTSTARTUPTYPE="Manual"
; The result directory for the Distributed Replay Client service.
CLTRESULTDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir"
; The working directory for the Distributed Replay Client service.
CLTWORKINGDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
; RSInputSettings_RSInstallMode_Description
RSINSTALLMODE="DefaultNativeMode"
; RSInputSettings_RSInstallMode_Description
RSSHPINSTALLMODE="SharePointFilesOnlyMode"
; Specify the installation directory.
INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
; Agent account name
AGTSVCACCOUNT="NT Service\SQLSERVERAGENT"
; Auto-start service after installation.
AGTSVCSTARTUPTYPE="Manual"
; Startup type for Integration Services.
ISSVCSTARTUPTYPE="Automatic"
; Account for Integration Services: Domain\User or system account.
ISSVCACCOUNT="NT Service\MsDtsServer120"
; The name of the account that the Analysis Services service runs under.
ASSVCACCOUNT="NT Service\MSSQLServerOLAPService"
; Controls the service startup type setting after the service has been created.
ASSVCSTARTUPTYPE="Automatic"
; The collation to be used by Analysis Services.
ASCOLLATION="Hebrew_CI_AS"
; The location for the Analysis Services data files.
ASDATADIR="C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Data"
; The location for the Analysis Services log files.
ASLOGDIR="C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Log"
; The location for the Analysis Services backup files.
ASBACKUPDIR="C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Backup"
; The location for the Analysis Services temporary files.
ASTEMPDIR="C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Temp"
; The location for the Analysis Services configuration files.
ASCONFIGDIR="C:\Program Files\Microsoft SQL Server\MSAS12.MSSQLSERVER\OLAP\Config"
; Specifies whether or not the MSOLAP provider is allowed to run in process.
ASPROVIDERMSOLAP="1"
; Specifies the list of administrator accounts that need to be provisioned.
ASSYSADMINACCOUNTS="ARIELUBA-PC\Arie Luba"
; Specifies the server mode of the Analysis Services instance. Valid values are MULTIDIMENSIONAL and TABULAR. The default value is MULTIDIMENSIONAL.
ASSERVERMODE="MULTIDIMENSIONAL"
; CM brick TCP communication port
COMMFABRICPORT="0"
; How matrix will use private networks
COMMFABRICNETWORKLEVEL="0"
; How inter brick communication will be protected
COMMFABRICENCRYPTION="0"
; TCP port used by the CM brick
MATRIXCMBRICKCOMMPORT="0"
; Startup type for the SQL Server service.
SQLSVCSTARTUPTYPE="Automatic"
; Level to enable FILESTREAM feature at (0, 1, 2 or 3).
FILESTREAMLEVEL="0"
; Set to "1" to enable RANU for SQL Server Express.
ENABLERANU="False"
; Specifies a Windows collation or an SQL collation to use for the Database Engine.
SQLCOLLATION="Hebrew_CI_AS"
; Account for SQL Server service: Domain\User or system account.
SQLSVCACCOUNT="NT Service\MSSQLSERVER"
; Windows account(s) to provision as SQL Server system administrators.
SQLSYSADMINACCOUNTS="ARIELUBA-PC\Arie Luba"
; Provision current user as a Database Engine system administrator for %SQL_PRODUCT_SHORT_NAME% Express.
ADDCURRENTUSERASSQLADMIN="True"
; Specify 0 to disable or 1 to enable the TCP/IP protocol.
TCPENABLED="1"
; Specify 0 to disable or 1 to enable the Named Pipes protocol.
NPENABLED="0"
; Startup type for Browser Service.
BROWSERSVCSTARTUPTYPE="Automatic"
; Specifies which account the report server NT service should execute under. When omitted or when the value is empty string, the default built-in account for the current operating system.
; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.
RSSVCACCOUNT="NT Service\ReportServer"
; Specifies how the startup mode of the report server NT service. When
; Manual - Service startup is manual mode (default).
; Automatic - Service startup is automatic mode.
; Disabled - Service is disabled
RSSVCSTARTUPTYPE="Automatic"
; Add description of input argument FTSVCACCOUNT
FTSVCACCOUNT="NT Service\MSSQLFDLauncher" -
Logical delete in database adapter
Hello
I was wondering if someone has solution the problem with polling database. You can specify the logical delete column and you can give values for READ, UNREAD and RESERVED states. The problem is that when for example ESB project polls some specific table and starts an instance for every new row with specified logical delete field with value UNREAD, when something unexpected happens and something goes wrong the database adapter updates the row with READ value. This is problematic if we have thousands of rows, and we would like to separate the errored rows from the successfully read rows. Is there anyway (easy) way to update those rows that went wrong to some other value than READ?
I don't know if anyone understood me, but just for clarification here's a example:
I have a ESB-project which poll specific database table and parses and XML from the data. After this the ESB-project sends the data to some Web Service. The database table has column CONDITION_CODE in which value 0 means unread and value 1 means read. Now if everything goes fine there is no problems. But if the Web Service is unavailable or the data is malformed, the database adapter still updates the CONDITION_CODE to 1! We have no ways (except to listen ESB_ERROR topic and implement some error handling there) to know what rows were successfully delivered and which were not...
Hope I was able to clarify the problem... And I hope someone could be able to provide me with answer.
Best Regards TuomasDid you use the RESERVED value property? How about the transaction mechanism? Do you have global transactions? I gues you would have to use them!
-
Use DPM to backup Exchange DAG can not see the database
Hi,
I want to use DPM to backup Exchange DAG, but when I create the protection group, I can't open the dag to choose the database.
If somebody can tell me what's wrong with it? How to troubleshoot this problem?
The version of DPM is 2012 sp1,and the version of Exchange is 2013.
I'm sorry that I could just provide a picture in Chinese.
I received this event on the DPM Server:
Log Name: System
Source: Microsoft-Windows-DistributedCOM
Event ID: 10016
Description:
The application-specific permission settings do not grant Remote Launch permission for the COM Server application with CLSID {CC7D8A18-C386-48D5-9906-4FFC77A39788} to the user DOMAIN\DC$ SID (S-1-5-21-3005733532-2211877466-3700573520-15394).
This security permission can be modified using the Component Services administrative tool.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
<EventID Qualifiers="0">10016</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2014-04-08T08:25:20.222501400Z" />
<EventRecordID>2715</EventRecordID>
<Correlation />
<Execution ProcessID="856" ThreadID="2380" />
<Channel>System</Channel>
<Computer>DPMSERVER.domain.local</Computer>
<Security UserID="S-1-5-21-3005733532-2211877466-3700573520-15394" />
</System>
<EventData>
<Data Name="param1">application-specific</Data>
<Data Name="param2">Remote</Data>
<Data Name="param3">Launch</Data>
<Data Name="param4">{CC7D8A18-C386-48D5-9906-4FFC77A39788}</Data>
<Data Name="param5">{A3B9D3F4-2477-4F95-B2D1-F75B0FDF2A0E}</Data>
<Data Name="param6">DOMAIN</Data>
<Data Name="param7">DC$</Data>
<Data Name="param8">S-1-5-21-3005733532-2211877466-3700573520-15394</Data>
<Data Name="param9">172.16.103.3</Data>
<Data Name="param10">Unavailable</Data>
<Data Name="param11">Unavailable</Data>
</EventData>
</Event>
Kindly clarify me, Thanks in advance.
thorneHi,
please take a look at this:
http://social.technet.microsoft.com/Forums/en-US/0d876796-cef4-4ec4-a76e-dcda8c0bcea8/dpm-2012-sp1-protecting-exchange-2010-and-exchange-2013-at-the-same-time?forum=dpmexchbackup
regards
/bkpfast
My postings are provided "AS IS" with no warranties and confer no rights -
Connection from the web server to the database which is situated in another machine.
Thanks for the reply.
I need to know, whether there shold be a physical connection between the web server and database machine? or can we connect to the database machine through the web, if the database machine has a domain name? if there is a physical connection, we can use the jdbc/odbc connection. but if we are connecting through the web, how can I estblish the connection using a JDBC/ ODBC connection?
Regards,
GeorgeAs long as there's a network connection between the two machines, you should be able to make the connection. I'm not sure what the difference between a 'direct connection' and a 'connection through the web' is-- are you actually running a network cable from one machine to another?
When you cannot make the connection, are you able to do a 'tnsping' on the target database?
When you say 'connecting through the web', is it possible that you're going through a firewall? If so, the firewall may be blocking the ports you need to communicate on.
Justin Cave
ODBC Development -
System
Provider
[ Name]
SharePoint
Products and Technologies Configuration
Wizard
EventID
104
[ Qualifiers]
0
Level
2
Task
0
Keywords
0x80000000000000
TimeCreated
[ SystemTime]
2014-11-06T02:03:00.000Z
EventRecordID
11054
Channel
Application
Computer
HZNTPMSWSMOS001.NEO-DIAGEO.com
Security
EventData
Failed
to create the configuration database. An exception of type
System.SystemException was thrown. Additional exception information: The trust
relationship between this workstation and the primary domain failed.
System.SystemException: The trust relationship between this workstation and the
primary domain failed. at
System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection
sourceAccounts, Boolean& someFailed) at
System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection
sourceAccounts, Type targetType, Boolean forceSuccess) at
System.Security.Principal.NTAccount.Translate(Type targetType) at
Microsoft.SharePoint.Administration.SPProcessIdentity.GetMachineRelativeSecurityIdentifier(SPServer
server, Boolean& isMachineAccount) at
Microsoft.SharePoint.Administration.SPProcessIdentity.GrantIdentityAccessToDatabase(SPProcessIdentity
identity, SPDatabase database) at
Microsoft.SharePoint.Administration.SPProcessIdentity.GrantIdentityDatabaseAccess()
at Microsoft.SharePoint.Administration.SPProcessIdentity.Update() at
Microsoft.SharePoint.Administration.SPWindowsService.Update() at
Microsoft.SharePoint.Administration.SPFarm.CreateBasicServices(SqlConnectionStringBuilder
administrationContentDatabase, IdentityType identityType, String farmUser,
SecureString farmPassword) at
Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder
configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase,
IdentityType identityType, String farmUser, SecureString farmPassword) at
Microsoft.SharePoint.Administration.SPFarm.Create(SqlConnectionStringBuilder
configurationDatabase, SqlConnectionStringBuilder administrationContentDatabase,
String farmUser, SecureString farmPassword) at
Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb()
at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run()
at
Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()Hi,
This issue seems to be a machine Issue. From message is seems that your Computer is not properly connected to Domain. use the steps in the below link and try doing your steps again.
https://support.microsoft.com/kb/162797?wa=wsignin1.0
Regards -
Table Z does not exist in the database
Hi,
I have created a Z table and modified the DataType from NUMC to DEC and transported to Quality server
and it is giving an information error that (Table Z does not exist in the database) then once again
i modified the DataType from DEC to NUMC and transported to Quality server then still it is giving an information error that
(Table Z does not exist in the database) please help me out in this issue.
Thanks in advance.Hi Jayanthumer,
Have you Activated (Ctrl + F3) the Table in SE11 before transporting to Quality server ?
Try to activate (Ctrl + F3) the table in SE11 of your Quality server...
It may not be imported properly into Quality server...
Ask to BASIS person about errors/warnings while importing to Quality Server..
Also activate all dataelement and domains.... make sure all things are active...
Once you activate it then it will create the table in database... till then there will be no table in database...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
How to delete the content of a datatable by the "Database Adapter"
Hello,
i want to delete all entries in a table by a database adapter - like "DELETE FROM table" in SQL. (Oracle SOA Suite 11g SR1, with Oracle DB over JDBC))
When i create a new Database adapter i can select standard functions for "insert, select, delete". The function delete does have the disadvantage, that it needs a input message with the key values of the data entry which have to be deleted, which i don't have and don't want to get.
So i tried the "Pure SQL" mode for the adapter with the SQL string "DELETE FROM table" but this instruction is somehow not commited to the database.
My questions are:
- Is there any commit needed for the pure sql instructions? How is the syntax to write several SQL instructions for one Database Adapter?
- Does anyone have another solution to delete the entries?
Thanx in advance
TobiasHi Shishir,
it is a pretty simple example. I think the problem is that the Database Adapter is not commiting.
The BPEL is simple sending an empty message to the adapter which should trigger the SQL execution (See Code below)
The PURE SQL String i'm using is "DELETE FROM table"
Thanks Tobias
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
Oracle JDeveloper BPEL Designer
Created: Wed May 05 09:13:00 CEST 2010
Author: oracle
Purpose: Asynchronous BPEL Process
-->
<process name="BPELProcess1"
targetNamespace="http://xmlns.oracle.com/App_DWH_Prototype/TestDELETE/BPELProcess1"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:client="http://xmlns.oracle.com/App_DWH_Prototype/TestDELETE/BPELProcess1"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:xpath20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:ui="http://xmlns.oracle.com/soa/designer/"
xmlns:task="http://xmlns.oracle.com/bpel/workflow/task"
xmlns:taskservice="http://xmlns.oracle.com/bpel/workflow/taskService"
xmlns:wfcommon="http://xmlns.oracle.com/bpel/workflow/common"
xmlns:wf="http://schemas.oracle.com/bpel/extension/workflow"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/App_DWH_Prototype/TestDELETE/TestDelete%2F"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/top/TestDelete">
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
<partnerLink name="TestDelete" partnerRole="TestDelete_role"
partnerLinkType="ns1:TestDelete_plt"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
<!-- Reference to the message that will be sent back to the requester during callback -->
<variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
<variable name="Invoke_1_delete_InputVariable"
messageType="ns1:TActIngredientCollection_msg"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->
<receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
<!--
Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
-->
<assign name="Assign_1">
<copy>
<from expression="''"/>
<to variable="Invoke_1_delete_InputVariable"
part="TActIngredientCollection"
query="/ns2:TActIngredientCollection/ns2:TActIngredient/ns2:plotNo"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/client:process/client:input"/>
<to variable="outputVariable" part="payload"
query="/client:processResponse/client:result"/>
</copy>
</assign>
<invoke name="Invoke_1" inputVariable="Invoke_1_delete_InputVariable"
partnerLink="TestDelete" portType="ns1:TestDelete_ptt"
operation="delete"/>
<invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
</sequence>
</process> -
NO domains accessible to the user error while opening bpel console
Hi all,
I have applied SOA patchset 10.1.3.5 on SOA 10.1.3.1 .After that when I am trying to access bpel console is givving the error like
'No Domains accessable to the user logged in'. I am able to connect to the database using jdeveloper.
I am missing any post instalation steps ?.Can anybody help me please.
Thanks and Regards,
Durgareddy Katta.Hi
It means that your bpel services have failed to start up. perhaps a failure with patching it.
Did you also patched the orabpel schema? Did you follow the post install tasks?
Look into $ORACLE_HOME/bpel/domains/domain_name/logs/domain.log and ORACLE_HOME/opmn/logs, oc4j_soa logs what kind of errors there are related to bpel startup
Michel -
EJB 3.0 - JSF APPLICATION: DATA DOES NOT PERSIST TO THE DATABASE
Hi,
I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
Here is my scenario ( Iam using JDeveloper IDE to create this application) -
SCENARIO START
The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
1.) INDEX.JSP
2.) ADDUSER.JSP
Step 1: Create the USERS Table in database
CREATE TABLE users
user_id serial,
username varchar(255) NOT NULL,
first_name varchar(255),
last_name varchar(255),
password char(64) NOT NULL,
CONSTRAINT pk_users PRIMARY KEY (user_id)
Step 2: Add Database Connection To JDeveloper
Go to Database Connection Navigator and create a New Database Connection using the Wizard
Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows –
User.java -
package lux.domain;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@NamedQuery(name = "User.findAll", query = "select o from User o")
@Table(name = "USERS")
public class User implements Serializable {
@Column(name="FIRST_NAME")
private String firstName;
@Column(name="LAST_NAME")
private String lastName;
@Column(nullable = false)
private String password;
@Column(nullable = false)
private String username;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
@SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
@Column(name="USER_ID", nullable = false)
private Long userId;
public User() {
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getUsername() {
return username;
public void setUsername(String username) {
this.username = username;
public Long getUserId() {
return userId;
public void setUserId(Long userId) {
this.userId = userId;
Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
Again Right Click on Model and create Session Bean from Wizard which creates two files –
UserDAOBean.java – Stateless Session Bean
UserDAO.java – Local Interface
package lux.facade;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import lux.domain.User;
@Stateless(name="UserDAO")
public class UserDAOBean implements UserDAO {
@PersistenceContext(unitName="Model")
private EntityManager em;
public UserDAOBean() {
public User getUser(int UserId) {
User u = new User();
u = em.find(User.class, UserId);
return u;
public List<User> getAllUsers() {
Query q = em.createQuery("SELECT u FROM User u");
List<User> users = q.getResultList();
return users;
public void createUser(User u) {
String hashedPw = hashPassword(u.getPassword());
u.setPassword(hashedPw);
em.persist(u);
public void updateUser(User u) {
String hashedPw = hashPassword(u.getPassword());
u.setPassword(hashedPw);
em.merge(u);
public void deleteUser(User u) {
em.remove(u);
private String hashPassword(String password) {
StringBuilder sb = new StringBuilder();
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA");
byte[] bs;
bs = messageDigest.digest(password.getBytes());
for (int i = 0; i < bs.length; i++) {
String hexVal = Integer.toHexString(0xFF & bs);
if (hexVal.length() == 1) {
sb.append("0");
sb.append(hexVal);
} catch (NoSuchAlgorithmException ex) {
Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
return sb.toString();
Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
Step 7: Now Right Click on View/Controller Node and create a Java File –
UserController.java -
package lux.controllers;
import javax.ejb.EJB;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import lux.domain.User;
import lux.facade.UserDAO;
public class UserController {
@EJB UserDAO userDao;
private User user;
private DataModel model;
public String createUser() {
this.user = new User();
return "create_new_user";
public String saveUser() {
String r = "success";
try {
userDao.createUser(user);
} catch (Exception e) {
e.printStackTrace();
r = "failed";
return r;
public DataModel getUsers() {
model = new ListDataModel(userDao.getAllUsers());
return model;
public User getUser() {
return user;
public void setUser(User user) {
this.user = user;
Step 8: Configure page flow in faces-config.xml
1. Create the JSP file adduser.jsp by right-clicking View-Controller
node and selecting New > JSP. Use the wizard to create JSF – JSP Page, fill in
File Name adduser.jsp, click Finish. -
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>New user</title>
</head>
<body>
<f:view>
<h:form>
<h:messages/>
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText
id="Username"
value="#{user.user.username}"
required="true"/>
<h:outputText value="First name"/>
<h:inputText
id="FirstName"
value="#{user.user.firstName}" />
<h:outputText value="Last name"/>
<h:inputText
id="LastName"
value="#{user.user.lastName}" />
<h:outputText value="Password" />
<h:inputSecret
id="Password"
value="#{user.user.password}"
required="true" />
<h:panelGroup/>
<h:commandButton
action="#{user.saveUser}"
value="Save"/>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
2. Repeat the previous step for another JSP file failed.jsp.
3. On failed.jsp add the string
Save failed
Next we configure the page flow.
1. Open faces-config.xml.
2. Create index.jsp -
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>User Listing</title>
</head>
<body>
<f:view>
<h:form>
<h:outputText value="User Listing"/>
<h:commandLink action="#{user.createUser}" value="Create a user"/>
<h:dataTable value="#{user.user}"
var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
<h:column>
<f:facet name="header">
<h:outputText value="Username"/>
</f:facet>
<h:outputText value="#{dataTableItem.username}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="First name"/>
</f:facet>
<h:outputText value="#{dataTableItem.firstName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Last name"/>
</f:facet>
<h:outputText value="#{dataTableItem.lastName}" />
</h:column>
</h:dataTable>
</h:form>
</f:view>
</body>
</html>
3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow’s label to create_new_user.
4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
ailed
5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
This creates the following faces-config.xml file –
<?xml version='1.0' encoding='UTF-8'?>
<faces-config>
<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>lux.controllers.UserController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>username</property-name>
<value>#{username}</value>
</managed-property>
<managed-property>
<property-name>firstName</property-name>
<value>#{firstName}</value>
</managed-property>
<managed-property>
<property-name>lastName</property-name>
<value>#{lastName}</value>
</managed-property>
<managed-property>
<property-name>password</property-name>
<value>#{password}</value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/index.jsp</from-view-id>
<navigation-case>
<from-outcome>create_new_user</from-outcome>
<to-view-id>/adduser.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/adduser.jsp</from-view-id>
<navigation-case>
<from-outcome>failed</from-outcome>
<to-view-id>/failed.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model’s JAR and View-Controller’s
WAR files to it.
Step 11: Run the JSP Files
SCENARIO END
Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
WHAT IS WRONG OUT HERE ???If you set a breakpoint in your createUser method - does this code get executed?
We have a couple of tutorials that might show you how to do this.
EJB/JSF with ADF-binding tutorial:
http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
EJB/JSF without ADF binding:
http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm -
JSF - EJB 3.0 Application - Data does not persist to the database
Hi,
I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
Here is my scenario ( Iam using JDeveloper IDE to create this application) -
------------------------------------------------------- SCENARIO START
The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
1.) INDEX.JSP
2.) ADDUSER.JSP
Step 1: Create the USERS Table in database
CREATE TABLE users
user_id serial,
username varchar(255) NOT NULL,
first_name varchar(255),
last_name varchar(255),
password char(64) NOT NULL,
CONSTRAINT pk_users PRIMARY KEY (user_id)
Step 2: Add Database Connection To JDeveloper
Go to Database Connection Navigator and create a New Database Connection using the Wizard
Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows �
User.java -
package lux.domain;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@NamedQuery(name = "User.findAll", query = "select o from User o")
@Table(name = "USERS")
public class User implements Serializable {
@Column(name="FIRST_NAME")
private String firstName;
@Column(name="LAST_NAME")
private String lastName;
@Column(nullable = false)
private String password;
@Column(nullable = false)
private String username;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
@SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
@Column(name="USER_ID", nullable = false)
private Long userId;
public User() {
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
public String getLastName() {
return lastName;
public void setLastName(String lastName) {
this.lastName = lastName;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public String getUsername() {
return username;
public void setUsername(String username) {
this.username = username;
public Long getUserId() {
return userId;
public void setUserId(Long userId) {
this.userId = userId;
Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
Again Right Click on Model and create Session Bean from Wizard which creates two files �
UserDAOBean.java � Stateless Session Bean
UserDAO.java � Local Interface
package lux.facade;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import lux.domain.User;
@Stateless(name="UserDAO")
public class UserDAOBean implements UserDAO {
@PersistenceContext(unitName="Model")
private EntityManager em;
public UserDAOBean() {
public User getUser(int UserId) {
User u = new User();
u = em.find(User.class, UserId);
return u;
public List<User> getAllUsers() {
Query q = em.createQuery("SELECT u FROM User u");
List<User> users = q.getResultList();
return users;
public void createUser(User u) {
String hashedPw = hashPassword(u.getPassword());
u.setPassword(hashedPw);
em.persist(u);
public void updateUser(User u) {
String hashedPw = hashPassword(u.getPassword());
u.setPassword(hashedPw);
em.merge(u);
public void deleteUser(User u) {
em.remove(u);
private String hashPassword(String password) {
StringBuilder sb = new StringBuilder();
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA");
byte[] bs;
bs = messageDigest.digest(password.getBytes());
for (int i = 0; i < bs.length; i++) {
String hexVal = Integer.toHexString(0xFF & bs);
if (hexVal.length() == 1) {
sb.append("0");
sb.append(hexVal);
} catch (NoSuchAlgorithmException ex) {
Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
return sb.toString();
Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
Step 7: Now Right Click on View/Controller Node and create a Java File �
UserController.java -
package lux.controllers;
import javax.ejb.EJB;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import lux.domain.User;
import lux.facade.UserDAO;
public class UserController {
@EJB UserDAO userDao;
private User user;
private DataModel model;
public String createUser() {
this.user = new User();
return "create_new_user";
public String saveUser() {
String r = "success";
try {
userDao.createUser(user);
} catch (Exception e) {
e.printStackTrace();
r = "failed";
return r;
public DataModel getUsers() {
model = new ListDataModel(userDao.getAllUsers());
return model;
public User getUser() {
return user;
public void setUser(User user) {
this.user = user;
Step 8: Configure page flow in faces-config.xml
1. Create the JSP file adduser.jsp by right-clicking View-Controller
node and selecting New > JSP. Use the wizard to create JSF � JSP Page, fill in
File Name adduser.jsp, click Finish. -
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>New user</title>
</head>
<body>
<f:view>
<h:form>
<h:messages/>
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText
id="Username"
value="#{user.user.username}"
required="true"/>
<h:outputText value="First name"/>
<h:inputText
id="FirstName"
value="#{user.user.firstName}" />
<h:outputText value="Last name"/>
<h:inputText
id="LastName"
value="#{user.user.lastName}" />
<h:outputText value="Password" />
<h:inputSecret
id="Password"
value="#{user.user.password}"
required="true" />
<h:panelGroup/>
<h:commandButton
action="#{user.saveUser}"
value="Save"/>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
2. Repeat the previous step for another JSP file failed.jsp.
3. On failed.jsp add the string <h2>Save failed</h2>.
Next we configure the page flow.
1. Open faces-config.xml.
2. Create index.jsp -
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>User Listing</title>
</head>
<body>
<f:view>
<h:form>
<h1><h:outputText value="User Listing"/></h1>
<p><h:commandLink action="#{user.createUser}" value="Create a user"/></p>
<h:dataTable value="#{user.user}"
var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
<h:column>
<f:facet name="header">
<h:outputText value="Username"/>
</f:facet>
<h:outputText value="#{dataTableItem.username}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="First name"/>
</f:facet>
<h:outputText value="#{dataTableItem.firstName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Last name"/>
</f:facet>
<h:outputText value="#{dataTableItem.lastName}" />
</h:column>
</h:dataTable>
</h:form>
</f:view>
</body>
</html>
3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow�s label to create_new_user.
4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
ailed
5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
This creates the following faces-config.xml file �
<?xml version='1.0' encoding='UTF-8'?>
<faces-config>
<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>lux.controllers.UserController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>username</property-name>
<value>#{username}</value>
</managed-property>
<managed-property>
<property-name>firstName</property-name>
<value>#{firstName}</value>
</managed-property>
<managed-property>
<property-name>lastName</property-name>
<value>#{lastName}</value>
</managed-property>
<managed-property>
<property-name>password</property-name>
<value>#{password}</value>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/index.jsp</from-view-id>
<navigation-case>
<from-outcome>create_new_user</from-outcome>
<to-view-id>/adduser.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/adduser.jsp</from-view-id>
<navigation-case>
<from-outcome>failed</from-outcome>
<to-view-id>/failed.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model�s JAR and View-Controller�s
WAR files to it.
Step 11: Run the JSP Files
------------------------------------------------------- SCENARIO END
Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
WHAT IS WRONG OUT HERE ???PLZZZZZZZZZzzzzzzzzzzz HELP ! ! !
Maybe you are looking for
-
Data merging: how to get multiple records in single text frame?
Hi I'm experimenting with data merging in InDesign CS3. The biggest stumbling block I've come across is trying to get my records to flow as continuous text in a single text frame (which would, ideally, autoflow onto new pages in the document). The re
-
How do I transfer files from a LaCIe backup drive onto new MacBoo Pro?
I have an iMac and use a LaCie backup to, um, backup my files. I am confused over how to transfer my iTunes library from my backup into my MacBook Pro's iTunes library. Thanks.
-
How to change the tempo in ultrabeat
I simply want to know how to change the tempo of a beat to the desired speed... all i can see thus far is under resolution, 1/12, 1/16, etc. But I want to match the tempo with a sample I am using which I have pasted onto an audio track.. and those in
-
I have moved a copy of the domain.sites file to a new machine as described in many other posts. Within iWeb I can access the single pages of my site but cannot open any of the folders. If I click "get info" on the domain.sites file I know all the inf
-
Data Load using only 1 data package
Hi, I am moving data from one cube to another manually using an infopackage. This system has recently been upgraded from 3.0 to 3.5. It is only using 1 datapackage (I am loading 19m records) and have done this successfully before and it used 4 datapa