Jose Alvarez de Lara

Ranch Hand
+ Follow
since May 10, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jose Alvarez de Lara

Here is the spring-stateless-ejb.xml file,


Best,

Thanks,
jose
9 years ago
I'm carrying a MySQL database to another Neo4j for which I read MySQL using Ejb and convert to a database Neo4j.
For this I use Spring. The problem is I can not instantiate the EJB because I get a NullPointerException.

These are the code and the configuration files,

The Business Interface


The Implementation class


The EJB Remote Object


The Country Service EJB


ejb-jar.xml


client-spring-stateless-ejb.xml


And here is the client,


The application is deployed in Tomcat as a webapp. Here is the exception,


Please, where am I getting wrong?

All the best,

Thanks,
jose

9 years ago
Take a look at this web, it seems that resolve my issue

Seam Data Validation

Thank you for your interesting.

Kind regards,
Jose
13 years ago
JSF
I get the following message,

Warning: This page calls for XML namespace http://jboss.com/products/seam/taglib declared with prefix s but no taglibrary exists for that namespace.

Whitch is the taglibrary?

Thanks,
Jose
13 years ago
JSF
Hi Herbert,

If I add a little hardcode like 'Helo world' I can see it.

It's the <s:link> tag what I cannot see

Thnaks,
Jose
13 years ago
JSF
Hi,

I am newbe with JBoss Seam. I am using 2.2.0 GA version. My problem is that I cannot display a JSF page.
When I invoke it I see a blank page. Here is my code,

Then bean (HomeBean),



The JSF page (index.xhtml),



I am thinking I have to do some declarations in the faces-config.xml file but I do not know what is it.

Please help.

Kind regards,
Jose
13 years ago
JSF
Hi,

There is a bug in my GF version.

Let you see the fix in [#GLASSFISH-16816]

Regards,
Jose
13 years ago
Hi,

I have an Oracle StoredFunctionCall method implemented in an EJB 3.1, all deployed
in GF 3.1.1

When I try to call the EJB from an Application Client Project I get the following
exception


javax.naming.CommunicationException: Communication exception for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} [Root exception is java.rmi.RemoteException: CORBA NO_IMPLEMENT 1398079489 Maybe; nested exception is:
org.omg.CORBA.NO_IMPLEMENT: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_IMPLEMENT: ADVERTENCIA: 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:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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 $Proxy148.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: session.__EJB31_Generated__ObtenerMaxIdPedidoUsuario__Intf____Bean__ (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:202)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:135)
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

----------END server-side stack trace---------- vmcid: SUN minor code: 1 completed: Maybe]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:542)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at Main.getMaxId(Main.java:34)
at Main.main(Main.java:17)
Caused by: java.rmi.RemoteException: CORBA NO_IMPLEMENT 1398079489 Maybe; nested exception is:
org.omg.CORBA.NO_IMPLEMENT: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_IMPLEMENT: ADVERTENCIA: 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:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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 $Proxy148.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: session.__EJB31_Generated__ObtenerMaxIdPedidoUsuario__Intf____Bean__ (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:202)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:135)
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

----------END server-side stack trace---------- vmcid: SUN minor code: 1 completed: Maybe
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:311)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:213)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
at com.sun.enterprise.naming.impl._SerialContextProvider_DynamicStub.lookup(com/sun/enterprise/naming/impl/_SerialContextProvider_DynamicStub.java)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:505)
... 4 more
Caused by: org.omg.CORBA.NO_IMPLEMENT: ----------BEGIN server-side stack trace----------
org.omg.CORBA.NO_IMPLEMENT: ADVERTENCIA: 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:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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 $Proxy148.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: session.__EJB31_Generated__ObtenerMaxIdPedidoUsuario__Intf____Bean__ (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:202)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:135)
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

----------END server-side stack trace---------- vmcid: SUN minor code: 1 completed: Maybe
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:900)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:131)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:637)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:499)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:373)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:273)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at com.sun.org.omg.SendingContext._CodeBaseStub.implementation(_CodeBaseStub.java:63)
at com.sun.corba.ee.impl.encoding.CachedCodeBase.implementation(CachedCodeBase.java:119)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.getClassFromString(CDRInputStream_1_0.java:2292)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1095)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:935)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:525)
at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:289)
at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:605)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:775)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_any(CDRInputObject.java:482)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:452)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.read(DynamicMethodMarshallerImpl.java:299)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:483)El MaxId es null

at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:203)
... 8 more



Here is the main method of the Application Client Project within an ear project,



And this is the EJB,



I know that the StoredFunctionCall musts return a Number value, but this is a test.
In my web app I have it returning a Long value, that is in fact what I need. The problem
is that I get an exception about can't cast from java.lang.String to java.lang.Long.

I do not know what is happening so I need to know what is the String value for debuging.

Kind regards,
Jose
13 years ago
Hi

It is happening something estrange in my Oracle database. I have to ways of getting the
ID_PEDIDOUSUARIO. One of them is as follows,


em.persist(pedidoUsuario);
em.flush();
return pedidoUsuario.getIdPedidousuario();



The other one is calling a StoredFunctionCall that gets the last Id inserted in the database.
The estrange thing is that in both cases I get a value one unit less than the real Id (PK).
I mean if the inserted Id (PK) has value of ‘n’ I get in both cases ‘n-1’. And that is the
reason I am getting NullPointerException for the first inserting.

But one thing that I cannot understand is that if I execute the Function from inside an Oracle
management tool I get the correct value so there must be something wrong during the execution
of the EJBs.

Any suggestion about this issue should be really appreciated.

Kind regards,
Jose
Hi,

Let's go on tomorrow. Now is 23:30 pm in Madrid (Spain) and I am a little bit tired.
I like your way of working. I think we can resolve this issue.

Thanks a lot,
Jose
Hi Piotr,

You say,

>>By the way - is this (assigning of an ID and reading it back) all what you want to achieve right now?

Yes, that is all.


I do not understand why the sequence generator returns pu.getPedidousuario 106 value when the PK in the table Pedido_Usuario (ID_PEDIDOUSUARIO)
is 107 value. This is the reasson why I prefer to get it calling a SP or a Function. But even in those cases I get a NullPointer.

I am in conversation with James Sutherland from EclipseLink by the mailing list but all the help should be really appreciated.

In fact this is all I need to end my web app.

Kind regards,
Jose
Hi Piotr,

First of all thanks for your interesting.

About your questios,

1)What is the "StoredProcedure" class and "JpaEntityManager"?

I took the code from another example that I have.

2)What does 'pedidoUsuarioFacade.create(order); ' do?

It persist an entity PedidoUsuario.

3)How is your entity annotated?

Here is the code snippet of the entities I manage in ManejadorPedido session bean,







I am not sure if this is the information you are asking me. If not let me know it.

Kind regards,
Jose
Hi,

I am newbe in this question so I need help.

Kind regards,
Jose
Hi,

I am developping a JPA, EJB and JSF 2.0 web app. I persist an entity PedidoUsuario and afetr it I want to get its PK in
the corresponding table ALMACEN.PEDIDO_USUARIO. To persist the entity I use an special EJB that calls another EJBs.

Here is the EJB,



The problem is in the method placeOrder(Usuario usuario, ShoppingCart cart) when I try to get the PK of the persisted PedidoUsuario.
For it I use an EJB that implements a StoredProcedureCall. Why? The reason why is that if I use JPQL, being the PK type of sequence
it returns me a wrong PK. So I guessed it could be resolved attacking the database directly.

Here is the EJB,



being the SP as follows,



But it fails. The EJB method ObtenerMaxId() returns a NullPointerException.

Maybe I am wrong in the code of the SP or maybe in the EJBs, I do not know.

Please help.

Hi Martin,

I have saved the Concurrency tutorial in my favourite’s folder of the browser.

It is clear I have to study about this stuff.

Regarding the method I have changed my code that means
I do not going to need it any longer.

Kind regards,
Jose