BlazeDS and JBoss

Hi All,
I have this BlazeDS problem I need help with....
I need to get Flex application to "talk to" java on the back-end.
For that to work, as you know, I need BlazeDS and, among many, JBoss application server.
I was wondering if someone knows how to integrate BlazeDS with JBoss?
I got stuck with this part....
I've seen some tutorials on the Internet suggesting to just put blazeds.war file into JBoss' deploy directory.
(server/default/deploy/) I think was the path....
I tried that and in fact this worked. I was able to run sample application too.... Strange.
The problem is that I need to control and map my java class to the flex class, which involves editing some config file.
If I'm not mistaken this file is in the blazeds.war file so I can't really edit it. And what if I have to make a change to it?
I can't just figure this whole thing out and run Flex project in Eclipse that "talks to" a java class.
Please note that I have to use JBoss and NOT Tomcat. If I can just correctly integrate BlazeDS with JBoss I'll be half way there already....
Thanks for any suggestions. 
Gregg 

Hi,
You have 2 options.  Probably the preferred method during development is to use an expanded war.  Create a subdirectory in the deploy directory named blazeds.war and expand the blazeds war file into it.
If you are ready to deploy the webapp, you can jar the directory back up and deploy it as a war. But as you have seen you cannot make updates to config files or classes on the war file itself.
KenS

Similar Messages

  • How to use Flex builder with blazeds and JBoss

    Following the instructions it is pretty easy to set up a project to work with the turnkey tomcat. However, I am having problems with JBoss because the app has to be deployed as a .war file. I can create a war file manually and depoly it no problem. How do I get flex builder to deploy to a war file? I want to be able to debug in flex builder and run at the click of a button.

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

  • Channel error when working with BlazeDS and JBoss

    I am getting this error... can someone just help me on this front
    this is the mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert;
    import mx.events.ResizeEvent;
    public function showData(evt:ResultEvent):void{
    var data:String = evt.result as String;
    Alert.show(data);
    ]]>
    </mx:Script>
    <mx:RemoteObject id="remoteSend" destination="CreateRpc"
    result="showData(event)" />
    <mx:Button id ="myclick" label="Get Me"
    click="remoteSend.getResults('Priyank')"/>
    </mx:Application>
    =====================================
    remoting-config.xml entry for createrpc
    <destination id="CreateRpc">
    <properties>
    <source>RemoteServiceHandler</source>
    <scope>application</scope>
    </properties>
    <adapter ref="java-object"/>
    </destination>
    ========================== error i get ===============
    [RPC Fault faultString="Send failed"
    faultCode="Client.Error.MessageSend"
    faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed:
    HTTP: Status 404: url: 'http://localhost:9081/biz/messagebroker/amf'"]
    Any solutions

    Ensure the services-config.xml on the running server contains the same
    channel definition as the services-config.xml you point at when you compile
    the Flex application.
    It looks like the application is attempting to use a URL
    ('http://localhost:9081/biz/messagebroker/amf') that the server is not
    listening to (404 not found).
    Hope that helps
    Tom Jordahl

  • Can Flex get faster using BLAZEDS with JBOSS

    how can i make the data push faster?
    i develop an application on java that reads data from a gps located in a car, and other java receive this data. im actually sending the data to FLEX using BlazeDS and JBoss as application server, but i dont know why it's too slow,
    flex receive the data push every 3 seconds or more, and i want to be able to receive as much data as i want!!
    my question is, can i make flex faster receiving this data!?
    i need to receive the data faster to actually show on real time the position of the car,
    thanks

    Looks like you guys have blazeds up and running inside JBoss. I'm actually having trouble getting this up and running. Can you provide some info on how you set it up? Here are my configs:
    activemq-jms-ds.xml:
          jms/testTopic
          jboss.jca:service=RARDeployment,name='activemq-ra.rar'
          javax.jms.Topic
          PhysicalName=test.topic
    messaging_config.xml :
                    Topic
                    javax.jms.TextMessage
                    activemq/TopicConnectionFactory
                    jms/testTopic
                    NON_PERSISTENT
                    DEFAULT_PRIORITY
                    "true"
                    AUTO_ACKNOWLEDGE
                    1
    What am I missing? Look forward to hearing from you guys. Thanks in advance.

  • Integrate Adobe Flex and JBOSS using BlazeDS

    I using this link http://simplyolaf.blogspot.com/2009/07/integrate-adobe-flex-and-jboss-using.html to create Flex Project for Blaze DS. I added the following arguments to the flex compiler: -services "F:/java_WS/iASCUE/WebContent/WEB-INF/flex/services-config.xml" . Can I define relate path? when I put my project on other server it don't work

    Does anybody something know?

  • Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )

    Hi,
         We are running our flex application in jboss clustering environment with the help of Apache mod_jk(Apache Web server as front end with mod_ssl enabled). We are using the SecureAMFChannel as we deploy the application in SSL. We use the RemoteObject for communicating with Java.
    The Application is running fine when we have only one node of JBoss. But once we add one more node to the cluster the application throws the following exception .
    Duplicate HTTP-based FlexSession error: A request for FlexClient 'FDCA49A7-9317-4D8A-881F-9248B1136E7A' arrived over a new FlexSession 'C9C563B8266A03C2207C00796CD7DFF1', but FlexClient is already associated with  FlexSession '8A328320F5C530D55E94568996A1B552', therefore it cannot be associated with the new session.
    As I am maintaing the session in the server, I need to use the JBoss cluster for session replication. I heard that flex clustering is not needed as we have mod_jk and it will do all the stuff for us.
    I checked with simple application without any session data also then too I faced the same problem.
    After the very first login, I can see 2 session created simultaneously and destroyed. I checked the application whether it calls twice before the session is created, but it is calling only once.
    Also when application connects with server2 and if I down the server2 my flex application throws the error that the server is not found, It is not detecting the other server.But it works once I refresh the browser.
    Application Environment Details
    JBoss 6
    Blaze Ds 4.5
    Apache Web server 2.2.21
    Mod_JK   1.2.32
    Mod_SSL 2.8.31
    Thanks,
    Suresh T
    I enabled the sticky session in Mod_jk .
    It is working when the connection is not secure(http) in both apache web server and jboss web server ). But when the connection is https the above problem is happening .
    Message was edited by: suresh.thirumurugan

    Hi,
     Thanks for your info.
      It worked for me as well.
    Thanks,
    Prasad
    On 6/26/08,
    Matthieu Labour <
    [email protected]> wrote:
    A new message was posted by Matthieu Labour in
    Configuration and Getting Started Discussion --
      Problem with configuring BlazeDS with JBOSS
    You might want to download the following tutorial
    http://sebastien-arbogast.com/2008/04/10/flex-spring-and-blazeds-the-full-stack/
    it works on jboss
    Best
    Matt
    View/reply at
    Problem with configuring BlazeDS with JBOSS
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.

  • How to store an image into MySQL db using BlazeDS and Hibernate?

    Hi!
    I am using Flash Builder 4.6, BlazeDS, and Hibernate. How to store a webcam snapshot into the MySql Database. I stored Form Items by using RemoteObject into the database. But I failed to store webcam snapshot. I captured that image on Panel component.I converted that image to ByteArray. Now I want to save that image into the database. Please help me in this regard.
    thanks in advance.
    Here the Code:
    VisitorEntryForm.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:vo="com.visitor.vo.*"
              width="600"
              height="300"
              defaultButton="{submitButton}"
              showCloseButton="true"
              creationComplete="creationCompleteHandler();"
              close="PopUpManager.removePopUp(this);"
              title="Visitor Entry Form" xmlns:text="flash.text.*">
              <mx:RemoteObject id="saveService" destination="visitorService" result="handleSaveResult(event)" fault="handleFault(event)" showBusyCursor="true" />
              <vo:Visitor id="visitor"
                                               vType="{vTypeField.text}"
                                               vPurpose="{vPurposeField.text}"
                                               vName="{vNameField.text}"
                                               vAddress="{vAddressField.text}"
                                               cPerson="{cPersonField.text}"
                                               cAddress="{cAddressField.text}"
                                     />
                        <mx:Script>
                        <![CDATA[
                        import mx.managers.PopUpManager;
                        import flash.media.Camera;
                        import com.visitor.vo.WebCam;
                        import com.visitor.vo.Base64;
                        import mx.core.UIComponent;
                        import mx.graphics.codec.JPEGEncoder;
                        import mx.controls.Alert;
                        import mx.containers.Canvas;
                        import mx.rpc.events.ResultEvent;
                        import mx.rpc.events.FaultEvent;
                        import mx.events.ValidationResultEvent;
                        import mx.validators.Validator;
                                  [Bindable]
                                  private var webCam: com.visitor.vo.WebCam;
                                  [Bindable]
                                  private var message:String;
                                  [Bindable]
                                  private var formIsValid:Boolean = false;
                                  [Bindable]
                                  public var formIsEmpty:Boolean;
                                  private var focussedFormControl:DisplayObject;
                                  private function handleSaveResult(ev:ResultEvent):void {
                                            clearFormHandler();
                                            validateForm(ev);
                                            Alert.show("Visitor successfully created/updated.", "Information", Alert.OK, null, null, null, Alert.OK);
                                            // Reload the list.
                                            parentApplication.listConsultants.loaderService.getConsultants();
                                            PopUpManager.removePopUp(this);
                                  private function handleFault(ev:FaultEvent):void {
                                            message = "Error: " + ev.fault.faultCode + " \n "
                                                      + "Detail: " + ev.fault.faultDetail + " \n "
                                                      + "Message: " + ev.fault.faultString;
                                  public function saveVisitor():void {
                                            saveService.addUpdateVisitor(visitor);
                                  private function creationCompleteHandler():void {
                                            init();
                                            PopUpManager.centerPopUp(this);
                                            resetFocus();
                                  private function resetFocus():void {
                                            focusManager.setFocus(vTypeField);
                                  public function validateForm(event:Event):void  {
                                            focussedFormControl = event.target as DisplayObject;   
                                            formIsValid = true;
                                            // Check if form is empty
                                            formIsEmpty = (vTypeField.text == "" && vPurposeField.text == "" && vNameField.text == "" && vAddressField.text == "" && cPersonField.text == "" && cAddressField.text == "");
                                            validate(vTypeValidator);               
                                            validate(vPurposeValidator);
                                            validate(vNameValidator);
                                            validate(vAddressValidator);
                                            validate(cPersonValidator);
                                            validate(cAddressValidator);
                                  private function validate(validator:Validator):Boolean {
                                            var validatorSource:DisplayObject = validator.source as DisplayObject;
                                            var suppressEvents:Boolean = (validatorSource != focussedFormControl);
                                            var event:ValidationResultEvent = validator.validate(null, suppressEvents);
                                            var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID);
                                            formIsValid = formIsValid && currentControlIsValid;
                                            return currentControlIsValid;
                                  private function clearFormHandler():void {
                                            // Clear all input fields.
                                            vTypeField.text = "";
                                            vPurposeField.text = "";
                                            vNameField.text = "";
                                            vAddressField.text = "";
                                            cPersonField.text = "";
                                            cAddressField.text = "";
                                            message = "";
                                            // Clear validation error messages.
                                            vTypeField.errorString = "";
                                            vPurposeField.errorString = "";
                                            vNameField.errorString = "";
                                            vAddressField.errorString = "";
                                            cPersonField.errorString = "";
                                            cAddressField.errorString = "";
                                            formIsEmpty = true;
                                            formIsValid = false;
                                            resetFocus();
                                  private function init():void {
                                  webCam = new WebCam(97,97);
                                  var ref:UIComponent = new UIComponent();
                                  preview.removeAllChildren();
                                  preview.addChild(ref);
                                  ref.addChild(webCam);
                                  private function takeSnapshot():void {
                                  imageViewer.visible = true;
                                  imageViewer.width = preview.width;
                                  imageViewer.height = preview.height;
                                  var uiComponent : UIComponent = new UIComponent();
                                  uiComponent.width = webCam.width;
                                  uiComponent.height = webCam.height;
                                  var photoData:Bitmap = webCam.getSnapshot();
                                  var photoBitmap:BitmapData = photoData.bitmapData;
                                  uiComponent.addChild(photoData);
                                  imageViewer.removeAllChildren();
                                  imageViewer.addChild(uiComponent);
                                  private function uploadSnapshot():void
                                            if (imageViewer.getChildren().length > 0)
                                                      var uic:UIComponent = imageViewer.getChildAt(0) as UIComponent;
                                                      var bitmap:Bitmap = uic.getChildAt(0) as Bitmap;
                                                      var jpgEncoder:JPEGEncoder = new JPEGEncoder(75);
                                                      var jpgBytes:ByteArray = jpgEncoder.encode(bitmap.bitmapData);
                                  private function deleteSnapshot():void
                                            imageViewer.removeAllChildren();
                        ]]>
                        </mx:Script>
              <mx:StringValidator id="vTypeValidator"          source="{vTypeField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vPurposeValidator" source="{vPurposeField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vNameValidator"          source="{vNameField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vAddressValidator"          source="{vAddressField}"          property="text" minLength="5" required="true" />
              <mx:StringValidator id="cPersonValidator" source="{cPersonField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="cAddressValidator"          source="{cAddressField}"          property="text" minLength="5" required="true" />
              <mx:Grid width="575" height="211">
                        <mx:GridRow width="575" height="211">
                                  <mx:GridItem width="301" height="235">
                                            <mx:Form width="301" height="208">
                                                      <mx:FormItem label="Visitor's Type">
                                                                <mx:ComboBox id="vTypeField" text="{visitor.vType}" change="validateForm(event);" editable="true">
                                                                          <mx:Array>
                                                                                    <mx:String></mx:String>
                                                                                    <mx:String>Contractor</mx:String>
                                                                                    <mx:String>Supplier</mx:String>
                                                                                    <mx:String>Transporter</mx:String>
                                                                                    <mx:String>Plant</mx:String>
                                                                                    <mx:String>Non-Plant</mx:String>
                                                                          </mx:Array>
                                                                </mx:ComboBox>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Visit Purpose">
                                                                <mx:ComboBox id="vPurposeField" text="{visitor.vPurpose}" change="validateForm(event);" editable="true">
                                                                          <mx:Array>
                                                                                    <mx:String></mx:String>
                                                                                    <mx:String>Official</mx:String>
                                                                                    <mx:String>Personal</mx:String>
                                                                          </mx:Array>
                                                                </mx:ComboBox>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Visitor's Name">
                                                                <mx:TextInput id="vNameField"  text="{visitor.vName}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Address">
                                                                <mx:TextInput id="vAddressField"   text="{visitor.vAddress}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Contact Person">
                                                                <mx:TextInput id="cPersonField"  text="{visitor.cPerson}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Address">
                                                                <mx:TextInput id="cAddressField"  text="{visitor.cAddress}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      </mx:Form>
                                  </mx:GridItem>
                                  <mx:GridItem width="264" height="193">
                                            <mx:Grid width="241" height="206">
                                                      <mx:GridRow width="100%" height="100%">
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
                                                                          <mx:Panel width="100" height="132" title="Snap" id="preview" layout="absolute"/>
                                                                </mx:GridItem>
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
                                                                          <mx:Panel width="100" height="132" title="Preview" id="imageViewer"  layout="absolute"/>
                                                                </mx:GridItem>
                                                      </mx:GridRow>
                                                      <mx:GridRow width="100%" height="27" >
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center">
                                                                          <mx:Button id="snapshot" x="2" width="106" height="27" label="Snap"
                                                                                                  click="takeSnapshot();"/>
                                                                </mx:GridItem>
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center">
                                                                          <mx:Button id="deleteButton" x="1" width="106" height="27" label="Delete"
                                                                                                  click="deleteSnapshot();"/>
                                                                </mx:GridItem>
                                                      </mx:GridRow>
                                            </mx:Grid>
                                  </mx:GridItem>
                        </mx:GridRow>
              </mx:Grid>
              <mx:ControlBar height="40" horizontalAlign="center">
                        <mx:Button label="Save Visitor"          id="submitButton" enabled="{formIsValid}" click="saveVisitor();" />
                        <mx:Button label="Clear form" enabled="{!formIsEmpty}"          click="clearFormHandler();" />
                        <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/>
                        <mx:Label width="211" id="state"/>
              </mx:ControlBar>
              <mx:Text text="{message}" fontWeight="bold" width="300"/>
    </mx:TitleWindow>
    ListVisitors.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:view="com.visitor.view.*"
              width="100%"
              height="100%"
              title="Visitor Management System - Found {visitorRecords} visitors."
              creationComplete="loadVisitors();">
              <mx:RemoteObject id="loaderService" destination="visitorService" result="handleLoadResult(event)"          fault="handleFault(event)" showBusyCursor="true" />
              <mx:RemoteObject id="deleteService" destination="visitorService" result="handleDeleteResult(event)"          fault="handleFault(event)" showBusyCursor="true" />
              <mx:Script>
                        <![CDATA[
                                  import com.visitor.vo.Visitor;
                                  import mx.controls.Alert;
                                  import mx.managers.PopUpManager;
                                  import mx.containers.TitleWindow;
                                  import mx.collections.ArrayCollection;
                                  import mx.rpc.events.ResultEvent;
                                  import mx.rpc.events.FaultEvent;
                                  [Bindable]
                                  private var message:String;
                                  [Bindable]
                                  private var visitors:ArrayCollection = new ArrayCollection();
                                  [Bindable]
                                  private var visitorRecords:int = 0;
                                  public function loadVisitors():void {
                                            loaderService.getVisitors();
                                  private function deleteVisitor():void {
                                            if(dataGrid.selectedItem != null) {
                                                      var selectedItem:Visitor = dataGrid.selectedItem as Visitor;
                                                      deleteService.deleteVisitor(selectedItem.visitorId);
                                  private function createVisitor():void {
                                            var titleWindow:VisitorEntryForm = VisitorEntryForm(PopUpManager.createPopUp(this, VisitorEntryForm, true));
                                            titleWindow.setStyle("borderAlpha", 0.9);
                                            titleWindow.formIsEmpty = true;
                                  private function updateVisitor():void {
                                            var titleWindow:VisitorEntryForm = VisitorEntryForm(PopUpManager.createPopUp(this, VisitorEntryForm, true));
                                            titleWindow.setStyle("borderAlpha", 0.9);
                                            titleWindow.visitor = dataGrid.selectedItem as Visitor;
                                            titleWindow.formIsEmpty = false;
                                  private function handleLoadResult(ev:ResultEvent):void {
                                            visitors = ev.result as ArrayCollection;
                                            visitorRecords = visitors.length;
                                  private function handleDeleteResult(ev:ResultEvent):void {
                                            Alert.show("The visitor has been deleted.", "Information", Alert.OK, null, null, null, Alert.OK);
                                            loadVisitors();
                                  private function handleFault(ev:FaultEvent):void {
                                            message = "Error: "
                                                      + ev.fault.faultCode + " - "
                                                      + ev.fault.faultDetail + " - "
                                                      + ev.fault.faultString;
                        ]]>
              </mx:Script>
              <mx:VBox width="100%" height="100%">
                        <mx:Label text="{message}" fontWeight="bold" includeInLayout="false" />
                        <mx:DataGrid
                                  id="dataGrid"
                                  width="100%"
                                  height="100%"
                                  dataProvider="{visitors}"
                                  doubleClickEnabled="true"
                                  doubleClick="updateVisitor()" >
                                  <mx:columns>
                                            <mx:DataGridColumn dataField="visitorId"          headerText="Visitor ID" width="100"/>
                                            <mx:DataGridColumn dataField="vType"                    headerText="Visitor's Type" />
                                            <mx:DataGridColumn dataField="vPurpose"           headerText="Visit Purpose" />
                                            <mx:DataGridColumn dataField="vName"                     headerText="Visitor's Name" />
                                            <mx:DataGridColumn dataField="vAddress"                    headerText="Visitor's Address" />
                                            <mx:DataGridColumn dataField="cPerson"                     headerText="Contact Person" />
                                            <mx:DataGridColumn dataField="cAddress"                    headerText="Contact Address" />
                                            <mx:DataGridColumn dataField="timeIn"                     headerText="Time-In" />
                                            <mx:DataGridColumn dataField="timeOut"                     headerText="Time-Out" />
                                            <mx:DataGridColumn dataField="vPhoto"                     headerText="Visitor's Photo" />
                                  </mx:columns>
                        </mx:DataGrid>
                        <mx:ControlBar horizontalAlign="center">
                                  <mx:Button label="Create Visitor"          click="createVisitor()"          toolTip="Create a new visitor and store it in the database." />
                                  <mx:Button label="Update Visitor"          click="updateVisitor()"           enabled="{dataGrid.selectedItem}" toolTip="Update an existing database visitor." />
                                  <mx:Button label="Delete Visitor"          click="deleteVisitor()"          enabled="{dataGrid.selectedItem}" toolTip="Delete the visitor from the database." />
                                  <mx:Button label="Reload Data"                    click="loadVisitors()"           toolTip="Reload the visitor list from the database." />
                        </mx:ControlBar>
              </mx:VBox>
    </mx:Panel>
    Visitor.as
    package com.visitor.vo
              import mx.controls.Image;
              import spark.primitives.BitmapImage;
              [Bindable]
              [RemoteClass(alias="com.visitor.Visitor")]
              public class Visitor
                        public function Visitor()
                        public var visitorId:Number;
                        public var vType:String;
                        public var vPurpose:String;
                        public var vName:String;
                        public var vAddress:String;
                        public var cPerson:String;
                        public var cAddress:String;
                        public var timeIn:Date;
                        public var timeOut:Date;
                       public var vPhoto: Image;
    Visitor.java
    package com.visitor;
    import java.sql.Blob;
    import java.sql.Timestamp;
    import javax.persistence.Basic;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import org.hibernate.annotations.Index;
    @Entity
    @Table(name = "visitors")
    @NamedQueries( {
                        @NamedQuery(name = "visitors.findAll", query = "from Visitor"),
                        @NamedQuery(name = "visitors.byId", query = "select v from Visitor v where v.visitorId= :visitorId") })
    public class Visitor {
              @Id
              @GeneratedValue(strategy = GenerationType.AUTO)
              @Column(name = "visitorId", nullable = false)
              private Long visitorId;
              @Basic
              @Index(name = "vType_idx_1")
              @Column(name = "vType", nullable = true, unique = false)
              private String vType;
              @Basic
              @Column(name = "vPurpose", nullable = true, unique = false)
              private String vPurpose;
              @Basic
              @Column(name = "vName", nullable = true, unique = false)
              private String vName;
              @Basic
              @Column(name = "vAddress", nullable = true, unique = false)
              private String vAddress;
              @Basic
              @Column(name = "cPerson", nullable = true, unique = false)
              private String cPerson;
              @Basic
              @Column(name = "cAddress", nullable = true, unique = false)
              private String cAddress;
              @Basic
              @Column(name = "timeIn", nullable = false, unique = false)
              private Timestamp timeIn;
              @Basic
              @Column(name = "timeOut", nullable = true, unique = false)
              private Timestamp timeOut;
              @Basic
              @Column(name = "vPhoto", nullable = true, unique = false)
              private Blob vPhoto;
              public Visitor() {
                        super();
              public Long getVisitorId() {
                        return visitorId;
              public void setVisitorId(Long visitorId) {
                        this.visitorId = visitorId;
              public String getvType() {
                        return vType;
              public void setvType(String vType) {
                        this.vType = vType;
              public String getvPurpose() {
                        return vPurpose;
              public void setvPurpose(String vPurpose) {
                        this.vPurpose = vPurpose;
              public String getvName() {
                        return vName;
              public void setvName(String vName) {
                        this.vName = vName;
              public String getvAddress() {
                        return vAddress;
              public void setvAddress(String vAddress) {
                        this.vAddress = vAddress;
              public String getcPerson() {
                        return cPerson;
              public void setcPerson(String cPerson) {
                        this.cPerson = cPerson;
              public String getcAddress() {
                        return cAddress;
              public void setcAddress(String cAddress) {
                        this.cAddress = cAddress;
              public Timestamp getTimeIn() {
                        return timeIn;
              public void setTimeIn(Timestamp timeIn) {
                        this.timeIn = timeIn;
              public Timestamp getTimeOut() {
                        return timeOut;
              public void setTimeOut(Timestamp timeOut) {
                        this.timeOut = timeOut;
              public Blob getvPhoto() {
                        return vPhoto;
              public void setvPhoto(Blob vPhoto) {
                        this.vPhoto = vPhoto;
    VisitorService.java
    package com.visitor;
    import java.sql.Timestamp;
    import java.util.Date;
    import java.util.List;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.EntityTransaction;
    import javax.persistence.Persistence;
    import javax.persistence.Query;
    import org.apache.log4j.Logger;
    public class VisitorService {
              private static final String PERSISTENCE_UNIT = "visitor_db";
              private static Logger logger = Logger.getLogger(VisitorService.class);
              public VisitorService() {
                        super();
              public List<Visitor> getvisitors() {
                        logger.debug("** getVisitors called...");
                        EntityManagerFactory entityManagerFactory = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = entityManagerFactory.createEntityManager();
                        Query findAllQuery = em.createNamedQuery("visitors.findAll");
                        List<Visitor> visitors = findAllQuery.getResultList();
                        if (visitors != null)
                                  logger.debug("** Found " + visitors.size() + " records:");
                        return visitors;
              public void addUpdateVisitor(Visitor visitor) throws Exception {
                        logger.debug("** addUpdateVisitor called...");
                        EntityManagerFactory emf = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = emf.createEntityManager();
                        // When passing Boolean and Number values from the Flash client to a
                        // Java object, Java interprets null values as the default values for
                        // primitive types; for example, 0 for double, float, long, int, short,
                        // byte.
                        if (visitor.getVisitorId() == null          || visitor.getVisitorId() == 0) {
                                  // New consultant is created
                                  visitor.setVisitorId(null);
                                  visitor.setTimeIn(new Timestamp(new Date().getTime()));
                        } else {
                                  visitor.setTimeOut(new Timestamp(new Date().getTime()));
                                  // Existing consultant is updated - do nothing.
                        EntityTransaction tx = em.getTransaction();
                        tx.begin();
                        try {
                                  em.merge(visitor);
                                  tx.commit();
                        } catch (Exception e) {
                                  logger.error("** Error: " + e.getMessage());
                                  tx.rollback();
                                  throw new Exception(e.getMessage());
                        } finally {
                                  logger.info("** Closing Entity Manager.");
                                  em.close();
              public void deleteVisitor(Long visitorId) {
                        logger.debug("** deleteVisitor called...");
                        EntityManagerFactory emf = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = emf.createEntityManager();
                        Query q = em.createNamedQuery("visitors.byId");
                        q.setParameter("visitorId", visitorId);
                        Visitor visitor = (Visitor) q.getSingleResult();
                        if (visitor != null) {
                                  EntityTransaction tx = em.getTransaction();
                                  tx.begin();
                                  try {
                                            em.remove(visitor);
                                            tx.commit();
                                  } catch (Exception e) {
                                            logger.error("** Error: " + e.getMessage());
                                            tx.rollback();
                                  } finally {
                                            logger.info("** Closing Entity Manager.");
                                            em.close();
    remoting-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="remoting-service" class="flex.messaging.services.RemotingService">
              <adapters>
                        <adapter-definition id="java-object"
                                  class="flex.messaging.services.remoting.adapters.JavaAdapter"
                                  default="true" />
              </adapters>
              <default-channels>
                        <channel ref="my-amf" />
              </default-channels>
              <!-- ADC Demo application -->
              <destination id="visitorService">
                        <properties>
                                  <source>com.visitor.VisitorService</source>
                        </properties>
              </destination>
    </service>

    Hi!
    I am using Flash Builder 4.6, BlazeDS, and Hibernate. How to store a webcam snapshot into the MySql Database. I stored Form Items by using RemoteObject into the database. But I failed to store webcam snapshot. I captured that image on Panel component.I converted that image to ByteArray. Now I want to save that image into the database. Please help me in this regard.
    thanks in advance.
    Here the Code:
    VisitorEntryForm.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:vo="com.visitor.vo.*"
              width="600"
              height="300"
              defaultButton="{submitButton}"
              showCloseButton="true"
              creationComplete="creationCompleteHandler();"
              close="PopUpManager.removePopUp(this);"
              title="Visitor Entry Form" xmlns:text="flash.text.*">
              <mx:RemoteObject id="saveService" destination="visitorService" result="handleSaveResult(event)" fault="handleFault(event)" showBusyCursor="true" />
              <vo:Visitor id="visitor"
                                               vType="{vTypeField.text}"
                                               vPurpose="{vPurposeField.text}"
                                               vName="{vNameField.text}"
                                               vAddress="{vAddressField.text}"
                                               cPerson="{cPersonField.text}"
                                               cAddress="{cAddressField.text}"
                                     />
                        <mx:Script>
                        <![CDATA[
                        import mx.managers.PopUpManager;
                        import flash.media.Camera;
                        import com.visitor.vo.WebCam;
                        import com.visitor.vo.Base64;
                        import mx.core.UIComponent;
                        import mx.graphics.codec.JPEGEncoder;
                        import mx.controls.Alert;
                        import mx.containers.Canvas;
                        import mx.rpc.events.ResultEvent;
                        import mx.rpc.events.FaultEvent;
                        import mx.events.ValidationResultEvent;
                        import mx.validators.Validator;
                                  [Bindable]
                                  private var webCam: com.visitor.vo.WebCam;
                                  [Bindable]
                                  private var message:String;
                                  [Bindable]
                                  private var formIsValid:Boolean = false;
                                  [Bindable]
                                  public var formIsEmpty:Boolean;
                                  private var focussedFormControl:DisplayObject;
                                  private function handleSaveResult(ev:ResultEvent):void {
                                            clearFormHandler();
                                            validateForm(ev);
                                            Alert.show("Visitor successfully created/updated.", "Information", Alert.OK, null, null, null, Alert.OK);
                                            // Reload the list.
                                            parentApplication.listConsultants.loaderService.getConsultants();
                                            PopUpManager.removePopUp(this);
                                  private function handleFault(ev:FaultEvent):void {
                                            message = "Error: " + ev.fault.faultCode + " \n "
                                                      + "Detail: " + ev.fault.faultDetail + " \n "
                                                      + "Message: " + ev.fault.faultString;
                                  public function saveVisitor():void {
                                            saveService.addUpdateVisitor(visitor);
                                  private function creationCompleteHandler():void {
                                            init();
                                            PopUpManager.centerPopUp(this);
                                            resetFocus();
                                  private function resetFocus():void {
                                            focusManager.setFocus(vTypeField);
                                  public function validateForm(event:Event):void  {
                                            focussedFormControl = event.target as DisplayObject;   
                                            formIsValid = true;
                                            // Check if form is empty
                                            formIsEmpty = (vTypeField.text == "" && vPurposeField.text == "" && vNameField.text == "" && vAddressField.text == "" && cPersonField.text == "" && cAddressField.text == "");
                                            validate(vTypeValidator);               
                                            validate(vPurposeValidator);
                                            validate(vNameValidator);
                                            validate(vAddressValidator);
                                            validate(cPersonValidator);
                                            validate(cAddressValidator);
                                  private function validate(validator:Validator):Boolean {
                                            var validatorSource:DisplayObject = validator.source as DisplayObject;
                                            var suppressEvents:Boolean = (validatorSource != focussedFormControl);
                                            var event:ValidationResultEvent = validator.validate(null, suppressEvents);
                                            var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID);
                                            formIsValid = formIsValid && currentControlIsValid;
                                            return currentControlIsValid;
                                  private function clearFormHandler():void {
                                            // Clear all input fields.
                                            vTypeField.text = "";
                                            vPurposeField.text = "";
                                            vNameField.text = "";
                                            vAddressField.text = "";
                                            cPersonField.text = "";
                                            cAddressField.text = "";
                                            message = "";
                                            // Clear validation error messages.
                                            vTypeField.errorString = "";
                                            vPurposeField.errorString = "";
                                            vNameField.errorString = "";
                                            vAddressField.errorString = "";
                                            cPersonField.errorString = "";
                                            cAddressField.errorString = "";
                                            formIsEmpty = true;
                                            formIsValid = false;
                                            resetFocus();
                                  private function init():void {
                                  webCam = new WebCam(97,97);
                                  var ref:UIComponent = new UIComponent();
                                  preview.removeAllChildren();
                                  preview.addChild(ref);
                                  ref.addChild(webCam);
                                  private function takeSnapshot():void {
                                  imageViewer.visible = true;
                                  imageViewer.width = preview.width;
                                  imageViewer.height = preview.height;
                                  var uiComponent : UIComponent = new UIComponent();
                                  uiComponent.width = webCam.width;
                                  uiComponent.height = webCam.height;
                                  var photoData:Bitmap = webCam.getSnapshot();
                                  var photoBitmap:BitmapData = photoData.bitmapData;
                                  uiComponent.addChild(photoData);
                                  imageViewer.removeAllChildren();
                                  imageViewer.addChild(uiComponent);
                                  private function uploadSnapshot():void
                                            if (imageViewer.getChildren().length > 0)
                                                      var uic:UIComponent = imageViewer.getChildAt(0) as UIComponent;
                                                      var bitmap:Bitmap = uic.getChildAt(0) as Bitmap;
                                                      var jpgEncoder:JPEGEncoder = new JPEGEncoder(75);
                                                      var jpgBytes:ByteArray = jpgEncoder.encode(bitmap.bitmapData);
                                  private function deleteSnapshot():void
                                            imageViewer.removeAllChildren();
                        ]]>
                        </mx:Script>
              <mx:StringValidator id="vTypeValidator"          source="{vTypeField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vPurposeValidator" source="{vPurposeField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vNameValidator"          source="{vNameField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="vAddressValidator"          source="{vAddressField}"          property="text" minLength="5" required="true" />
              <mx:StringValidator id="cPersonValidator" source="{cPersonField}"          property="text" minLength="2" required="true" />
              <mx:StringValidator id="cAddressValidator"          source="{cAddressField}"          property="text" minLength="5" required="true" />
              <mx:Grid width="575" height="211">
                        <mx:GridRow width="575" height="211">
                                  <mx:GridItem width="301" height="235">
                                            <mx:Form width="301" height="208">
                                                      <mx:FormItem label="Visitor's Type">
                                                                <mx:ComboBox id="vTypeField" text="{visitor.vType}" change="validateForm(event);" editable="true">
                                                                          <mx:Array>
                                                                                    <mx:String></mx:String>
                                                                                    <mx:String>Contractor</mx:String>
                                                                                    <mx:String>Supplier</mx:String>
                                                                                    <mx:String>Transporter</mx:String>
                                                                                    <mx:String>Plant</mx:String>
                                                                                    <mx:String>Non-Plant</mx:String>
                                                                          </mx:Array>
                                                                </mx:ComboBox>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Visit Purpose">
                                                                <mx:ComboBox id="vPurposeField" text="{visitor.vPurpose}" change="validateForm(event);" editable="true">
                                                                          <mx:Array>
                                                                                    <mx:String></mx:String>
                                                                                    <mx:String>Official</mx:String>
                                                                                    <mx:String>Personal</mx:String>
                                                                          </mx:Array>
                                                                </mx:ComboBox>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Visitor's Name">
                                                                <mx:TextInput id="vNameField"  text="{visitor.vName}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Address">
                                                                <mx:TextInput id="vAddressField"   text="{visitor.vAddress}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Contact Person">
                                                                <mx:TextInput id="cPersonField"  text="{visitor.cPerson}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      <mx:FormItem label="Address">
                                                                <mx:TextInput id="cAddressField"  text="{visitor.cAddress}" change="validateForm(event);"/>
                                                      </mx:FormItem>
                                                      </mx:Form>
                                  </mx:GridItem>
                                  <mx:GridItem width="264" height="193">
                                            <mx:Grid width="241" height="206">
                                                      <mx:GridRow width="100%" height="100%">
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
                                                                          <mx:Panel width="100" height="132" title="Snap" id="preview" layout="absolute"/>
                                                                </mx:GridItem>
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
                                                                          <mx:Panel width="100" height="132" title="Preview" id="imageViewer"  layout="absolute"/>
                                                                </mx:GridItem>
                                                      </mx:GridRow>
                                                      <mx:GridRow width="100%" height="27" >
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center">
                                                                          <mx:Button id="snapshot" x="2" width="106" height="27" label="Snap"
                                                                                                  click="takeSnapshot();"/>
                                                                </mx:GridItem>
                                                                <mx:GridItem width="100%" height="100%" horizontalAlign="center">
                                                                          <mx:Button id="deleteButton" x="1" width="106" height="27" label="Delete"
                                                                                                  click="deleteSnapshot();"/>
                                                                </mx:GridItem>
                                                      </mx:GridRow>
                                            </mx:Grid>
                                  </mx:GridItem>
                        </mx:GridRow>
              </mx:Grid>
              <mx:ControlBar height="40" horizontalAlign="center">
                        <mx:Button label="Save Visitor"          id="submitButton" enabled="{formIsValid}" click="saveVisitor();" />
                        <mx:Button label="Clear form" enabled="{!formIsEmpty}"          click="clearFormHandler();" />
                        <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/>
                        <mx:Label width="211" id="state"/>
              </mx:ControlBar>
              <mx:Text text="{message}" fontWeight="bold" width="300"/>
    </mx:TitleWindow>
    ListVisitors.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:view="com.visitor.view.*"
              width="100%"
              height="100%"
              title="Visitor Management System - Found {visitorRecords} visitors."
              creationComplete="loadVisitors();">
              <mx:RemoteObject id="loaderService" destination="visitorService" result="handleLoadResult(event)"          fault="handleFault(event)" showBusyCursor="true" />
              <mx:RemoteObject id="deleteService" destination="visitorService" result="handleDeleteResult(event)"          fault="handleFault(event)" showBusyCursor="true" />
              <mx:Script>
                        <![CDATA[
                                  import com.visitor.vo.Visitor;
                                  import mx.controls.Alert;
                                  import mx.managers.PopUpManager;
                                  import mx.containers.TitleWindow;
                                  import mx.collections.ArrayCollection;
                                  import mx.rpc.events.ResultEvent;
                                  import mx.rpc.events.FaultEvent;
                                  [Bindable]
                                  private var message:String;
                                  [Bindable]
                                  private var visitors:ArrayCollection = new ArrayCollection();
                                  [Bindable]
                                  private var visitorRecords:int = 0;
                                  public function loadVisitors():void {
                                            loaderService.getVisitors();
                                  private function deleteVisitor():void {
                                            if(dataGrid.selectedItem != null) {
                                                      var selectedItem:Visitor = dataGrid.selectedItem as Visitor;
                                                      deleteService.deleteVisitor(selectedItem.visitorId);
                                  private function createVisitor():void {
                                            var titleWindow:VisitorEntryForm = VisitorEntryForm(PopUpManager.createPopUp(this, VisitorEntryForm, true));
                                            titleWindow.setStyle("borderAlpha", 0.9);
                                            titleWindow.formIsEmpty = true;
                                  private function updateVisitor():void {
                                            var titleWindow:VisitorEntryForm = VisitorEntryForm(PopUpManager.createPopUp(this, VisitorEntryForm, true));
                                            titleWindow.setStyle("borderAlpha", 0.9);
                                            titleWindow.visitor = dataGrid.selectedItem as Visitor;
                                            titleWindow.formIsEmpty = false;
                                  private function handleLoadResult(ev:ResultEvent):void {
                                            visitors = ev.result as ArrayCollection;
                                            visitorRecords = visitors.length;
                                  private function handleDeleteResult(ev:ResultEvent):void {
                                            Alert.show("The visitor has been deleted.", "Information", Alert.OK, null, null, null, Alert.OK);
                                            loadVisitors();
                                  private function handleFault(ev:FaultEvent):void {
                                            message = "Error: "
                                                      + ev.fault.faultCode + " - "
                                                      + ev.fault.faultDetail + " - "
                                                      + ev.fault.faultString;
                        ]]>
              </mx:Script>
              <mx:VBox width="100%" height="100%">
                        <mx:Label text="{message}" fontWeight="bold" includeInLayout="false" />
                        <mx:DataGrid
                                  id="dataGrid"
                                  width="100%"
                                  height="100%"
                                  dataProvider="{visitors}"
                                  doubleClickEnabled="true"
                                  doubleClick="updateVisitor()" >
                                  <mx:columns>
                                            <mx:DataGridColumn dataField="visitorId"          headerText="Visitor ID" width="100"/>
                                            <mx:DataGridColumn dataField="vType"                    headerText="Visitor's Type" />
                                            <mx:DataGridColumn dataField="vPurpose"           headerText="Visit Purpose" />
                                            <mx:DataGridColumn dataField="vName"                     headerText="Visitor's Name" />
                                            <mx:DataGridColumn dataField="vAddress"                    headerText="Visitor's Address" />
                                            <mx:DataGridColumn dataField="cPerson"                     headerText="Contact Person" />
                                            <mx:DataGridColumn dataField="cAddress"                    headerText="Contact Address" />
                                            <mx:DataGridColumn dataField="timeIn"                     headerText="Time-In" />
                                            <mx:DataGridColumn dataField="timeOut"                     headerText="Time-Out" />
                                            <mx:DataGridColumn dataField="vPhoto"                     headerText="Visitor's Photo" />
                                  </mx:columns>
                        </mx:DataGrid>
                        <mx:ControlBar horizontalAlign="center">
                                  <mx:Button label="Create Visitor"          click="createVisitor()"          toolTip="Create a new visitor and store it in the database." />
                                  <mx:Button label="Update Visitor"          click="updateVisitor()"           enabled="{dataGrid.selectedItem}" toolTip="Update an existing database visitor." />
                                  <mx:Button label="Delete Visitor"          click="deleteVisitor()"          enabled="{dataGrid.selectedItem}" toolTip="Delete the visitor from the database." />
                                  <mx:Button label="Reload Data"                    click="loadVisitors()"           toolTip="Reload the visitor list from the database." />
                        </mx:ControlBar>
              </mx:VBox>
    </mx:Panel>
    Visitor.as
    package com.visitor.vo
              import mx.controls.Image;
              import spark.primitives.BitmapImage;
              [Bindable]
              [RemoteClass(alias="com.visitor.Visitor")]
              public class Visitor
                        public function Visitor()
                        public var visitorId:Number;
                        public var vType:String;
                        public var vPurpose:String;
                        public var vName:String;
                        public var vAddress:String;
                        public var cPerson:String;
                        public var cAddress:String;
                        public var timeIn:Date;
                        public var timeOut:Date;
                       public var vPhoto: Image;
    Visitor.java
    package com.visitor;
    import java.sql.Blob;
    import java.sql.Timestamp;
    import javax.persistence.Basic;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import org.hibernate.annotations.Index;
    @Entity
    @Table(name = "visitors")
    @NamedQueries( {
                        @NamedQuery(name = "visitors.findAll", query = "from Visitor"),
                        @NamedQuery(name = "visitors.byId", query = "select v from Visitor v where v.visitorId= :visitorId") })
    public class Visitor {
              @Id
              @GeneratedValue(strategy = GenerationType.AUTO)
              @Column(name = "visitorId", nullable = false)
              private Long visitorId;
              @Basic
              @Index(name = "vType_idx_1")
              @Column(name = "vType", nullable = true, unique = false)
              private String vType;
              @Basic
              @Column(name = "vPurpose", nullable = true, unique = false)
              private String vPurpose;
              @Basic
              @Column(name = "vName", nullable = true, unique = false)
              private String vName;
              @Basic
              @Column(name = "vAddress", nullable = true, unique = false)
              private String vAddress;
              @Basic
              @Column(name = "cPerson", nullable = true, unique = false)
              private String cPerson;
              @Basic
              @Column(name = "cAddress", nullable = true, unique = false)
              private String cAddress;
              @Basic
              @Column(name = "timeIn", nullable = false, unique = false)
              private Timestamp timeIn;
              @Basic
              @Column(name = "timeOut", nullable = true, unique = false)
              private Timestamp timeOut;
              @Basic
              @Column(name = "vPhoto", nullable = true, unique = false)
              private Blob vPhoto;
              public Visitor() {
                        super();
              public Long getVisitorId() {
                        return visitorId;
              public void setVisitorId(Long visitorId) {
                        this.visitorId = visitorId;
              public String getvType() {
                        return vType;
              public void setvType(String vType) {
                        this.vType = vType;
              public String getvPurpose() {
                        return vPurpose;
              public void setvPurpose(String vPurpose) {
                        this.vPurpose = vPurpose;
              public String getvName() {
                        return vName;
              public void setvName(String vName) {
                        this.vName = vName;
              public String getvAddress() {
                        return vAddress;
              public void setvAddress(String vAddress) {
                        this.vAddress = vAddress;
              public String getcPerson() {
                        return cPerson;
              public void setcPerson(String cPerson) {
                        this.cPerson = cPerson;
              public String getcAddress() {
                        return cAddress;
              public void setcAddress(String cAddress) {
                        this.cAddress = cAddress;
              public Timestamp getTimeIn() {
                        return timeIn;
              public void setTimeIn(Timestamp timeIn) {
                        this.timeIn = timeIn;
              public Timestamp getTimeOut() {
                        return timeOut;
              public void setTimeOut(Timestamp timeOut) {
                        this.timeOut = timeOut;
              public Blob getvPhoto() {
                        return vPhoto;
              public void setvPhoto(Blob vPhoto) {
                        this.vPhoto = vPhoto;
    VisitorService.java
    package com.visitor;
    import java.sql.Timestamp;
    import java.util.Date;
    import java.util.List;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.EntityTransaction;
    import javax.persistence.Persistence;
    import javax.persistence.Query;
    import org.apache.log4j.Logger;
    public class VisitorService {
              private static final String PERSISTENCE_UNIT = "visitor_db";
              private static Logger logger = Logger.getLogger(VisitorService.class);
              public VisitorService() {
                        super();
              public List<Visitor> getvisitors() {
                        logger.debug("** getVisitors called...");
                        EntityManagerFactory entityManagerFactory = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = entityManagerFactory.createEntityManager();
                        Query findAllQuery = em.createNamedQuery("visitors.findAll");
                        List<Visitor> visitors = findAllQuery.getResultList();
                        if (visitors != null)
                                  logger.debug("** Found " + visitors.size() + " records:");
                        return visitors;
              public void addUpdateVisitor(Visitor visitor) throws Exception {
                        logger.debug("** addUpdateVisitor called...");
                        EntityManagerFactory emf = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = emf.createEntityManager();
                        // When passing Boolean and Number values from the Flash client to a
                        // Java object, Java interprets null values as the default values for
                        // primitive types; for example, 0 for double, float, long, int, short,
                        // byte.
                        if (visitor.getVisitorId() == null          || visitor.getVisitorId() == 0) {
                                  // New consultant is created
                                  visitor.setVisitorId(null);
                                  visitor.setTimeIn(new Timestamp(new Date().getTime()));
                        } else {
                                  visitor.setTimeOut(new Timestamp(new Date().getTime()));
                                  // Existing consultant is updated - do nothing.
                        EntityTransaction tx = em.getTransaction();
                        tx.begin();
                        try {
                                  em.merge(visitor);
                                  tx.commit();
                        } catch (Exception e) {
                                  logger.error("** Error: " + e.getMessage());
                                  tx.rollback();
                                  throw new Exception(e.getMessage());
                        } finally {
                                  logger.info("** Closing Entity Manager.");
                                  em.close();
              public void deleteVisitor(Long visitorId) {
                        logger.debug("** deleteVisitor called...");
                        EntityManagerFactory emf = Persistence
                                            .createEntityManagerFactory(PERSISTENCE_UNIT);
                        EntityManager em = emf.createEntityManager();
                        Query q = em.createNamedQuery("visitors.byId");
                        q.setParameter("visitorId", visitorId);
                        Visitor visitor = (Visitor) q.getSingleResult();
                        if (visitor != null) {
                                  EntityTransaction tx = em.getTransaction();
                                  tx.begin();
                                  try {
                                            em.remove(visitor);
                                            tx.commit();
                                  } catch (Exception e) {
                                            logger.error("** Error: " + e.getMessage());
                                            tx.rollback();
                                  } finally {
                                            logger.info("** Closing Entity Manager.");
                                            em.close();
    remoting-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <service id="remoting-service" class="flex.messaging.services.RemotingService">
              <adapters>
                        <adapter-definition id="java-object"
                                  class="flex.messaging.services.remoting.adapters.JavaAdapter"
                                  default="true" />
              </adapters>
              <default-channels>
                        <channel ref="my-amf" />
              </default-channels>
              <!-- ADC Demo application -->
              <destination id="visitorService">
                        <properties>
                                  <source>com.visitor.VisitorService</source>
                        </properties>
              </destination>
    </service>

  • Building the mod_jk between apche and jboss in solaris environment

    hi there,
    i have installed apache2 and running on one zone and jboss installed and running on another zone
    now when i connecting of them using the tomcat connector by building the mod_jk i am getting the error where i have followed the procedure in the following link:
    http://blogs.sun.com/shanti/entry/building_mod_jk
    from the above link i have downloaded the source and set the path and then when i am running the file which i have saved then i am getting the below error:
    ./configure --with-apxs=/usr/local/apache2/bin/apxs
    checking build system type... i386-pc-solaris2.10
    checking host system type... i386-pc-solaris2.10
    checking target system type... i386-pc-solaris2.10
    checking for a BSD-compatible install... scripts/build/unix/install-sh -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... no
    checking for nawk... nawk
    checking whether make sets $(MAKE)... yes
    checking for test... /usr/bin/test
    checking for rm... /usr/bin/rm
    checking for grep... /usr/bin/grep
    checking for echo... /usr/bin/echo
    checking for sed... /usr/bin/sed
    checking for cp... /usr/bin/cp
    checking for mkdir... /usr/bin/mkdir
    need to check for Perl first, apxs depends on it...
    checking for perl... /usr/bin/perl
    could not find /usr/local/apache2/bin/apxs
    configure: error: You must specify a valid --with-apxs path
    if any body has encountered such a problem please give me the reply
    thank you for all

    hi o.bogosavljevic
    yes i am using that package only
    what might be the path of the aspx

  • Getting started with Flex Builder, BlazeDS and Eclipse

    Hi,
    I'm a java developer looking at RIA for the first time. I'm really excited about BlazeDS and object remoting, but I can't get a working dev environment together. I'm assuming I should use Flex Builder for the client code, Eclipse Europa for the java webapp code, and deploy from both IDEs into the BlazeDS-equipped turnkey-Tomcat. I haven't found a tutorial explaining how to deploy a new webapp with this setup.
    The turnkey-Tomcat sample app works fine. Trouble starts when I try to create  a new project in Flex Builder. I don't understand the 'debug' deployment that Flex Builder does. Why are there 2 versions of my app, the regular and the debug versions? What is exactly the project structure that I'm supposed to have in Tomcat?
    The specific error I encounter when trying to deploy a new Flex project is this:
    [MessagingError message='Destination 'productService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
    I do have a default channel configured for my environment in services-config:
    And I do have a valid destination configured in remoting-config (I'm mostly interested in object remoting):
                test.ProductService
    Here's the client code:
    What am I doing wrong? Where can I get help on these specific topics? Also, does anyone have an Ant build file that would automate this sort of deployment?
    Thanks!

    Hi Peter,<br />I don't have problems passing JavaBeans to Flex. For collections, I used DataGrid, it displayed my collection seamlessly, except I don't get column headers, just a column index number. For receiving a single JavaBean, I had a little more trouble, until I tried to display it with a DataGrid: it displayed a single row that represented my data, with each java property name used as a column header, and object attributes were displayed as 'object'. These 2 experiences led me to these conclusions:<br />- for the collection, Flex converted each element into an ordered list of attributes<br />- for the single bean, Flex converted it into a hierarchy of Maps of attributes<br /><br />I didn't create a Flex value object. Flex is doing it automatically,very much like in JavaScript/JSON: dynamic objects.<br /><br />Here's the remote object markup:<br /><br /><!-- We target the remote Java object through BlazeDS gateway: --><br />     <mx:RemoteObject id="myRemoteObject" destination="productService" <br />                          fault="Alert.show(event.fault.faultString, 'Error');"><br />          <mx:method name="getProductsCount" result="setProductsCount(event)"><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProducts"><br />          <!-- search params are wrapped in a model, ProductSC (will be converted to a Map on <br />                the server side by BlazeDS): --><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />                    <!-- This works because we declared these to be Bindable: --><br />                    <arg2>{pager.pageSize}</arg2><br />                    <arg3>{pager.currentPage}</arg3><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProduct" result="goToView()"><br />          <!--<mx:method name="getProduct">--><br />               <mx:arguments><br />                    <arg1>{selectedRecordId}</arg1><br />               </mx:arguments><br />          </mx:method><br />     </mx:RemoteObject><br /><br />And here's the dataGrid that displays the bean collection:<br /><br /><mx:DataGrid id="myDataGrid" <br />                               dataProvider="{myRemoteObject.getProducts.lastResult}" <br />                               change="selectRecord();"<br />                               width="100%" height="100%" ><br />               </mx:DataGrid><br /><br />Let me know how it goes, I'd be glad to assist if I can.<br />Miguel

  • [svn] 839: Moving the SuspendableAMFFilter classes to BlazeDS (and fix an @ author Javadoc tag in the SQLParser.jj grammar).

    Revision: 839
    Author: [email protected]
    Date: 2008-03-17 13:06:58 -0700 (Mon, 17 Mar 2008)
    Log Message:
    Moving the SuspendableAMFFilter classes to BlazeDS (and fix an @author Javadoc tag in the SQLParser.jj grammar).
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/selector/S QLParser.jj
    Added Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableAMFF ilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableBatc hProcessFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableLega cyFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableMess ageBrokerFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableSeri alizationFilter.java

    Revision: 839
    Author: [email protected]
    Date: 2008-03-17 13:06:58 -0700 (Mon, 17 Mar 2008)
    Log Message:
    Moving the SuspendableAMFFilter classes to BlazeDS (and fix an @author Javadoc tag in the SQLParser.jj grammar).
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/selector/S QLParser.jj
    Added Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableAMFF ilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableBatc hProcessFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableLega cyFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableMess ageBrokerFilter.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/amf/SuspendableSeri alizationFilter.java

  • Some advice please, BlazeDS and some ideas

    HEllo all,
    I am planning on building an app out, that has two versions,  viewer and admin.  The admin will be allowed to upload images, and then display an image of choice on the viewers page,  and be able to change these images at will, with the viewers page automatically updating.
    Kind of like a daynamic image sharing thing.
    Now i have been doing some research in how to do this, and stumbled along BlazeDS,  and am wondering if something like this is possible with Blaze, i know it can support sending and recieving text based messages really well, but dose it suppose images in the same way ?
    Any advice would be great !

    hi,
    You would still use the messageing system of blaze to tell a user an image has been modified then tehy would download it again, much the same way we did with the video app you would have a key word in the message that triggers a dowload event.
    For instance a user uploads an image when the event complete is fired it feeds a message to the server "imageUL:image001.jpg" the serevr then posts a message to all clients "imageED:USR:image001.jpg"
    when you get the message it fires the download event because ther first 7 characters ="imageED, the character between the colons is the user id so if you where the one that updated the image you would not proceed to download the image.
    David.

  • How to compile jsp project on the plateform of Myeclipse and jboss

    hi
    I m new in jboss application server with myeclipse plateform.
    im unable to solve this error.which are occured doring the starting of server in my eclipse.
    the error is:-----
    13:12:41,484 INFO [Server] Starting JBoss (MX MicroKernel)...
    13:12:41,500 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
    13:12:41,515 INFO [Server] Home Dir: C:\Program Files\jboss-4.0.4.GA
    13:12:41,515 INFO [Server] Home URL: file:/C:/Program Files/jboss-4.0.4.GA/
    13:12:41,515 INFO [Server] Patch URL: null
    13:12:41,515 INFO [Server] Server Name: default
    13:12:41,515 INFO [Server] Server Home Dir: C:\Program Files\jboss-4.0.4.GA\server\default
    13:12:41,515 INFO [Server] Server Home URL: file:/C:/Program Files/jboss-4.0.4.GA/server/default/
    13:12:41,531 INFO [Server] Server Log Dir: C:\Program Files\jboss-4.0.4.GA\server\default\log
    13:12:41,531 INFO [Server] Server Temp Dir: C:\Program Files\jboss-4.0.4.GA\server\default\tmp
    13:12:41,531 INFO [Server] Root Deployment Filename: jboss-service.xml
    13:12:44,015 INFO [ServerInfo] Java version: 1.4.2_05,Sun Microsystems Inc.
    13:12:44,015 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_05-b04,Sun Microsystems Inc.
    13:12:44,015 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
    13:12:45,750 INFO [Server] Core system initialized
    13:12:55,515 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
    13:13:09,218 INFO [WebService] Using RMI server codebase: http://shabrez:8083/
    13:13:19,578 INFO [MailService] Mail Service bound to java:/Mail
    13:13:20,484 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
    13:13:20,718 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
    13:13:25,109 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000D8000102000000000E3139322E3136382E302E313331000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000005000000000000000010000000000000024000000200000007E00000000000000010000000E3139322E3136382E302E313331000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
    13:13:25,812 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000D8000102000000000E3139322E3136382E302E313331000DC8000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000005000000000000000010000000000000024000000200000007E00000000000000010000000E3139322E3136382E302E313331000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
    13:13:27,875 INFO [Embedded] Catalina naming disabled
    13:13:28,140 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
    13:13:28,140 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
    13:13:29,390 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
    13:13:29,390 INFO [Catalina] Initialization processed in 1250 ms
    13:13:29,406 INFO [StandardService] Starting service jboss.web
    13:13:29,406 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
    13:13:29,562 INFO [StandardHost] XML validation disabled
    13:13:29,640 INFO [Catalina] Server startup in 250 ms
    13:13:30,671 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
    13:13:31,906 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
    13:13:33,515 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
    13:13:34,015 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp13610jbossws-exp.war/
    13:13:34,531 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
    13:13:35,359 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
    13:13:39,453 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
    13:13:39,593 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
    13:13:39,687 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
    13:13:39,781 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
    13:13:39,906 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
    13:13:40,031 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
    13:13:44,234 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding' to JNDI name 'java:DefaultDS'
    13:13:45,640 INFO [A] Bound to JNDI name: queue/A
    13:13:45,656 INFO Bound to JNDI name: queue/B
    13:13:45,656 INFO [C] Bound to JNDI name: queue/C
    13:13:45,656 INFO [D] Bound to JNDI name: queue/D
    13:13:45,656 INFO [ex] Bound to JNDI name: queue/ex
    13:13:45,718 INFO [testTopic] Bound to JNDI name: topic/testTopic
    13:13:45,734 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
    13:13:45,734 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    13:13:45,750 INFO [testQueue] Bound to JNDI name: queue/testQueue
    13:13:46,000 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
    13:13:46,140 INFO [DLQ] Bound to JNDI name: queue/DLQ
    13:13:46,609 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
    13:13:46,750 ERROR [MainDeployer] Could not create deployment: file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/
    java.lang.UnsupportedClassVersionError: com/jbosstest/testJboss (Unsupported major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at org.jboss.ws.server.WebServiceDeployerJSE.isWebserviceDeployment(WebServiceDeployerJSE.java:151)
         at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:101)
         at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy41.create(Unknown Source)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
         at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy6.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:417)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy4.start(Unknown Source)
         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
         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:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy5.deploy(Unknown Source)
         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
         at org.jboss.Main.boot(Main.java:200)
         at org.jboss.Main$1.run(Main.java:464)
         at java.lang.Thread.run(Thread.java:534)
    13:13:47,000 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    13:13:47,625 INFO [TomcatDeployer] deploy, ctxPath=/testproject, warUrl=.../deploy/testproject.war/
    13:13:48,578 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- Incompletely deployed packages ---
    org.jboss.deployment.DeploymentInfo@abba8a12 { url=file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/ }
    deployer: MBeanProxyExt[jboss.web:service=WebServer]
    status: Deployment FAILED reason: com/jbosstest/testJboss (Unsupported major.minor version 49.0)
    state: FAILED
    watch: file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/WEB-INF/web.xml
    altDD: null
    lastDeployed: 1148111026703
    lastModified: 1147940958000
    mbeans:
    13:13:48,796 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
    13:13:49,125 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
    13:13:49,312 INFO [JkMain] Jk running ID=0 time=0/328 config=null
    13:13:49,328 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 1m:7s:797ms
    plz send me the solution of this error.
    Thanks.

    I m new in jboss application server with myeclipse plateform.
    im unable to solve this error.which are occured doring the starting of server in my eclipse.
    How to compile jsp project on the plateform of Myeclipse and jboss
    hi :-) this is not eclipse forum and not that sure about your problem but i'll try to answer :-)
    i'm not sure how you create your war but there something wrong with your web.xml. kindly check it :-)
    by d way, you can deploy your project in my-eclipse by
    - right click on the project then select my-eclipse > Add and Remove Project Deployment's
    - a new window will open and you can now configure how you deploy your project :-)
    other alternative edit your jboss-service.xml then put something like this
    <attribute name="URLs">deploy/, file:/D:/workspace/deploy</attribute>
    (note, change the path according to your needs)
    regards,

  • BlazeDS and JSF

    I have an existing JSF (really Oracle ADF) application that I'd like to connect to a Flex front-end rather than rewrite totally in Flex + JSPs for the back-end. BlazeDS will properly instantiate the managed beans through remote object requests, but the FacesContext references in my managed beans are null, as BlazeDS seems to have nothing to do with this context. Does anyone have experience connecting a Flex application to a JSF application properly, maybe through creating his/her own FacesContext factory?

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Hi,<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>It&#8217;s pretty easy to integrate blazeds into an existing application. <br />The war is just an example of how to configure and package blazeds.  BlazeDS<br />itself is just a servlet, with a collection of jars and some configuration<br />files.  You put the required jars into your WEB-INF/lib, the configuration files<br />into WEB-INF/flex (If I remember correctly), and then map the blazeds message<br />broker servlet in your web.xml file. You can open up the war file and see how it&#8217;s<br />configured there and base your configuration on that.  Depending on your needs<br />and your servlet container you may have to add a jar file to your container&#8217;s lib<br />or classpath.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>One of the benefits of blazeds is that if you&#8217;ve structured your<br />application so that you&#8217;ve abstracted the view then you can just plop bds right<br />in there and expose all your services through bds views.  It&#8217;s very powerful<br />that way.  <o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>If you&#8217;re still having trouble just write a response and I&#8217;ll<br />see what I can do.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>/r <o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Larry Guros<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Thursday, July 24, 2008 8:28 AM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: BlazeDS and JSF<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />Larry Guros in <br><br /><br><br /><b>General Discussion</b> --<br><br />  BlazeDS and JSF<br><br /><br><br />Ditto. I am guessing the answer is no one knows. <br><br /><br><br />Seems Blazeds is much better suited to flex-only applications and doesn't<br />integrate easily with other J2EE apps. <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b4b834/0">BlazeDS and JSF</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b4b834!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • Tomcat and JBoss

    Hello! I'm not that new to web programming in Java but there are some things that I think I need to fully understand. Can anyone here give me a comparison between Tomcat and JBoss? What are the similarities and key differences between the two? Tomcat is a servlet container while JBoss is an application container(?? not sure about that, still haven't read enough about it).
    Thanks in advance,
    Romaine

    Hi Romaine,
    Tomcat is not only a servelet container...its actually the webserver which is a servlet container and jsp engine as well.
    Where as JBOSS is one of the application servers where it provides the run time environment for the business components( the ejbs) in addition to the support environment for servlets and jsps.
    examples of application servers: JBOSS, WEBLOGIC, WEBSPHERE

  • Transaction Isolation level in WebSphere and JBOSS???

    Hi,
    How to set up the transaction isolation level in Websphere and JBOSS???
    In weblogic, we can set it in weblogic-ejb-jar.xml. Is there any other file where we can set the isolation level in websphere and jboss???
    What is the difference between all the 4 isolation levels such as
    1) Transaction_committed
    2) Transaction_uncommitted
    3)Transaction_Repeatable_read
    4)Transaction_serializable
    Thanks,
    JavaCrazyLover

    In WebSphere 5.1 you can set the isolation level using resource reference. The following link describes the steps involved in this operation. I am not aware how to do the same thing in JBoss.
    Regards,
    Neo

Maybe you are looking for

  • Help me I'm in a tough situation, is there a technical solution?

    Apple have previously disapproved my previous version of this issue because I was not clear about my questions, so I have chosen to rephrase them. Despite this "misunderstanding" I was actually asking for technical help and instead got deleted. Pleas

  • ITunes won't open now (and I didn't do anything!)

    I'm seriously angry here. I've had so many problems related to iTunes. The past 2 times my iTunes stopped working altogether and I actually resorted to formatting my whole hard drive both times. It's been working fine now for a month. I turned my com

  • MS fonts, hickups with Greek

    Hello. I've being looking in to fonts on 10.7, trying to find my perfect font, when I hit a really odd bug! So the preview of the story is that I need a font what can display Latin, Greek and Cyrillic letter. And the problematic one has always been G

  • System Call in Unix?

    Hi, Is there a way to send a system call from LabView 6.1 to UNIX similar to the Windows environment? Thanks, Roger

  • Font issue in Smartforms

    Hi, I m adding additional fields to existing smartforms and using the same paragraph and character format used for other texts, but my text alone not formatting. Material desc .... its already in smartform and printing in HELVE Material Classificatio