[JBoss Seam] - HibernateSessionProxy ClassCastException
by tangdazhu
1. i want to inject the hibernate session in seam,so i config the component.xml as follows:
<core:hibernate-session-factory name="hibernateSessionFactory" />
<core:managed-hibernate-session name="session" auto-create="true"
session-factory-jndi-name="java:/HibernateSessionFactory" />
2. Inside managed Bean , i use @in to inject the Hibernate Session,
but when i am using DetachedCriteria in my application
DetachedCriteria criteria =
DetachedCriteria.forClass(Smartform.class);
criteria.getExecutableCriteria(session)
i got the HibernateSessionProxy ClassCastException,i debug the application and found that seam injected HibernateSessionProxy not the real HibernateSession object . So DetachedCriteria can't work.
Does it mean that i can't use DetachedCriteria in my application?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031271#4031271
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031271
19Â years, 1Â month
[JBoss Seam] - Serialization Exception after Session timeout
by ollix
Hi there,
I am having problems after a session timeout.
When a session times out, my web page tries to access a property in an Stateful Session Bean in Session Scope and I get the following Exception:
top:
Exception getting value of property headline.line1 of base of type : de.greenmiles.website.words.SessionWords$$EnhancerByCGLIB$$a4daa20d
...
Caused by: javax.ejb.EJBTransactionRolledbackException: java.lang.RuntimeException: org.jboss.serial.exception.SerializationException: Could not create instance of org.jboss.seam.persistence.EntityManagerProxy - org.jboss.seam.persistence.EntityManagerProxy
It seams to me, that this is some follow-up problem, but I have no idea, what could be wrong.
The exotic part in my setup is, that the session bean accesses another Stateful Session Bean in Application Scope, that is used as a cache for the data used in the Session Bean in Session Scope.
I hope, someone can give me a hint, why the Serialization Exception is happening.
Thanks for any help
:oliver
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031269#4031269
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031269
19Â years, 1Â month
[JBossWS] - NoSuchMethodError in clientside of a jaxws ws
by santhoshitha
Hi,
I am using jbossws1.2.0 on jboss as 4.0.5, and jdk 1.6.0. i have a web service that contains methods that accept arrays of custom classes as one of its parameters, and returns an array of strings. in the wsdl generated i see that separate classes are generated for the arrays of the custom objects and strings. objects of these classes are instead taken as parameters from the client. basically the wsdl contains separate complextypes created for the arrays of the custom objects and strings. when i do a wsdl to java generation on the client i see an sei and a service class that contains a get(service)port method. apart from these there are namespace and package mapping classes.
i would like to use a static stub at the client side, since my client is a standalone java app, that acts as an adapter and interacts with other apps in my organization. how do i get a static stub that implements the sei on the clientside using the jaxws tools provided by jboss? as of now i have a cleint that tries to obtain the port by instanciating the service class and invoking the webservice method. since there is no impl on the client side, i get a NoSuchMethodError.
i have also tried using the dynamic proxy invocation from my client and get an exception there too. the exception reads, Cannot obtain java type mapping for: {http://datamodel.nm_update}securityAttributesArray, where http://datamodel.nm_update is my target namespace and securityAttributeArray is the complex type generated in the wsdl for the array of custom objects, which is the webservice method's parameter.
below is a section of the wsdl generated for my ws.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NmUpdateService_Service" targetNamespace="http://datamodel.nm_update" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://jaxb.dev.java.net/array" xmlns:tns="http://datamodel.nm_update" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<xs:schema targetNamespace="http://jaxb.dev.java.net/array" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType final="#all" name="stringArray">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema targetNamespace="http://datamodel.nm_update" version="1.0" xmlns:tns="http://datamodel.nm_update" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="securityAttributes">
<xs:sequence>
<xs:element minOccurs="0" name="colName" type="xs:string"/>
<xs:element name="index" type="xs:int"/>
<xs:element name="spn" type="xs:int"/>
<xs:element minOccurs="0" name="value" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="#all" name="securityAttributesArray">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="tns:securityAttributes"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
the java name of the webservice method is updateAttributes, and wsdl name is NmUpdateService_updateAttributesResponse.
1) could the nosuchmethoderror be because of incomplete/wrong mapping of type names from wsdl to java?
2) what could the reason for the inability to map between the securityattributesarray object from to java to wsdl be during invocation from the client?
3)will the provider and dispatch APIs help in any way for dynamic invocation?
any help is much appreciated. thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031266#4031266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031266
19Â years, 1Â month
[Beginners Corner] - Email Function Error when running Jboss web applicaiton with
by xijia_chen
Greeting....
I have a Java web applicaiton running on jboss
applicaiton server in linux environment.
I also run James for mail server.
The web application has an email function.
When I run it, it got the following error:
<----
MAIL FROM:<support(a)myapplicaitonDomain.com>
250 ok
RCPT TO:<myfirstname_lastname(a)yahoo.com>
553 sorry, that domain isn't in my list of allowed
rcpthosts (#5.7.1)
DEBUG SMTP: Invalid Addresses
DEBUG SMTP: myfirstname_lastname(a)yahoo.com
DEBUG SMTP: Sending failed because of invalid
destination addresses
--->
In addition,
1. In the same environment, I run a stand alone Java
email application with James (i.e. without JBOSS), the
email function works fine.
2. In my local machine (Windows XP), I run the same
JBoss web application with James, the email function
works fine.
3. I am using james v 2.2.0, jboss 4.0.2.
4. myfirstname_lastname(a)yahoo.com is my real yahoo
email account.
Do I need configure jboss and/or james somewhere to
solve the problem?
Or I maybe miss something else.
Any advices are really appreciated!
Best,
Frank
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031256#4031256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031256
19Â years, 1Â month