You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Nick Faiz <ni...@atlassian.com> on 2005/09/23 03:54:46 UTC

jdk 1.4/1.5 incompatibility problem?

Hi,

I'm seeing the following 'bad class file' problem when I try a 
multiproject:install from apacheds/trunk . I believe it has only 
appeared in the last 24 hours.

Is this a jdk 1.5/jdk 1.4 incompatibility problem? A quick chat with 
Brett in directory-dev on freenode led me to try setting 
maven.compile.target=1.4 in project.properties for ldap-common. It 
didn't remove the problem.

Having googled it does look like it is a 1.5/1.4 compatibility problem

I don't have time to pursue this problem right now but wanted to raise 
it on the list mailer. Perhaps other people will run into it too.

[javac] Compiling 2 source files to 
/home/nickf/src/apache/directory/directory/apacheds/trunk/core/target/classes
/home/nickf/src/apache/directory/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/SchemaService.java:50: 
cannot access org.apache.ldap.common.util.AttributeUtils
bad class file: 
/home/nickf/.maven/repository/directory-shared/jars/ldap-common-0.9.3-SNAPSHOT.jar(org/apache/ldap/common/util/AttributeUtils.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the 
classpath.
import org.apache.ldap.common.util.AttributeUtils;



Cheers,
Nick

Re: jdk 1.4/1.5 incompatibility problem?

Posted by Nick Faiz <ni...@atlassian.com>.
Trustin,

Thanks for the quick response. I'm pushed for time right now but will 
let you know how it goes.

By the looks of it I'm going to have to work out a 1.5 strategy anyway. :)

Cheers,
Nick

Trustin Lee wrote:
> Hi Nick,
> 
> I've just redeployed ldap-common and apacheds now compiles OK with JDK 
> 1.4.  But I couldn't figure out why 'bad class file' error occurred to you.
> 
> Please let me know if the problem didn't go away.
> 
> Trustin
> 
> 2005/9/23, Nick Faiz <nick@atlassian.com <ma...@atlassian.com>>:
> 
>     I'm seeing the following 'bad class file' problem when I try a
>     multiproject:install from apacheds/trunk . I believe it has only
>     appeared in the last 24 hours.
> 
>     Is this a jdk 1.5/jdk 1.4 incompatibility problem? A quick chat with
>     Brett in directory-dev on freenode led me to try setting
>     maven.compile.target=1.4 in project.properties for ldap-common. It
>     didn't remove the problem.
> 
>     Having googled it does look like it is a 1.5/1.4 compatibility problem
> 
>     I don't have time to pursue this problem right now but wanted to raise
>     it on the list mailer. Perhaps other people will run into it too.
> 
>     [javac] Compiling 2 source files to
>     /home/nickf/src/apache/directory/directory/apacheds/trunk/core/target/classes
> 
>     /home/nickf/src/apache/directory/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/SchemaService.java:50:
>     cannot access org.apache.ldap.common.util.AttributeUtils
>     bad class file:
>     /home/nickf/.maven/repository/directory-shared/jars/ldap-
>     common-0.9.3-SNAPSHOT.jar(org/apache/ldap/common/util/AttributeUtils.class)
>     class file has wrong version 49.0, should be 48.0
>     Please remove or make sure it appears in the correct subdirectory of the
>     classpath.
>     import org.apache.ldap.common.util.AttributeUtils;
> 
> 
> 
>     Cheers,
>     Nick
> 
> 
> 
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/


-- 
ATLASSIAN - http://www.atlassian.com/

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--

Re: jdk 1.4/1.5 incompatibility problem?

Posted by Norbet Reilly <nr...@gmail.com>.
Rebuilt with JDK 1.5 and build succeeded. So if I'm understanding correctly
it seems that classes compiled with JDK 1.5 and included in .jars cause
problems for people running JDK 1.4.
 I should note that I'm haven't used Maven before, so it's unclear to me how
anything involving JDK 1.5 made it onto my system when I'm doing a complete
build locally under JDK 1.4 (which was working fine until recently)...

Re: jdk 1.4/1.5 incompatibility problem?

Posted by Norbet Reilly <nr...@gmail.com>.
Should have mentioned I'm trying to build onder JDK 1.4.2

Re: jdk 1.4/1.5 incompatibility problem?

Posted by Norbet Reilly <nr...@gmail.com>.
I see the same problem with a different file. I have deleted the ldap common
0.9.3 jar from my maven repository, but that didn't help.

directory:generate:


[echo] Compiling to d:\src\reference\apacheds\apacheds\trunk\core/target/cla
sses
[javac] Compiling 400 source files to D:\src\reference\apacheds\apacheds\tru
nk\core\target\classes
D:\src\reference\apacheds\apacheds\trunk\core\src\main\java\org\apache\ldap\serv
er\authz\TupleCache.java:27: cannot access
org.apache.ldap.common.acl.ACIItem
bad class file: C:\Documents and Settings\...\.maven\repository\directory-sh
ared\jars\ldap-common-0.9.3-SNAPSHOT.jar(org/apache/ldap/common/acl/ACIItem.clas
s)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the
classpa th.
import org.apache.ldap.common.acl.ACIItem;
^
1 error

BUILD FAILED
File...... C:\Documents and Settings\...\.maven\cache\maven-multiproject-plu
gin-1.3.1\plugin.jelly
Element... maven:reactor
Line...... 217
Column.... 9
Unable to obtain goal [multiproject:install-callback] -- C:\Documents and
Settin gs\...\.maven\cache\maven-java-plugin-1.5\plugin.jelly:63:48:<ant:javac>
Co mpile failed; see the compiler error output for details.
Total time: 33 seconds
Finished at: Fri Sep 23 13:21:00 EST 2005

Re: jdk 1.4/1.5 incompatibility problem?

Posted by Trustin Lee <tr...@gmail.com>.
Hi Nick,

I've just redeployed ldap-common and apacheds now compiles OK with JDK 1.4.
But I couldn't figure out why 'bad class file' error occurred to you.

Please let me know if the problem didn't go away.

Trustin

2005/9/23, Nick Faiz <ni...@atlassian.com>:
>
> I'm seeing the following 'bad class file' problem when I try a
> multiproject:install from apacheds/trunk . I believe it has only
> appeared in the last 24 hours.
>
> Is this a jdk 1.5/jdk 1.4 incompatibility problem? A quick chat with
> Brett in directory-dev on freenode led me to try setting
> maven.compile.target=1.4 in project.properties for ldap-common. It
> didn't remove the problem.
>
> Having googled it does look like it is a 1.5/1.4 compatibility problem
>
> I don't have time to pursue this problem right now but wanted to raise
> it on the list mailer. Perhaps other people will run into it too.
>
> [javac] Compiling 2 source files to
>
> /home/nickf/src/apache/directory/directory/apacheds/trunk/core/target/classes
>
> /home/nickf/src/apache/directory/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/SchemaService.java:50:
> cannot access org.apache.ldap.common.util.AttributeUtils
> bad class file:
> /home/nickf/.maven/repository/directory-shared/jars/ldap-
> common-0.9.3-SNAPSHOT.jar
> (org/apache/ldap/common/util/AttributeUtils.class)
> class file has wrong version 49.0, should be 48.0
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> import org.apache.ldap.common.util.AttributeUtils;
>
>
>
> Cheers,
> Nick
>



--
what we call human nature is actually human habit
--
http://gleamynode.net/