The moose likes JBoss/WildFly and the fly likes Strange JBoss error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Strange JBoss error" Watch "Strange JBoss error" New topic

Strange JBoss error

Ken Hively

Joined: Nov 17, 2004
Posts: 2
When I start JBoss (even a clean install of JBoss), I get the following error (and the JAR file is in the right place):
"java.lang.NoClassDefFoundError: javax/activation/DataSource" (see stack below)

07:38:37,399 INFO [Engine] ContextConfig[/jboss-net]: Added certificates -> request attribute Valve
07:38:37,400 INFO [Engine] ContextConfig[/jboss-net]: Configured an authenticator for method BASIC
07:38:37,457 WARN [EmbeddedCatalinaService41] Unable to invoke setDelegate on class loader{ url=file:/usr/local/jboss-3.2.2RC1_tomcat-4.1.24/server/all/deploy/jboss-net.sar/ ,addedOrder=6}
07:38:37,457 INFO [Engine] StandardManager[/jboss-net]: Seeding random number generator class
07:38:37,458 INFO [Engine] StandardManager[/jboss-net]: Seeding of random number generator has been completed
07:38:37,460 INFO [Engine] StandardWrapper[/jboss-net efault]: Loading container servlet default
07:38:37,461 INFO [Engine] StandardWrapper[/jboss-net:invoker]: Loading container servlet invoker
07:38:37,472 INFO [AxisService] Starting
07:38:38,168 WARN [ServiceController] Problem starting service
java.lang.NoClassDefFoundError: javax/activation/DataSource
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class$(
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.getSerializerClass(
at org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.<init>(
at org.apache.axis.encoding.DefaultTypeMappingImpl.<init>(
at org.apache.axis.encoding.DefaultTypeMappingImpl.getSingleton(
at org.apache.axis.encoding.TypeMappingRegistryImpl.<init>(
at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(

The activation.jar is in the lib folder, and like I said even if I create/run a clean JBoss package I still get this error. I am running Fedora c2.

Any ideas?

Thank you,

Andy Bach

Joined: Feb 02, 2005
Posts: 4
I'm seeing something similar, trying to get a SOAP example to work. It appears to be due to the method signature for javax/activation/datasource not being able to handle byte arrays.

I've got Apache SOAP 2.3.1 and the latest JAF 1.0.2 from Sun - the code where I'm seeing the error is in the soap.jar
public void setRootPart(byte[] b, String contentType)
throws MessagingException {
ByteArrayDataSource ds = new ByteArrayDataSource(b, contentType);
DataHandler dh = new DataHandler(ds);

The signature for DataHandler and a data source requires a javax.activation.datasource obj, which ByteArrayDataSource isn't?

I dunno, its maddening.

Hi Mom!
Andy Bach

Joined: Feb 02, 2005
Posts: 4
Well, just a brief, in probably unhelpful follow up - w/o changing anything, except (in Eclipse) the version of the Javs SDK used (from 1.4.2 to 1.5), I got my app to compile and run.

My guess is its a bug. There's a mention of a change to the DataHandler to fix a bug in it in the last update, so ....

I agree. Here's the link:
subject: Strange JBoss error
It's not a secret anymore!