• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

There is JBAS011469 error when the app trying to write data to db. (JBossAS7, MySql)

 
Ranch Hand
Posts: 34
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Forumers,

I am newbie in the Java EE world. For my programming experience I chose the JBoss Developer Studio, and the JBoss AS 7 server with MySQL database. I use these tools in Fedora 20.
JBoss has a sample application (jboss-as-kitchensink.zip ) and I would like to create my own simple sample application like this example. The kitchensink sample use xml to store data, I'm using MySql.
I cannot insert to data from jsf page. If I tried I've got this message to the consol:

INFO [com.itemsapp.service.ItemInsertion] (http-localhost-127.0.0.1-8080-1) Inserting Lenovo
INFO [javax.enterprise.resource.webcontainer.jsf.renderkit] (http-localhost-127.0.0.1-8080-1) WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=null[severity=(ERROR 2), summary=(JBAS011469: Transaction is required to perform this operation (either use a transaction or extended persistence context)), detail=(Insertation unsuccessful)]

But if I insterted data maunaly, I could get the that from the database as you can see here.

INSERT INTO `itemsapp`.`ITEM`(`ITEM_ID`,`ITEM_PRICE`,`MODEL_NO`,`NAME`,`TOTAL_NO`)VALUES(1,250,"Inspiron 3520","DELL",12);SELECT * FROM itemsapp.ITEM;

I archived my project from jbdevstudio it can be found here.

Does someone have any idea how to change this code?

Thank you in advance for any help you can provide.
 
Edward Bloom
Ranch Hand
Posts: 34
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear forumers,

I guess I solved this problem.
At the com.itemsapp.service package i annotated the ItemInsertion class with @Stateless annotation.
Now i've got the
sourceId=null[severity=(INFO 0), summary=(Inserted!), detail=(Insertation successful)]

And i can see the data in the db and the listItems.xhtml too.

Regards,
Adrian
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic