Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] very weird compile problem (this could be not really tycho but the eclipse compiler)

Maybe (but thats just a guess) the order of jars differs a little bit in Linux/Windows (file-system implementation, uper/lower-case/...) so you are getting different results in order.

Did you import it by package with proper version constraint? Or do you require-bundle it? What jar is presented to you if you dpuble-click in your eclipse install in the manifest on the package/bundle?


Am 21.10.19 um 12:15 schrieb Johan Compagner:
i deleted the dir javax.transaction from:
C:\Users\jcomp\.m2\repository\p2\osgi\bundle

because that is seen in the classpath:


  C:\Users\jcomp\.m2\repository\p2\osgi\bundle\org.apache.commons.commons-dbcp2\2.7.0\org.apache.commons.commons-dbcp2-2.7.0.jar[+org/apache/commons/dbcp2/*



[INFO] Fetching javax.transaction_1.1.0.jar from http://developer.servoy.com/p2_repository/ship_plugins/2019.12/plugins/ (22,27kB)

http://developer.servoy.com/p2_repository/ship_plugins/2019.12/plugins/javax.transaction_1.1.0.jar

i see this on both ends if i delete it, so also on jenkins i delete that same folder in the repo dir then it also fetches the same jar, and i download the jar from that jenkinks repo dir to compare with mine localy repo one and that is the same..

So the javax.transaction jars on that location in the maven p2 repo is the same in both ends.

It is just very weird
if i look at the -X output of both builds
then the build on jenkins that fails if i search for javax/transaction
i get a hit on the -classpath argument

so this:

[DEBUG] Manifest BREEs: [OSGi profile 'JavaSE-1.8' { source level: 1.8, target level: 1.8}] [DEBUG] Effective EE: OSGi profile 'JavaSE-1.8' { source level: 1.8, target level: 1.8}
[DEBUG] Effective source/target: 1.8/1.8
[DEBUG] Using compiler 'jdt'.
[DEBUG] Source directories: [/var/lib/jenkins/jobs/master/jobs/server/workspace/j2db_server/src]
[DEBUG] Classpath:

then a lot of stuff
and for:
xxxxxx;
  /var/lib/jenkins/.m2/repository/p2/osgi/bundle/org.eclipse.osgi/3.15.0.v20190830-1434/org.eclipse.osgi-3.15.0.v20190830-1434.jar[+javax/transaction/*:+org/osgi/framework/*
a lot more paths and also +javax/transaction/xa/*:

but if i look that classpath entry (of osgi) on my local machine:

C:\Users\jcomp\.m2\repository\p2\osgi\bundle\org.eclipse.osgi\3.15.0.v20190830-1434\org.eclipse.osgi-3.15.0.v20190830-1434.jar[+org/osgi/framework/*
a lot more and then: +javax/transaction/xa/*;

But you see where it fails for some reason it is the first entry of the org.eclipse.osgi plugin......
(also a bit weird why that really is the first there..)
So at this stage the working on doesn't have it and the one that fails does have it at this level...

if i then search on on that classpath i encounter javax.transaction itself:

jenkinks:
/var/lib/jenkins/.m2/repository/p2/osgi/bundle/javax.transaction/1.1.0/javax.transaction-1.1.0.jar[+javax/transaction/xa/*:?**/*]

local:
  C:\Users\jcomp\.m2\repository\p2\osgi\bundle\javax.transaction\1.1.0\javax.transaction-1.1.0.jar[+javax/transaction/*;+javax/transaction/xa/*;?**/*]

so there it is suddenly in reverse...

So that is the weird part here.. somehow that javax.transaction package is seen at some point as a exported package (for org.eclipse.osgi) but then it is somehow removed at javax.transaction plugin itself..


i can't run with: -Dtycho.localArtifacts=ignore because i have many projects that are builded locally that this one depends on again..

it tried deleting .cache/tycho dir but that didn't help


then i renamed the whole repository dir so i start full clean over..
Still the same problem, still javax.transaction has a access restriction on that package...


So how this is possible i don;t know what the actual difference is between the 2 maven builds yes 1 is windows the other is linux, but both should be using the same java versions to compile against..




On Fri, 18 Oct 2019 at 16:50, Christoph Läubrich <laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>> wrote:


    Most likeley your build and your local install using different versions
    (maybe one from a nexus proxy and one from maven central?)

    Try to clear the local .m2 cache and try again for both cases and make
    sure both are downloading the artifact from the same server.

    Am 18.10.19 um 16:00 schrieb Udo.Walker@xxxxxxxxxxx
    <mailto:Udo.Walker@xxxxxxxxxxx>:
     > Hi,
     >
     > you could use the option -Dtycho.localArtifacts=ignore. Maybe
    this helps?
     >
     > With regards,
     >
     > Udo
     >
     > -----Original-Nachricht-----
     >
     > Betreff: [tycho-user] very weird compile problem (this could be not
     > really tycho but the eclipse compiler)
     >
     > Datum: 2019-10-18T14:07:49+0200
     >
     > Von: "Johan Compagner" <jcompagner@xxxxxxxxxx
    <mailto:jcompagner@xxxxxxxxxx>>
     >
     > An: "Tycho user list" <tycho-user@xxxxxxxxxxx
    <mailto:tycho-user@xxxxxxxxxxx>>
     >
     > Hi,
     > locally it works fine but if i push it to jenkins and let it
    build there
     > then it get:
     >
     > [ERROR] Failed to execute goal
     > org.eclipse.tycho:tycho-compiler-plugin:1.4.0:compile
    (default-compile)
     > on project j2db_server: Compilation failure: Compilation failure:
     > [ERROR]
     >
    /var/lib/jenkins/jobs/master/jobs/server/workspace/j2db_server/src/com/servoy/j2db/dblayer/QueryGenerator.java:[27]

     > [ERROR] import javax.transaction.TransactionManager; [ERROR]
     > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ERROR] Access restriction: The
     > type 'TransactionManager' is not API (restriction on classpath entry
     >
    '/var/lib/jenkins/.m2/repository/p2/osgi/bundle/javax.transaction/1.1.0/javax.transaction-1.1.0.jar')

     > [ERROR]
     >
    /var/lib/jenkins/jobs/master/jobs/server/workspace/j2db_server/src/com/servoy/j2db/dblayer/QueryGenerator.java:[3349]

     > [ERROR] public TransactionManager getTransactionManager()
     >
     >
     >
     > but the weird thing is that should be fine if we look at that jar
    the
     > export packages are
     > javax.transaction and javax.transaction.xa
     > if i run it with mvn with -X
     > i see this at jenkins:
     >
    /var/lib/jenkins/.m2/repository/p2/osgi/bundle/javax.transaction/1.1.0/javax.transaction-1.1.0.jar[+javax/transaction/xa/*:?**/*]
     > but locally it is:
>  C:\Users\jcomp\.m2\repository\p2\osgi\bundle\javax.transaction\1.1.0\javax.transaction-1.1.0.jar[+javax/transaction/*;+javax/transaction/xa/*;?**/*]
     > and i guess that is between [] is what is exported?
     > But where does that come from?
     > because it looks like it is the export packages, but if i look at
    others
     > some are just [?**/*]
     > but they do have export packages if i look in the manifest file...
     > So it doesn't make fully sense to me how that is generated
     > So that somewhere cached in the maven repository in another place?
     > And am i right that that between [] is really the exported stuff?
     > --
     > Johan Compagner
     > Servoy
     > 
     >
     > _______________________________________________
     > tycho-user mailing list
     > tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
     > To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
     > https://www.eclipse.org/mailman/listinfo/tycho-user
     >
    _______________________________________________
    tycho-user mailing list
    tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/tycho-user



--
Johan Compagner
Servoy

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user



Back to the top