Netbeans and hibernate

I created a netbeans project .Netbeans uses nbxdoclet for hibernate.
I created the bean in hibernate .Netbeans generated Util file and facade file(in which i specify my function).
It is working.
Now I want to add date in existing table.
But the problem is whenever I try to add date in an existing bean using hibernate property feature.
I dont get date as a datatype??
Any suggestions?
Thankyou in advance.

Well, it seems like most of you simply read the
various texts and try the vendors' examples. I'm
surprised that no one mentioned ever having bought a
prototype application from the onset. "bought"? What's that mean? You don't buy prototypes. You download evaluation versions, maybe.
I try to find sample code and tweak it to see the effects. Otherwise, I start writing small sample code an build on that.
I consider myself a reasonably competent core Java
programmer, but I had serious difficulty configuring
and merging its related technologies. There were so
many disjointed pieces of instructional information
that the additional research time really hurt our
budget severely. Not an uncommon thing, I'm sure. There's a lot of stuff. But don't bother learning all of it. Not in detail, at least. It's a good idea to familiarize yourself with the names of packages/libraries and what they do. But only really learn what you need to learn for what you need to do. The next project you will probably need other things, so you learn them then.
bsampieri,
I've setup Tomcat and tried the examples--in fact, I
normally follow tutorials for all products I hope to
use. Problem is, the examples and tutorials never
address my specific needs. So, I usually inch toward
my goal by spending weeks or months in forums to
continue where the tutorials leave off. Anything complex is going to not be there.... the trick is to identify pieces that you can pull out to build more complex apps. And the fact that JSP/servlets have the issue of being compounded by all the HTML/CSS/JS and HTTP protocol ... I don't want to say limitiations, exactly... Well, it just makes things more complex and harder to know what you need.
Perhaps you guys are much faster and smarter than
I...or you have a much bigger budget :)Probably not... on either account.

Similar Messages

  • Sleep and Hibernate does not work after BIOS update X1 Carbon 20A8

    As subject title, did a recent Lenovo "System Update" on BIOS and other drivers, and since then sleep and hibernate no longer works, when i close the lid, it turns on by itself after 2 seconds.
    When i select Sleep or Hibernate in Windows 8.1 with lid open, it just behaves like a Restart command.
    Need this fixed! Any ideas?

    Try downgrading to your older BIOS and see if it works again.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • 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>

  • Communication problem between NetBeans and Tomcat

    hi!
    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    okay.
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    thanks,
    flo.
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

  • Transfer Object in JSF, Spring, and Hibernate

    The application on which I am working deploys the JavaServer Faces, Spring and Hibernate frameworks.
    We are going to use the "transfer object" to move data between J2EE tiers from the front end to the back end and vice versa. In addition, data "types" may need to be converted --
    At the front end, the "type" of the data that are entered by users may not match that in the database table. For example, checkboxes may be marked or left blank by users. The "type" of the checkboxes is "boolean" in the JSF backing bean. However, we have either "Y" or "N" for the corresponding field in the database table.
    The JSF backing bean holds data as well as controller functionality. Of course, the transfer object holds data only.
    With regard to class properties, Is the transfer object an exact copy of the JSF backing bean? And at which tier the data are converted to match their correspoding "types" in the database tables?
    We also have the "data objects" which are exact representation of database tables.
    Thanks for your advices.

    Small example: you can decide in the business layer
    whether to convert it to boolean or Boolean (which
    has a 3rd state: null).But it all goes back to your data model. If your data model supports null for that property, then of course boolean is a poor choice. If that case one could use Boolean. None of this has anything to do with re-usability, which was your objection.
    I think the re-usability question goes back to the data model as well. Suppose your data model says this property is boolean valued. However if your database does not support booleans natively, then you need to map the value for storage in the database. But that is the data persistence layers problem.
    OTOH, suppose your data model says that this property may be 'Y' or 'N'. Then the Java class represent the business object should not have a boolean property, we should make it match the data model.
    However, I think that most cases where people are storing 'Y' or 'N' in a field in the database fall into the first case, where the data model is a boolean and they are working around limitations in the database. There is no reason in that case to perpetuate the same limitations in the Java code.

  • [SOLVED] Poweroff, suspend and hibernate don't work

    I installed Archlinux on my work desktop on Monday and can't get poweroff, suspend and hibernate to work. The command `systemctl poweroff` sort of works, except it doesn't actually turn off the computer. Suspend and hibernate don't work at all, the computer hangs on the terminal with a cursor on the top left corner of the screen. Here is the log from `journalctl`. There doesn't seem to be any error messages in it, as far as I can see.
    Apr 16 10:02:55 carolfs-ifusp sudo[1127]: carolfs : TTY=pts/0 ; PWD=/home/carolfs ; USER=root ; COMMAND=/usr/bin/systemctl poweroff
    Apr 16 10:02:55 carolfs-ifusp sudo[1127]: pam_unix(sudo:session): session opened for user root by carolfs(uid=0)
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Session c2 of user carolfs.
    Apr 16 10:02:55 carolfs-ifusp gnome-session[576]: Received signal:15->'Terminated'
    Apr 16 10:02:55 carolfs-ifusp org.gnome.evolution.dataserver.Sources3[591]: Received terminate signal.
    Apr 16 10:02:55 carolfs-ifusp colord[453]: Automatic remove of icc-9cb50954c1872204852075bef0599dec from xrandr-Goldstar Company Ltd-W2043-16843009
    Apr 16 10:02:55 carolfs-ifusp colord[453]: Profile removed: icc-9cb50954c1872204852075bef0599dec
    Apr 16 10:02:55 carolfs-ifusp colord[453]: device removed: xrandr-Goldstar Company Ltd-W2043-16843009
    Apr 16 10:02:55 carolfs-ifusp polkitd[358]: Unregistered Authentication Agent for unix-session:c2 (system bus name :1.37, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
    Apr 16 10:02:55 carolfs-ifusp ntpd[300]: ntpd exiting on signal 15
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped Session c2 of user carolfs.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Session c1 of user gdm.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped Session c1 of user gdm.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Sound Card.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped target Sound Card.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping system-systemd\x2dfsck.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Removed slice system-systemd\x2dfsck.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping system-getty.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Removed slice system-getty.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping User Manager for UID 1000...
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Disk Manager...
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Login Service...
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopping Default.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopping Default.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Login Prompts.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopped target Default.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopped target Default.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped target Login Prompts.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopping Basic System.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopping Basic System.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping GNOME Display Manager...
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopped target Basic System.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopped target Basic System.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Starting Generate shutdown-ramfs...
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopping Paths.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopping Paths.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopped target Paths.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopped target Paths.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopping Timers.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopping Timers.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopped target Timers.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped RealtimeKit Scheduling Policy Service.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopped target Timers.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopping Sockets.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopping Sockets.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped Locale Service.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Stopped target Sockets.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Stopped target Sockets.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Starting Shutdown.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped Disk Manager.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Starting Shutdown.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Reached target Shutdown.
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Reached target Shutdown.
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Starting Exit the Session...
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Starting Exit the Session...
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping Network.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped target Network.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping dhcpcd on all interfaces...
    Apr 16 10:02:55 carolfs-ifusp systemd[567]: Received SIGRTMIN+24 from PID 1159 (kill).
    Apr 16 10:02:55 carolfs-ifusp systemd[386]: Received SIGRTMIN+24 from PID 1160 (kill).
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped User Manager for UID 120.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped User Manager for UID 1000.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping user-1000.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Removed slice user-1000.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopping user-120.slice.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Removed slice user-120.slice.
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[1161]: sending signal TERM to pid 264
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[1161]: waiting for pid 264 to exit
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[264]: received signal TERM from PID 1161, stopping
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[264]: eno1: removing interface
    Apr 16 10:02:55 carolfs-ifusp systemd[387]: pam_unix(systemd-user:session): session closed for user gdm
    Apr 16 10:02:55 carolfs-ifusp systemd[568]: pam_unix(systemd-user:session): session closed for user carolfs
    Apr 16 10:02:55 carolfs-ifusp gnome-session[576]: Received signal:15->'Terminated'
    Apr 16 10:02:55 carolfs-ifusp gdm-session-worker[383]: <3>GLib: Source ID 71 was not found when attempting to remove it
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) evdev: AT Translated Set 2 keyboard: Close
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) UnloadModule: "evdev"
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) evdev: Microsoft Microsoft Basic Optical Mouse : Close
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) UnloadModule: "evdev"
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) evdev: Power Button: Close
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) UnloadModule: "evdev"
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) evdev: Power Button: Close
    Apr 16 10:02:55 carolfs-ifusp gdm-Xorg-:0[336]: (II) UnloadModule: "evdev"
    Apr 16 10:02:55 carolfs-ifusp org.freedesktop.Tracker1[591]: Received signal:15->'Terminated'
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[1161]: dhcpcd[1161]: sending signal TERM to pid 264
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[1161]: dhcpcd[1161]: waiting for pid 264 to exit
    Apr 16 10:02:55 carolfs-ifusp dhcpcd[264]: exited
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: Stopped Login Service.
    Apr 16 10:02:55 carolfs-ifusp systemd[1]: dhcpcd.service: main process exited, code=exited, status=1/FAILURE
    Apr 16 10:02:55 carolfs-ifusp mkinitcpio[1145]: ==> Starting build: none
    Apr 16 10:02:56 carolfs-ifusp mkinitcpio[1145]: -> Running build hook: [sd-shutdown]
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped dhcpcd on all interfaces.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unit dhcpcd.service entered failed state.
    Apr 16 10:02:56 carolfs-ifusp gdm-Xorg-:0[336]: (II) NVIDIA(GPU-0): Deleting GPU-0
    Apr 16 10:02:56 carolfs-ifusp gdm-Xorg-:0[336]: (EE) Server terminated successfully (0). Closing log file.
    Apr 16 10:02:56 carolfs-ifusp gdm[295]: Freeing conversation 'gdm-password' with active job
    Apr 16 10:02:56 carolfs-ifusp gdm[295]: Freeing conversation 'gdm-launch-environment' with active job
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped GNOME Display Manager.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Permit User Sessions...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Permit User Sessions.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Basic System.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Basic System.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Slices.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Slices.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping User and Session Slice.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Removed slice User and Session Slice.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Paths.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Paths.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Forward Password Requests to Wall Directory Watch.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Forward Password Requests to Wall Directory Watch.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Dispatch Password Requests to Console Directory Watch.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Dispatch Password Requests to Console Directory Watch.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Timers.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Timers.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Daily man-db cache update.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Daily man-db cache update.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Daily verification of password and group files.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Daily verification of password and group files.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Daily rotation of log files.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Daily rotation of log files.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Daily Cleanup of Temporary Directories.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Daily Cleanup of Temporary Directories.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Sockets.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Sockets.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Device-mapper event daemon FIFOs.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Closed Device-mapper event daemon FIFOs.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping LVM2 metadata daemon socket.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Closed LVM2 metadata daemon socket.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping D-Bus System Message Bus Socket.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Closed D-Bus System Message Bus Socket.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping System Initialization.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target System Initialization.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Apply Kernel Variables...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Apply Kernel Variables.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Setup Virtual Console...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Setup Virtual Console.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Encrypted Volumes.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Encrypted Volumes.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Load/Save Random Seed...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Update UTMP about System Boot/Shutdown...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Swap.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Swap.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivating swap Swap Partition...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Remote File Systems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Remote File Systems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Load/Save Random Seed.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Update UTMP about System Boot/Shutdown.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Create Volatile Files and Directories...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Create Volatile Files and Directories.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Local File Systems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Local File Systems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting /run/user/1000/gvfs...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting /run/user/120...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting /boot...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting /home...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting Temporary Directory...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap /dev/disk/by-partuuid/748828e6-d06b-4dc9-a1ee-94e2bf6e2d41.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap /dev/disk/by-partlabel/swap.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap /dev/disk/by-id/wwn-0x5000c500242cde85-part2.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap /dev/disk/by-id/ata-ST3500418AS_5VM96G8V-part2.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap /dev/disk/by-uuid/59c506eb-3a40-4eae-8048-317bcc3d00fb.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Deactivated swap Swap Partition.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted /run/user/1000/gvfs.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted Temporary Directory.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounting /run/user/1000...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted /run/user/120.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted /boot.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping EFI System Partition Automount.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unset automount EFI System Partition Automount.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted /run/user/1000.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Unmounted /home.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Starting Unmount All Filesystems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Reached target Unmount All Filesystems.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Local File Systems (Pre).
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped target Local File Systems (Pre).
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopping Remount Root and Kernel File Systems...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Stopped Remount Root and Kernel File Systems.
    Apr 16 10:02:56 carolfs-ifusp mkinitcpio[1145]: ==> Build complete.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Started Generate shutdown-ramfs.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Starting Shutdown.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Reached target Shutdown.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Starting Final Step.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Reached target Final Step.
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Starting Power-Off...
    Apr 16 10:02:56 carolfs-ifusp systemd[1]: Shutting down.
    Apr 16 10:02:56 carolfs-ifusp systemd-shutdown[1]: Sending SIGTERM to remaining processes...
    Apr 16 10:02:56 carolfs-ifusp systemd-journal[166]: Journal stopped
    Last edited by CFS (2014-05-08 12:57:13)

    Thank you for your replies. Shutdown now doesn't turn the computer off either. About the type of system, I think it was custom built. This is a new install from Monday, so I didn't update the kernel. Poweroff, suspend and hibernate have never worked. The requested output:
    $ uname -a
    Linux carolfs-ifusp 3.14.1-1-ARCH #1 SMP PREEMPT Mon Apr 14 20:40:47 CEST 2014 x86_64 GNU/Linux
    $ pacman -Qi linux
    Name : linux
    Version : 3.14.1-1
    Description : The Linux kernel and modules
    Architecture : x86_64
    URL : http://www.kernel.org/
    Licenses : GPL2
    Groups : base
    Provides : kernel26=3.14.1
    Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
    Optional Deps : crda: to set the correct wireless channels of your country
    Required By : nvidia
    Optional For : None
    Conflicts With : kernel26
    Replaces : kernel26
    Installed Size : 71136.00 KiB
    Packager : Tobias Powalowski <[email protected]>
    Build Date : Mon 14 Apr 2014 03:42:52 PM BRT
    Install Date : Mon 14 Apr 2014 07:50:11 PM BRT
    Install Reason : Explicitly installed
    Install Script : Yes
    Validated By : Signature

  • Windows explorer + other windows applications crashing regularly at resume from sleep and hibernate

    Good evening,
    I have a Thinkpad W510 (4319-29G) running Windows 7 Pro 64bit. The system is loaded with the latest software and drives from Lenovo including BIOS 6NET74WW (1.34), upgrade was done Dec 7th (windows update performed Dec 15th).
    The machine has
    - 8Gb RAM
    - nVidia Quadro FX880M, driver version is 8.17.12.5896, 7-9-2010 and video card BIOS is 70.16.5f.0.b
    - dual harddrives,
       - one Seagate Momentus XT 500Gb (ST95005620AS) FW rev SD23 in the main location with C: and some other partitions
       - one Hitatchi 320 Gb (HTS723232L9SA60) FW rev FC4ZC50B in the bay.
    - Intel Centrino Advanced-N 6200 AGN, driver version 13.3.0.24, 7-14-2010
    - Intel 82577LM Gigabit Network Connection, driver version 11.5.10.1030, 7-22-2010
    Recently I have experienced crashes of multiple windows components at resume from sleep and hibernate.
    It seems to happen when swithing location (from work to home) and thus switching from docking station with wired network connection to no dock and wireless network connection (dont know if this has any bearing but anyway).
    In the event viewer I typically have some 6-12 application errors logged. Sample output from event viewer is:
    Log Name: Application
    Source:Application Error
    EventID:1000
    Level:Error
    Logged:2010-12-15 20:30:02
    Task category100)
    Keywords: Classic
    Computer: xxxxxxx (my computername)
    Then for each application the following detailed data is written in event viewer in the general tab:
    #1
    Faulting application name: rundll32.exe_nview64.dll, version: 6.1.7600.16385, time stamp: 0x4a5bc9e0
    Faulting module name: nview64.dll, version: 6.14.10.13527, time stamp: 0x4c35752f
    Exception code: 0xc0000005
    Fault offset: 0x00000000000f0786
    Faulting process id: 0x115c
    Faulting application start time: 0x01cb9bd59882f1f6
    Faulting application path: C:\Windows\system32\rundll32.exe
    Faulting module path: C:\Program Files\NVIDIA Corporation\nView\nview64.dll
    Report Id: b606b17d-0881-11e0-be39-00a0c6000000
    #2
    Faulting application name: taskhost.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x10c0
    Faulting application start time: 0x01cb9bd5694caebe
    Faulting application path: C:\Windows\system32\taskhost.exe
    Faulting module path: nview64.dll
    Report Id: b6ae8cb2-0881-11e0-be39-00a0c6000000
    #3
    Faulting application name: sidebar.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc9e1
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x6f0
    Faulting application start time: 0x01cb9bd5986a397a
    Faulting application path: C:\Program Files\Windows Sidebar\sidebar.exe
    Faulting module path: nview64.dll
    Report Id: b6bd0bd9-0881-11e0-be39-00a0c6000000
    #4
    Faulting application name: Explorer.EXE, version: 6.1.7600.16450, time stamp: 0x4aebab8d
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x0000000008c3b350
    Faulting process id: 0x1210
    Faulting application start time: 0x01cb9bd569d9ae8e
    Faulting application path: C:\Windows\Explorer.EXE
    Faulting module path: nview64.dll
    Report Id: b6d21ac7-0881-11e0-be39-00a0c6000000
    #5
    Faulting application name: Dwm.exe, version: 6.1.7600.16385, time stamp: 0x4a5bc541
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800ba570
    Faulting process id: 0x11c4
    Faulting application start time: 0x01cb9bd569aa125c
    Faulting application path: C:\Windows\system32\Dwm.exe
    Faulting module path: nview64.dll
    Report Id: b72bfbe8-0881-11e0-be39-00a0c6000000
    #6
    Faulting application name: rundll32.exe_PWMTR64V.DLL, version: 6.1.7600.16385, time stamp: 0x4a5bc9e0
    Faulting module name: nview64.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c35752f
    Exception code: 0xc000041d
    Fault offset: 0x00000001800bb350
    Faulting process id: 0x1450
    Faulting application start time: 0x01cb9bd59995023a
    Faulting application path: C:\Windows\system32\rundll32.exe
    Faulting module path: nview64.dll
    Report Id: b7e4521b-0881-11e0-be39-00a0c6000000
    It seems that a module "nview64.dll" is always the first application to crash. I suspect this has something with graphics to do.
    I dont know if this event triggers the following crashes or if it is so that the display is initialized before the other programs.
    After all crash diagnostic messages have been shown windows explorer restarts and also other applications restart but a lot of system tools in the system tray are gone so a cold start is needed to restore all tools again.
    I really would appreciate any help and suggestions how to fix this really annoying issue.
    Thanks, Anton

    I had a similar issue, as soon as a described even a little bit of it to warrenty support they sent someone to swap the board
    It seems thats the only fix, its been fine since 

  • How to handle blob data with java and mysql and hibernate

    Dear all,
    I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
    now my code is :--
    ==================================================
    *.hbm.xml :--
    <property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
    ===================================================
    *.java :--
    package com.shrisure.server.usertype;
    import java.io.OutputStream;
    import java.io.Serializable;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.BLOB;
    import org.hibernate.HibernateException;
    import org.hibernate.usertype.UserType;
    import org.jboss.resource.adapter.jdbc.WrappedConnection;
    import com.google.gwt.user.client.rpc.IsSerializable;
    public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
    private static final long serialVersionUID = 1111222233331231L;
    public int[] sqlTypes() {
    return new int[] { Types.BLOB };
    public Class returnedClass() {
    return byte[].class;
    public boolean equals(Object x, Object y) {
    return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
    BLOB tempBlob = null;
    WrappedConnection wc = null;
    try {
    if (value != null) {
    Connection oracleConnection = st.getConnection();
    if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
    InitialContext ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
    Connection dsConn = dataSource.getConnection();
    wc = (WrappedConnection) dsConn;
    // with getUnderlying connection method , cast it to Oracle
    // Connection
    oracleConnection = wc.getUnderlyingConnection();
    tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
    tempBlob.open(BLOB.MODE_READWRITE);
    OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
    tempBlobWriter.write((byte[]) value);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    tempBlob.close();
    st.setBlob(index, tempBlob);
    } else {
    st.setBlob(index, BLOB.empty_lob());
    } catch (Exception exp) {
    if (tempBlob != null) {
    tempBlob.freeTemporary();
    exp.printStackTrace();
    st.setBlob(index, BLOB.empty_lob());
    // throw new RuntimeException();
    } finally {
    if (wc != null) {
    wc.close();
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
    final Blob blob = rs.getBlob(names[0]);
    return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
    public Object deepCopy(Object value) {
    if (value == null)
    return null;
    byte[] bytes = (byte[]) value;
    byte[] result = new byte[bytes.length];
    System.arraycopy(bytes, 0, result, 0, bytes.length);
    return result;
    public boolean isMutable() {
    return true;
    public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
    return assemble(arg0, arg1);
    public Serializable disassemble(Object arg0) throws HibernateException {
    return disassemble(arg0);
    public int hashCode(Object arg0) throws HibernateException {
    return hashCode();
    public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
    return replace(arg0, arg1, arg2);
    =================================================================
    can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..

    Moderator action: crosspost deleted.

  • NetBeans and JSP pages

    I'm using the netBeans IDE to develope my project and the project is web application. But I've a problems with this IDE.
    Q1. The default page is index.html and the default home for the project is say $HOME, when I write http://localhost:8084/$HOME/index.html the browser displace error message. I've to run this file from the netBeans. Do I need to run netBeans and run the file from the IDE to access the index.html file?
    Q2. The second problem is; once I run the index file from the netBeans and then use this address http://localhost:8084/$HOME i.e if I remove the index.html file form the URL the Browser displays all the files that I've in my project but I don't won't this to happend. Is there any means to avoid this problem?
    Thank you indavance.

    I'm using the netBeans IDE to develope my project and
    the project is web application. But I've a problems
    with this IDE.If you are new to application development, then I recommend not using any IDE - it is better to configure everything manually http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html to understand what's going on under the hood.
    Once you understand what's going on, then it will be much easier to configure your IDE.
    Q1. The default page is index.html and the default
    home for the project is say $HOME, when I write
    http://localhost:8084/$HOME/index.html the browser
    displace error message. I've to run this file from
    the netBeans. Do I need to run netBeans and run the
    file from the IDE to access the index.html file?Check this with NetBeans User Mailing List
    Q2. The second problem is; once I run the index file
    from the netBeans and then use this address
    http://localhost:8084/$HOME i.e if I remove the
    index.html file form the URL the Browser displays all
    the files that I've in my project but I don't won't
    this to happend. Is there any means to avoid this
    problem?
    Thank you indavance.

  • Using NetBeans and Eclipse to drag and drop forms, controls etc

    Hi, can you use NetBeans and Eclipse to drag and drop like say with C# in MS Visual Studio ?
    like forms and listboxes, textboxes etc ??

    And [this is a good place to start|http://java.sun.com/docs/books/tutorial/uiswing/index.html]
    db

  • How to persist parent  and child tree node data through JSF and Hibernate

    Dear dudes,
    I'm a novice to JSF and Hibernate
    Actually i want to create a tree structure where for each child node, i should have the parent node reference in my form and then when i save, i need to save the corresponding child node data in the database.
    node-1
      node 1-1
         node 1-11a
      node 1-2
    node-2
       node 2-1
       node2-2Whenever i click node 1-1 the corresponding parent node ( node-1) reference should appear in my form and when i save this data this data should be saved under parent node and the tree should be re-rendered.
    How this can be accomplished and if there are any URL's please refer.

    Everybody need not face the same problem you faced. And moreover, everyone out here have their own issues to solve. If people are helping out here, its cause of their passion. Please try to be polite.
    First of all, what is that you have tried on the issue? Could you please share your work so that we can try to fill the gaps?

  • Java6, tomcat6, ojdbc6.jar and hibernate 3.3

    We were running an application with Oracle 10g, tomcat5 and java5 with ojdbc5.jar and hibernate 3 without any issues. We recently upgraded to java6, tomcat6, ojdbc6.jar and hibernate 3.3. We created a new instance of the Oracle10g database. We are now seeing intermittent errors at least once a week. The errors are:
    [ WARN] 12/11 09:52:02 (JCLLoggerAdapter:warn:357)-SQL Error: 17447, SQLState: 99999
    [ERROR] 12/11 09:52:02 (JCLLoggerAdapter:error:454)-OALL8 is in an inconsistent state
    With the following causes:
    Caused by: java.sql.SQLException: Protocol violation
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1053)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
    at org.hibernate.loader.Loader.doQuery(Loader.java:697)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    at org.hibernate.loader.Loader.doList(Loader.java:2232)
    and
    java.sql.SQLException: Bigger type length than Maximum
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
    at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2253)
    at oracle.jdbc.driver.T4CMAREngine.unmarshalUB2(T4CMAREngine.java:1101)
    at oracle.jdbc.driver.T4CTTIoer.unmarshal(T4CTTIoer.java:248)
    at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:115)
    at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:539)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3432)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3438)
    at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.commit(DelegatingConnection.java:301)
    at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:200)
    at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146)
    and
    Caused by: java.sql.SQLException: OALL8 is in an inconsistent state
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
    at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:474)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
    at org.hibernate.loader.Loader.doQuery(Loader.java:697)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    at org.hibernate.loader.Loader.doList(Loader.java:2232)
    The errors occur when the user is querying for a list of objects. It does not seem to matter which list or type of objects. Attempting to recreate the error has not been fruitful - the queries are typical and ordinary routine data pulls. In the forums we see a lot posts about compatibility between drivers. The oracle 10g is using the ojdbc14.jar in its lib. Do we need to update this? Can we run java 6 against the 10g instance reliably?
    We have also seen a similiar issue occur once when the user tried a normal save:
    [ WARN] 12/11 10:00:11 (JCLLoggerAdapter:warn:357)-SQL Error: 17447, SQLState: 99999
    [ERROR] 12/11 10:00:11 (JCLLoggerAdapter:error:454)-OALL8 is in an inconsistent state
    [ERROR] 12/11 10:00:11 (OwnerHolder:doSave:787)-Problem occurred trying to prepare the info for save
    org.hibernate.exception.GenericJDBCException: could not get next sequence value
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:119)
    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
    at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:535)
    at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:527)
    at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:523)
    at us.ca.santaclara.co.tax.tcas.dao.ParentDao.save(ParentDao.java:56)
    Caused by: java.sql.SQLException: OALL8 is in an inconsistent state
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
    at oracle.jdbc.driver.T4C8Oall.marshal(T4C8Oall.java:474)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
    at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98)
    [ERROR] 12/11 10:00:11 (JCLLoggerAdapter:error:532)-JDBC commit failed
    java.sql.SQLException: Protocol violation
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
    at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:130)
    at oracle.jdbc.driver.T4CConnection.doCommit(T4CConnection.java:539)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3432)
    at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:3438)
    at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.commit(DelegatingConnection.java:301)
    at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:200)
    at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146)

    Thanks For the Post. It occurs mostly in my app too which uses oracle 10G with ojdbc14.jar , but client in weblogic 10.3 has ojdbc6.jar. My logic is , at that time network was impaired and oracle could not find exact cause of error. To replicate you can input severly in multiple threads same query to oracle so it cannot get timeout values or cannot serve incoming requests withing certain allowed timeframes. If you are using a RAC , it cannot SYNC those cache and memory dumps in GCS , PGA, and SGA, thus inconsistent state.

  • Netbeans and JavaFX

    I am new to Netbeans and am only using it for the JavaFX integration (IntelliJ user) so I am not sure if I am dealing with my ignorance of Netbeans or some JavaFX idiosyncrasy.
    However, when I try to organize my JavaFX code into package structure (rather than using a single default package) and go to run it I get NoClassDef exceptions on my main class. It looks like netbeans automatically packages up the files into a jar and runs it from a jar. I took a peek inside the generated jar and Netbeans is not maintaining the package structure inside the jar it is just putting all the classes at the root of the jar (hence the NoClassDefs).
    How can I get Netbeans to maintain the package structure inside the jar?
    Does JavaFX use the "package" keyword the same way as Java does?

    Yep, after I was able to get my classes in a package structure (rather than default package) I discovered that.
    I couldn't at first get my classes out of the default package. I am spoiled by IntelliJ which changes/adds package statements when you move classes. Netbeans did not automatically add the package statement when I moved from the default package to a package structure. Nor did it warn me that the classes were missing a package statement and/or the package statement didn't match its package location.

  • Integrate Crystal Reports with Spring MVC and Hibernate

    Hi all,
    having successfully used the JRC version 11.8.4.1094 in a Java environment with:
    1)JBoss 4.2.3,
    2)Oracle 11,
    3)EJB 2,
    4)Crystal Reports 2008,
    I would like to integrate Crystal Reports into my existing spring MVC and hibernate web app using:
    1)CRJ version 12.2.209,
    2)JBoss 5.1,
    3)Oracle 11,
    4)EJB 3,
    5)Crystal Reports 2008,
    reusing code integration. I used ReportExportControl and I produced the PDF directly.
    The error occurs when returning from EJB, into Delegate, and is the following:
    09:36:23,046 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
    09:36:23,062 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
    09:38:03,062 ERROR [[dispatcher]] Servlet.service() for servlet dispatcher threw exception
    java.lang.InstantiationException: com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat
         at java.lang.Class.newInstance0(Class.java:340)
         at java.lang.Class.newInstance(Class.java:308)
         at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:334)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:101)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
         at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
         at $Proxy286.invoke(Unknown Source)
         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
         at $Proxy284.getXXXX(Unknown Source)
         at xx.xxx.xxxxxx.spring.manager.report.ReportManagerImpl.getXXXX(ReportManagerImpl.java:26)
         at xxx.xxxx.springprova.WelcomeController.handleRequestInternal(WelcomeController.java:70)
         at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
         at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
         at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:662)
    Have an idea, please?
    Thank you.

    You'll need to install the Crystal .NET that comes with VS 2005. You then install Crystal XI R2 over the top and not only will Crystal be integrated with the IDE, it should use the updated assemblies from R2.
    -Dell
    - A computer only does what you told it to, not what you thought you told it to!</p>

  • NetBeans and Heap Size

    I'm trying to write a program using NetBeans and I keep getting OutOfMemoryErrors. I have 2GB of RAM and I've attempted to modify the netbeans.conf file to increase the heap size at startup. The changes I've made aren't being reflected in the memory manager tool (it still indicates a maximum size of ~50MB). The pertinent code from the config file is as follows:
    netbeans_default_options="-J-Xms512m -J-Xmx1024m -J-XX:PermSize=128m -J-XX:MaxPermSize=512m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:NewSize256m"
    Assuming my memory usage won't exceed these limits, any suggestions as to how to make sure the changes are being implemented?

    I would subscribe to the netbeans user mail list, and pose your question to that list. The Sun Netbeans gurus live there.
    I would also use a seperate email account to subscribe to the list as it generates alot of messages daily. If thats not an option, definatly try to set up a rule that seperates messages from the list from your regular email.
    The main netbeans top level mail list web page is here with all the instructions to subscribe and unsubscribe.
    Good luck,
    JJ

Maybe you are looking for

  • Purchasing & A/P Credit Card Processing

    We have cases where we place purchase orders to vendors with a company credit card. We would like the PO to be for the actual vendor. When the Goods are received, we would perform a PO goods receipt and A/P Invoice. When the A/P invoices is paid, we

  • Dynamiclinkmediaserver has encountered an error. message when dealing with any video in LR5, anyone have any suggestions?

    /DynamicLinkMediaServer701/releases/2013.03/shared/adobe/MediaCore/ASL/Foundation/Make/Mac /../../Src/DirectoryRegistry.cpp-283 is my error code. I get it ANYTIME I try to import any videos ( I work in MOV ) ANYONE have any fracking suggestions?? Tal

  • What's New 3.0.A.3 Update

    A new update of What's New application has started to roll out (3.0.A.0.3) With What's New, you can discover great apps, games, music and film, and receive relevant recommendations to fine-tune your Xperia™ to suit your lifestyle. What's been changed

  • Message window

    how to pop a message window without using awt

  • Portal Services

    I have created a portal service with 2 simple functionalities of adding and subtracting 2 numbers. I made this using NWDS and deployed it as a par file I have consumed this service by calling the methods in another portal application project. Now, I