[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-11-25 Thread demetrio812
Hi,
I have the same problem here, I have a SESSION EJB that is working with 
extended PersistenceContext but when I try to inject EntityManager in a session 
scoped seam pojo it give me the org.jboss.seam.RequiredException...

My conf:

1. JBoss AS 4.2.1GA
2. Seam 2.0.0.GA
3. Richfaces 3.1.2.GA 

Thanks!

Demetrio

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107602#4107602

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107602
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-11-22 Thread ivan.indrawan
Hi there,

Try checking the library (the rich faces jars) whether they are all the same 
version? If not necessary, dont put the rich-faces jars in the server 
deployment library (/server/default/lib).

I had the same problem and managed to fix it that way. 

Cheers,

Ivan

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4107222#4107222

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107222
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-10-24 Thread mickknutson
jrodri wrote : 
  | grdzeli_kaci:
  | 
  | Could you fix the problem?
  | 
  | Could you post the code fixed
  | 
  | Regards 
  | 
  | 
  | Jaime
Any update you can post here please?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4098558#4098558

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4098558
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-09-24 Thread jrodri

grdzeli_kaci:

Could you fix the problem?

Could you post the code fixed

Regards 


Jaime

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4088195#4088195

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088195
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-05 Thread grdzeli_kaci
hi lowecg2004, 
first of all thank you for your post, i tried all versions of seam and jboss 
application server,
is this so difficult that use seam and richfaces together ???
i already tried this for a week  but could not resolve :(
environment :

1. JBoss AS 4.2.0GA
2. Seam 2.0.0.BETA1
3. Richfaces 3.0.1
4.ajax4jsf 1.1.1



here is my example simple dynamic tree   generation into seam component :
1.MenuBean.java (Seam Component)

  | @Name(menu)
  | @Scope(ScopeType.SESSION)
  | public class MenuBean{
  | 
  | @In
  | private EntityManager entityManager;
  | 
  | private HtmlPanelBar bar = new HtmlPanelBar();
  | public MenuBean() {
  | }
  | 
  | public HtmlPanelBar getBar() {
  | if (bar!=null  bar.getChildren()!=null) {
  | bar.getChildren().clear();
  | }
  | 
  | ArrayListMenu arraylist = 
(ArrayListMenu)entityManager.createNamedQuery(Menu.findAll).getResultList();
  | for (Menu elem : arraylist) {
  | HtmlPanelBarItem item= new HtmlPanelBarItem();
  | item.setLabel(Bl);
  | 
  | Library library = new Library();
  | HtmlTree tree = new HtmlTree();
  | tree.setStyle(width:150px);
  | tree.setValue(library.getData());
  | tree.setVar(item);
  | tree.setNodeFace(library.getType());
  | 
  | 
  | IteratorArtist itArtists = 
library.getArtists().values().iterator();
  | while (itArtists.hasNext()) {
  | Artist artist = (Artist)itArtists.next();
  | 
  | HtmlTreeNode artistNode = new HtmlTreeNode();
  | artistNode.setType(artist);
  | HtmlOutputText artistText = new HtmlOutputText();
  | artistText.setValue(artist.getName());
  | 
  | IteratorAlbum itAlbums = artist.getAlbums();
  | while (itAlbums.hasNext()) {
  | Album album = (Album) itAlbums.next();
  | 
  | HtmlTreeNode albumNode = new HtmlTreeNode();
  | albumNode.setType(album);
  | HtmlOutputText albumText = new HtmlOutputText();
  | albumText.setValue(album.getTitle());
  | 
  | IteratorSong itSongs = album.getSongs();
  | while (itSongs.hasNext()) {
  | Song song = (Song) itSongs.next();
  | 
  | HtmlTreeNode songNode = new HtmlTreeNode();
  | songNode.setType(song);
  | HtmlOutputText songText = new HtmlOutputText();
  | songText.setValue(song.getTitle());
  | 
  | tree.getChildren().add(songNode);
  | }
  | tree.getChildren().add(albumNode);
  | tree.getChildren().add(artistNode);
  | item.getChildren().add(tree);
  | bar.getChildren().add(item);
  | }
  | }
  | }
  | return bar;
  | }
  | public void setBar(HtmlPanelBar bar) {
  | this.bar = bar;
  | }
  | }
  | 
1.Home.xhtml (Presentation Layer)

  |  ui:define name=body
  | 
  | h:messages globalOnly=true styleClass=message/
  | h:form id=bodyForm
  | rich:panel
  | f:facet name=headerWelcome!/f:facet
  | pThis empty shell application includes:/p
  | ul
  | liAnt build script/li
  | liDeployment to JBoss AS/li
  | liIntegration testing using TestNG and JBoss 
Embeddable EJB3/li
  | liEJB 3.0 Seam components/li
  | liTemplated Facelets views/li
  | liHSQL (or MySQL) Datasource/li
  | liDefault CSS stylesheet/li
  | liInternationalization support/li
  | /ul
  | rich:panelBar binding=#{menu.bar} width=500 
height=600
  | /rich:panelBar
  | /rich:panel
  | /h:form
  | /ui:define 
  | 

i always get this error :

  | Caused by: org.jboss.seam.RequiredException: In attribute requires non-null 
value: menu.entityManager
  | at org.jboss.seam.Component.getValueToInject(Component.java:2042)
  | at org.jboss.seam.Component.injectAttributes(Component.java:1481)
  | at org.jboss.seam.Component.inject(Component.java:1302)
  | 

i tried to find something into seam code but i could not find anything for this 
issue,
you told me about configurations lowecg200, here is my configurations :

1.components.XML

  | ?xml version=1.0 

[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-05 Thread lowecg2004
Hello Paata,

Your code and persistence.xml/components.xml config look okay to me.  Do you 
have an entry in your startup logs that looks like the following?

16:53:36,554 INFO  [Component] Component: entityManager, scope: CONVERSATION, 
type: JAVA_BEAN, class: org.jboss.seam.persistence.ManagedPersistenceContext

If your entityManager was successfully created then you'll have an entry like 
the one above.  Otherwise, you'll not.  This will at least tell us if there is 
a config issue or not.

Have you still got the managed-bean config from your original post hanging 
around?

I'm using RichFaces without any problems.

As for your EJB3 question  - I don't know the answer to this, hopefully someone 
else can help you here.  Maybe you could try making your Seam POJO into a SFSB? 
 As a SFSB you could also try @PersistenceContext for getting at your 
entityManager?

Could you post your web.xml and faces-config.xml?

Regards,

Chris.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060668#4060668

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060668
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-05 Thread grdzeli_kaci
HI lowecg2004, i saw log and i found this :

  | 04:03:56,515 INFO  [Component] Component: org.jboss.seam.core.init, scope: 
APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
  | 04:03:56,559 INFO  [Initialization] Installing components...
  | 04:03:56,593 INFO  [Component] Component: authenticator, scope: EVENT, 
type: JAVA_BEAN, class: 
action.com.liliko.billing.businesslayer.beans.session.Authenticator
  | 04:03:56,635 INFO  [Component] Component: entityManager, scope: 
CONVERSATION, type: JAVA_BEAN, class: 
org.jboss.seam.persistence.ManagedPersistenceContext
  | 04:03:56,653 INFO  [Component] Component: menu, scope: SESSION, type: 
JAVA_BEAN, class: model.MenuBean
  | 
entity manager exist,
here is my web.xml :

  | ?xml version=1.0 ?
  | web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  |  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  |  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  |  version=2.4
  | 
  | !-- Ajax4jsf --
  | 
  | context-param
  | param-nameorg.ajax4jsf.VIEW_HANDLERS/param-name
  | param-valuecom.sun.facelets.FaceletViewHandler/param-value
  | /context-param
  | 
  | context-param
  | param-nameorg.ajax4jsf.SKIN/param-name
  | param-valueblueSky/param-value
  | /context-param
  |  
  |!-- Seam --
  | 
  |listener
  |   listener-classorg.jboss.seam.servlet.SeamListener/listener-class
  |/listener
  | 
  | filter
  | filter-nameSeam Filter/filter-name
  | filter-classorg.jboss.seam.servlet.SeamFilter/filter-class
  | /filter
  | 
  | filter-mapping
  | filter-nameSeam Filter/filter-name
  | url-pattern/*/url-pattern
  | /filter-mapping
  | 
  |servlet
  |   servlet-nameSeam Resource Servlet/servlet-name
  |   servlet-classorg.jboss.seam.servlet.ResourceServlet/servlet-class
  |/servlet
  | 
  |servlet-mapping
  |   servlet-nameSeam Resource Servlet/servlet-name
  |   url-pattern/seam/resource/*/url-pattern
  |/servlet-mapping
  |
  |!-- Facelets development mode (disable in production) --
  |
  |context-param
  |   param-namefacelets.DEVELOPMENT/param-name
  |   param-valuetrue/param-value
  |/context-param
  | 
  |!-- JSF --
  |
  |context-param
  |   param-namejavax.faces.DEFAULT_SUFFIX/param-name
  |   param-value.xhtml/param-value
  |/context-param
  | 
  |servlet
  |   servlet-nameFaces Servlet/servlet-name
  |   servlet-classjavax.faces.webapp.FacesServlet/servlet-class
  |   load-on-startup1/load-on-startup
  |/servlet
  | 
  |servlet-mapping
  |   servlet-nameFaces Servlet/servlet-name
  |   url-pattern*.seam/url-pattern
  |/servlet-mapping
  |   
  |security-constraint 
  |display-nameRestrict raw XHTML Documents/display-name
  |web-resource-collection
  |web-resource-nameXHTML/web-resource-name
  |url-pattern*.xhtml/url-pattern
  |/web-resource-collection
  |auth-constraint
  |role-nameNONE/role-name
  |/auth-constraint
  |/security-constraint
  |
  | /web-app
  | 
  | 
and my faces-config.xml

  | ?xml version='1.0' encoding='UTF-8'?
  | faces-config version=1.2
  |   xmlns=http://java.sun.com/xml/ns/javaee;
  |   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  |   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd;
  | 
  | application
  | locale-config
  | default-localeen/default-locale
  | supported-localeen/supported-locale
  | supported-localeka/supported-locale
  | supported-localede/supported-locale
  | supported-localefr/supported-locale
  | /locale-config
  | message-bundlemessages/message-bundle
  | /application
  | 
  | application
  | view-handlercom.sun.facelets.FaceletViewHandler/view-handler
  | /application
  | /faces-config
  | 
  | 

is this configuration files incorrect ?
i use seam gen fro project creation, i don't understand why this not working :(


_
Regards,
Paata



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060763#4060763

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060763
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-05 Thread grdzeli_kaci
this files identical with dvd example files,
why this is not working :(,

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060788#4060788

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060788
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-04 Thread lowecg2004
Have you got an entry in persistence.xml that corresponds to your entity 
manager factory?

components.xml
  | 
  |core:managed-persistence-context name=entityManager
  |   auto-create=true
  |persistence-unit-jndi-name=java:/dvdEntityManagerFactory/
  | 
  | 
  | persistence.xml
  | persistence xmlns=http://java.sun.com/xml/ns/persistence; 
  |  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  |  xsi:schemaLocation=http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd; 
  |  version=1.0
  |persistence-unit name=dvdDatabase
  |   providerorg.hibernate.ejb.HibernatePersistence/provider
  |   jta-data-sourcejava:/dvdDatasource/jta-data-source
  |   properties
  |  property name=hibernate.hbm2ddl.auto value=create-drop/
  |  property name=hibernate.cache.use_query_cache value=true/
  |  property name=hibernate.show_sql value=true/
  | 
  |  property name=hibernate.cache.provider_class 
  |value=org.hibernate.cache.HashtableCacheProvider/
  | 
  |  !-- use a file system based index --
  |  property name=hibernate.search.default.directory_provider 
  |   value=org.hibernate.search.store.FSDirectoryProvider/
  |  !-- directory where the indexes will be stored --
  |  property name=hibernate.search.default.indexBase 
value=./dvdindexes/  
  |  !-- Not needed with HA 3.3 --
  |  property name=hibernate.ejb.event.post-insert 
value=org.hibernate.search.event.FullTextIndexEventListener/
  |  property name=hibernate.ejb.event.post-update 
value=org.hibernate.search.event.FullTextIndexEventListener/
  |  property name=hibernate.ejb.event.post-delete 
value=org.hibernate.search.event.FullTextIndexEventListener/ 
  |  
  |  property name=jboss.entity.manager.factory.jndi.name
  |value=java:/dvdEntityManagerFactory /
  |   /properties
  |/persistence-unit
  | /persistence
  | 


One other potential trap is that I have just upgraded from Seam 1.2.1 to 2.0b1 
and managed-persistence-context has been moved from namespace core to 
persistence.  If this is the case, then don't forget to add the persistence 
namespace to your XML namespace config:

xmlns:persistence=http://jboss.com/products/seam/persistence;

persistence:managed-persistence-context name=entityManager
  auto-create=true
   
persistence-unit-jndi-name=java:/dvdEntityManagerFactory /

See DVD store example for complete code.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060469#4060469

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060469
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-04 Thread flood27
anonymous wrote : One other potential trap is that I have just upgraded from 
Seam 1.2.1 to 2.0b1 and managed-persistence-context has been moved from 
namespace core to persistence. If this is the case, then don't forget to add 
the persistence namespace to your XML namespace config:
  | 
  | xmlns:persistence=http://jboss.com/products/seam/persistence;
  | 
  | persistence:managed-persistence-context name=entityManager
  | auto-create=true
  | persistence-unit-jndi-name=java:/dvdEntityManagerFactory / 

Please add this to the seam2migration.txt, I spent one day on this.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060482#4060482

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060482
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-02 Thread hispeedsurfer
if you have the following in components.xml
core:managed-persistence-context name=entityManager
  |   auto-create=true
  |persistence-unit-jndi-name=java:/TestEntityManagerFactory/

you can use
@In(create=true)
  | private EntityManager entityManager;

But one question. Why you have managed-bean stuff in faces-config.xml?
This should be handelt from your annotations in your bean, I think!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059519#4059519

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059519
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-02 Thread g00se24
You don't need

  | @In(create=true)
  | EntityManager entityManager;
  | 

@In should be sufficent

Greets

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059530#4059530

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059530
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-02 Thread grdzeli_kaci
g00se24 wrote : You don't need
  | 
  |   | @In(create=true)
  |   | EntityManager entityManager;
  |   | 
  | 
  | @In should be sufficent
  | 
  | Greets

HI ALL,
Thank you very much for your posts, i tried everything but myu problem still 
appears,
problem is not on first time, i see tabpane and tree component generated from 
database, all works fine but when i tried to expand tree than an exception 
occured,


i did not understand what happend :(, why got entitymanager null ?



Regards,
Paata
 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059532#4059532

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059532
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-02 Thread grdzeli_kaci
if i remove generate tabpane from database and set simple string, everuthing 
works fine, tree also work.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059534#4059534

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059534
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam, problem with EntityManager

2007-07-02 Thread grdzeli_kaci
can anybody help me ?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059576#4059576

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059576
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user