Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

EAServer 6.2: java.lang.NoClassDefFoundError

2 posts in Java J2EE specific Last posting was on 2009-01-28 19:54:48.0Z
Mattias Posted on 2009-01-27 10:36:07.0Z
Sender: 6fff.497e066c.1804289383@sybase.com
From: Mattias
Newsgroups: sybase.public.easerver.j2ee
Subject: EAServer 6.2: java.lang.NoClassDefFoundError
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <497ee397.383.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Jan 2009 02:36:07 -0800
X-Trace: forums-1-dub 1233052567 10.22.241.41 (27 Jan 2009 02:36:07 -0800)
X-Original-Trace: 27 Jan 2009 02:36:07 -0800, 10.22.241.41
Lines: 28
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7904
Article PK: 208327

Hi,

I have problem that I don't get EAServer to find data
classes in other components. An example:

I have one component, some.package.EJB1, that have a data
class some.package.data.Information.
The EJB1 have one method in the remote interface that
returns an Information object.
In the /deploy/ejbjars/ejb1/some/package/data the file
Information.class exists. This all looks fine.

I then create another component some.other.package.EJB2.
This component also uses the same
some.package.data.Information object. But this causes an
exception to occure.
It's possible to compile the EJB2 (since I have
/deploy/ejbjars/ejb1/ in my classpath) but when I deploy it
to the EAServer I get an exception
java.lang.NoClassDefFoundError:
some/package/data/Information. I have tried to deploy both
by putting the EJB2.jar file in the deploy folder and by
using ant scripts with the same result.

Can you please help me with this?

Best regards,
Mattias


Evan Ireland [Sybase] Posted on 2009-01-28 19:54:48.0Z
From: "Evan Ireland [Sybase]" <eireland@sybase.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: sybase.public.easerver.j2ee
Subject: Re: EAServer 6.2: java.lang.NoClassDefFoundError
References: <497ee397.383.1681692777@sybase.com>
In-Reply-To: <497ee397.383.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4980b808@forums-1-dub>
Date: 28 Jan 2009 11:54:48 -0800
X-Trace: forums-1-dub 1233172488 10.22.241.152 (28 Jan 2009 11:54:48 -0800)
X-Original-Trace: 28 Jan 2009 11:54:48 -0800, vip152.sybase.com
Lines: 40
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7905
Article PK: 208330

Mattias,

Try putting both the EJB-JAR with Information.class in the CLASSPATH
before calling the deploy tool. This should help with deployment, but
at runtime you need to ensure that the class will also be accessible to
all EJB-JARs that have code referencing it. You can put it into a JAR in
the lib/ext folder, or somewhere that is accessible to the class loader
named "lib.default-ext" (which you can define in the web console).

Or, put Information.class in both EJB-JAR files.

Mattias wrote:
> Hi,
>
> I have problem that I don't get EAServer to find data
> classes in other components. An example:
>
> I have one component, some.package.EJB1, that have a data
> class some.package.data.Information.
> The EJB1 have one method in the remote interface that
> returns an Information object.
> In the /deploy/ejbjars/ejb1/some/package/data the file
> Information.class exists. This all looks fine.
>
> I then create another component some.other.package.EJB2.
> This component also uses the same
> some.package.data.Information object. But this causes an
> exception to occure.
> It's possible to compile the EJB2 (since I have
> /deploy/ejbjars/ejb1/ in my classpath) but when I deploy it
> to the EAServer I get an exception
> java.lang.NoClassDefFoundError:
> some/package/data/Information. I have tried to deploy both
> by putting the EJB2.jar file in the deploy folder and by
> using ant scripts with the same result.
>
> Can you please help me with this?
>
> Best regards,
> Mattias