Seam Sample

package net.assyst.aims.session;
import static org.jboss.seam.ScopeType.SESSION;
import java.io.StringReader;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import net.assyst.aims.bo.MachineAllocationBO;
import net.assyst.aims.interfaces.MachineAllocation;
import net.assyst.aims.model.MachineAllocationBean;
import net.assyst.aims.model.MachineBean;
import net.assyst.aims.model.UserBean;
import net.assyst.aims.utils.GeneralUtils;
import net.assyst.aims.utils.MachineConverter;
import net.assyst.aims.utils.UserConverter;
import net.assyst.aims.utils.Utils;
import org.apache.axis.client.Service;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.log.Log;
import org.w3c.dom.CharacterData;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@Stateful
@Scope(SESSION)
@Name("machineAllocationAction")
public class MachineAllocationAction implements MachineAllocation
     @PersistenceContext
     private EntityManager em;
     @Logger
     private static Log log;
     @In(required = false) @Out(required = false)
     private MachineAllocationBean machineAllocationBean;
     @In
     private transient FacesContext facesContext;
     @DataModel
     private List<MachineAllocationBean> machineAllocationList = null;;
     @DataModel
     private List<MachineBean> MachineTypes;
     @DataModel
     private List<UserBean> UserTypes;
     private Map<String,String> employees;
     private Map<String,String> techLeads;
     private Map<String,String> corporateLeads;
     private String toolTip;
     private Map<String,MachineBean> MachineTypeMap;
     private Map<String,UserBean> UserTypeMap;
     private String toValid;
     Map<String,MachineBean> resultsMachine = null;
     Map<String,String> results = null;
     Map<String,String> results1 = null;
Map<String,String> resultUserName = null;
Map<String,String> resultTechLead = null;
Map<String,String> resultCorporateLead = null;
MachineAllocationBO machineAllocationBO = null;
Long machineIds;
/*----------Pagination-------------- */
     private String query = null;
     private String querySize = null;
@DataModel
private List<MachineAllocationBean> itemsMachineAllocation = null;
private int size=0;
private int batchSize = 0;
private int index = 0;
private int firstItem = 0;
@Factory("itemsMachineAllocation")
public void getitemsMachineAllocation() {
if ((itemsMachineAllocation==null) || (index != firstItem) ){
getNextItems(query);
@SuppressWarnings("unchecked")
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void getNextItems(String query) {
     Query q = em.createQuery(query);
q.setMaxResults(batchSize);
q.setFirstResult(firstItem);
itemsMachineAllocation= q.getResultList();
index = firstItem;
public int getSize() {
     if(machineAllocationBean!=null){
                    System.out.println("INSIDE ELSE::::::::::::::::::::::::::::::::");
                    if(querySize!=null){
                         System.out.println("INSIDE ELSE IF::::::::::::::::::::::::::::::::");
                         Query q1 = em.createQuery(querySize);
                         getNextItems(query);
                         size = ((Long)q1.getSingleResult()).intValue();
                         System.out.println("SIZE2::::::::::::::::::::::::::::"+size);
                         return size;
                    }else{
                         Query q = em.createQuery("select count(machine) from MachineAllocationBean machine ");
                         size = ((Long)q.getSingleResult()).intValue();
                         getNextItems(query);
                         System.out.println("SIZE3:::::::::::::::::::::::::::::::"+size);
                         return size;
          }else{
          Query q = em.createQuery("select count(machine) from MachineAllocationBean machine ");
          size = ((Long)q.getSingleResult()).intValue();
          System.out.println("SIZE5:::::::::::::::::::::::::::::::"+size);
          return size;
public int getItemCount() {
size =getSize();
System.out.println("ITEM COUNT:::::::::::::::::::"+size);
return size;
public int getFirstItem() {
     size =getSize();
     System.out.println("getFirstItem::::::::::::::::::::::::"+size);
     if(size < batchSize){
          firstItem = 0;
     return firstItem;
public int getLastItem() {
size = getItemCount();
System.out.println("getLastItem::::::::::::::::::::::::"+size);
return firstItem + batchSize > size ? size : firstItem + batchSize;
public int getBatchSize() {
     System.out.println("BatchSize::::::::::::::::::::::::"+batchSize);
return batchSize;
public String next() {
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
if (firstItem + batchSize < getItemCount()) {
firstItem += batchSize;
System.out.println("Next :::::::::::::::::::::::::"+firstItem);
getNextItems(query);
return "/pages/machines/SearchAllocationMachine.xhtml";
public String prev() {
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
firstItem -= batchSize;
if (firstItem < 0) {
firstItem = 0;
System.out.println("Previous :::::::::::::::::::::::::"+firstItem);
getNextItems(query);
return "/pages/machines/SearchAllocationMachine.xhtml";
/*------------END----------------------*/
/*For saving machineAllocation Details*/
public String saveMachineAllocation(){
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     System.out.println("Inside SAVE MACHINE");
     LoginAction loginAction = null;
          loginAction = new LoginAction();
          if(loginAction.checkAccess("Allocate Machines","ADD","saveMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
     machineAllocationBO = new MachineAllocationBO();
     FacesMessage facesMessage = machineAllocationBO.validateMachineAllocation(em,machineAllocationBean);
          if(facesMessage !=null){
               facesContext.addMessage(null, facesMessage);
               return null;
          else{
               System.out.println("Inside SAVE MACHINE:::::::::::::::::::::::;:");     
               Long userId = 0L;
               userId = Long.valueOf(Contexts.getSessionContext().get("userId").toString());
               machineAllocationBean.setCreatedBy(userId);
               machineAllocationBean.setCreatedDate(new Date());
               machineAllocationBO.saveMachineAllocation(em, machineAllocationBean);
               //FacesMessage facesMessagess = new FacesMessage("Machine allocated successfully");
               FacesMessage facesMessagess = new FacesMessage(Utils.getMessageResourceString("allocate_machine_add"));
               facesContext.addMessage(null, facesMessagess);
               //machineAllocationList = listMachineAllocation();
               machineAllocationBean = null;
               return null;
/*For editing machineAllocation Details */
public String editMachineAllocation(){
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     if(machineAllocationBean!=null){
          System.out.println("MACHINE Allocation ID:"+machineAllocationBean.getMachineAllocationId());
          LoginAction loginAction = null;
          loginAction = new LoginAction();
          if(loginAction.checkAccess("Allocate Machines","EDIT","editMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
          machineAllocationBO = new MachineAllocationBO();
                    machineAllocationList = machineAllocationBO.editMachineAllocation(em, machineAllocationList, machineAllocationBean);
                    System.out.println("MACHINES:"+machineAllocationList);
                    Iterator it = machineAllocationList.iterator();
                    while(it.hasNext()){
                         machineAllocationBean = (MachineAllocationBean) it.next();
                         System.out.println(machineAllocationBean.getMachineId().getMachineId());
                    MachineTypeMap = null;
                    Map<String,MachineBean> resultsEdit = null;
                    MachineTypes = machineAllocationBO.getMachineTypes(em, MachineTypes);
                    resultsEdit = new TreeMap<String,MachineBean>();
                    for (MachineBean type: MachineTypes) {
                         resultsEdit.put(type.getMachineReferenceId()+"----"+ type.getMachineName(), type);
                    MachineTypeMap = resultsEdit;
               //Editing
                    try
               System.out.println("INVOKING SERVICE+++++++++++++++++++++++++++++++++");
               String endPoint ="http://192.168.2.105:9999/axis/services/Login_ws";
               Service service = new Service();
               //Service service = new Service();
               Call call = (Call)service.createCall();
               call.setTargetEndpointAddress(endPoint);
               //call.setOperationName(new QName ("Login_ws","getTechnicalAndCorporateLead"));
String deptId = machineAllocationBean.getDepartment() ;
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
call.setOperationName(new QName("LoginService","getEmployeesByDepartment"));
call.addParameter("deptId",org.apache.axis.Constants.XSD_STRING, ParameterMode.IN);
System.out.println("INVOKING SERVICE:----------------------------------"+service.toString());
String serviceName = (String)call.invoke(new Object []{deptId});
results = new TreeMap<String,String>();
resultUserName = new TreeMap<String,String>();
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(serviceName));
org.w3c.dom.Document doc = db.parse(is);
NodeList nodes = doc.getElementsByTagName("Table");
String firstName = null;
String lastName = null;
String fullName = null;
String techLead = null;
String corporateLead = null;
results = new TreeMap<String,String>();
// iterate the employees
for (int i = 0; i < nodes.getLength(); i++) {
     Element element = (Element) nodes.item(i);
     NodeList name = element.getElementsByTagName("First_Name");
Element line = (Element) name.item(0);
firstName = getCharacterDataFromElement(line);
System.out.println("First Name: " + getCharacterDataFromElement(line));
NodeList title = element.getElementsByTagName("Last_Name");
line = (Element) title.item(0);
lastName = getCharacterDataFromElement(line);
System.out.println("Last Name: " + getCharacterDataFromElement(line));
fullName = firstName +" "+ lastName;
System.out.println("NAME:"+fullName);
NodeList id = element.getElementsByTagName("employee_id");
line = (Element) id.item(0);
String employeeId = getCharacterDataFromElement(line);
System.out.println("Employee Id: " + getCharacterDataFromElement(line));
results.put(fullName,fullName);
resultUserName.put(fullName, fullName);
employees = results;
//call.setOperationName(new QName ("Login_ws","getTechnicalAndCorporateLead"));
//For taking values of technical lead
//Call call2 = (Call)service.createCall();
call2.setTargetEndpointAddress(endPoint);
call2.setOperationName(new QName("LoginService","getProjectResourceDetailsMap"));
String projectName = (String)call2.invoke(new Object []{});
System.out.println("PROJECT NAME::::::::::::::::::::::::::::"+projectName);
Service service1 = new Service();
Service service = new Service();
Call call1 = (Call)service.createCall();
call1.setTargetEndpointAddress(endPoint);
call1.setReturnType(org.apache.axis.Constants.XSD_STRING);
call1.setOperationName(new QName("LoginService","getTechnicalAndCorporateLead"));
String techCorporateLead = (String)call1.invoke(new Object []{});
System.out.println("--------------------------------------------------");
System.out.println("--------------------------------------------------");
System.out.println(" TECHNICAL LEAD: "+techCorporateLead);
System.out.println("--------------------------------------------------");
System.out.println("--------------------------------------------------");
System.out.println("Organizations:"+techCorporateLead);
is.setCharacterStream(new StringReader(techCorporateLead));
doc = db.parse(is);
nodes = doc.getElementsByTagName("Table");
resultTechLead = new TreeMap<String,String>();
resultCorporateLead = new TreeMap<String,String>();
// iterate the employees
for (int i = 0; i < nodes.getLength(); i++) {
     Element element = (Element) nodes.item(i);
     NodeList name = element.getElementsByTagName("tech_lead");
     Element line = (Element) name.item(0);
techLead= getCharacterDataFromElement(line);
System.out.println("TECH LEAD: " + getCharacterDataFromElement(line));
NodeList title = element.getElementsByTagName("corp_lead");
line = (Element) title.item(0);
corporateLead = getCharacterDataFromElement(line);
resultTechLead.put(techLead,techLead);
resultCorporateLead.put(corporateLead,corporateLead);
techLeads = resultTechLead;
corporateLeads = resultCorporateLead;
               }catch(Exception e){
          e.printStackTrace();
     getMachines();
     getUsers();
                    return "/pages/machines/EditAllocationMachine.xhtml" ;
          else{
          return null;
public void addResetMachineAllocation(){
     addMachineAllocation();
public void editResetMachineAllocation(){
     editMachineAllocation();
public String listMachineAllocation()
     //WEB SERVICE//
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     LoginAction loginAction = null;
          loginAction = new LoginAction();
          if(loginAction.checkAccess("Allocate Machines","VIEW","listMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
     System.out.print("IN LIST MACHINE ALLOCATION::::::::::::::::::::::::::________________+++++++++++");
     ///For Listing in Pagination
     querySize = null;
     size=0;
     machineAllocationBO = new MachineAllocationBO();
     batchSize = machineAllocationBO.getBatchSize(em);
     System.out.println("BATCH SIZE:::::::::::::::::::::::::::::::::::::::::"+batchSize);
     index = 0;
     firstItem = 0;
     String query = "select machine from MachineAllocationBean machine order by machine.createdDate desc ";
     this.query = query;
     getNextItems("select machine from MachineAllocationBean machine order by machine.createdDate desc ");
     ///////////-----------END--------
     //machineAllocationList = machineAllocationBO.listMachineAllocation(em, machineAllocationList);
     /*Iterator itr = machineAllocationList.iterator();
     while(itr.hasNext()){
          System.out.println("IN ITERATOR::::::::::::::::::::++++++++++++++");
          MachineAllocationBean machineAllocationBean = (MachineAllocationBean) itr.next();
     machineAllocationBean = null;
     return null;
public void onChangeMachine(){
     System.out.println("ON CHANGE:::::::::::::::MACHINE:::::::::::::::::::");
     if(machineAllocationBean.getMachineId()!=null){
          machineIds = machineAllocationBean.getMachineId().getMachineId();
public void onChangeDepartment()
     try
          System.out.println("INVOKING SERVICE+++++++++++++++++++++++++++++++++");
          String endPoint ="http://192.168.2.105:9999/axis/services/Login_ws";
Service service = new Service();
//Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(endPoint);
//call.setOperationName(new QName ("Login_ws","getTechnicalAndCorporateLead"));
String deptId = machineAllocationBean.getDepartment();
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
int jj= Integer.valueOf(deptId)-1;
String[] dd = {"Software","Support","Marketing","Administration","Business Development","Education"};
setToolTip(dd[jj]);
call.setOperationName(new QName("LoginService","getEmployeesByDepartment"));
call.addParameter("deptId",org.apache.axis.Constants.XSD_STRING, ParameterMode.IN);
System.out.println("INVOKING SERVICE:----------------------------------"+service.toString());
String serviceName = (String)call.invoke(new Object []{deptId});
results = new TreeMap<String,String>();
resultUserName = new TreeMap<String,String>();
DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(serviceName));
org.w3c.dom.Document doc = db.parse(is);
NodeList nodes = doc.getElementsByTagName("Table");
String firstName = null;
String lastName = null;
String fullName = null;
results = new TreeMap<String,String>();
results.put("-- Select --","");
// iterate the employees
for (int i = 0; i < nodes.getLength(); i++) {
Element element = (Element) nodes.item(i);
NodeList name = element.getElementsByTagName("First_Name");
Element line = (Element) name.item(0);
firstName = getCharacterDataFromElement(line);
System.out.println("First Name: " + getCharacterDataFromElement(line));
NodeList title = element.getElementsByTagName("Last_Name");
line = (Element) title.item(0);
lastName = getCharacterDataFromElement(line);
System.out.println("Last Name: " + getCharacterDataFromElement(line));
fullName = firstName +" "+ lastName;
System.out.println("NAME:"+fullName);
String employeeId = getCharacterDataFromElement(line);
System.out.println("Employee Id: " + getCharacterDataFromElement(line));
results.put(fullName,fullName);
resultUserName.put(fullName, fullName);
String allocatedTo = null;
machineAllocationBO = new MachineAllocationBO();
List removeUser = null;
removeUser = machineAllocationBO.allocatedUsers(em, removeUser);
System.out.println("SIZE:::::::::::::::::::"+removeUser.size());
Iterator itr = removeUser.iterator();
while(itr.hasNext()){
     allocatedTo = (String)(itr.next());
     System.out.println("111111111111111:::::::::::::::::::");
     results.remove(allocatedTo);//For removing the user which is already allocated to the same machine
     System.out.println("2222222222222222:::::::::::::::::::");
employees = results;
//call.setOperationName(new QName ("Login_ws","getTechnicalAndCorporateLead"));
     catch(Exception e)
          e.printStackTrace();
public String cancelMachineAllocation()
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     //machineAllocationList = listMachineAllocation();
     machineAllocationBean = null;
     return "/pages/machines/ListAllocationMachines.xhtml";
public String updateMachineAllocation()
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     LoginAction loginAction = null;
          loginAction = new LoginAction();
          if(loginAction.checkAccess("Allocate Machines","EDIT","updateMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
     machineAllocationBO = new MachineAllocationBO();
          FacesMessage facesMessage = machineAllocationBO.validateMachineAllocation(em,machineAllocationBean);
          if(facesMessage !=null){
               facesContext.addMessage(null, facesMessage);
               return null;
          else{
               Long userId = 0L;
               userId = Long.valueOf(Contexts.getSessionContext().get("userId").toString());
               if(!machineAllocationBean.getTypeOfAllocation().equalsIgnoreCase("t")){
                    machineAllocationBean.setToDate(null);
               machineAllocationBean.setUpdatedBy(userId);
               em.merge(machineAllocationBean);
               //FacesMessage facesMessagess = new FacesMessage("Allocated Machines updated successfully");
               FacesMessage facesMessagess = new FacesMessage(Utils.getMessageResourceString("allocate_machine_edit"));
               facesContext.addMessage(null, facesMessagess);
               return null;
public String deleteMachineAllocation(){
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
LoginAction loginAction = null;
     loginAction = new LoginAction();
     if(loginAction.checkAccess("Allocate Machines","DELETE","deleteMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
     /*List<MachineAllocationBean> selectMachines = null;
     if(machineAllocationBean != null){
          Long machineAllocationId = machineAllocationBean.getMachineAllocationId();
          System.out.println("ID------------"+machineAllocationId);
          machineAllocationBO = new MachineAllocationBO();
          selectMachines = machineAllocationBO.editMachineAllocation(em, machineAllocationList, machineAllocationBean);
          Iterator itr = selectMachines.iterator();
          while(itr.hasNext()){
               machineAllocationBean = (MachineAllocationBean) itr.next();
          em.remove(machineAllocationBean);
          machineAllocationBean = null;
          return "/pages/machines/ListAllocationMachines.seam";
     }else{
               FacesMessage facesMessagess = new FacesMessage("This machine doesn't exist");
               facesContext.addMessage(null, facesMessagess);
               return null;
     FacesMessage facesMessage = null;
     machineAllocationBO = new MachineAllocationBO();
     facesMessage = machineAllocationBO.deleteMachineAllocation(machineAllocationBean, em) ;
     if(facesMessage != null) {
          facesContext.addMessage(null, facesMessage);
          return null;
     else {
          machineAllocationBean = null;
          return "/pages/machines/ListAllocationMachines.seam";
public String searchMachineAllocation()
     if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     System.out.print("IN LIST MACHINE ALLOCATION::::::::::::::::::::::::::________________+++++++++++");
     String machineReferenceId = GeneralUtils.escapeQuotes(machineAllocationBean.getTypeOfAllocation().toLowerCase());
     System.out.println("MACHINE REFERENCE ID::::::::::::::::"+machineReferenceId);
     String machineName = GeneralUtils.escapeQuotes(machineAllocationBean.getIpAddress().toLowerCase());
     System.out.println("MACHINE NAME::::::::::::::::"+machineName);
     String userName = GeneralUtils.escapeQuotes(machineAllocationBean.getBugId().toLowerCase());
     System.out.println("USERNAME:::::::::::::::::::::::"+userName);
          machineReferenceId = machineReferenceId.replace("#","@@@");
               machineName = machineName.replace("#","@@@");
               userName = userName.replace("#","@@@");
               String select = "select mac";
               String selectCount = "select count(mac)";
               String from = " from MachineAllocationBean mac";
               String where = " where mac.machineId in(select m.machineId from MachineBean m where m.machineId is not null";
               String filter1 = " ";
               String filter2 = "";
               String filter3 = "";
               String filter4 = "";
               String filter6 = ")";
               String filter7 =" order by mac.createdDate desc ";
               if(machineReferenceId != ""){
                    filter1 = " and lower(m.machineReferenceId) like '%"+machineReferenceId+"%'";
               if(machineName != ""){
                    filter2 = "and lower(m.machineName) like '%"+machineName+"%'";
               if(userName != ""){
                    filter4 = ") and lower(mac.allocatedTo) like '%"+userName+"%'";
               if(machineReferenceId == "" && machineName == "" && userName == "") {
                    filter3 = " and lower(m.machineReferenceId) like '%'";
               machineAllocationList = em.createQuery(select+from+where+filter1+filter2+filter3+filter4+filter6).getResultList();
               query = select+from+where+filter1+filter2+filter3+filter4+filter6+filter7;
               querySize = selectCount+from+where+filter1+filter2+filter3+filter4+filter6+filter7;
               getNextItems(query);
          return "/pages/machines/SearchAllocationMachine.xhtml";
public String addMachineAllocation()
if(Contexts.getSessionContext().get("userDetails") == null) {
               return "sessionExpired";
     LoginAction loginAction = null;
     loginAction = new LoginAction();
     if(loginAction.checkAccess("Allocate Machines","ADD","addMachineAllocation").equals("accessDenied")) {
               return "accessDenied";
     String techCorporateLead=null;
     try{
          employees = new TreeMap<String,String>();
     System.out.println("INSIDE ADD1:::::::::::::::::::::::::");
     employees.put("-- Select --","");
     System.out.println("INSIDE ADD2:::::::::::::::::::::::::");
     techLeads = new TreeMap<String,String>();
     techLeads.put("-- Select --","");
     //techLeads = machineAllocationBO.getTechLeads();
     corporateLeads = new TreeMap<String,String>();
     corporateLeads.put("-- Select --","");
     System.out.println("INVOKING SERVICE+++++++++++++++++++++++++++++++++");
          String endPoint ="http://192.168.2.105:9999/axis/services/Login_ws";
String techLead = null;
String corporateLead = null;
//call.setOperationName(new QName ("Login_ws","getTechnicalAndCorporateLead"));
//For taking values of technical lead
Service service1 = new Service();
//Service service = new

Doubleposted.
[http://forums.sun.com/thread.jspa?threadID=5352622]
[http://forums.sun.com/thread.jspa?threadID=5352623]
[http://forums.sun.com/thread.jspa?threadID=5352628]
[http://forums.sun.com/thread.jspa?threadID=5352642]
[http://forums.sun.com/thread.jspa?threadID=5352643]
Stop doubleposting. Stick to one topic.

Similar Messages

  • Problem logging on to the managed RAS using JBoss Seam

    <p>The app I am currently working on is using JBoss Seam.  The sample jsp files you guys created were excellent.  As a simple test I first tried to logon and export a report thru a different app using JSP and Tomcat and had no problems.   I then copied the same code to my Seam application.  I placed the logon and export report code into an Action class.  I had to place the crystal jars into the seam/lib directory in order for seam to compile without errors.  I now have seam running successfully,  but get a runtime exception  every time I try to logon to the RAS server.</p><p>This code</p><p><strong>enterpriseSession = sm.logon(username, password, cms, auth);</strong></p><p>causes this exception</p><p>2006-11-20 12:00:49,551 ERROR [com.crystaldecisions.sdk.occa.pluginmgr.internal.PluginMgr] (getPlugins:292): unexpected exception<br /><strong>java.lang.ClassCastException</strong>: com.crystaldecisions.sdk.plugin.desktop.pdf.internal.PDFFactory</p><p>Any ideas on how to correct this?</p><p>Thanks in advance,</p><p>Dave</p>

    <p>Hi Dave</p><p>I wasn&#39;t familiar with JBoss Seam before you mentioned it in your post.  Looks like yet another application framework like Struts or JSF.  The logon error shouldn&#39;t cause any kind of ClassCastException with a PDF factory.  </p><p>Have you tried commenting out all code except for the login.  My only guess is that Seam changes the way that the code is executed so it appears that the error has to do with the login call.  I really don&#39;t think this is possible.</p><p>Start off real simple and uncomment the code as you go to see where the error is coming from. </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • Persistence problems wit seam/hibernate and EntityHome

    This is the scenario(using JBoss Seam 2.2 and JBoss Application Server 5.1.0.):
    I've got TestCases and TestSteps. One TestCase has multiple TestSteps. I have a table that displays the steps and actions like "addStep" and "deleteStep".
    I use rich:inplaceInput to edit existing steps. This works perfectly.
    Adding or deleting a step however does not. When adding, I create an "empty" step which is displayed in the table and the user can then edit it.
    I can't explain how it persists changes to existing steps, but doesn't cooperate when list TestCaseHome.testSteps changes in size.
    Entity TestStep:
    @Entity
    @Table(name = "teststeps")
    public class TestStep implements java.io.Serializable {
         private static final long serialVersionUID = 6534546556882292702L;
         private long id;
         private TestCase testCase;
         private String test;
         private String expectedResult;
         private long ordering;
         @ManyToOne(fetch = FetchType.LAZY)
         @JoinColumn(name = "tc_id")
         public TestCase getTestCase() {
              return this.testCase;
         public void setTestCase(TestCase testCase) {
              this.testCase = testCase;
    }Entity TestCase: Entity CoreTestObject isn't really relevant, TestCase just inherits it's id from it.
    @Entity
    @Table(name = "testcases")
    @PrimaryKeyJoinColumn(name="id")
    public class TestCase extends CoreTestObject implements java.io.Serializable{     
         private Set<TestStep> testSteps = new HashSet<TestStep>(0);
         public TestCase(Set<TestStep> testSteps, ...) {
              this.testSteps = testSteps;
         @OneToMany(fetch = FetchType.LAZY, mappedBy = "testCase")
         @OrderBy("test")
         public Set<TestStep> getTestSteps() {
              return this.testSteps;
         public void setTestSteps(Set<TestStep> testSteps) {
              this.testSteps = testSteps;
    }TestCaseHome:
    @Name("testCaseHome")
    @Scope(ScopeType.CONVERSATION)
    public class TestCaseHome extends EntityHome<TestCase> {     
         @DataModel
         private List<TestStep> testSteps;
         /*@param step The Step after which the new Step is to be inserted*/
         public void addStep(TestStep step){
              testSteps = new ArrayList<TestStep>(this.getInstance().getTestSteps());
              long id, ordering;
              [...] // here I find the id and ordering of step
              testSteps.add(new TestStep(id+1, this.getInstance(), "", "", ordering+1));     
              this.getInstance().setTestSteps(new HashSet<TestStep>(testSteps));
         /*@param step The Step to be deleted*/
         public void deleteStep(TestStep step){
              int index = testSteps.indexOf(step);          
              testSteps.remove(index);
              this.getInstance().setTestSteps(new HashSet<TestStep>(testSteps));          
    }EntityHome:
    public class EntityHome<E> extends Home<EntityManager, E>
       @Transactional
       public String update()
          joinTransaction();
          getEntityManager().flush();
          updatedMessage();
          raiseAfterTransactionSuccessEvent();
          return "updated";
       @Transactional
       public String persist()
          getEntityManager().persist( getInstance() );
          getEntityManager().flush();
          assignId( PersistenceProvider.instance().getId( getInstance(), getEntityManager() ) );
          createdMessage();
          raiseAfterTransactionSuccessEvent();
          return "persisted";
    }View:
    <rich:dataTable value="#{testCaseHome.testSteps}" var="_testStep"
              id="testStepsTable" rowKeyVar="row" autoresize="true">
         <rich:column sortBy="#{_testStep.ordering}"
              sortOrder="ASCENDING" style=" width : 20px;">
              <f:facet name="header">Order</f:facet>
              <rich:inplaceInput layout="block" value="#{_testStep.ordering}"
                   selectOnEdit="true" editEvent="onclick">
                   <a:support event="onviewactivated" ajaxSingle="true"
                        reRender="testStepsTable" />
              </rich:inplaceInput>
         </rich:column>
         <rich:column sortBy="#{_testStep.expectedResult}" [...] </rich:column>     
         <rich:column sortBy="#{_testStep.test}"> [...] </rich:column>
         <rich:column style=" width : 80px;">
              <f:facet name="header">
                   Action
                        </f:facet>
              <a:commandLink ajaxSingle="true" id="deletelink"
                   reRender="testStepsTable"
                   action="#{testCaseHome.deleteStep(_testStep)}">
                   <h:graphicImage value="/img/delete.gif" />
                   <f:param name="testCaseId" value="#{testCaseHome.instance.id}" />
                   <f:param name="testStepFrom" value="TestCase" />
              </a:commandLink>
              <a:commandLink ajaxSingle="true" id="addlink"
                   reRender="testStepsTable"
                   action="#{testCaseHome.addStep(_testStep)}">
                   <h:graphicImage value="/img/plus_icon.gif" style=" width : 16px; height : 16px;"/>
                   <f:param name="testCaseId" value="#{testCaseHome.instance.id}" />
                   <f:param name="testStepFrom" value="TestCase" />
                   <s:conversationId />     <!-- <<<<I thought that might help but it didn't-->
              </a:commandLink>
         </rich:column>
    </rich:dataTable>
    <div class="actionButtons">
         <h:commandButton id="save"
              value="Save" action="#{testCaseHome.persist}"
              disabled="#{!testCaseHome.wired}"
              rendered="#{!testCaseHome.managed}" />
         <h:commandButton id="update"
              value="Save" action="#{testCaseHome.update}"
              rendered="#{testCaseHome.managed}" />
    </div>I cut a lot from the code, I hope I didn't leave anything relevant out. I also hope this is the right place for this question, excuse me if not (noob here).
    I would very much appreciate your help since I'm trying to fix this for weeks. Thank you!

    Hello gimbal2,
    yes, I initialized the collection by myself now and it works better.
    But I think there is a general Problem in the order-Example. The Example isn't implemented as described in the written part of the tutorial and has several other
    bugs with persistence in this example.
    I've installed the turorial with Update Tool. Is it possible that the samples in the update contain a newer/older version than the code that is described in the PDF?
    Thanks,
    Johann

  • Seam tags in custom tag libs

    Hi,
    Can't we use seam tags inside Java class ?
    I need to create a custom tag using seam tag <s:link />
    stringbuf.append("<s:link id=\"sample\" view=\"/sample.seam\" value=\"Sample123\" propagation=\"none\"/> ");
    The below given code is not giving me a link in the UI. While taking source from the UI the <s:link /> tag is not converted into html <a href >.
    What should I do to get a link by <s:link> using as a custom tag ?

    Sorry, wrong forum, should be in the JSP forum. Hope someone can still help!

  • Logic can't find Ultrabeat samples after swapping hard-drive-HELP!

    Hi!
    I have just replaced my 'audio' drive with a larger one. From 280Gb to 1Tb. Woohoo
    I named the new drive exactly the same thing as my old drive, Same format (Extended Journaled) Copied the entire folder structure across intact - and as far as I can see - all the paths to all my audio are exactly the same as they were on my old drive... Even the cute icons on the shortcuts in my sidebar are now automatically linking to the correct places in my new drive.
    BUT...
    Logic now can't find anything. Well lets be more specific, When I try to load a song there seem to be two types of files it can't locate:
    1/ Ultrabeat samples. Ie: the .aif and .wav samples that I have loaded into my own custom Ultrabeat instruments. When loading a song a dialog box appears asking me to find these audio files for it...
    Not such a 'show stopper' you may think, but I have anywhere up to 10 Ultrabeat instruments in a song - and, of course, each one has up to 20 samples... Multiply by 50 songs - yeah - you get the point - this is nightmarish
    2/ Audio files referenced in the song itself with long file names. Logic seems to be finding audio files in the song with short file names, but then comes up with dialog boxes during song load asking me to find filenames that are TRUNCATED! argh! So instead of the file 'Kik-Reggaeton warm 01' I am asked to locate 'Kik-reggaeton wa#16E59'. Now I have a lot of reggaeton kicks!! Which one does it want? And note also - that in the audio files associated with the song - none of the file names have been truncated! So which one is it looking for????? Corrupted look-up table? Wha?????
    Just to clarify too:
    -Logic 7.2.3 (961.9)
    -PPC G5, 2.5Mb Ram
    -Osx 10.4.11
    And the system drive has remain unchanged! I have just swapped out my drive with all my Audio on it. So my /user path and so on remains unchangted.
    This is driving me NUTS! I have a beautiful big new drive to play with, am bursting the seams of my current one and have an album to finish... I've looked on every Logic forum and group I can find and there is very little reference to this kind of problem, but I'm sure some-one else must have come across this before... There are some very cool tools in Project manager for resolving this kind of problem - but they only apply to EXS instruments and songs - not Ultrabeat instruments!
    PLEASE HELP!
    Thanks,
    Dan

    Well, I just tired the cloning approach, using 'Carbon Copy Clone', and unfortunately...
    The problem remains.
    Can anyone help here? Does anyone have a contact within the Logic development team?
    Below is the problem again in as concise format as I can make it, can any-one forward this on?
    Thanks for any help...
    THE MAIN QUESTION
    Does the Ultrabeat Instrument in Logic 7 store some form of unique Drive Identifier in it's path information for each sample it loads (in relation to user loaded samples - not preset samples.)
    THE PROBLEM
    I have an internal 'Audio' Drive (300Gb) in my G5, which I would like to replace with a new drive (1000Gb). But when I copy all my data across (including all my sample libraries) and then run Logic - Ultrabeat no longer can find the samples on the new drive. Of course - since I have hundreds of Ultrabeat instruments each with up to 24 samples referenced, having to find and point to each sample would take a looooong time.
    Furthermore, internally Ultrabeat seems to be truncating long file names, so asking me to find "KIK-File name tester f#F15C.wav" and of course I have many such files with the differentiating number at the END of the filename - so I cannot tell which file it wants.
    MORE DETAILS
    -Logic 7.2.3 (961.9)
    -PPC Dual 2Ghz G5, 2.5Mb Ram
    -Osx 10.4.11
    I have tried Carbon Clone Copying the data from old drive to new drive. The Drive Names are the same, so as far as I can tell the entire path for the samples should identical... Other applications correctly find files on the new drive. Mac OS resolves paths correctly to the extent that custom Folder Icons display correctly on the new drive.
    Ultrabeat asks me to find both samples with short filenames, and long filenames. The long filenames it asks for are truncated in the 'Ultrabeat:Please Locate:filename' window.
    Furthermore, some SONG data is not found - any file referenced in a song with a long file name is asked to be found by the truncated name.
    'Audio file "bustarhymes-touch_it#F14C.aif" not found!
    Audio with short filenames ARE succesfully found by the song.
    This is not so bad because with Project Manager I have some tools to locate samples, but these tools do not apply to the Ultrabeat instrument - which is my main problem.
    Any help or advice, please contact:
    danatcoyproductions.com
    Thanks.
    Dan

  • Sample Schema Scripts

    I have installed 10g application server and jdeveloper - but cannot find any of the scripts to create the sample schema. From searching the OTN forums it seams that the onl way of obtaing these scripts is to install the database or companion disk and run from the demo folder.
    This seems a bit over the top - i had intended to use the infrastructure database, (my system dosn't have enough resources to install a seperate database), can any helpful person email the scripts, perhaps someone from oracle might be able to make this easier there seems to be a fair bit of interest in this on the forums.
    Many thanks Terry Bennett

    Hi Terry,
    When you installed Oracle 10g, the demo tables should have been installed under the scott schema. Try select * from scott.emp and see if you get any results. Incase you are looking for the script for the demo tables, its in $ORACLE_HOME/rdbms/admin/utlsampl.sql (in my case its in C:\oracle\product\10.1.0\Db_1\RDBMS\ADMIN).
    Hope that helps.
    -Raj

  • Calling Seam component from mxml

    I have a sample seam web project where in have integrated
    FLEX. I am using one mxml file and am able to convert it into swf
    and through the mxml Iam trying to call the method of the seam
    component using the context in the following way:
    var ctx: Context = Seam.getInstance().getSeamContext();
    ctx.helloAction.sayHello(txtName.text,sayHelloResult);
    Here the helloAction is the seam component name mentioned in
    the @Name annotation and sayHello is the method in the seam
    component.
    But my problem is that the seam component is not getting
    called.

    It won't see it just by creating the namespace that contains it.  There has to actually be an instance of it in the application.  So in your case, your main application file (lets call it MyApp.mxml) would look something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:components="components.*">
         <components:Main id="main"/>
         <components:GetComponent id="getComp"/>
    </mx:Application>
    Then, you can reach down (mind you this isn't best practice) into those components to access their public properties.  In a script block in MyApp.mxml, you could access the VBox with getComp.vbTB.
    I don't know the ins and outs of your application, but perhaps Main is the main application, so then you would add GetComponent as a child of it instead of both Main and GetComponent being child components of the MyApp application.  Does that clear up the confusion?

  • DSAME single sign on sample

    Has anyone used Directory Server Access Management Edition? I'm trying to a proof of concept for single sign on.
    I'm having a bit of trouble running the sample on code SSOTokenSampleServlet on a remote server.
    I get a UnsopportedOperationException.
    I'm running the policy agent on an iPlanet Webserver 4.1SP9.
    Any insights?
    thanks, thomas

    excuse me thomas; I dont have answer for your question but it seams that you have more experience than me about iDSAME. I have a problme about the authentication.
    the probleme is that when I do a request on the web server iws 6.0(with ie 5), I get the autentication page, untill this all is aright. but when I try to get
    authentifacated with LDAP Authentification, here and at the bare statut of ie I see the message "website found waiting for response" and this message loops and
    noyhing happen after this.
    Please to give me exemples how can I create polocies to protect my web site. and the solutions for my problem.
    thanks, Redouane
    [email protected]

  • Sample JSF application

    <p>In the documentation I&#39;ve read there is a sample-code application, <span class="bold">jsfplatform.war. Is there somewhere I could get just this file from ?</span></p><p>Thanx</p><p>--</p><p>George </p><p> </p>

    <br /><p>it,  however I got the following exception: </p><p> 11:49:53,184 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception<br />javax.faces.FacesException: java.io.InvalidClassException: com.crystaldecisions.reports.reportengineinterface.<br />JPEReportSource; no valid constructor<br />        at org.apache.myfaces.shared_impl.util.StateUtils.getAsObject(StateUtils.java:283)<br />        at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:217)<br />        at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getComponentStateToRestore(HtmlResponseStateManager.java:221)<br />        at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentState(JspStateManagerImpl.java:186)<br />        at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:287)<br />        at org.jboss.seam.jsf.SeamStateManager.restoreView(SeamStateManager.java:41)<br />        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)<br />        at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:64)<br />        at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:317)<br />        at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)<br />        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)<br />        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />        at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />        at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />        at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br />        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<br />        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br />        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br />        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br />        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)<br />        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)<br />        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<br />        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br />        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br />        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br />        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)<br />        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)<br />        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<br />        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)<br />        at java.lang.Thread.run(Thread.java:595)</p><p> From looking at the web I found the following link: http://www.mail-archive.com/[email protected]/msg28306.html//www.mail-archive.com/[email protected]/msg28306.html</p><p>--</p><p>George </p><p> </p>

  • How do I find, at-a-glance, the sample size used in several music files?

    How do I find, at-a-glance, the sample size used in several music files?
    Of all the fields available in a FInder Search, "Sample Size" is not available. Finder does offer a "Bits per Sample" field, but it only recognized graphic files and not music files.
    Running 10.8.5 on an iMac i5.
    I did search through a couple of communities but came up empty.
    Thank you,
    Craig

    C-squared,
    There is no View Option to allow display of a column of sample size. 
    For WAV or Apple Lossless files, it is available on the Summary tab (one song at a time, as you know).  For MP3 and AAC it is not available at all.
    You can roughly infer it from the files that are larger than expected for their time.
    99% of the music we use is at the CD standard of 16-bit, so I can guess that displaying it has never been a priority.  However, if you want to make a suggestion to Apple, use this link:
    http://www.apple.com/feedback/itunesapp.html

  • COGS update on other GL Account at the time of Free goods or Sample goods

    Hello,
    In sales process, Usually the at the time of Delivery, material document is created as
    DR COGS
    CR INVENTORY
    But in the case of free goods or bonus goods or samples: the account should not determines COGS instead it should determine another GL Account called as Free good -COGS expense A/c.
    How can we solve the issue.
    Regards,
    SK

    Hi Yasar,
    You need to create a new routine for calculate type.
    Do as below:
    1. Go to VOFM>Formulas>calc.rule Rebate InKd to create a new routine for calculate type.  for example 601.
    2. add the following code in this routine 601 and then save.
      USING L_FRM STRUCTURE KONDN_FRM.
    DATA: VORKOMMA  LIKE KONDN-KNRMM,
           NACHKOMMA LIKE KONDN-KNRMM.
      L_FRM-NRMENGE = 0.
      L_FRM-NRRUND  = 0.
      L_FRM-NRMENGE = ( L_FRM-MGLME / L_FRM-KNRNM * L_FRM-KNRZM ).
    business rounding
        VORKOMMA = FLOOR( L_FRM-NRMENGE ).
      L_FRM-NRRUND  = L_FRM-NRMENGE - VORKOMMA.
      L_FRM-NRMENGE = VORKOMMA.
    3. Select routine 601 in field "Calc.Rule" when you create free goods condition record.
    Hope it helps.

  • Error in compiling Photoshop CC 2014 sample project

    Hi,
    I am trying to compile SDK sample project "outbound". but it is showing errors, as "Parse Issue: Unknown type name 'DialogPtr' " in DialogUtilities.h .
    DialogUtilities.h file is in "Adobe Photoshop CC 2014:photoshopsdk:pluginsdk:samplecode:common:includes".
    even if I add this path in project  settings it still shows the errors.
    how can I make this work?
    I am using Photoshop CC 2014 and Xcode version is 4.6.3 (4H1503)
    If you have any idea regarding project settings then please let me know.
    Thanks and regards,
    Priyanka.

    Are you using the CC 2014 release of the SDK?
    The DialogUtilities.h for mac do not work. They are the old Carbon API's. See the Dissolve example for an Objective-C UI.
    I would comment out the DialogUtilities.h include and other associated headers for Carbon UI. Some Carbon calls still work that are unrelated to UI.

  • How to log in to Service Desk to create sample message to SAP?

    Dear all,
    How to log in to Service Desk under my Solution Manager server to create sample message to SAP under Component: SV-SMG-SUP?
    Regards
    GN

    Hi GN,
    You have different options to create messages in test component SV-SMG-SUP-TST:
    1. if you are on 7.1 you can create message using CRM_UI
    2. If you are using lower vrsion then either you can create message using Workcenter or using transaction NOTIF_CREATE or using menu --> Help --> Create support message.
    Thanks
    Regards,
    Vikram

  • SSO java sample application problem

    Hi all,
    I am trying to run the SSO java sample application, but am experiencing a problem:
    When I request the papp.jsp page I end up in an infinte loop, caught between papp.jsp and ssosignon.jsp.
    An earlier thread in this forum discussed the same problem, guessing that the cookie handling was the problem. This thread recommended a particlar servlet , ShowCookie, for inspecting the cookies for the current session.
    I have installed this cookie on the server, but don't see anything but one cookie, JSESSIONID.
    At present I am running the jsp sample app on a Tomcat server, while Oracle 9iAS with sso and portal is running on another machine on the LAN.
    The configuration of the SSO sample application is as follows:
    Cut from SSOEnablerJspBean.java:
    // Listener token for this partner application name
    private static String m_listenerToken = "wmli007251:8080";
    // Partner application session cookie name
    private static String m_cookieName = "SSO_PAPP_JSP_ID";
    // Partner application session domain
    private static String m_cookieDomain = "wmli007251:8080/";
    // Partner application session path scope
    private static String m_cookiePath = "/";
    // Host name of the database
    private static String m_dbHostName = "wmsi001370";
    // Port for database
    private static String m_dbPort = "1521";
    // Sehema name
    private static String m_dbSchemaName = "testpartnerapp";
    // Schema password
    private static String m_dbSchemaPasswd = "testpartnerapp";
    // Database SID name
    private static String m_dbSID = "IASDB.WMDATA.DK";
    // Requested URL (User requested page)
    private static String m_requestUrl = "http://wmli007251:8080/testsso/papp.jsp";
    // Cancel URL(Home page for this application which don't require authentication)
    private static String m_cancelUrl = "http://wmli007251:8080/testsso/fejl.html";
    Values specified in the Oracle Portal partner app administration page:
         ID: 1326
         Token: O87JOE971326
         Encryption key: 67854625C8B9BE96
         Logon-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_login
         single signoff-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_logout
         Name: testsso
         Start-URL: http://wmli007251:8080/testsso/
         Succes-URL: http://wmli007251:8080/testsso/ssosignon.jsp
         Log off-URL: http://wmli007251:8080/testsso/papplogoff.jsp
    Finally I have specified the cookie version to be v1.0 when running the regapp.sql script. Other parameters for this script are copied from the values specified above.
    Unfortunately the discussion in the earlier thread did not go any further but to recognize the cookieproblem, so I am now looking for help to move further on from here.
    Any ideas will be greatly appreciated!
    /Mads

    Pierre - When you work on the sample application, you should test the pages in a separate browser instance. Don't use the Run Page links from the Builder. The sample app has a different authentication scheme from that used in the development environment so it'll work better for you to use a separate development browser from the application testing browser. In the testing browser, to request the page you just modified, login to the application, then change the page ID in the URL. Then put some navigation controls into the application so you can run your page more easily by clicking links from other pages.
    Scott

  • Sample source code for fields mapping in expert routine

    Hi All
    Iam writing the expert routine from dso to cube for example I have two fields in dso FLD1,FLD2
    same fields in infocube also ,can any body provide me sample abap code to map source fields to target fields in expert routine,your help will be heighly appreciatble,it's an argent.
    regards
    eliaz

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

Maybe you are looking for

  • How can i put a file into blob using jdbc !?

    Hi i tried to put a file into blob , but got a problem..... My environment:windows 2000pro,JBuilder 5.0 enterprise,oracle 8.1.6,(not install oracle jdbc driver ) a part of program(my program is very uglily,if anyone want,later i paste it ba....~_~) /

  • I work in Indesign CS5.5. After saving all documents in indd and open again. Document are not editable now. Whats wrong?

    I have started to work in Indesign CS5.5. Ater saving all my pages in indd and open them again. Now they are not editable what is wrong?

  • Office mac

    I got a real problem right here.. I installed microsoft office on my new iMac, The first time something went wrong so I installed it the second time and so I had double programs on my computer.. I threw all of that away and installed office again.. b

  • Have I lost my old photos forever?

    So this seems to have come up in various forms but I haven't found an answer as yet. Basically I have all my photos backing up to icloud from various devices and has been for a couple of years now. My photostream is only 1000 photos long which puts m

  • Make firefox start with one tab using mozilla.cfg

    i create new package for fire fox when start firefox it is open two tabs for same link i need it to start with one tab i use the this in my mozilla.cfg : <pre><nowiki>defaultPref("startup.homepage_welcome_url", "https://portal.field.weightwatchers.ca