Bonjour,
Mon environnement est netbeans 7, glassfish 3.1, jEE5
J'aimerai simplement ajouter une catégorie et que la méthode dans mon stateless bean me retourne l'object en question.
La persistance ce fait correctement, j'ai bien ma catégorie qui est créé mais c'est lors du return côté EJB que ça coince...
Client main :
Côté stateless catalogBean :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Category category = new Category(); category.setTitle("ophélie"); System.out.println(category.getIdCategory()); System.out.println("test1"); category = catalogBean.createCategory(category); System.out.println(category.getIdCategory()); System.out.println("test4");
L'erreur et la suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 @Stateless @TransactionAttribute(value = TransactionAttributeType.REQUIRED) @TransactionManagement(TransactionManagementType.CONTAINER) public class CatalogBean implements CatalogBeanRemote, CatalogBeanLocal { @PersistenceContext(unitName="booxtorePU") private EntityManager em; @Override public Category createCategory(Category category) { System.out.println("test5"); em.persist(category); return category; } @Override public Category findCategory(long categoryId) { Category category = new Category(); category = em.find(Category.class, categoryId); return category; } public Category updateCategory(Category category) { em.merge(category); return category; } public void deleteCategory(Category category) { em.remove(category); } public void createBook(Book book) { em.persist(book); } public Book findBook(long bookId) { Book bookfind = em.find(Book.class, bookId); return bookfind; } public Book updateBook(Book book) { em.merge(book); return book; } public void deleteBook(Book book) { em.remove(book); } }
Merci bien
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 Infos: ACDEPL104: Java Web Start services stopped for the app client booxtore-client Avertissement: ACDEPL112: The following extensions or libraries are referenced from the manifest of /home/bastien/glassfish-3.1.1/glassfish/domains/domain1/applications/xfer-8701307910290052246/booxtore-client.jar but were not found where indicated: booxtore-clientView.jar lib/booxtore-clientView.jar ; ignoring and continuing Infos: ACDEPL103: Java Web Start services started for the app client booxtore-client (contextRoot: /booxtore-client) Infos: booxtore-client a été déployé en 497 ms. Avertissement: IOP01000001: Missing local value implementation org.omg.CORBA.NO_IMPLEMENT: Avertissement: IOP01000001: Missing local value implementation vmcid: SUN minor code: 1 completed: Maybe at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95) at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387) at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.access$400(WrapperGenerator.java:107) at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator$2.invoke(WrapperGenerator.java:511) at com.sun.corba.ee.spi.orbutil.proxy.CompositeInvocationHandlerImpl.invoke(CompositeInvocationHandlerImpl.java:99) at $Proxy146.missingLocalValueImpl(Unknown Source) at com.sun.corba.ee.impl.io.FVDCodeBaseImpl.implementation(FVDCodeBaseImpl.java:113) at com.sun.org.omg.SendingContext._CodeBaseImplBase._invoke(_CodeBaseImplBase.java:99) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:199) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1624) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1486) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:990) at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:214) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:742) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:539) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2324) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540) Caused by: java.lang.ClassNotFoundException: oracle.toplink.essentials.indirection.IndirectList (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:394) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:184) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:219) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:152) at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:319) at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:228) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640) at com.sun.corba.ee.impl.util.RepositoryId.getClassFromType(RepositoryId.java:577) at com.sun.corba.ee.impl.io.ValueHandlerImpl.getClassFromType(ValueHandlerImpl.java:373) at com.sun.corba.ee.impl.io.FVDCodeBaseImpl.implementation(FVDCodeBaseImpl.java:105) ... 12 more
Partager