[Installation, Configuration & DEPLOYMENT] - [3.2.3] [NoClassDefFoundError] Weird exception although i ha
by nicdo77
Hey there,
I know, this subject has been treated already in this forum, but i did not find the answer to my problems.
Here is the context.
I am working on an .ear. So far, i was not packaging my librairies in my .ear, i used to put them directly in JBoss (in /server/default/lib).
Now i have some problems with my app and i decided to clean all this mess. So i removed all the lib from my JBoss directory lib (/server/default/lib), then i downloaded a fresh JBoss 3.2.3 from the website, unzipped it and copied all the libs in /server/default/lib into my JBoss
Now i am having some problems.
My app is using Hibernate 2.x. Though i packaged the hibernate2.jar in my .ear, Jboss fails at deployment. So i added hibernate2.jar in server/default/lib. It still fails, but later in the code;)
Here is the exception:
2007-11-28 10:05:34,199 WARN [org.jboss.system.ServiceController] Problem starting service jboss.jca:service=HibernateFactory, name=HibernateFactory
| java.lang.NoClassDefFoundError: net/sf/hibernate/collection/List
| at net.sf.hibernate.type.TypeFactory.list(TypeFactory.java:186)
| at net.sf.hibernate.mapping.List.getCollectionType(List.java:19)
| at net.sf.hibernate.mapping.Collection.getType(Collection.java:275)
| at net.sf.hibernate.cfg.Binder.bindProperty(Binder.java:422)
| at net.sf.hibernate.cfg.Binder.createProperty(Binder.java:1041)
| at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1022)
| at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:344)
| at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1204)
| at net.sf.hibernate.cfg.Configuration.add(Configuration.java:247)
| at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:281)
| at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:304)
| at net.sf.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:174)
| at net.sf.hibernate.jmx.HibernateService.start(HibernateService.java:145)
| 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:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
| at $Proxy14.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:394)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
| at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
| at $Proxy6.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
| at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:394)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
| 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:324)
| at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
| at org.jboss.Main.boot(Main.java:150)
| at org.jboss.Main$1.run(Main.java:395)
| at java.lang.Thread.run(Thread.java:534)
So as you can see, i get a NoClassDefFoundError on net.sf.hibernate.collection.List.
BUT: i checked my hibernate2.jar in my JBoss libs, this class is present. I checked my hibernate2.jar in my .ear, the class is present.
BESIDES: before throwing the exception, some hibernate classes are used (see calls to net.sf.hibernate.cfg.Binder.bindRoot, bindRootClass, createProperty...)
Someone told me the error might come because the VM doesnt know which version of my net.sf.hibernate.collection.List class to use (since its present in two librairies). BUT, if i remove one of them, as soon as i start deploying my app, deployment fails at the very beginning saying a class is missing...
HEEEELP!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108806#4108806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108806
18 years, 5 months
[JBossWS] - Re: Java Client Application using Stub with WS-Security
by alessio.soldano@jboss.com
Did you set up the keystore/truststore references in your environment?
| System.setProperty("org.jboss.ws.wsse.keyStore", "resources/interop/nov2007/wsse/shared/META-INF/alice-sign_enc.jks");
| System.setProperty("org.jboss.ws.wsse.trustStore", "resources/interop/nov2007/wsse/shared/META-INF/wsse10.truststore");
| System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
| System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
| System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
| System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
|
If you still get errors, please post here your logs with the error details.
anonymous wrote :
| Exception in thread "main" javax.xml.ws.WebServiceException: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
| at org.jboss.ws.core.jaxws.client.ClientImpl.callRequestHandlerChain(ClientImpl.java:160)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:297)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
| at $Proxy14.hello(Unknown Source)
| at com.main.MainTest.main(MainTest.java:51)
| Caused by: org.jboss.ws.core.CommonSOAPFaultException: An internal WS-Security error occurred. See log for details
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:105)
| at org.jboss.ws.extensions.security.WSSecurityDispatcher.handleOutbound(WSSecurityDispatcher.java:314)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleOutboundSecurity(WSSecurityHandler.java:95)
| at org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient.handleOutbound(WSSecurityHandlerClient.java:45)
| at org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
| ... 7 more
|
| Anyone knows how I can resolve my problem ?
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108801#4108801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108801
18 years, 5 months
[JBoss Seam] - seam-gen : list.xhtml - Create Button issue
by gonzalad
Hello,
When using seam-gen (2.0.0) I have the following issue : in list page, button 'Create entity' can disappear.
To reproduce the problem, you'll need 2 associated entities (i.e. @ManyToOne) :
1 - navigate to entity A list.
2 - click 'Create entity A' button.
3 - click 'Select entity B' button.
4 - on entity B edit page, just click on the menu link 'Entity A List'
5 - you're back to 'Entity A List' page, but the 'Create entity A' button just disappeared.
This issue is because Create button is rendered only if 'from' parameter is empty :
<s:div styleClass="actionButtons" rendered="#{empty from}">
This isn't the case in interaction 4->5.
I've just modified menu.xhtml to force from parameter to '' and it resolves this issue :
changed from
<s:link view="/CustomerList.xhtml"
| value="Customer List"
| propagation="none"/>
to :
<s:link view="/CustomerList.xhtml"
| value="Customer List"
| propagation="none">
| <f:param name="from" value=""/>
| </s:link>
Should I raise a JIRA ? Or have I misunderstood sthing ?
Thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108794#4108794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108794
18 years, 5 months
[JBoss Messaging] - Properties inside an ObjectMessage becomes a HashMap
by sll74
Hi
We are running the following test:
A producer sends an ObjectMessage with a Properties inside to a Queue.
A consumer dequeues the ObjectMessage from the Queue, but we found an HashMap instead of a Properties.
| Procuder:
|
| if ( !initError ){
| Session session = null;
| MessageProducer publisher = null;
| ObjectMessage message = null;
| int numMsgs = ciclesNumber.intValue();
|
| try {
| StringBuffer sb = new StringBuffer();
| properties = new Properties();
|
| for (int i = 0; i < numMsgs; i++) {
| if ( stop ){
| break;
| }
| session = connection.createSession(false, 0); //autocommit
| publisher = session.createProducer(dest);
| message = session.createObjectMessage();
| properties.clear();
| properties.put("properties iteration",
| String.valueOf( i ) );
| message.setIntProperty("iteration", i );
| message.setObject( properties );
|
| sb.setLength( 0 );
| sb.append( " iteration number : " ).append( i );
| log.info( sb.toString() );
|
| publisher.send( message, DeliveryMode.PERSISTENT,
| Message.DEFAULT_PRIORITY, timeToLive.intValue() );
|
| session.close();
| }
| mess = "messaggio spedito";
| } catch (Throwable t) {
| // JMSException could be thrown
| mess = t.toString();
| log.error("PublisherBean.publishNews: ", t);
| }
| }
|
| Consumer:
|
| ObjectMessage msg = null;
| StringBuffer sb = new StringBuffer();
|
| try {
| if (message instanceof ObjectMessage ) {
| msg = (ObjectMessage) message;
| Integer id = msg.getIntProperty("iteration");
| sb.setLength( 0 );
| sb.append( "MESSAGE BEAN: IntProperty iteration: " ).append( id );
| log.info( sb );
| Object array = msg.getObject();
| log.info( array.getClass() );
|
| long now = System.currentTimeMillis();
|
| while(true){
| if ( System.currentTimeMillis() - now > 10000 )
| break;
| }
|
| } else {
| log.warn("Message of wrong type: " + message.getClass().getName());
| }
| } catch (JMSException e) {
| e.printStackTrace();
| } catch (Throwable te) {
| te.printStackTrace();
| }
|
The cosumer writes:
| base.MessageMdb.onMessage INFO - class java.util.HashMap
|
Any hints?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108788#4108788
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108788
18 years, 5 months