[JBossWS] - org.jboss.ws.WSException: Cannot obtain UnifiedBeanMetaData
by MmarcoM
hi all,
i have deployed an EJB webservice in jboss4.0.4GA.. using latest download of jbossws..
this is my wsdl-config
| <configuration xmlns="http://www.jboss.org/jbossws-tools">
|
| <java-wsdl>
| <service name="MessengerService" style="rpc" endpoint="com.mw.webservices.MessengerService"/>
| <namespaces target-namespace="http://mw.com/messengerservice"
| type-namespace="http://mw.com/messengerservice/types"/>
| <mapping file="mss-mapping.xml"/>
| <webservices ejb-link="ResponderBean" append="true"/>
| </java-wsdl>
|
| </configuration>
|
|
here's the ejb-jar (for ResponderBean part)
| <session id="Session_Responder">
| <description><![CDATA[]]></description>
|
| <ejb-name>Responder</ejb-name>
|
| <service-endpoint>com.mw.webservices.MessengerService</service-endpoint>
| <ejb-class>com.mw.ejb.ResponderBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
|
| <ejb-local-ref id="EJBLocalRef_5">
| <ejb-ref-name>ejb/ContactLocalHome</ejb-ref-name>
| <ejb-ref-type>Entity</ejb-ref-type>
| <local-home>com.ejb.partners.contact.ContactLocalHome</local-home>
| <local>com.ejb.partners.contact.ContactLocal</local>
| </ejb-local-ref>
|
i have generated mapping.xml and webservices.xml, and i have put
them in the META-INF directory of the jar file where my ejbs are ..
when i deploy my ear, i have received this exception
| org.jboss.ws.WSException: Cannot obtain UnifiedBeanMetaData for: ResponderBean
| at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JS
| 109ServerMetaDataBuilder.java:152)
| at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpoi
| tDeployer.java:85)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerIn
| erceptor.java:80)
| at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(Deploye
| InterceptorEJB.java:44)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor
| create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterc
| ptor.java:91)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy31.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercep
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(Model
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy6.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeployme
| tScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeployment
| canner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread
| doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(
| bstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBean
| upport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceM
| eanSupport.java:245)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceContro
| ler.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
|
what am i doing wrong?
can anyone help me out?
thanx and regards
marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969829#3969829
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969829
19 years, 8 months
[JBoss Seam] - UISelectOne: Value is not a valid option.
by blady
Hi!
I have a big problem with JSF validation. I don't know why but when i submit a form i get "Value is not a valid option" error for h:selectOneMenu control. I'm using @SelectItems binder with my converter:
xhtml:
| <h:selectOneMenu class="configInput"
| id="tAccountStatus"
| value="#{bankAccountControl.instance.idBankAccountStatus}"
| converter="#{bankAccountStatusFinder.converter}">
| <f:selectItems value="#{bankAccountStatusList}"/>
| </h:selectOneMenu>
|
#{bankAccountStatusList}:
| @SelectItems(valueStrategy=SelectItems.Strategy.OBJECT, labelMethod="getStatusName")
| private List<BankAccountStatus> bankAccountStatusList;
|
| @Factory("bankAccountStatusList")
| public void findBankAccountStatuses() {
| bankAccountStatusList = entityManager
| .createQuery("FROM BankAccountStatus bas ORDER BY bas.statusName")
| .getResultList();
| }
|
#{bankAccountControl.instance}:
| @Valid
| private BankAccount bankAccount;
|
| public BankAccount getInstance() {
| return bankAccount;
| }
|
#{bankAccountStatusFinder.converter}:
| static public class BankAccountStatusConverter
| implements Converter, Serializable {
|
| private static final long serialVersionUID = 3820066884549543875L;
|
| List<BankAccountStatus> bankAccountStatusList;
|
| public BankAccountStatusConverter(
| List<BankAccountStatus> bankAccountStatusList){
| this.bankAccountStatusList = bankAccountStatusList;
| }
|
| public String getAsString(FacesContext facesContext,
| UIComponent component,
| Object obj) {
| if (obj == null) return null;
|
| BankAccountStatus bankAccountStatus = (BankAccountStatus) obj;
| String val = String.valueOf(bankAccountStatus.getIdBankAccountStatus());
| return val;
| }
|
| public Object getAsObject(FacesContext facesContext,
| UIComponent component,
| String str) throws ConverterException {
|
| if (str == null || str.length()==0) {
| return null;
| }
|
| long id = Long.valueOf(str).longValue();
| for (BankAccountStatus bankAccountStatus : bankAccountStatusList){
| if (bankAccountStatus.getIdBankAccountStatus() == id) {
| return bankAccountStatus;
| }
| }
| return null;
| }
| }
|
There is no any exception on console, anything. Only message from JSF that "Value is not a valid option", i don't know how to make it works.
Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969828#3969828
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969828
19 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - Hibernate3.1.3 ClassLoader Memory Leak
by i_n_g
The Hibernate classes and the ClassLoader which loads them are not GCed.
The following example has two classes, "CallJunk" creates a ClassLoader , loads Junk and hibernate classes, and call Junk.main(). Junk.main() opens a session and closes it.
The CallJunk program grows 1-2 MB in each loop step and finally run out of memory.
I profiled with JProfiler, found hibernate classes are duplicated, which is loaded by a new URLClassLoader in the Loop, but never GCed.
| package calljunk;
|
| import java.io.File;
| import java.net.URL;
| import java.net.URLClassLoader;
|
| public class CallJunk {
|
| static String[] dum=new String[0];
| static Class[] parameterTypes = new Class[]{dum.getClass()};
|
| public static void main(String[] args)throws Exception {
| URL[] urls = new URL[]{
| new File("../junk/cglib-2.1.3.jar").toURL(),
| new File("../junk/commons-collections-2.1.1.jar").toURL(),
| new File("../junk/dom4j-1.6.1.jar").toURL(),
| new File("../junk/ehcache-1.1.jar").toURL(),
| new File("../junk/hibernate3.jar").toURL(),
| new File("../junk/jta.jar").toURL(),
| new File("../junk/postgresql-8.0-311.jdbc3.jar").toURL(),
| new File("../junk/commons-logging.jar").toURL(),
| new File("../junk/bin").toURL()
| };
|
| for (int i=0; i<100; i++) {
| System.out.println("No "+i+": ");
| System.in.read();
| Class cls = new URLClassLoader(urls).loadClass("junk.Junk");
| cls.getMethod("main", parameterTypes).invoke(null, new Object[]{dum});
| }
| }
| }
|
|
| package junk;
| import org.hibernate.HibernateException;
| import org.hibernate.Session;
| import org.hibernate.SessionFactory;
| import org.hibernate.cfg.Configuration;
| import org.hibernate.cfg.Environment;
|
| import javax.naming.InitialContext;
|
| public class Junk {
|
| private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
|
| public static void main(String[] args) throws Exception {
| Configuration cfg = new Configuration();
| SessionFactory sFactory = null;
| try {
| cfg.configure(CONFIG_FILE_LOCATION);
| String sessionFactoryJndiName = cfg.getProperty(Environment.SESSION_FACTORY_NAME);
| if (sessionFactoryJndiName != null) {
| cfg.buildSessionFactory();
| sFactory = (SessionFactory) (new InitialContext()).lookup(sessionFactoryJndiName);
| } else {
| sFactory = cfg.buildSessionFactory();
| }
| } catch (Exception e) {
| throw new HibernateException("Could not initialize the Hibernate configuration");
| }
| Session s = sFactory.getCurrentSession();
| s.close();
| sFactory.close();
| }
|
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969822#3969822
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969822
19 years, 8 months