Task Outcome does not populated in the BPM Worklist
Hi,
I have created several Human task with different outcome, i.e
Task 1 - Input Data; Outcome = Submit, Hold
Task 2 - Verify Data; Outcome = Approve, Reject, Reassign
The process was created and deployed successfully on the Weblogic server, however, when I execute the task, the "Outcome" Column on the BPM worklist never shown up and it was blank , does the outcome automatically mapped, or do I have to additionally bind it to the process variable? Thanks in advance.
To use the value of the Outcome in the process layer, you would be required to capture it in a dataobject/attribute of type string.
Similar Messages
-
Error in script task "The name 'file' does not exist in the current context"
I am new to the c# scripting and SSIS come from PHP and Foxpro.
I am using SSIS with a script task and I am getting am errror "The name 'file' does not exist in the current context" in the following code in the picture below: (See
Why does the object named "file" go away after the first refrence to it?? How do I make it avaliable for the whole script??
public void Main()
String cFileInfo = null;
DateTime dFTPFileDateTime;
bool fireAgain = true;
List<IRemoteFileInfo> fileList = (List<IRemoteFileInfo>)Dts.Variables["SFTPResult"].Value;
foreach (IRemoteFileInfo file in fileList)
cFileInfo = file.Name + "|" +file.ModifiedTime +"|"+ file.Size;
Dts.Events.FireInformation(1, "Name ", cFileInfo, "", 0, ref fireAgain);
dFTPFileDateTime =
file.ModifiedTime;
<< This is where the error is occuring.
Dts.TaskResult = (int)ScriptResults.Success;I think you forgot { and } after the loop... Or is that deliberately?
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter -
Firefox is running. I close the program. I try to reopen it. I get an error message: Firefox is already running. It does not show in the task manager, nor anywhere else. I can not close the old version, nor start a new one. I have to reboot.
Did you look in the Processes tab in the Task Manager?
See also "Hang at exit":
* http://kb.mozillazine.org/Firefox_hangs
* [[Firefox hangs]] -
ORA-13605: The specified task or object Get does not exist for the current
Dear all,
11.1.0.6 on solaris 10
SQL>
SQL> DECLARE
2 taskname varchar2(100);
3 taskdesc varchar2(128);
4 task_id number;
5 object_id number;
6 timeLimit varchar2(25);
7 numDaysToRetain varchar2(25);
8 objectName varchar2(100);
9 objectType varchar2(100);
10 BEGIN
11 taskname := 'SEGMENTADV_8980096';
12 taskdesc :='Get';
13 numDaysToRetain :='30';
14 dbms_advisor.create_task('Segment Advisor','',taskname,taskdesc,NULL);
15 dbms_advisor.create_object(taskname, 'TABLE', 'TRPT', 'CRM_CHECK', ' ', NULL, object_id);
16 dbms_advisor.set_task_parameter(taskname, 'RECOMMEND_ALL', 'TRUE');
17 dbms_advisor.set_task_parameter(taskname, 'DAYS_TO_EXPIRE', numDaysToRetain);
18 END;
19 /
DECLARE
ERROR at line 1:
ORA-13605: The specified task or object Get does not exist for the current
user.
ORA-06512: at "SYS.PRVT_ADVISOR", line 4766
ORA-06512: at "SYS.PRVT_ADVISOR", line 4637
ORA-06512: at "SYS.DBMS_ADVISOR", line 56
ORA-06512: at line 14
Am running the above as sys user ..
Any idea ?
KaiHi,
This link may help:
ORA-13605: The specified task or object ADDM:<task number> does not exist.
Thanks and Regards,
Rajesh K. -
The name '' does not exist in the current context
I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally this
has also happened during normal debbuging of running code on my machine.
I have included 2 screen shots. The first is when it is working. I have a break point set at the declaration of list of types. At this point all my variables are still reporting their values back to the debugger. Once I step over this to the next line (screen
shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
This problem is annoying me to no end. If anyone has any insight as to why this might be happening I would be very much appreciative.
My Settings/Configuration
Using Visual Studio 2013 Premium (Version 12.0.31101.00 Update 4)
Projects are all set to Target Framework = .NET 4.5.1
Resharper 9.1 is installed
My active configuration is debug mode, Any CPU
My PC is 64bit and so is the O/S windows 8.1
All of my projects are also compiled and built in debug mode
For all my projects configuration debug has the Optimize Code check box unchecked
I am unit testing code in an outside project referenced by the unit testing project (standard unit test project setup)
I make use of the latest version of NSubstitute in my tests although I do not think that would have any bearing on this issue
I omitted the code following the error because it is not relevant. I had cut it out and replaced it with a Task.Delay(4) which resulted in the same issue.
What I have tried so far
I have tried debugging the unit test from Visual Studio Test Explorer instead of from Resharper with the same result.
If I remove 2 items at the end of the array it starts to work again (so 6 items initialized instead of 8)
I clean solution with rebuild has no effect
Removing properties of the array also seems to work, example remove all initialization of property Value
Mark as answer or vote as helpful if you find it useful | IgorHi IWolbers,
>>I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally
this has also happened during normal debbuging of running code on my machine.
So you mean that it worked well before, am I right?
If you debug the same app in other VS machine, does it work well? So we could make sure that whether it is related to the VS IDE.
Please disable all add-ins in your VS IDE, and then reset your VS settings, debug it again.
https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx
Or you could run your VS in safe mode, debug it again, at least, we could know that whether it is the add-in's issue.
https://msdn.microsoft.com/en-us/library/ms241278.aspx
To make sure that it is not the project files' issue, create a new blank solution, copy the project files to the new solution, clean and rebuild the solution, check the result.
>>Once I step over this to the next line (screen shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
How about debugging it with "Step Into" instead of "Step Over"? Or you could add breakpoints between 234 line to 241 line, after the breakpoint is hit, check the watch window again. How about the result?
In addition, do you check other debugger window like local or others?
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Open Task Button does not come in Outlook
I have a three level approval workflow in which each level an email is generated to the approve to approve or reject.
But suddenly the Open Task Button does not pop up in Outlook 2010 anymore can you tell me why?
Srinivasan Kidambihad the same issue with External users not using Outlook. This is how I fixed it:
Open the task list that the workflow is using and connect it to Outlook. Then kick off a workflow to make a new task. Once the task is made open the task from Outlook. The bottom options (review, perform the specific req. for the task, and Open this task)
are now links. Hover your mouse over the link and you will see the address.
Now open SPD, connect to your site and open the work flow assc. to the doc lib.
Start editing the workflow and click the "Approval" link
Click "Change the behavior of a single task"
You are going to have to look for all the instances of "then e-mail task notification to "Current Task:Assigned to"
Open "Current Task:Assigned to"
Click where you want he link to go and hit the Hyperlink button
name the link whatever you want, then hit the string builder ("..." button)
Copy the link from the Task in Outlook into the string builder (if you use External addressing you can also hard code the External address).
At the very end of the link where is says ID=(then a number) delete the number and DO NOT put a space. Click the Add or Change Lookup button and use "Current Task: Approval" "ID" "As String" and click ok. Should like this:
Now this will not pop the form up, but it will send the user straight to the task form (might have to enter username and password) for the correct task. Remember to do this to all the "Current Task:Assigned to" in the workflow. It sounds like a chuck of
work but it does not really take thaty long on the OOTB Approval workflow.
Just wanted wanted to add my two cents.
Also check
http://social.technet.microsoft.com/Forums/en-US/417466a3-cdcb-4559-8453-9fff6da4aceb/getting-around-a-missing-open-this-task-button-in-a-nonoutlook-email?forum=sharepointcustomizationprevious
If this helped you resolve your issue, please mark it Answered -
Field VIQMSM-MATXT(14) does not exist in the screen SAPLIQS0 7204
Hi experts,
I have a BDC calls QM02 Tcode in a custom report as follow:
PERFORM bdc_dynpro USING 'SAPLIQS0' '7204'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=REAK'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VIQMEL-QMNUM'.
CLEAR txline.
CONCATENATE 'VIQMSM-MATXT(' lnindex ')' INTO txline.
" txline = VIQMSM-MATXT(0014)
CONCATENATE 'PO #: ' alv_qmel-ponum INTO matxt SEPARATED BY space.
PERFORM bdc_field USING txline
matxt.
PERFORM bdc_transaction USING 'QM02'.
When debugging I found that the input bdcdata table contains a field VIQMSM-MATXT(14) in screen SAPLIQS0 7204.
Number 14 is the number of task of the notification which was not marked as deleted.
This field caused the error: Field VIQMSM-MATXT(14) does not exist in the screen SAPLIQS0 7204 after that.
I would like to know what does VIQMSM-MATXT(14) mean? How BDC can transfer VIQMSM-MATXT(14) to QM02? And How does it work?
Thanks,
KhanhHi Kostek,
I did not have the solution for this exact problem because our FA canceled this bug.
Check your test case carefully whether the screen of the TCode called by BDC has that field OR NOT. If that screen does not have that field in your special case, just ignore it.
Regards,
Khanh -
Hi,
I am getting this error in most of our WSUS servers.
Content file download failed.
Reason: HTTP status 404: The requested URL does not exist on the server.
Source File: /Content/FB/134501186F4C81089054E4EC3376E74EEC895EFB.exe
Destination File: d:\wsus\WsusContent\FB\134501186F4C81089054E4EC3376E74EEC895EFB.exe
After few minutes, getting below error as well. But i could see the synchronization has completed successfully.
Log Name: Application
Source: Windows Server Update Services
Date: 12/19/2014 4:45:55 PM
Event ID: 10032
Task Category: 7
Level: Error
Keywords: Classic
User: N/A
Computer: ******
Description:
The server is failing to download some updates.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Windows Server Update Services" />
<EventID Qualifiers="0">10032</EventID>
<Level>2</Level>
<Task>7</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-12-19T08:45:55.000000000Z" />
<EventRecordID>496887</EventRecordID>
<Channel>Application</Channel>
<Computer>*****</Computer>
<Data>The server is failing to download some updates.</Data>
This error is happening everyday. Please advise for a fix.Reason: HTTP status 404: The requested URL does not exist on the server.
Source File: /Content/FB/134501186F4C81089054E4EC3376E74EEC895EFB.exe
Destination File: d:\wsus\WsusContent\FB\134501186F4C81089054E4EC3376E74EEC895EFB.exe
Source: Windows Server Update Services
Description:
The server is failing to download some updates.
This error is happening everyday. Please advise for a fix.
If this is happening on an UPSTREAM server it is because you have approved updates that are no longer available from Microsoft. Almost always this involves approvals of *EXPIRED* updates (which have been pulled from the catalog and cannot be downloaded).
If this is happening on a DOWNSTREAM server it's because something/someone deleted the files from the upstream server. It can also happen if the entire upstream ~\WSUSContent folder has gone amuk.
For an upstream server, find the expired updates, remove the approvals, cancel the downloads, and then decline the updates.
For a downstream server, figure out what the affected updates are and fix the upstream server.
Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
SolarWinds Head Geek
Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
http://www.solarwinds.com/gotmicrosoft
The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds. -
REP-52005: The specified key userlogin does not exist in the key map file.
Hi,
I am using oracle 11g report server. I am getting the error of REP-52005: The specified key userlogin does not exist in the key map file.
I updated the user_string in cgicmd.dat file. My cgicmd.dat file content is below
; OracleAS Reports Services ;
; CGICMD.DAT ;
; Example CGICMD.DAT Mapping file ;
; Syntax:
; KEY : VALUE
; Where:
; KEY - the first argument of the rwservlet URL request (case sensitive).
; VALUE - command line parameters and/or special parameters.
; Keys can be referenced in the following ways:
; 1. Parameter on command line to the reports servlet
; e.g. http://machine/servlet/rwservlet?KEY
; 2. Parameter on command line to a reports jsp
; e.g. http://machine/mydir/myreport.jsp?KEY
; 3. Within a reports jsp - in the rw:report custom tag
; e.g. <rw:report parameters="KEY">
; In addition to the Reports Server command line parameters, VALUE can include special parameters
; represented as "%X", where X identifies the parameter. Currently recognized special
; parameters:
; %0 - %9 - 0..9 arguments from original rwservlet URL request. Note that %0 refers to the key itself.
; %* - entire contents (all arguments) of original rwservlet URL request.
; %D - request users to input database userid everytime they run the report.
; %P - request for report parameter form in HTML format. It generates the PARAMFORM=HTML
; construction on the first submission of the URL and PARAMFORM=NO upon parameter form submission.
; CGICMD.DAT Usage Notes
; 1. Multiple keys in this file MUST be separated by an EXTRA empty line.
; 2. Extra spaces are ignored. Multi-line entries allowed.
; 3. Lines starting with ";" character are treated as a comments.
; 4. Comments within a key or key value are NOT allowed.
; 5. NLS language support is provided and can be used (encoding should match the one
; used in HTML request - no language conversion of any kind is attempted.
; 6. For %P special parameter, HTML format is by default mapped to the HTMLTABLE format in this release.
; The HTML format in the future may be mapped to the HTMLCSS format.
;;;;;;;;;;;; Example Key Entries
; Example 1: Run a simple breakb report and output to HTML
orqa: report=breakb.rdf destype=cache desformat=html server=repserver
; Example 2: prompt for userid the first time, then use database userid stored in the cookie subsequently.
report_defaultid: report=breakb.rdf destype=cache desformat=html server=repserver
; Example 3: use %D to require user authentication every time
report_secure: report=breakb.rdf destype=cache desformat=html server=repserver1 %D
; Example 4: Take all arguments from URL and send it to the reports server
run: %*
; Example 5: Run breakb report with HTML parameter form.
breakbparam : report=breakb.rdf destype=cache desformat=html server=repserver userid=scott/tiger@mydb %P
; Example 6: take all URL arguments, and also generate a HTML parameter form
runp: %* %P
; Example 7: Run an Express Report. Replace <MYHOST> with the name of the machine running the Express server. The
; builder on-line help explains the rest of the parameters (the /sl, st etc. etc.)
express: report=my_expr_rep express_server="server=ncacn_ip_tcp:<MYHOST>/sl=1/st=1/ct=0/sv=1/" desformat=htmlcss userid=scott/tiger@mydb destype=cache server=repserver
;;;;;;;;;;;; Keys for Reports Demos
; Using default/in-process server.
; JSPs
;charthyperlink_ias: userid="scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=%DBHOSTNAME%)(PORT=%DBPORT%))(CONNECT_DATA=(SID=%DBSID%)))" %*
;charthyperlink_ids: userid=scott/tiger@ %*
;barcodeweb: userid=oe
;parmformjsp: userid=oe
;tutorial: userid=oe
; Paper Reports
;xmldata: userid=oe report=inventory_report.rdf destype=cache p_filelocation="http://%HOSTNAME%:%OC4JPORT%/reports/examples/xml_pds/scripts/" desformat=pdf
;barcodepaper: userid=oe report=shippingmanifest.rdf destype=cache desformat=pdf
;distributionpaper: userid=oe report=inventory_report_dist.rdf distribute=yes destination=exampledistribution.xml
;pdfenhancements: userid=oe report=utf8test.rdf destype=cache desformat=pdf
userlogin : userid=SYMFINBTOTEST@fin10r21 %*
As in the above file i have added a key as userlogin at the end of the file. But the reports server does not take the key that i have given. I followed the same steps provided in oracle docs. I used "showmap" to check the cgicmd file that is used by the reports
http://aspirevm8-17.aspiresys.com:9002/reports/rwservlet/showmap?server=bluQubeReportsAtLocalEnv&destype&userid=SYMFINBT…
It shows me the content of the cgicmd.dat file and it also shows my updations. But in the "Parsed Map File Entries" it does not show my key value pair
Parsed Map File Entries
Return to Top
Key Name
Value
runp
%* %P
breakbparam
report=breakb.rdf destype=cache desformat=html server=repserver userid=scott@mydb %P
report_defaultid
report=breakb.rdf destype=cache desformat=html server=repserver
run
report_secure
report=breakb.rdf destype=cache desformat=html server=repserver %D
express
report=my_expr_rep express_server="server=ncacn_ip_tcp:<MYHOST>/sl=1/st=1/ct=0/sv=1/" desformat=htmlcss userid=scott@mydb destype=cache server=repserver
orqa
report=breakb.rdf destype=cache desformat=html server=repserver
Please help me to to make the key being populated here and being used by the reports server.
Thanks,
Priyauncomment #KEYPMAPFILE=CGICMD.DAT. remove the #
then for development set
reloadkeymap=yes (same file - rwservlet.properties).
Now it should reload everytime. (otherwise for every change u need to restart oc4j_bi_forms)
(For * production* may be you want to set reloadkeymap=no once all testing is done)
see cgicmd.dat for many examples of using keymap file
[ All Docs for all versions ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i/10g ]
9i - http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
10g - http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
http://www.oracle.com/technology/products/forms/techlisting10g.html
--------------------------------------------------------------------------------- -
hi,
I am performing the below operations:
1) Itemupdated event handler when a document is uploaded into the document library
2) Now amreading another list which is in the root site level so, i used spsite, spweb again and accessed that splist and trying to read single line of text column and user or group column.
Now when i am reading this, i am getting the error "Value does not fall within the expected range".
I went to resource throttling under central admin -->my current web appln and changed that value to 20 from 8
even after performing the above, i am getting the same error.
pls help anyone has faced this issue before.
Accessing a splist which is under root site collection within the itemupdated eventreceiver is allowed in SP ?hello sir,
as per my requirement i have to access a splist which is residing in the ROOT SITE COLLECTION OF THIS WEB APPLICATION. the event receiver i have written is residing in one of the few document libraries within the sub site. there are hundreds
of sub sites exist in this site collection. I need to access the root site collection within the itemevent receiver and access thatperson column from that splist. why i ahve kept this list at the root site collection level [
http://server1:2020/ ] , because this splist is the UI for customer's sp admin for performing weekly tasks. like adding few items in the splist and my event receiver fires and check this column- person /group
column ] and apply permissions on the document.
so my doubt is it possible to access the root site collection from my event receiver code.
spweb from properties web is just the subsite url and not the site collection. i want to get the root sitec ollection url's splist.
also am already running this code under runwithelevatedprivileges. -
My PC does not return to the source document I print from
I had a setting control for
this in XP but can't find the page I got it from.<o:p></o:p>
<o:p> </o:p>
In ANY application or browser
this happens. I print from a specific Excel workbook, by example, when I
have a number of them open. The system does not return to the workbook I
printed from. This is maddening and causes all kinds of issues.
Searching the web for this now produces nothing and I know I can't be the
only person who experiences this.<o:p></o:p>
<o:p> </o:p>
This is a Windows 7 platform
in a networked business environment. I'm running the Classic Menu add-in
from Addintools because I can't stand the ribbon and have never liked it.
In Windows 7, I'm running a couple of other add-ins that restore the XP
use of the task bar properly so one can work efficiently.<o:p></o:p>
<o:p> </o:p>
None of the add-ins are what
is causing this issue because I'd run the same Classic Menu add-in on the XP
box and it had the same issue until I found the work-around that I can't
remember now.<o:p></o:p>
<o:p> </o:p>
Has anyone else experienced
this issue?<o:p></o:p>
<o:p> </o:p>
Jeff Lynch<o:p></o:p>Hi,
"I print from a specific Excel workbook, by example, when I
have a number of them open. The system does not return to the workbook I
printed from."
If I'm not misunderstanding, do you mean that the workbook is automatically closed after you print from that workbook, right?
As I know, if we use the default ribbon in Excel, no matter in Windows XP or Windows 7, the opened workbook should be stay opened after you print from that Excel workbook.
So the question is that: what is the version of office? What is the Classic Menu add-in you're running now? Did you manually download and install it to your system? Could you please share a picture with us about the add-ins you're using?
Yolanda Zhu
TechNet Community Support -
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 ! ! !
-
I am running IE 11 on Windows 7 Home Premium 64 Bit Service Pack 1. When I attempt to install Flash Player, it goes through all of the steps, tells me the player is installed, and welcomes me. I cannot open the player and it does not appear in the Start Menu, Task Manager, System Tray, or anywhere else. When I try to open a file, the site tells me Flash player is not installed. I have even downloaded it to a separate folder and ran the install with IE shut down completely. And Shockwave in ENABLED but in 32 bit .I have been trying to get this to work for about 3 weeks now. HELP!!!
Flash Player is a browser add-on, not an executable program.
If you need to open a local SWF file you will need the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
Note that the download is the player, not an installer, so you will need to make the file association manually. -
I am by no means a SharePoint developer, but I really wanted to customize the discussion board for my site - so I found this link: http://www.codeproject.com/Articles/733164/How-to-create-HelpDesk-on-SharePoint-Online
I added the columns, like the article said, and then completed the section "Modification of the discussion board views". I skipped the workflow stuff because while I think it would be useful I wanted to make sure I could get
the actual customization of the discussion board to work first.
My Problem (Just to preface - I followed the above instructions, including disabling the Minimal Download Strategy):
When I clicked into my discussion board list, I was able to get it to look and function as described for both the subject and flat views. However, when I click on the Subject, from the Discussion Board Web Part on my Home Page, it does not redirect into the
Discussion Board List Flat View. Instead, it tries to open the root folder from the Home Page while still using the subject view. The outcome being an empty discussion board on the Home Page.
So I decided to create a whole new discussion board to see if that one would work, when I inserted a new Discussion Board Web Part into the Home Page, newly created from the app menu, it used the same custom JS file(plumTickets), even though I never linked
the discussion board to the JS file. Of course when I went into the newly created Discussion Board list it opened as it does OOTB.
I am so close it having this work like I have been envisioning. I just need users to be able to click on a discussion subject from the Home Page and be redirected to the list view of the parent folder (I think that is the correct terminology,
but it may not be) so they would be able to see any replies and be able to reply. Please Help Me!!!
I truly appreciate any help you are able to provide, thank you!I figured it out. I was using ?FilterField1=fieldname&FilterValue1=value on the URL to the page to pick out one project number. The web part I was trying to add was for a list that did not have that particular fieldname. I didn't realize that would matter
since I was using the Connections -> Get Filter Values From to get my filter values from the main web part, which does have that fieldname.
I added a field with that fieldname to the other list and set a workflow to copy the lookup value of the project number lookup field into the new field. Now all is working fine. Sorry for the wild geese in my original question.
Maybe you are looking for
-
Composite state is set to "off"
I have two composites which both use an OA Adapter to dequeue messages from ECX_OUTBOUND (the XML Gateway outbound queue). In order to prevent interference between the two composites, I shut down one (called UpdatePerson) using Enterprise Manager. Wh
-
No vdc in java.library.path error in performance reporting
Has anyone ran into this issue? This is the error message I'm currently receiving while looking at the performance link in OEM reports. Everything else seems to work ok. Anyone know what file this is located in? Or where I'm going wrong? [Thread-160]
-
Flash Archive Install Question
Recently I flashed a box to create a flash archive. That archive was served out via NFS and "seen" by the client server I built. Used image to sucessfully build the client server, but the disk is not sliced up like my source box. Is there something I
-
Transporting workflow in landscape
Hi , I copy a standard workflow template and customize it including all Task and Rules and put them all into a single Transport request number. I need to move it to Quality environment for testing. Will it be like all other transporting like(Programe
-
I have a sbs 2008 running exchange 2007. Active Directory failed. I want to manually take the exchange databases from the server hard drive in a copy and restore them on another 2008 sp2 enterprise server running exchange 2007 enterprise so I can ext