Help on RTP session!

Actually, i'm currently testing a java program that can send voice through the network but i faced problem on only windows 2000. I had tested on windows 98, windows Xp and windows 2000 locally. But when i send voice over 2 windows 2000 PCs, this error come out - "Cannot create the RTP session: Can't open local data port: 12468". Can anybody tell me what is the error means? Thank you.

Sorry by my english im from spain.
The problem is in the transmiter because he send the stream by the same port that the receiver will go to receive.
I change this code in AVTransmiter2
private String createTransmitter() {
int port,port2;
port2 =portBase - 2*i -2;
localAddr = new SessionAddress( InetAddress.getLocalHost(),port2);
And now you can utilice in the same mahine AVTransmit2 and AVReceive2.
PD: if you want have the sound in mpg archive you must put in AvReceive other sesion with the port + 2.

Similar Messages

  • Help with RTP: Format of Stream not supported in RTP Session Manager

    Hello everyone,
    I am quite new to JMF and RTP. So far I've succeeded in capturing audio from the microphone and playing it back. However, I failed when I tried to send the stream over using RTP.
    Here's my program, all it does is: get a DataSource from the CaptureDevice, create a Processor with that DataSource, convert the tracks in the Processor to one of the RTP formats, and create an RTP SendStream using the Processor's output DataSource.
    I can hear sound by creating a Player for the DataSource; however I get errors when I try to create RTP SendStream for the same output DataSource.
    Here's my code:
                CaptureDeviceInfo cdinfo;
                Format fmt = new AudioFormat(AudioFormat.LINEAR, 8000, 8, 1);
                Vector deviceList = CaptureDeviceManager.getDeviceList(fmt);
                if (deviceList.size() > 0) {
                    System.out.println("Device Found.");
                    cdinfo = (CaptureDeviceInfo) deviceList.firstElement();
                } else {
                    System.out.println("No device!");
                    return;
                DataSource ds = Manager.createDataSource(cdinfo.getLocator());
                Processor processor = Manager.createProcessor(ds);
                StateHelper sh = new StateHelper(processor);
                if (!sh.configure(10000)) {
                    System.out.println("Could not configure...");
                    System.exit(-1);
                // Get the track control objects
                TrackControl track[] = processor.getTrackControls();
                System.out.println("Number of tracks:" + track.length);
                boolean encodingPossible = false;
                // Go through the tracks and try to program one of them to outout some "RTP format"
                for (int i = 0; i < track.length; i++) {
                    try {
                        track.setFormat(new AudioFormat(AudioFormat.DVI_RTP));
    encodingPossible = true;
    } catch (Exception e) {
    // cannot convert
    track[i].setEnabled(false);
    if (!encodingPossible) {
    System.out.println("Could not encode..");
    sh.close();
    return;
    processor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    if (!sh.realize(10000)) {
    System.out.println("Could not realize...");
    System.exit(-1);
    System.out.println("Realized...");
    DataSource outSource = processor.getDataOutput();
    System.out.println(outSource.getContentType());
    processor.start();
    player = Manager.createRealizedPlayer(outSource);
    player.start();
    SessionAddress addr = new SessionAddress(InetAddress.getByName("224.144.251.104"), 8194, 4);
    manager.initialize(addr);
    //manager.addFormat(new AudioFormat(AudioFormat.GSM_RTP), 1);
    System.out.println("RTP Session started...");
    stream = manager.createSendStream(processor.getDataOutput(), 0);
    I get an error on the last line, the error is: javax.media.format.UnsupportedFormatException: Format of Stream not supported in RTP Session Manager And again, if I try to encode the tracks into *AudioFormat.GSM_RTP* instead of *DVI_RTP*, I get a different error on the same line:Exception in thread "AWT-EventQueue-0" java.lang.NullPointerExceptionWell I don't understand what's happening, is there something I need to do before I can use RTP?
    Hope you guys help :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    seems that you are encoding a track to RTP format but outputting a RAW format.
    Your encoding section is also a little bit lazy as you don't check supported formats...
    Try this between configured and realized state:
              // Get the tracks from the processor
              TrackControl [] tracks = processor.getTrackControls();
              // Do we have at least one track?
              if (tracks == null || tracks.length < 1)
                  return "Couldn't find tracks in processor";
              // Set the output content descriptor to RAW_RTP
              // This will limit the supported formats reported from
              // Track.getSupportedFormats to only valid RTP formats.
              ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
              processor.setContentDescriptor(cd);
              Format supported[];
              Format chosen;
              boolean atLeastOneTrack = false;
              // Program the tracks.
              for (int i = 0; i < tracks.length; i++) {
                  Format format = tracks.getFormat();
              log.info("Input format for RTP conversion: " + format);
              if (tracks[i].isEnabled()) {
                   supported = tracks[i].getSupportedFormats();
                   // We've set the output content to the RAW_RTP.
                   // So all the supported formats should work with RTP.
                   if (supported.length > 0) {
                        if (supported[i] instanceof VideoFormat) {
                             tracks[i].setEnabled(false);
                             continue;
                   else if (supported[i] instanceof AudioFormat) {
                        // set audio format for RTP transmission
                        chosen = new AudioFormat(AudioFormat.DVI_RTP);
                        tracks[i].setFormat(chosen);
                        tracks[i].setEnabled(true);
                        atLeastOneTrack = true;
                   else
                        tracks[i].setEnabled(false);
                   else
                   tracks[i].setEnabled(false);
              else
                   tracks[i].setEnabled(false);
              if (!atLeastOneTrack)
              return "Couldn't set any of the tracks to a valid RTP format";
    The important thing should be theContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);part.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • NoPlayerException in a RTP session

    hi, I'm learning jmf and follow the jmf2_0-guide. However, when I run the following code, it always says "Error:javax.media.NoPlayerException: Cannot find a Player for :rtp://192.168.1.22:8080/jmfstudy/testMedia.avi". 192.168.1.22:8080 is my ip and port. Could anyone help me?Thanks.
    String url = "rtp://192.168.1.22:8080/jmfstudy/testMedia.avi";
              MediaLocator mrl = new MediaLocator(url);
              if (mrl == null) {
                   System.err.println("Can't build MRL for RTP");
                   return false;
              // Create a player for this rtp session
              try {
                   player = Manager.createPlayer(mrl);
              } catch (NoPlayerException e) {
                   System.err.println("Error:" + e);
                   return false;
              } catch (MalformedURLException e) {
                   System.err.println("Error:" + e);
                   return false;
              } catch (IOException e) {
                   System.err.println("Error:" + e);
                   return false;
              }

    Thank you. I use Tomcat as my server and when I visit "http://192.168.1.22:8080/jmfstudy/testMedia.avi" my media player startup and play the movie. But it doesn't work in my programme.

  • JMF error - Format of Stream not supported in RTP Session Manager

    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    why this erro occors?
    I already created the DataSink.
    When I try to do this...
    dsk.open(); //here the error got
    dsk.start();     Code of server of media
    I want to sent audio (wav) like a radio, but from file. Without stop to send streaming. PullBufered
    *Class Server that you offers Streaming of midia
    public class Servidor {
    private MediaLocator ml;
    private Processor pro;
    private javax.media.protocol.DataSource ds;
    private DataSink dsk;
    private boolean codificado = false;
    //start the server service, passing the adress of media
    // ex: d:\music\music.wav
    // pass the ip and port, to make a server works
    public void iniciarServicoServidor(String end,String ip, int porta)
    try {
    //capture media
    capturarMidia(end);
    //creates processor
    criarProcessor();
    // configure the processor
    configurarProcessor();
    //setContent RAW
    descreverConteudoEnviado();
    //format the media in right RTP format
    formatRTP();
    //creat the streaming
    criarStreaming();
    //configure the server
    configurarServidor(ip, porta);
    //in this method raise the excepition
    iniciarServidor();
    //when I try to open the DataSink.open() raises the exception
    //java.io.IOException: Format of Stream not supported in RTP Session //Manager
    // at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em iniciarServicoServidor");
    e.printStackTrace();
    public void capturarMidia(String endereco)
    try {
    System.out.println("**************************************************************");
    System.out.println("Iniciando processo de servidor de multimidia em " + Calendar.getInstance().getTime().toString());
    ml = new MediaLocator("file:///" + endereco);
    System.out.println("Midia realizada com sucesso.");
    System.out.println ("[" + "file:///" + endereco +"]");
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em capturarMidia");
    e.printStackTrace ();
    public void criarProcessor()
    try {
    System.out.println("**************************************************************");
    pro = Manager.createProcessor(ml);
    System.out.println("Processor criado com sucesso.");
    System.out.println("Midia com durcao:" + pro.getDuration().getSeconds());
    } catch (NoProcessorException e) {
    System.out.println("Houve um erro em criarProcessor");
    e.printStackTrace();
    } catch (IOException e) {
    System.out.println ("Houve um erro em criarProcessor");
    e.printStackTrace();
    public void configurarProcessor()
    try {
    System.out.println("**************************************************************");
    System.out.println("Processor em estado de configura��o.");
    pro.configure();
    System.out.println("Processor configurado.");
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em configurarProcessor");
    e.printStackTrace();
    public void descreverConteudoEnviado()
    try {
    System.out.println("**************************************************************");
    pro.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    System.out.println("Descritor de conteudo:" + pro.getContentDescriptor().toString());
    } catch (NotConfiguredError e) {
    System.out.println("Houve um erro em descreverConteudoEnviado");
    e.printStackTrace();
    private Format checkForVideoSizes(Format original, Format supported) {
    int width, height;
    Dimension size = ((VideoFormat)original).getSize();
    Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
    Format h263Fmt = new Format(VideoFormat.H263_RTP);
    if (supported.matches(jpegFmt)) {
    // For JPEG, make sure width and height are divisible by 8.
    width = (size.width % 8 == 0 ? size.width :
    (int)(size.width / 8) * 8);
    height = (size.height % 8 == 0 ? size.height :
    (int)(size.height / 8) * 8);
    } else if (supported.matches(h263Fmt)) {
    // For H.263, we only support some specific sizes.
    if (size.width < 128) {
    width = 128;
    height = 96;
    } else if ( size.width < 176) {
    width = 176;
    height = 144;
    } else {
    width = 352;
    height = 288;
    } else {
    // We don't know this particular format. We'll just
    // leave it alone then.
    return supported;
    return (new VideoFormat(null,
    new Dimension(width, height),
    Format.NOT_SPECIFIED ,
    null,
    Format.NOT_SPECIFIED)).intersects(supported);
    public void formatRTP()
    try {
    // Program the tracks.
    TrackControl tracks[] = pro.getTrackControls();
    Format supported[];
    Format chosen;
    for (int i = 0; i < tracks.length; i++) {
    Format format = tracks.getFormat();
    if (tracks[i].isEnabled()) {
    supported = tracks[i].getSupportedFormats();
    // We've set the output content to the RAW_RTP.
    // So all the supported formats should work with RTP.
    // We'll just pick the first one.
    if (supported.length > 0) {
    if (supported[0] instanceof VideoFormat) {
    // For video formats, we should double check the
    // sizes since not all formats work in all sizes.
    chosen = checkForVideoSizes(tracks[i].getFormat(),
    supported[0]);
    } else
    chosen = supported[0];
    tracks[i].setFormat(chosen);
    System.err.println("Track " + i + " is set to transmit as:");
    System.err.println(" " + chosen);
    codificado = true;
    } else
    tracks[i].setEnabled(false);
    } else
    tracks[i].setEnabled(false);
    } catch (RuntimeException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    public void tocar()
    pro.start();
    public void criarStreaming()
    try {
    System.out.println("**************************************************************");
    if (codificado)
    System.out.println("Midia codificada...");
    System.out.println("Processor entra em estado de realize.");
    pro.realize();
    System.out.println("Processor realized.");
    System.out.println("Adquirindo o streaming a ser enviado.");
    ds = pro.getDataOutput();
    System.out.println("Streaming adquirido pronto a ser enviado.");
    } catch (NotRealizedError e) {
    System.out.println("Houve um erro em criarStreaming");
    System.out.println(e.getMessage());
    e.printStackTrace();
    catch (Exception e) {
    System.out.println(e.getMessage());
    public void configurarServidor(String ip, int porta)
    System.out.println("**************************************************************");
    String url = "rtp://" + ip + ":" + porta + "/audio/1";
    System.out.println("Servidor ira atender em " + url);
    MediaLocator mml = new MediaLocator(url);
    System.out.println("Localizador de midia ja criado");
    try {
    System.out.println("Criando um DataSink a ser enviado.");
    dsk = Manager.createDataSink(ds, mml);
    System.out.println("DataSink criado.");
    } catch (NoDataSinkException e) {
    e.printStackTrace();
    public void iniciarServidor()
    try {
    System.out.println("**************************************************************");
    dsk.open();
    System.out.println("Servidor ligado.");
    dsk.start();
    System.out.println("Servidor iniciado.");
    } catch (SecurityException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Gives that output console.
    All methods are executed but the last doesnt works.
    The method that open the DataSink.
    What can I do?
    Iniciando processo de servidor de multimidia em Sun May 13 22:37:02 BRT 2007
    Midia realizada com sucesso.
    [file:///c:\radio.wav ]
    Processor criado com sucesso.
    Midia com durcao:9.223372036854776E9
    Processor em estado de configura��o.
    Processor configurado.
    Descritor de conteudo:RAW
    Midia codificada...
    Processor entra em estado de realize.
    Processor realized.
    Adquirindo o streaming a ser enviado.
    Streaming adquirido pronto a ser enviado.
    Servidor ira atender em rtp://127.0.0.1:22000/audio/1
    Localizador de midia ja criado
    Criando um DataSink a ser enviado.
    streams is [Lcom.sun.media.multiplexer.RawBufferMux$RawBufferSourceStream;@a0dcd9 : 1
    sink: setOutputLocator rtp://127.0.0.1:22000/audio/1
    DataSink criado.
    Track 0 is set to transmit as:
    unknown, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 176400.0 frame rate, FrameSize=32 bits
    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    at br.org.multimidiasi.motor.Servidor.iniciarServidor(Servidor.java:291)
    at br.org.multimidiasi.motor.Servidor.iniciarServicoServidor(Servidor.java:43)
    at br.org.multimidiasi.motor.ConsoleServidor.main(ConsoleServidor.java:30)
    Since already thanks so much.
    Exactally in this method raises erros.
    Ive tried another formats (avi, mp3) but all with the same error, what I can do?
    [code] public void iniciarServidor()
    try {
    System.out.println("**************************************************************");
    dsk.open();
    System.out.println("Servidor ligado.");
    dsk.start();
    System.out.println("Servidor iniciado.");
    } catch (SecurityException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Track 0 is set to transmit as:
    unknown, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 176400.0 frame rate, FrameSize=32 bits
    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    at br.org.multimidiasi.motor.Servidor.iniciarServidor(Servidor.java:291)
    at br.org.multimidiasi.motor.Servidor.iniciarServicoServidor(Servidor.java:43)
    at br.org.multimidiasi.motor.ConsoleServidor.main(ConsoleServidor.java:30)

    unknown, 44100.0 Hz, 16-bit, Stereo,
    LittleEndian, Signed, 176400.0 frame rate,
    FrameSize=32 bits
    java.io.IOException: Format of Stream not supported
    in RTP Session Manager
    The fact that it doesn't know what the format is
    might have to do with the problem. I've had similar
    problems, and I've traced it back to missing jars and
    codecs. Have you tried running the same code locally
    without the transmission to see if you player will
    even play the file?Already and it works, I used Player to play it and play normally, I try to make it with the diferents codecs of audio and video, but no sucess.

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Cannot create the RTP Session

    we have made multithread rtp streaming server and tried to transmit the mpg file in a applet on a web page using tom-cat server.
    we got the following error...
    Cannot create the RTP Session: Local Data AddressDoes not belong to any of this hosts local interfaces
    Failed to initialize the sessions.
    java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkExit(Unknown Source)
         at java.lang.Runtime.exit(Unknown Source)
         at java.lang.System.exit(Unknown Source)
         at Receive.start(MyPlayer.java:90)
         at MyPlayer.start(MyPlayer.java:30)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    I am really surprised that no one has answer for my query?????

  • Rtp session problem

    HI, I’m using a custom data source for jmf to send audio over a RTPManager using javasound for capturing live audio from a microphone and at the same time receiving audio from a RTP session using jmf, the code for the custom data Source is one posted in here a while ago which is working fine the problem is that when I start sending audio the incoming audio stop but the sound is send correctly to the other part, so if a don’t send audio I get the audio from the rtp session if I send audio I don’t listen the incoming audio, I’m only talking of one side of the call because the other part is sending the rtp session by a sip server that is connected to a regular phone line and I don’t know exactly how that work I only know that works. anyone know what can be wrong with this? Can it be a buffer problem? Or a blocking device or just a error on the code? Thanks in advance.

    Your question doesn't make a whole lot of sense, but I'd assume you've coded something incorrectly.

  • Cannot create the RTP Session: Can't open local data port

    Hi,
    I'm trying to connect to two webcams simultaneously in the order:
    MediaLocator inputLocator1 = new MediaLocator("rtp://hostname1:8000/video");
    MediaLocator inputLocator2 = new MediaLocator("rtp://hostname2:8000/video");
    But I get this during the second connection:
    Cannot create the RTP Session: Can't open local data port: 8000
    And I can't see the video from hostname2.
    I did a check via netstat, and it seems that both mycomputer is receiving the video from both hostname1 & hostname2:
    TCP mycomputer:3236 hostname1:8000 ESTABLISHED
    TCP mycomputer:3264 hostname2:8000 ESTABLISHED
    TCP connections to both host were established!! But why can't I see the video of hostname2???? I've thought of 2 possible reasons why I cannot see the video of hostname2:
    1. Is this set of local data port maintained by Java? i.e It's not the same as the TCP port 8000 that I see in mycomputer's netstat. If yes, Java has assigned its local data port 8000 to hostname1, so it fails to reassign that port 8000 to hostname2 while hostname1 is still connected. Any other way to fix this apart from changing the portnumber of hostname2?
    2. It has to do with the custom.jar? I've read in an article somewhere in the forum that the custom.jar has to be customized (using JFMCustomizer) to receive video from two hosts with the same portnumber. Can someone elaborate the necessary boxes to check in the JFMCustomizer?
    Thanks much,
    Rach

    After all this while, I finally figured out the problem. In my code, I use MediaLocator to code the receiver and the transmitter. E.g.:
    MediaLocator inputLocator1 = new MediaLocator("rtp://hostname1:8000/video");
    player1 = Manager.createPlayer(inputLocator1)
    MediaLocator inputLocator2 = new MediaLocator("rtp://hostname2:8000/video");
    player2 = Manager.createPlayer(inputLocator2)
    Manager would complain "Cannot create the RTP Session: Can't open local data port: 8000" because port 8000 is already used up by player1, i.e.:
    mycomputer:8000 maps to hostname1:8000
    mycomputer:8000 cannot re-map to hostname2:8000
    To work around this, I'll need to use SessionAddress. SessionAddress provides the flexibility to do an independent local port mapping, e.g.:
    mycomputer:5000 maps to hostname1:8000
    mycomputer:5002 maps to hostname2:8000
    Rach

  • Need help with JSP - Session Bean scenario

    I have massive problems with a simple JSP <--> Statefull Session Bean scenario with Server Platform Edition 8.2 (build b06-fcs)
    What I do is generating a Collection in session bean returning it to JSP
    and giving the List back to Session Bean.
    A weird exception happens when giving the List back to Session Bean
    (see Exception details below)
    The same code runs without any trouble on Jboss Application Server 4.0.3
    Any help would be great!
    Please see code below
    Statefull Session Bean
    <code>
    package ejb;
    import data.Produkt;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Iterator;
    import javax.ejb.*;
    * This is the bean class for the WarenkorbBean enterprise bean.
    * Created 17.03.2006 09:53:25
    * @author Administrator
    public class WarenkorbBean implements SessionBean, WarenkorbRemoteBusiness, WarenkorbLocalBusiness {
    private SessionContext context;
    // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
    // TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise bean, Web services)
    // TODO Add business methods or web service operations
    * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
    public void setSessionContext(SessionContext aContext) {
    context = aContext;
    * @see javax.ejb.SessionBean#ejbActivate()
    public void ejbActivate() {
    * @see javax.ejb.SessionBean#ejbPassivate()
    public void ejbPassivate() {
    * @see javax.ejb.SessionBean#ejbRemove()
    public void ejbRemove() {
    // </editor-fold>
    * See section 7.10.3 of the EJB 2.0 specification
    * See section 7.11.3 of the EJB 2.1 specification
    public void ejbCreate() {
    // TODO implement ejbCreate if necessary, acquire resources
    // This method has access to the JNDI context so resource aquisition
    // spanning all methods can be performed here such as home interfaces
    // and data sources.
    // Add business logic below. (Right-click in editor and choose
    // "EJB Methods > Add Business Method" or "Web Service > Add Operation")
    public Collection erzeugeWarenkorb() {
    //TODO implement erzeugeWarenkorb
    ArrayList myList = new ArrayList();
    for (int i=0;i<10;i++)
    Produkt prod = new Produkt();
    prod.setID(i);
    prod.setName("Produkt"+i);
    myList.add(prod);
    return myList;
    public void leseWarenkorb(Collection Liste) {
    //TODO implement leseWarenkorb
    Iterator listIt = Liste.iterator();
    while(listIt.hasNext())
    Produkt p = (Produkt)listIt.next();
    System.out.println("Name des Produktes {0} "+p.getName());
    </code>
    <code>
    package data;
    import java.io.Serializable;
    * @author Administrator
    public class Produkt implements Serializable {
    private int ID;
    private String Name;
    /** Creates a new instance of Produkt */
    public Produkt() {
    public int getID() {
    return ID;
    public void setID(int ID) {
    this.ID = ID;
    public String getName() {
    return Name;
    public void setName(String Name) {
    this.Name = Name;
    </code>
    <code>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.util.*"%>
    <%@page import="data.*"%>
    <%@page import="javax.naming.*"%>
    <%@page import="javax.rmi.PortableRemoteObject"%>
    <%@page import="ejb.*"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!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>JSP Page</title>
    </head>
    <body>
    <h1>Online Shop Warenkorb Test</h1>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    <%
    Context myEnv = null;
    WarenkorbRemote wr = null;
    // Context initialisation
    try
    myEnv = (Context)new javax.naming.InitialContext();
    /*Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    //env.put(Context.PROVIDER_URL, "jnp://wotan.activenet.at:1099");
    env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
    env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
    myEnv = new InitialContext(env);*/
    catch (Exception ex)
    System.err.println("Fehler beim initialisieren des Context: " + ex.getMessage());
    // now lets work
    try
    Object ref = myEnv.lookup("ejb/WarenkorbBean");
    //Object ref = myEnv.lookup("WarenkorbBean");
    WarenkorbRemoteHome warenkorbrhome = (WarenkorbRemoteHome)
    PortableRemoteObject.narrow(ref, WarenkorbRemoteHome.class);
    wr = warenkorbrhome.create();
    ArrayList myList = (ArrayList)wr.erzeugeWarenkorb();
    Iterator it = myList.iterator();
    while(it.hasNext())
    Produkt p = (Produkt)it.next();
    %>
    ProduktID: <%=p.getID()%><br></br>Produktbezeichnung:
    <%=p.getName()%><br></br><%
    wr.leseWarenkorb(myList);
    catch(Exception ex)
    %><p style="color:red">Onlineshop nicht erreichbar</p><%=ex.getMessage()%>
    <% }
    %>
    </body>
    </html>
    </code>
    the exception
    CORBA MARSHAL 1398079745 Maybe; nested exception is: org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace---------- org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8101) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:873) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:863) at com.sun.corba.ee.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:275) at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:363) at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:526) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333) at java.util.ArrayList.readObject(ArrayList.java:591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1694) at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1212) at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400) at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330) at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034) at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:333) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readArguments(DynamicMethodMarshallerImpl.java:393) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709) at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:155) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:184) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150) at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source) at ejb._WarenkorbRemote_DynamicStub.leseWarenkorb(_WarenkorbRemote_DynamicStub.java) at org.apache.jsp.index_jsp._jspService(index_jsp.java:122) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83) Caused by: java.lang.ClassNotFoundException ... 69 more ----------END server-side stack trace---------- vmcid: SUN minor code: 257 completed: Maybe

    Hi,
    I have found a way out by passing the reference of my EJB in the HttpSession object and using it inside the javabean..

  • Help with jsp session validation

    i've build up a page that only users wil 'administrator' as the session is variable can access. if they don't they will be directed to the login page.
    However, I'm getting a null pointer exception.
    my code is as follows:
    <%@ page import="java.io.*"%>
    <%
         if (session.getAttribute("id").equals(null) || !(session.getAttribute("id").equals("administrator")))
              response.sendRedirect("adminlogin.htm");
    %>
    Error Message:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
    root cause
    java.lang.NullPointerException
    any pros please help? i know it's something to do with my jsp session validation. thanks in advance.

    one more thing, with regrads to the solution evnafets provided. I tried it out on all my pages that requires administrator rights and found that the code only redirects when it's not expecting any parameters. Else, it just display an error message there. Is there a way around this? Or I should let let my end user suffer?
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.NullPointerException
         at org.apache.jsp.view_jsp._jspService(view_jsp.java:177)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:534)

  • HELP WITH JSF SESSION

    I have 2 managed beans: studentBean and circulationBean. when a student logs in, a session for studentBean is created. the question is how can i access that session attribute from the circulationBean? I need it to create an "insert" query for my Circulation table. Student is a foreign key in the circulation table. PLEASE HELP!!

    I may misunderstand what you want to do,
    however, if you want to create a circulationBean,
    create it by yourself without depending on the managed bean mechanizm.
    For example:public class StudentBean {
       private CirculationBean cb;
       public CirculationBean getCirculation() {
        return cb;
       public String login() {
        cb = new CirculationBean(someKey);
       }You can access the created circulationBean by using a cascaded EL expression
    as #{student.circulation.someProperty}.

  • IP Helper Service causes Session "" failed to start with the following error: 0xC000000D

    I have a Windows 8.1 Pro version. In the event viewer I can see that the error `Session "" failed to start with the following error: 0xC000000D´ is registered every time I boot my laptop.
    I am 100% sure that this is related to the IP Helper Service (iphlpsvc) because the error is logged every time I manually restart the service.
    I have a Windows 8.1 Pro version. In the event viewer I can see that the error `Session "" failed to start with the following error: 0xC000000D´ is registered every time I boot my laptop.
    I am 100% sure that this is related to the IP Helper Service (iphlpsvc) because the error is logged every time I manually restart the service.
    Does anyone know how to fix this issue? I know I could disable the service but I prefer not to do it.
    Thanks
    Alberto

    Hi,
    IP Helper (service name 'iphlpsvc') is apparently designed to improve a Windows PC's support for IPv6 network protocol.
    I suggest you try enable  the dump collection by copying following words into notepad, saving it as dump.reg and importing it:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\localdumps\iphelper.exe]
    "DumpFolder"=hex(2):63,00,3a,00,5c,00,63,00,72,00,61,00,73,00,68,00,64,00,75,\
      00,6d,00,70,00,73,00,00,00
    "DumpCount"=dword:00000010
    "DumpType"=dword:00000001
    "CustomDumpFlags"=dword:00000000
    Once the error appears again, please find the crashdump file under c:\.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • PLease Help !Jsp Session expired when open Window with "_blank" atributte

    PLease please Help me!
    Hi ,
    I have a problem
    First , all my pages when load evaluate if session exists .
    If not exists session
    this page redirect other page (page_expired.jsp)
    this works correctly ... but
    when page01.jsp open page02.jsp from :
    <form action='page02.jsp' target ="_self"> - >works correctly (load on the same page ..)
    but when :
    <form action='page02.jsp' target ="_blank"> -> this redirect page_expired.jsp
    why this ??
    Sometimes work and Sometimes not work...
    but now it does not work
    Excuse my english not is goog...
    Greetings From Lima - Peru

    Hi
    This problem ocurred when testing on my server of testing(this is in my office) ,
    but when test in the server machine of my house this work!!! great! ,
    not appear session expired.!!
    this theme of configuration ??
    if is ths ?
    what configure ?
    Please Help Me .
    I am using EASERVER 5.2 with JSP
    Bye! Greetings From Lima Per�

  • Help with php session variables

    I am using Dreamweaver 8 to set up a dynamic app with PHP and
    MySQL. I want the code that the user logs in with ('UPN') to be
    stored as a session variable so that recordsets on subsequent pages
    can be set to display personalised data.
    I have set the session variable like this: $_SESSION['UPN'] =
    'UPN' (UPN is the name of the form textfield, also set as the
    username for logging in)
    On the data page, I have called the variable like this:
    $query_Recordset1 = ("SELECT pupils.pupilID, pupils.UPN,
    pupils.forename, pupils.surname FROM pupils WHERE UPN = '" .
    $_SESSION['UPN'] . "'");
    The recordset returns nothing- the dynamic table returns ony
    the column headings (both as headings and immediately under where
    you would expect the data to be).
    Can anyone help?
    Thanks

    On Wed, 17 Oct 2007 11:43:04 +0000 (UTC), "denman"
    <[email protected]> wrote:
    > I have set the session variable like this:
    $_SESSION['UPN'] = 'UPN' (UPN is
    >the name of the form textfield, also set as the username
    for logging in)
    Your code assigns the literal string UPN to the session
    variable. If
    it's coming from POSTed form data, you'd need to do it like:
    $_SESSION['UPN'] = $_POST['UPN'];
    Gary

  • HELP NEEDED:: variable SESSION is undefine

    Guys, help me out; PLEASE. I'm stuck on this for days and am
    running out of options.
    I have a CFC that checks some session variables for
    validation (client login etc), and I have a RemoteObject call to
    said CFC.
    All my other CFCs that do not reference session variables
    work fine; this one bunks right when my CFC checks the session
    variables.
    I tried webservices, no-go (hell, I couldn't even see the
    faultString!!).
    I played around with my CF8 server settings and tried
    everything.
    I tried Ben Forta's blogs (and posted a question there) but
    didn't get much help,
    HOW CAN I ACCESS A CFC THAT REFERENCES SESSION VARIABLES
    WITHOUT CREATING A GET/SET METHOD TO GET/SET THESE SESSION
    VARIABLES!!!! (Obvious security risk).

    Thank you for your reply John,
    Sorry I wasn't clear in my description.
    I do -in fact- have a CFC check my client's log-in and return
    a true or false, however in subsequent site functionality, it is
    the norm to see whether the session has expired or not. From Flex I
    am using a RemoteObject call to a CFC; the CFC has the following if
    statement:
    <cfif IsDefined(SESSION.CLIENT.boolClientLoggedIn)>
    <cfif SESSION.CLIENT.boolClientLoggedIn eq "true">
    <cfthrow message="Attempting to call fncClientWebSignup
    when client is logged in.">
    </cfif>
    </cfif>
    The faultString I get in Flex is 'Variable SESSION is
    undefined.'
    Also, I did try to change my wrapper from html to cfm and
    still no success. Not only that, but I've tried Webservices (which
    failed miserably because I couldn't even get the details of the
    SOAP fault!!!).
    I built a test cfm page that tests my cfcs (instead of Flex
    calling them, I had the cfm call the same cfcs) and Session
    variables were defined and everything went well.
    It so happens that when Flex calls the SAME cfcs, the SESSION
    variable is undefined.
    I hope this clears up my problem.

Maybe you are looking for

  • I cant get camera raw update 8.7.1 to work with lightroom 5.7 after downloading and opening zip file

    When I try to open a raw file from lightroom 5.7 I get a message that I need camera raw 8.7.1. I downloaded the update as a zip file I extracted file then went through the install wizard process but still I cant get it to work. If I go to photoshop c

  • Saving a Contact Sheet...

    In iView I can make a contact sheet that I can save as a jpg. How can I do this in LR? Jeff

  • Business Planning Object

    I have a business requirement to provide Business Planning information on Accounts for our Field Sales Reps. I have viewed the R17 webinar on Business Planning for Life Sciences and it looks just like what I need, but I am not in the Life Sciences ve

  • How to detect a malware in Mac OS X Lion

    Hello, I am not a seasoned Mac user. I heard that Mac doesn't have malware like Windows. Last night I carelessly downloaded something (from Google talk) from the link http://bitly.com/wEV7Hy?id=a4a4a6 It has a zip file, within that a .scr file. Can a

  • BB 7100 NOL Missing

    ok I have just recently recieved a BB 7100 new. I have been working on activating everything, and as of now Browser, messages and everything work well. The only thing I am missing that I know should be there is the NOL, Where i can download ringers,