[JBoss-user] [JBossWS] - @WebService - Invalid byte 2 of 2-byte UTF-8 sequence

2006-06-27 Thread hlfsousa
This problem is also reported at 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3930922. I checked 
JIRA and it seems that the fix was done in late April, so I assume it is the 
code released with JBossAS 4.0.4 GA. However, I ran on this problem while 
defining a web service through annotations:
@WebService
  | @SOAPBinding(style = SOAPBinding.Style.RPC)
  | public class MyWebService {
  | @WebMethod
  | public MyClass[] someMethod() { ... }
  | }
  | 
  | public class MyClass {
  | private String str;
  | public String getStr() { return str; }
  | public void setStr(String str) { this.str = str; }
  | }
If I populate the elements of the returned array with non UTF-8 characters the 
response parsing fails. The specific character for which I'm getting the error 
is Ç, or _ccedil; (without the underline). If the response XML had 
encoding=ISO-8859-1 everything would work great, is there any way to do this? 
The exception stack trace is the same of the above mentioned topic, so I will 
not post it again. Thanks

Henrique

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3953710

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - SerializationException, not sure about the source

2006-05-23 Thread hlfsousa
Hi, guys.
I'm receiving an exception, apparently with the return value of a remote call 
to a session bean. This is the exception stack trace:
org.jboss.serial.exception.SerializationException
  | at 
org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55)
  | at 
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
  | at 
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
  | at 
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55)
  | at 
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
  | at 
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
  | at 
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55)
  | at 
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
  | at 
org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:85)
  | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
  | at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
  | at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:61)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
  | ... 46 more
  | Caused by: java.lang.reflect.InvocationTargetException
  | at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:124)
  | ... 65 more
  | Caused by: org.jboss.serial.exception.SerializationException
  | at 
org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:134)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55)
  | at 
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
  | at 
org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:204)
  | at 
org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:151)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:167)
  | at 
org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:55)
  | at 
org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:657)
  | at 
org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:65)
  | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
  | at java.util.HashSet.readObject(HashSet.java:278)
  | ... 69 more
  | Caused by: java.lang.reflect.InvocationTargetException
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.serial.persister.PrivateWritePersister.readData(PrivateWritePersister.java:124)
  | ... 80 more
  | Caused by: java.lang.NullPointerException
  | at 
sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:407)
  | at 
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2054)
  | at 

[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread hlfsousa
Since I cannot delete this topic, let me just say that I solved the problem. 
The thing is, as the error suggests, that I had a SimpleDateFormat that was not 
serializable. I declared it in a class as 'DateFormat fmt, and assigned a 
value to it as DateFormat.getDateInstance(). It was used to format some dates 
in toString(), so I made it static final and everything works. The world would 
be so perfect if I didn't do these stupidities.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3945828


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread hlfsousa
I guess we posted at the same time :)
I'm using JBoss 4.0.4.CR2 (can't upgrade to GA right now because of some bad 
collection mapping; not my fault). Thanks for the tips, they are certainly very 
useful. I'm using that DateFormat just for debugging and intend to remove it 
soon -- as soon as everything else works. Thanks again

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3945856


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: EntityListener repeatedly called

2006-05-11 Thread hlfsousa
I have solved the problem by introducing a static ThreadLocal variable to check 
if the listener is executing when it is called the second time. If it is, it 
just returns and causes no further listener calls.

Now I face a second problem: the entity that I get from storage has a 
many-to-many association, and a many-to-one association wich has a many-to-many 
association on its own turn. It happens that hibernate just pops SQL commands 
that deletes these two many-to-many associations (which has some catastrophic 
consequences). I think I'm going to get a JIRA report on this.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3943000


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: Which version of Hibernate is my JBoss running?

2006-05-11 Thread hlfsousa
It will not show up unless you deploy some EJB3 entities. Of course I only 
found it out when I undeployed my EJB3 application and restarted JBoss. :D

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3943008


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: Which version of Hibernate is my JBoss running?

2006-05-10 Thread hlfsousa
You should get the following message from your log:
INFO  [org.hibernate.cfg.Environment] Hibernate 3.2 cr1
I got it from my own, which is the same version as yours (with EJB 3.0).

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3942530


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - EntityListener repeatedly called due to ClassDefNotFoundErro

2006-05-10 Thread hlfsousa
Hi guys,

I am trying to attach an audit listener to my EJB 3.0 entities. All my entities 
already have a listener to set all string properties to upper case (which works 
fine). My audit listener does not modify any properties from the audited 
entity, just reads them and also read the current value of that entity.

When reading values, the audit process calls a method from another session bean 
which executes a named query. When that named query runs, the @PreUpdate method 
of the audit listener is called again for the same entity as the first time 
(not the one involved in the executed query). That becomes an infinite loop 
until a StackOverflowError is thrown.

Is there any way to avoid this? Here is the recurrent part of the thread stack 
trace:
javax.ejb.EJBTransactionRolledbackException: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
  | ...
  | at $Proxy148.registrarAtualizacao(Unknown Source)
  | at 
com.diaup.worldnet.dominio.LogListener.antesDeSalvar(LogListener.java:44)
  | at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:30)
  | at 
org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:75)
  | at 
org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:60)
  | at 
org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:40)
  | at 
org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:301)
  | at 
org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:241)
  | at 
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:121)
  | at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
  | at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
  | at 
org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
  | at 
org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:957)
  | at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1102)
  | at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  | at 
org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:756)
  | at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:63)
  | at 
com.diaup.worldnet.negocio.admin.UsuarioServiceBean.findByLogin(UsuarioServiceBean.java:128)
  | at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
  | at 
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
  | at 
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:196)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
  | at 
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
  | at 

[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: EntityListener repeatedly called

2006-05-10 Thread hlfsousa
I forgot to mention that one of the caused by traces is a 
ClassDefNotFoundError for org.hibernate.action.EntityUpdateAction, but I 
checked that class and it does exist in the shared library hibernate3.jar. I'm 
using JBoss 4.0.4 CR2

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3942619


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Injecting an EJB from JSF Action

2006-04-20 Thread hlfsousa
Hi
I have asked this around and found no response. I started EJB 3 recently, and I 
have successfully created and deployed my EJBs and Entitys. But when it comes 
to accessing them from a web tier things go wrong. I have an EJB that appears 
in JNDI like this: (my @Stateless annotation has no name attribute)
  +- WorldNet
  |   |   +- PerfilServiceBean
  |   |   |   +- remote (proxy: $Proxy75 implements No ClassLoaders found for: 
com.diaup.worldnet.admin.PerfilService (no security manager: RMI class loader 
disabled))
  | --
  | @Stateless
  | public class PerfilServiceBean implements PerfilService { ... }
  | 
First of all, that No ClassLoaders found kind of scared me. Interface 
PerfilService is annotated as @Remote. Okay, my JSF Backing bean looks like 
this:
public class BackingBean {
  | @EJB
  | private PerfilService ejb;
  | 
  | public String doSomething() {
  | ejb.doSomething();
  | }
  | }
When doSomething() is called, ejb is null. I really don't know what happens. 
Both bean and interface classes are packaged in the same ejb jar. The 
BackingBean class is packaged in WEB-INF/classes of a war file, and both are 
contained in the same ear file. I guess that's why I don't get a 
ClassNotFoundException when BackingBean is loaded. Anyway, why ejb is still 
null?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938437


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Injecting an EJB from JSF Action

2006-04-20 Thread hlfsousa
Okay, I found the answer here: 
http://docs.jboss.org/ejb3/app-server/tutorial/ear/ear.html
Man, that was a tough one to both find and to accept :P

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

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3938470


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user