Error -The trustAnchors parameter must be non-empty.

Hi to all,
i ve a send mail program, which i modified fm smtpsend.java,the sample come with javamail 1.4.3. this is working when i run from command prompt. but when i run this inside in jdeveloper 11g "the trustAnchors parameter must be non-empty" error is coming.
i m using Weblogic Server 11g(10.3.2) & jdk6 update 16.
Can anyone help me? wt is problem here?
C:\Middleware11g2\jdk160_14_R27.6.5-32\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\MyTestApp\classes;C:\JDeveloper\mywork\WorkFlow\javamail-1.4.3\javamail-1.4.3\mail.jar "-Djavax.net.ssl.trustStore=D:\Middleware11g 2\wlserver_10.3\server\lib\DemoTrust.jks" com.company.jsf.TestSmtp
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty.
package com.company.jsf;
import com.sun.mail.smtp.SMTPTransport;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class TestSmtp {
public TestSmtp() {
super();
public static void main(String[] args){
String to="[email protected]", subject = "Hi", from = "[email protected]", cc = null, bcc = null, url = null;
String mailhost = "smtp.gmail.com";
String user = "myid", password = "mypassword";
boolean debug = false;
boolean verbose = false;
boolean auth = true;
String prot = "smtps";
try{
Properties props = System.getProperties();
if (mailhost != null)
props.put("mail." prot ".host", mailhost);
if (auth)
props.put("mail." prot ".auth", "true");
// Get a Session object
Session session = Session.getInstance(props, null);
if (debug)
session.setDebug(true);
Message msg = new MimeMessage(session);
if (from != null)
msg.setFrom(new InternetAddress(from));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
if (cc != null)
msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(cc, false));
if (bcc != null)
msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(bcc, false));
msg.setSubject(subject);
String text = "hr u?";
msg.setText(text);
SMTPTransport t = (SMTPTransport)session.getTransport(prot);
try {
if (auth)
t.connect(mailhost, user, password);
else
t.connect();
t.sendMessage(msg, msg.getAllRecipients());
finally {
if (verbose)
System.out.println("Response: " + t.getLastServerResponse());
t.close();
System.out.println("\nMail was sent successfully.");
catch(Exception e){
e.printStackTrace();
Edited by: user7895 on May 20, 2010 12:47 AM

Hi,
is this topic *"Customizing JSSE-The Installation Directory <java-home>"* enough or there is something more? bz it's not a small doc, worthless to read whole, i believe.
i ll appreciate if u specify related topics, other than above.
thanks with regards
Edited by: user7895 on May 20, 2010 11:44 AM
Edited by: user7895 on May 20, 2010 11:45 AM

Similar Messages

  • Error: The property attribute must be specified

    Hi,
        When I am using Flex's validator I get the error specified below
    Error: The property attribute must be specified when the source attribute is specified.
        at mx.validators::Validator/getValueFromSource()[C:\autobuild\3.2.0\frameworks\projects\fram ework\src\mx\validators\Validator.as:853]
        at mx.validators::Validator/validate()[C:\autobuild\3.2.0\frameworks\projects\framework\src\ mx\validators\Validator.as:810]
        at mx.validators::Validator/triggerHandler()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\validators\Validator.as:1016]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9298]
        at mx.controls::TextInput/focusOutHandler()[C:\autobuild\3.2.0\frameworks\projects\framework \src\mx\controls\TextInput.as:2167]
        at flash.display::Stage/set focus()
        at mx.core::UIComponent/setFocus()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ore\UIComponent.as:6857]
        at mx.managers::FocusManager/setFocus()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\managers\FocusManager.as:545]
        at mx.managers::FocusManager/mouseDownHandler()[C:\autobuild\3.2.0\frameworks\projects\frame work\src\mx\managers\FocusManager.as:1865]
    Let me know what is that I am missing .
    Regards
    Kalavati Singh
    [email protected]

    seems like you specified the id of some textinput as source property of validator, but didnot specify the attribute property.
    most probably, it should be 'text'.
    when you provide the source property of the validator, you just specity which OBJECT to validate. hoever, you missed WHICH PROPERTY OF THE OBJECT to validate.

  • Should I specify the Parallel parameter for an non-RAC database?

    The Oracle documatation state as the following:
    "The Oracle Database 10g Release 2 database controls and balances all parallel operations, based upon available resources, request priorities and actual system load." It show that Oracle can optimize the Parallel level automaticly.
    Should I specify the Parallel parameter for a non-RAC database? Most of the transactions are small OLTP.

    What parallel parameter are you talking about?
    Generally, you may benefit from parallelization in a very similar manner on RAC as on single instance system. And it is in both cases not sufficient to change the value of any initialization parameter to achieve parallelization of queries, DDL or DML.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • The type of RETURNING parameter must be fully specified

    Hello,
    I want to program a locall class, a method to return a table of a local type:
    TYPES:
    BEGIN OF ty_line,
       id   TYPE char10,
       txt  TYPE string,
    END OF ty_line,
    ty_line_tt type standard table of ty_line.
    CLASS cl_html DEFINITION FINAL CREATE PRIVATE.
      PUBLIC SECTION.
        CLASS-METHODS parse importing fdata        type string_table
                            returning value(fmeta) type ty_line_tt.
    ENDCLASS.                    "cl_rep DEFINITION
    Got an error as in the subject. Does that mean that the table type MUST be declared in the ABAP dictionary?
    Regards,
    Michal

    Hello Michal
    Since your static method is PUBLIC you cannot use local types in its interface. The type of the RETURNING parameter must be public as well. Thus, you have to define it in the DDIC.
    Alternatively, you could switch to the more flexible EXPORTING parameters. Or you could return you itab as data reference, e.g.:
    *& Report  ZUS_LOCAL_CLASS                                             *
    REPORT  zus_local_class                                             .
    TYPES:
    BEGIN OF ty_line,
    id TYPE char10,
    txt TYPE string,
    END OF ty_line,
    ty_line_tt TYPE STANDARD TABLE OF ty_line.
    *       CLASS cl_html DEFINITION
    CLASS cl_html DEFINITION FINAL CREATE PRIVATE.
      PUBLIC SECTION.
        CLASS-METHODS parse IMPORTING fdata TYPE string_table
    *    RETURNING value(fmeta) TYPE ty_line_tt.
        RETURNING value(data_obj) TYPE REF TO data.
    ENDCLASS. "cl_rep DEFINITION
    *       CLASS cl_html IMPLEMENTATION
    CLASS cl_html IMPLEMENTATION.
      METHOD parse.
    *   define local data
        DATA:
          lt_line_tt    TYPE ty_line_tt.
        APPEND INITIAL LINE TO lt_line_tt.
        GET REFERENCE OF lt_line_tt INTO data_obj.
      ENDMETHOD.                    "parse
    ENDCLASS.                    "cl_html IMPLEMENTATION
    Regards
      Uwe

  • Error: Proxy list must not be empty

    Hello All,
    I use a apex listener 2.0.5 version and glass fish webserver on windows server 2008.
    Did any body had the above error, while connecting through apex listener by providing username: listeneradmin credentials?
    One of my teamates already connected to the listener, able to configure settings, and deploy the changes to the apex.war file.
    Basically, i'm trying to connect with similar settings that my colleage has.
    Thanks for all your help in advance.

    Figured it out: Go to Tools -> Preferences -> Web Browser and Proxy, "Proxy Settings" tab.
    I changed mine to "No Proxy" from "Use System Default Proxy Settings".
    I use Linux as my workstation and don't [normally] have HTTP_PROXY, et al. defined thus the "Proxy list must not be empty" error.

  • Error Message FF747  -The tax amount must not be greater than the tax base

    Hello,
    We are attempting to post an import vendor invoice through transaction    FB60 for Israel company code . Since the tax charged by the vendor is not fixed every time , we are entering the tax amount in the    FB60 screen manually , without selecting 'calculate tax'.The amount of tax is greater than the amount of expense as per the real business scenario. For example amount of expense is 100, amount of tax is 200 and the total amount charged by the vendor is 300 .However when we simulate the posting we get an error - The tax amount must not be greater than the tax base-Message no. FF747
    We tried putting a very high percentage in the tax code also but it didn't help
    We would like to go ahead with this posting. Could you pl throw light on the same . ? Is there any way (OSS note ) or a work around which can resolve the issue ?
    Best Regards
    Amit  Kulkarni

    Hello
    This may be  a work around in other cases , but since we want the amount to be updated in the BSET table for further VAT reports , we would like  this to be posted along with the expense item

  • Implementing the Last Non Empty

    Dear All,
    I am trying to get the last non empty set by applying the Last Non Empty property to the measures Projectedvalue and Gross amount.  The below is the original table.
    The output I want is as below:
    For the Revised Quarter type Original all the recent values of the Projected quarter should be displayed.
    As you can see the last value for Q1 needs to be selected which is shown in above pic.
    Currently the cube output is same as the original table. :(
    Can anybody help me on this?
    Thanks, Franco.

    Hi Franco,
    In SQL Server Analysis Services (SSAS), LastNonEmpty is an aggregation function available in the Enterprise version of SQL Server. Essentially, you simply create a calculated member that returns the non empty value, or if empty, it looks in the previous
    member. Please take a look at the articles regarding Last Ever Non Empty.
    Getting the last non empty value
    The Last Non Empty Dilemma
    Last Ever Non Empty – a new, fast MDX approach
    Regards,
    Charlie Liao
    TechNet Community Support

  • Ms sql - {"The referenced table must have a primary or candidate key. [ FK Name = ForeignKeyB_Details ]"}

    I have a txt file which has all the sqltext in it separated by semi colon .Then I try to run a query one by one like this-
                var conn = new SqlCeConnection(ConnectionString);
                conn.Open();
                var cmdArray = Regex.Split(sqlText, ";");
                var cmd = new SqlCeCommand(null, conn);
                foreach (var text in cmdArray)
                    cmd.CommandText = text;
                    if (!text.Equals(string.Empty))
                        cmd.ExecuteNonQuery();
                    else
                        break;
                conn.Close();
    I get the error {"The referenced table must have a primary or candidate key. [ FK Name = ForeignKeyB_Details  ]"}
    here is part of my txt file-
    CREATE TABLE A
           PrimaryId nvarchar(10) NOT NULL REFERENCES C(PrimaryId),
           UserId nvarchar(20) NOT NULL,
           FirstName nvarchar(30) NOT NULL,
           MiddleInitial nvarchar(1) NULL,
           LastName nvarchar(30) NOT NULL,
           MobileNumber nvarchar(20) NULL,
           PhoneNumber nvarchar(10) NOT NULL,
           PhoneExtension nvarchar(6) NULL,
           FaxNumber nvarchar(20) NULL,
           EmailAddress nvarchar(50) NOT NULL,
      CONSTRAINT PrimaryKeyA PRIMARY KEY(PrimaryId, UserId)
    CREATE TABLE B(
       MarketId int NOT NULL references E(MarketId),
       UserId nvarchar(20) NOT NULL,
       UserFirstName nvarchar(30) NOT NULL,
       UserMiddleInitial nvarchar(1) NOT NULL,
       UserLastName nvarchar(30) NOT NULL,
       PhoneNbr nvarchar(10) NOT NULL,
       Extension nvarchar(6) NOT NULL,
       FaxNbr nvarchar(20) NOT NULL,
       Email nvarchar(50) NOT NULL,
       ShortName nvarchar(10) NOT NULL,
    PublicIdFlag nvarchar(6) NOT NULL references D(publicId),
            CONSTRAINT PrimaryKeyB PRIMARY KEY( MarketId, UserId)
    ALTER TABLE B ADD CONSTRAINT ForeignKeyB_Details FOREIGN KEY(UserId, UserFirstName, UserMiddleInitial, UserLastName, PhoneNbr, Extension, FaxNbr, Email) REFERENCES A(UserId, FirstName, MiddleInitial, LastName, PhoneNumber, PhoneExtension, FaxNumber, EmailAddress);

    Hi,
    Foreign key columns are frequently used in join criteria when the data from related tables is combined in queries by matching the column or columns in the FOREIGN KEY constraint of one table with the primary or unique key column or columns in the other table.
    For more information about the foreign key constraint, please refer to this link:
    http://msdn.microsoft.com/en-us/library/ms175464.aspx
    Here is a similar thread for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a71948b-dfb1-46a5-8688-ccab9317e959/error-message-the-referenced-table-must-have-a-primary-or-candidate-key-fk-name-fktblatblb-?forum=sqlce
    Thanks.
    Tracy Cai
    TechNet Community Support

  • The obligatory parameter had no value assigned to it

    Hi,
    Abap OO question:
    method is defined in the protected section, like this:
    METHODS: path_build IMPORTING value(i_bukrs) TYPE bkpf-bukrs
                                      value(i_datatype) type char25
                                      value(i_dirtype) type char25
                             returning value(r_pathfile) type ZPATHFILE.
    I get syntax error
    "the obligatory parameter i_bukrs had no value assigned to it"
    when I try to call the method inside of a public method, like this:
    tp_pathfile = me->path_build( ) exporting i_bukrs = '4010'
                                                 i_datatype = 'I205A'
                                                 i_dirtype = 'OUT'.
    Any hints how to resolve syntax error are welcome.
    thank you,
    Rolf

    Hello Rolf
    The function method call should look like this.
    tp_pathfile = me->path_build(
      i_bukrs     = '4010'
      i_datatype = 'I205A'
      i_dirtype    = 'OUT' ).
    Regards
      Uwe

  • The entity name must immediately follow the '&' in the entity reference.

    Hello Group,
    I have been receiving below such org.xml.sax.SAXParseException exceptions.
    Could you anyone please advise me what could be the reason for these issues and any probable solution thereby.
    NOTE:
    Eg1: Below string is causing error:
    USER Given: funnicity is funny. isn't it. true. well go to "funnicity" today.
    Escaped String : funnicity is funny. isn&#039;t it. true. well go to "funnicity" today.
    Eg2: Below string successfully generated spell suggestions:
    USER Given: funnicity is funny. isn ' t it. true. well go to " funnicity " today.
    Escaped String : funnicity is funny. isn &#039; t it. true. well go to " funnicity " today.
    The difference between above two example strings is, characters to be escaped were separated from other chars with a single whitespace.
    In the below notes "TEXT:" is the string sent by ERXGoogleSpell to org.w3c.dom.Document.parse(InputStream) method and "ERROR:" is the error received from ERXGoogleSpell:
    TEXT:
    funnicity is funny. isn't it. true. well go to " funnicity " today.
    ERROR:
    The entity name must immediately follow the '&' in the entity reference.
    00:43 DEBUG text is : funnicity is funny. isn t it. true. well go to "funnicity" today.
    [Fatal Error] :1:244: The reference to entity "quot" must end with the ';' delimiter.
    er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. isn t it. true. well go to "funnicity" today.'.
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
    at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
    at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
    at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
    at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
    at com.mtj.Application.dispatchRequest(Application.java:669)
    at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
    at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: org.xml.sax.SAXParseException: The reference to entity "quot" must end with the ';' delimiter.
    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
    ... 14 more
    TEXT:
    funnicity is funny. tell me isn't it true.
    ERROR:
    07:29 DEBUG text is : funnicity is funny. tell me isn't it true.
    [Fatal Error] :1:187: The entity name must immediately follow the '&' in the entity reference.
    er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. tell me isn't it true.'.
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
    at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
    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.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
    at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
    at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
    at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
    at com.mtj.Application.dispatchRequest(Application.java:669)
    at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
    at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
    ... 15 more
    Please let me know, if this email is not clear or need any information.
    Thanks in advance.
    Thank You,
    Shravan

    Thanks so much for all your responses.
    I have actually passed-in properly escaped text to document parser, but it is behaving vaguely.
    I see the text I have posted in my initial post is parsed by forum.
    Here is the text that is reported as error:
    Actual Text: Hello "World"
    Escaped Text passed to parser: Hello & quot;World& quot; (note: & and quot are indeed not separated)
    Here is the text that is working fine:
    Actual Text: Hello " World "
    Escaped Text passed to parser: Hello & quot; World & quot; (note: & and quot are indeed not separated)
    The difference in above two versions of text input is: quotes and word are separated by a space to work fine.
    Please advise a solution.

  • How to solve the error Type Error #2007: Parameter hitTestObject must be non-null.

    When I combine the storytelling part(storytelling that run frame by frame) with platform game, this error appear:
    TypeError: Error #2007: Parameter hitTestObject must be non-null.
    at flash.display:: DisplayObject/_hitTest()
    at flash.display:: DisplayObject/hitTestObject()
    at SaveMyBaby4_fla::Background_27/frame1()
    at flash.display::MovieClip/gotoAndPlay()
    at SaveMyBaby4_fla::Mainmenu_20/clickStart()
    How can i solve it? As i use this coding:
    var leftDown:Boolean = false;
    var rightDown:Boolean = false;
    var upDown:Boolean = false;
    var downDown:Boolean = false;
    var leftBumping:Boolean = false;
    var rightBumping:Boolean = false;
    var upBumping:Boolean = false;
    var downBumping:Boolean = false;
    var leftBumpPoint:Point = new Point(0, 0);
    var rightBumpPoint:Point = new Point(0, 0);
    var upBumpPoint:Point = new Point(0, 0);
    var downBumpPoint:Point = new Point(0, 0);
    var scrollX:Number = 500;
    var scrollY:Number = 0;
    var xSpeed:Number = 0;
    var ySpeed:Number = 0;
    var speedConstant:Number = 2;
    var frictionConstant:Number = 0.9;
    var gravityConstant:Number = 1.5;
    var jumpConstant:Number = -35;
    var maxSpeedConstant:Number = 18;
    var doubleJumpReady:Boolean = false;
    var upReleasedInAir:Boolean = false;
    var door:Boolean = false;
    var currentLevel:int = 1;
    var animationState:String="rest";
    function loop(e:Event):void{
    if(back.block.hitTestPoint(player.x + leftBumpPoint.x, player.y + leftBumpPoint.y, true)){
    //trace("leftBumping");
    leftBumping = true;
    } else {
    leftBumping = false;
    if(back.block.hitTestPoint(player.x + rightBumpPoint.x, player.y + rightBumpPoint.y, true)){
    //trace("rightBumping");
    rightBumping = true;
    } else {
    rightBumping = false;
    if(back.block.hitTestPoint(player.x + upBumpPoint.x, player.y + upBumpPoint.y, true)){
    //trace("upBumping");
    upBumping = true;
    } else {
    upBumping = false;
    if(back.block.hitTestPoint(player.x + downBumpPoint.x, player.y + downBumpPoint.y, true)){
    //trace("downBumping");
    downBumping = true;
    } else {
    downBumping = false;
    if(leftDown){
    xSpeed -= speedConstant;
    player.scaleX = -1;
    } else if(rightDown){
    xSpeed += speedConstant;
    player.scaleX = 1;
    /*if(upPressed){
    ySpeed -= speedConstant;
    } else if(downPressed){
    ySpeed += speedConstant;
    if(leftBumping){
    if(xSpeed < 0){
    xSpeed *= -0.5;
    if(rightBumping){
    if(xSpeed > 0){
    xSpeed *= -0.5;
    if(upBumping){
    if(ySpeed < 0){
    ySpeed *= -0.5;
    if(downBumping){ //if we are touching the floor
    if(ySpeed > 0){
    ySpeed = 0; //set the y speed to zero
    if(upDown){ //and if the up arrow is pressed
    ySpeed = jumpConstant; //set the y speed to the jump constant
    //DOUBLE JUMP
    if(upReleasedInAir == true){
    upReleasedInAir = false;
    if(doubleJumpReady == false){
    doubleJumpReady = true;
    } else { //if we are not touching the floor
    ySpeed += gravityConstant; //accelerate downwards
    //DOUBLE JUMP
    if(upDown == false && upReleasedInAir == false){
    upReleasedInAir = true;
    //trace("upReleasedInAir");
    if(doubleJumpReady && upReleasedInAir){
    if(upDown){ //and if the up arrow is pressed
    //trace("doubleJump!");
    doubleJumpReady = false;
    ySpeed = jumpConstant; //set the y speed to the jump constant
    if(door == false)
    if(player.hitTestObject(back.door))
    door = true;
    if(xSpeed > maxSpeedConstant){ //moving right
    xSpeed = maxSpeedConstant;
    } else if(xSpeed < (maxSpeedConstant * -1)){ //moving left
    xSpeed = (maxSpeedConstant * -1);
    xSpeed *= frictionConstant;
    ySpeed *= frictionConstant;
    if(Math.abs(xSpeed) < 0.5){
    xSpeed = 0;
    scrollX -= xSpeed;
    scrollY -= ySpeed;
    back.x = scrollX;
    back.y = scrollY;
    sky.x = scrollX * 0.2;
    sky.y = scrollY * 0.2;
    if((leftDown||rightDown||xSpeed>speedConstant||xSp eed<speedConstant*-1)&&downBumping){
    animationState="playerrun";
    else if(downBumping){
    animationState="rest";
    else{
    animationState="jump";
    if(player.currentLable!=animationState){
    player.gotoAndStop(animationState);
    function nextLevel():void{
    currentLevel++;
    gotoAndPlay(4, "Scene 1");
    door = false;
    function keyDownHandler(e:KeyboardEvent):void
    if(e.keyCode == Keyboard.LEFT)
    leftDown = true;
    else if(e.keyCode == Keyboard.RIGHT)
    rightDown = true;
    else if(e.keyCode == Keyboard.UP)
    upDown = true;
    else if(e.keyCode == Keyboard.DOWN)
    downDown= true;
    if(player.hitTestObject(back.door))
    //proceed to the next level if the player is touching an open door
    door = true;
    gotoAndPlay(5, "Scene 1");
    function keyUpHandler(e:KeyboardEvent):void{
    if(e.keyCode == Keyboard.LEFT){
    leftDown = false;
    } else if(e.keyCode == Keyboard.RIGHT){
    rightDown = false;
    } else if(e.keyCode == Keyboard.UP){
    upDown = false;
    } else if(e.keyCode == Keyboard.DOWN){
    downDown = false;

    The code I say to add is to troubleshoot the problem, it will not solve it, but it could help lead to solving it if the file is able to compile.  Does the trace show up in your output panel?  If so, what does it indicate?
    You should also go into your Flash section of the Publish Settings and select the option to Permit Debugging... that can help by adding a line number to the error message.
    What is the 'door' object that is associated with the 'back' object?  Does it exist in a frame that is not present when you try to run the file?  If so, check to make sure that it has its instance name assigned in every keyframe it occupies.

  • Voting poll using PHP & MySQL TypeError: Error #2007: Parameter text must be non-null.

    I am getting this back:
    TypeError: Error #2007: Parameter text must be non-null.
    at flash.text::TextField/set text()
    at AS3_Flash_Poll_PHP_MySQL_fla::WholePoll_1/completeHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    PHP code:
    <?php
    // ---------------------------------------- Section 1 -----------------------------------------------
    //  IMPORTANT!!!! Connect to MySQL database here(put your connection data here)
    mysql_connect("ginaty05.fatcowmysql.com","fall2010","@regina") or die (mysql_error());
    mysql_select_db("poll_2010") or die (mysql_error());
    // When Flash requests the totals initially we run this code
    if ($_POST['myRequest'] == "load_numbers") {
    // Query the totals from the database
        $sql1 = mysql_query("SELECT id FROM votingPoll WHERE choice='1'");
        $choice1Count = mysql_num_rows($sql1);
        $sql2 = mysql_query("SELECT id FROM votingPoll WHERE choice='2'");
        $choice2Count = mysql_num_rows($sql2);
        $sql3 = mysql_query("SELECT id FROM votingPoll WHERE choice='3'");
        $choice3Count = mysql_num_rows($sql3);
        echo "choice1Count=$choice1Count";
        echo "&choice2Count=$choice2Count";
        echo "&choice3Count=$choice3Count";
    // ---------------------------------------- Section 2 -----------------------------------------------
    // IF POSTING A USER'S CHOICE
    if ($_POST['myRequest'] == "store_choice") {
        //Obtain user IP address
        $ip = $_SERVER['REMOTE_ADDR'];
        // Create local variable from the Flash ActionScript posted variable
        $userChoice = $_POST['userChoice'];
        $sql = mysql_query("SELECT id FROM votingPoll WHERE ipaddress='$ip'");
        $rowCount = mysql_num_rows($sql);
        if ($rowCount == 1) {
    $my_msg = "You have already voted in this poll.";
    print "return_msg=$my_msg";
        } else {
    $sql_insert = mysql_query("INSERT INTO votingPoll (choice, ipaddress) VALUES('$userChoice','$ip')")  or die (mysql_error());
    $sql1 = mysql_query("SELECT * FROM votingPoll WHERE choice='1'");
    $choice1Count = mysql_num_rows($sql1);
    $sql2 = mysql_query("SELECT * FROM votingPoll WHERE choice='2'");
    $choice2Count = mysql_num_rows($sql2);
    $sql3 = mysql_query("SELECT * FROM votingPoll WHERE choice='3'");
    $choice3Count = mysql_num_rows($sql3);
    $my_msg = "Thanks for voting!";
            echo "return_msg=$my_msg";
            echo "&choice1Count=$choice1Count";
    echo "&choice2Count=$choice2Count";
    echo "&choice3Count=$choice3Count";
    ?>
    AS3 code:
    stop(); // Stop the timeline since it does not need to travel for this to run
    // Assign a variable name for our URLVariables object
    var variables1:URLVariables = new URLVariables();
    //  Build the varSend variable
    var varSend1:URLRequest = new URLRequest("parse_my_poll.php");
    varSend1.method = URLRequestMethod.POST;
    varSend1.data = variables1;
    // Build the varLoader variable
    var varLoader1:URLLoader = new URLLoader;
    varLoader1.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader1.addEventListener(Event.COMPLETE, completeHandler1);
    // Set variable to send to PHP here for the varloader below
    variables1.myRequest = "load_numbers";  
    // Send data to php file now, and wait for response using the COMPLETE event
    varLoader1.load(varSend1);
    function completeHandler1(event:Event):void{
        count1_txt.text = "" + event.target.data.choice1Count;
        count2_txt.text = "" + event.target.data.choice2Count;
        count3_txt.text = "" + event.target.data.choice3Count;
    // hide the little processing movieclip
    processing_mc.visible = false;
    // Initialize the choiceNum variable that we will use below
    var choiceNum:Number = 0;
    // Set text formatting colors for errors and success messages
    var errorsFormat:TextFormat = new TextFormat();
    errorsFormat.color = 0xFF0000; // bright red
    var successFormat:TextFormat = new TextFormat();
    successFormat.color = 0x00FF00; // bright green
    // Button Click Functions
    function btn1Click(event:MouseEvent):void{
        choiceNum = 1;
        choice_txt.text = choice1_txt.text;
    function btn2Click(event:MouseEvent):void{
        choiceNum = 2;
        choice_txt.text = choice2_txt.text;
    function btn3Click(event:MouseEvent):void{
        choiceNum = 3;
        choice_txt.text = choice3_txt.text;
    // Button Click Listeners
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    btn2.addEventListener(MouseEvent.CLICK, btn2Click);
    btn3.addEventListener(MouseEvent.CLICK, btn3Click);
    // Assign a variable name for our URLVariables object
    var variables:URLVariables = new URLVariables();
    //  Build the varSend variable
    var varSend:URLRequest = new URLRequest("parse_my_poll.php");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    // Build the varLoader variable
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    // Handler for PHP script completion and return
    function completeHandler(event:Event):void{
        // remove processing movieclip
        processing_mc.visible = false;
        // Clear the form fields
        choice_txt.text = "";
        choiceNum = 0;
        // Load the response from the PHP file
        status_txt.text = event.target.data.return_msg;
        status_txt.setTextFormat(errorsFormat);
        if (event.target.data.return_msg == "Thanks for voting!") {
            // Reload new values into the count texts only if we get a proper response and new values
            status_txt.setTextFormat(successFormat);
            count1_txt.text = "" + event.target.data.choice1Count;
            count2_txt.text = "" + event.target.data.choice2Count;
            count3_txt.text = "" + event.target.data.choice3Count;
    // Add an event listener for the submit button and what function to run
    vote_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
    // Validate form fields and send the variables when submit button is clicked
    function ValidateAndSend(event:MouseEvent):void {
        //validate form fields
        if(!choice_txt.length) {  
            // if they forgot to choose before pressing the vote button
            status_txt.text = "Please choose before you press vote.";  
            status_txt.setTextFormat(errorsFormat);
        } else {
            status_txt.text = "Sending...";
            processing_mc.visible = true;
            // Ready the variables for sending
            variables.userChoice = choiceNum;
            variables.myRequest = "store_choice";  
            // Send the data to the php file
            varLoader.load(varSend);
        } // close else after form validation
    } // Close ValidateAndSend function ////////////////////////

    This error means that you are trying to set the text field but there is no data in the variable. As a first step, try to identify where this is happening, eg Is it the first call, or once you have submitted your data or only if you try to submit data second time?
    Trace out the data that is returned for both completeHandlers to see if there is a missing var. Try this for "load_numbers" and "store_choice". Do it twice for "store_choice". Do you get back what you expected?
    You could also try altering the php to return some fixed dummy variables, eg  choice1Count=11&choice2Count=22&choice3Count=33, etc. If this works then you know that the error is in the PHP.
    It looks to me like the issue is when you submit the data a second time and just get back the return_msg - the handler then tries to assign the choice1Count etc but doesn't have any count data back from the poll.php.
    Test that there is data before assigning it, eg
        if(event.target.data.choice1Count){
            count1_txt.text =  event.target.data.choice1Count;
            count2_txt.text =  event.target.data.choice2Count;
            count3_txt.text =  event.target.data.choice3Count;

  • ActionScript 3 + PHP: TypeError: Error #2007: Parameter text must be non-null.

    Hi - Still new to flash as3 and php -
    it is a contact form page - user puts in information - i am to receive it in an email address their information
    as well the variables get sent back from the php to the .swf file.
    I am receiving these errors and not knowing how to fix them.
    any help would be much appreciated. thank you in advance really.
    below are the errors in flash - as3 code - and php code setup.
    errors:
    ActionScript 3 + PHP: TypeError: Error #2007: Parameter text must be non-null:
      at flash.text::TextField/set text()
              at kwangjaekim_fla::wholeform_16/completeHandler()
              at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    my as3 code is the following:
    // build variable name for the URL Variables loader
    var variables:URLVariables = new URLVariables();
    //Build the varSend variable
    var varSend:URLRequest = new URLRequest("contact_parse.php");
    varSend.method = URLRequestMethod.POST;
    varSend.data = variables;
    //Build the varLoader variable
    var varLoader:URLLoader = new URLLoader;
    varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    varLoader.addEventListener(Event.COMPLETE, completeHandler);
    //handler for the PHP  script completion and return of status
    function completeHandler(event:Event):void{
              //value is cleared at ""
              name_txt.text = "";
              contact_txt.text = "";
              msg_txt.text = "";
              //Load the response PHP here
              status_txt.text = event.target.data.return_msg;
    //Add event listener for submit button click
    submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);
    //function ValidateAndSend
    function ValidateAndSend(event:MouseEvent):void{
              //validate fields
              if(!name_txt.length){
                        status_txt.text = "Please Enter Your Name";
              }else if(!contact_txt.length){
                        status_txt.text = "Please Enter Your Contact Detail";
              }else if(!msg_txt.length){
                        status_txt.text = "Please Enter Your Message";
              }else {
              // ready the variables in form for sending
      variables.userName = name_txt.text;
              variables.userContact = contact_txt.text;
              variables.userMsg = msg_txt.text;
              // Send the data to PHP now
    varLoader.load(varSend);
    submit_btn.addEventListener(MouseEvent.CLICK, function(){MovieClip(parent).gotoAndPlay(151)});
              } // Close else condition for error handling
    } // Close validate and send function
    my php code is the following:
    <?php
    // Create local PHP variables from the info the user gave in the Flash form
    $senderName   = $_POST['userName'];
    $senderEmail     = $_POST['userContact'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName   = stripslashes($senderName);
    $senderContact     = stripslashes($senderContact);
    $senderMessage   = stripslashes($senderMessage);
    //!!!!!!!!!!!!!!!!!!!!!!!!!     change this to my email address     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                              $to = "put iny me email address";
         // Place sender Email address here
        $from = "$senderContact ";
        $subject = "Contact from your site";
        //Begin HTML Email Message
        $message = <<<EOF
    <html>
      <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Contact</b> = <a href="mailto:$senderContact">$senderEmail</a><br /><br />
    <b>Message</b> = $senderMessage<br />
      </body>
    </html>
    EOF;
       //end of message
        $headers  = "From: $from\r\n";
        $headers .= "Content-type: text/html\r\n";
        $to = "$to";
        mail($to, $subject, $message, $headers);
    exit();
    ?>
    thank you once again
    jay

    thank you Ned -
    i put in the trace line as you mentioned -
    and this is what i received -
    returns: undefined
    TypeError: Error #2007: Parameter text must be non-null
              at flash.text::TextField/set text()
              at kwangjaekim_fla::wholeform_16/completeHandler()
              at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    what does this mean exactly?
    thank you for the help really

  • TypeError: Error #2007: Parameter text must be non-null

    I am new to AS period, but I am following some training videos for AS 3.0 to create a portfolio site where the images and text are loaded by xml.
    I have followed the instructions to the letter; however I am getting the #2007 Parameter text must be not-null error.
    I have pasted my code below:
    var titleArray:Array = new Array();
    var descriptionArray:Array = new Array();
    var largeImageArray:Array = new Array();
    var thumbnailImageArray:Array = new Array();
    var imageNum:Number=0;
    var totalImages:Number;
    //XML
    //load in XML
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("assets/portfolio/portfolio.xml"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void {
    var theXMLData:XML=new XML(XMLURLLoader.data);
    totalImages=theXMLData.title.length();
    for (var i:Number = 0; i < totalImages; i++) {
    titleArray.push(theXMLData.title[i]);
    descriptionArray.push(theXMLData.description[i]);
    largeImageArray.push(theXMLData.largeImage[i]);
    thumbnailImageArray.push(theXMLData.thumbImage[i]);
    loadThumbnail();
    myScrollPane.source=allThumbnails;
    //LOAD THE THUMBNAILS
    function loadThumbnail():void {
    trace(imageNum);
    var thumbLoader:Loader = new Loader();
    thumbLoader.load(new URLRequest(thumbnailImageArray[imageNum]));
    thumbLoader.x = 90*imageNum;
    //stores the appropriate info for thumbnail
    var thisLargeImage:String = largeImageArray[imageNum];
    var thisTitle:String = titleArray[imageNum];
    var thisDescription:String = descriptionArray[imageNum];
    thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
    function thumbLoaded(event:Event):void {
    //add the thumbnails to the allThumbnails instance
    allThumbnails.addChild(thumbLoader);
    allThumbnails.buttonMode = true;
    myScrollPane.update();
    thumbLoader.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source=thisLargeImage;
    selectedTitle.text=thisTitle;
    selectedDesc.text=thisDescription;
    //add to imageNum (1);
    imageNum++;
    if (imageNum<totalImages) {
    loadThumbnail();
    I know my error has something to do with this part of the code:
    //stores the appropriate info for thumbnail
    var thisLargeImage:String = largeImageArray[imageNum];
    var thisTitle:String = titleArray[imageNum];
    var thisDescription:String = descriptionArray[imageNum];
    but I can't figure out what's wrong. When I test my movie, everything functions correctly except when I click on a different thumbnail, the proper description does not load. My xml file is set up correctly. Here is a bit of that code:
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <!--Image 1-->
    <title>Spark Your Imagination Ad</title>
    <![CDATA[<description>These black & white ads were designed to run in the trade publication The Green Sheet in the Merchant Acquiring Industry</description>]]>
    <largeImage>assets/portfolio/lg/1.jpg</largeImage>
    <thumbImage>assets/portfolio/thumbs/1.jpg</thumbImage>
    <!--Image 2-->
    <title>Corporate Business Card - iMax Bancard</title>
    <![CDATA[<description>This full color double-sided business card is the current standard card being used by employees and agents of iMax Bancard</description>]]>
    <largeImage>assets/portfolio/lg/2.jpg</largeImage>
    <thumbImage>assets/portfolio/thumbs/2.jpg</thumbImage>
    </portfolio>
    The only thing different with my xml code is that in the tutorial I am following, the <description></description> tags are on the outside of the CDATA tags (which I have seen examples of both)... but when I put the code that way, it causes breaks in my code at the first special character I use.
    Any help is appreciated. Thanks, Jen

    click file/publish settings/flash and tick "permit debugging".  retest.  the line number with the non-existant object will be in the error message.

  • UIComponent+Button=TypeError: Error #2007: Parameter child must be non-null.

    I have created a super-simple Flash Component, -just a Button and TextArea together. These are both placed in 'assets' layer frame 2, with avatar in Frame 1, etc, and tied this to an ActionScript3 class, TestComponent.
    When I use this component, in say, Tester.fla, I get the following error,
    TestComponent1 Constructor called
    TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/addChildAt()
        at fl.controls::BaseButton/drawBackground()
        at fl.controls::LabelButton/draw()
        at fl.controls::Button/draw()
        at fl.core::UIComponent/callLaterDispatcher()
    If I include the 'Button' in Tester.fla library, the error goes away. But I don't have to do this for the TestArea.
    It appears that 'Button' need special treatment in Flash. I have seen this question asked several times before in different ways, and never answered.
    I would appreciate some explanation for this strange behavior, or if I designed my TestComponent incorrectly, then please advise on the correct design.
    Thanks
    Andrew

    click file/publish settings/flash and tick "permit debugging".   retest.  if you're lucky the line number of the problematic line of code will be in your error message.

Maybe you are looking for