Classpath problem with my own Container

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Classpath problem with my own Container

Michael Imhof
I created my own Container"DocGenContainer" generating documentation about entities and
services inside ofbiz. The Container is similar to TestRunContainer with the difference that I reference
service and entity classes:

  package org.ofbiz.docgen.container;

  import org.ofbiz.base.container.Container;
  import org.ofbiz.base.container.ContainerConfig;
  import org.ofbiz.base.container.ContainerException;
  import org.ofbiz.entity.GenericDelegator;
  import org.ofbiz.service.GenericDispatcher;
  import org.ofbiz.service.GenericServiceException;
  import org.ofbiz.service.LocalDispatcher;

  public class DocGenContainer implements Container {
  ...}

Now. If I try to start ofbiz with this container (java -jar ofbiz.jar -docgen)
I get the following error:

2007-02-07 14:12:11,831 (main) [ ComponentContainer.java:120:INFO ] All components loaded
2007-02-07 14:12:11,846 (main) [ClassLoaderContainer.java:50 :INFO ] CachedClassLoader created
Exception in thread "main" java.lang.NoClassDefFoundError: org/ofbiz/service/GenericServiceException

Does somebody has an idea what's wrong??

Michael
Reply | Threaded
Open this post in threaded view
|

RE: Classpath problem with my own Container

Akotaobi, Uche
[Immi]
> I created my own Container"DocGenContainer" generating documentation about
> entities and services inside ofbiz. The Container is similar to
> TestRunContainer with the difference that I reference service and entity
> classes:

[snip]
>   import org.ofbiz.service.GenericServiceException;

[snip]

> Now. If I try to start ofbiz with this container (java -jar ofbiz.jar
> -docgen) I get the following error:
>
> 2007-02-07 14:12:11,831 (main) [
> ComponentContainer.java:120:INFO ] All components loaded
> 2007-02-07 14:12:11,846 (main) [ClassLoaderContainer.java:50
> INFO ] CachedClassLoader created Exception in thread "main"
> java.lang.NoClassDefFoundError:
> org/ofbiz/service/GenericServiceException
>
> Does somebody has an idea what's wrong??


Hi, Immi.  Is framework/service/build/lib/ofbiz-service.jar in your container
project's classpath?  Our Ant build files tend to include *.jar from
framework/*/build/lib, just to be on the safe side.

--
Uche O. Akotaobi
Workflow Engineer
Xerox Corporation
701 South Aviation Blvd., ESAE-116
El Segundo, CA  90245
Phone (310) 333-2403  Internal 8*823-2403
Fax (310) 333-8419
[hidden email]

XEROX
Technology.  Document Management.  Consulting Services

www.xerox.com
Reply | Threaded
Open this post in threaded view
|

RE: Classpath problem with my own Container

Michael Imhof
I found the problem myself.
There was a jar file with a old class DocGenContainer in the class path...

Thanks

Akotaobi, Uche wrote
[Immi]
> I created my own Container"DocGenContainer" generating documentation about
> entities and services inside ofbiz. The Container is similar to
> TestRunContainer with the difference that I reference service and entity
> classes:

[snip]
>   import org.ofbiz.service.GenericServiceException;

[snip]
> Now. If I try to start ofbiz with this container (java -jar ofbiz.jar
> -docgen) I get the following error:
>
> 2007-02-07 14:12:11,831 (main) [
> ComponentContainer.java:120:INFO ] All components loaded
> 2007-02-07 14:12:11,846 (main) [ClassLoaderContainer.java:50
> INFO ] CachedClassLoader created Exception in thread "main"
> java.lang.NoClassDefFoundError:
> org/ofbiz/service/GenericServiceException
>
> Does somebody has an idea what's wrong??


Hi, Immi.  Is framework/service/build/lib/ofbiz-service.jar in your container
project's classpath?  Our Ant build files tend to include *.jar from
framework/*/build/lib, just to be on the safe side.

--
Uche O. Akotaobi
Workflow Engineer
Xerox Corporation
701 South Aviation Blvd., ESAE-116
El Segundo, CA  90245
Phone (310) 333-2403  Internal 8*823-2403
Fax (310) 333-8419
Uche.Akotaobi@xerox.com

XEROX
Technology.  Document Management.  Consulting Services

www.xerox.com