"org.eclipse.emf.ecore.EObject not found" after update from Intershop 7.7 to 7.9 - intershop

I just updated a project from Intershop Commerce Management 7.7 to 7.9, everything went well, except I now get one compile error:
...\app_sf_responsive\javasource\com\intershop\application\responsive\internal\preview\call\CMSPageCallInterface.java:54: error: cannot access EObject
for(Parameter p : PageletModelUtils.INSTANCE.getCallParameterDefinitions(app.getExtension(ApplicationBOPageletModelRepository.class), cepd))
^
class file for org.eclipse.emf.ecore.EObject not found
Did I miss some migration steps?

you get this error because of missing compile dependencies. You need to insert following statements into the dependency closure of your build.gradle file:
dependencies
{
...
compile 'org.eclipse.emf:org.eclipse.emf.common'
compile 'org.eclipse.emf:org.eclipse.emf.ecore'
...
}
I hope that helps to succeed you migration tasks.

Related

AndroidX AAPT colors not found

I checked a couple of tutorials and then dove in to Refactor>Migrate to AndroidX. I imported ActivityCompat, ContextCompat and DrawableCompat.
But now I am stuck getting a compile completed because of this error:
AAPT: C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:3: error: resource android:color/system_neutral1_1000 not found.
C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:4: error: resource android:color/system_neutral1_900 not found.
C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:5: error: resource android:color/system_neutral1_0 not found.
.
.
.
It continues on for about 21 missing items. It appears AndroidX is looking for color files that are missing.
I have spent hours looking for a similar posting, but there aren't any. I have even tried Invalidate caches/Restart but that changed nothing.
Please point me to an explanation to find the missing files or disable the hunt for them. BTW I am using Studio 4.1.2 and compile and target SDK versions 29.
It turned out I had to revise the compile and targetSDK versions from 29 to 31.
It was not mandatory, but I also upgraded the following versions in app/build.gradle:
androidx.appcompat.appcompat:1.0.0 -> 1.4.1
androidx.core.core:1.0.0 -> 1.7.0
androidx.constraintlayout.constraintlayout:1.1.2 -> 2.1.3

got error " The "RazorGenerate" task failed unexpectedly. " .After Updating to VS 16.8 and upgrade to .net 5.. the core version target is Core 2.2

When Build Project. Error The "RazorGenerate" task failed unexpectedly. .Net Core 2.2
The fix for me was to introduce a new System Environment Variable with the Key "DOTNET_HOST_PATH" and the value "dotnet" and then to restart Visual Studio.
I did 3 steps to get it to build AND to get the ( ~/ ) variable to work.
Open cmd and write this: setx DOTNET_HOST_PATH "%ProgramFiles%\dotnet\dotnet.exe"
Open C:\Program Files\dotnet\sdk in here delete the folder: NuGetFallbackFolder
Restart your pc!
It worked on the build server, after I added this Nuget package:
Microsoft.NET.Sdk.Razor
Since I added the Net.SDK.Razor package, it builds successfully.
I had also added Microsoft.AspNetCore.Razor.Design, but only Microsoft.NET.Sdk.Razor is actually needed.

PHPUnit stopped running

I've come back after the weekend to the following error:
Fatal error: Uncaught Error: Class 'PHPUnit\Runner\TestSuiteSorter' not found in /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 1143
Error: Class 'PHPUnit\Runner\TestSuiteSorter' not found in /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 1143
Call Stack:
0.0030 403784 1. {main}() /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/phpunit:0
0.0136 899376 2. PHPUnit\TextUI\Command::main() /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/phpunit:53
0.0137 899488 3. PHPUnit\TextUI\Command->run() /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/src/TextUI/Command.php:155
0.0519 2873464 4. PHPUnit\TextUI\TestRunner->doRun() /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/src/TextUI/Command.php:200
0.0519 2873488 5. PHPUnit\TextUI\TestRunner->handleConfiguration() /Users/piersb/Development/Den/dezeenjobs/_project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:153
Process finished with exit code 255
But Google is giving me no helpful results on what TestSuiteSorter might be and why it's suddenly started playing up right now.
Have run composer update, no news there.
I did upgrade Wordpress and Woocommerce, but rolling back to a commit before that happened (one where tests were green) doesn't help; it just gives me a slightly different error message about TestSuiteSorter.
Warning: include(/Users/piersb/Development/Den/dezeenjobs/_project/vendor/composer/../phpunit/phpunit/src/Runner/TestSuiteSorter.php): failed to open stream: No such file or directory in /Users/piersb/Development/Den/dezeenjobs/_project/vendor/composer/ClassLoader.php on line 444
Does anyone have any leads?
New information: The commit that introduces the problem is when I switch from installing phpunit via the command line to installing it via composer. Checking the composer.json file, it looks like the version of phpunit being pulled in is coming in via a WP_Mock dependency.
The TestSuiteSorter class is being called by this version, but the file doesn't appear to exist.
In the end I updated my composer file requirements to this
{
"require": {
"intervention/image": "^2.3",
"10up/wp_mock": "0.3.0",
"phpunit/phpunit": "^7.2" // this is the new line
}
}
then deleted my vendor directory and ran composer install and composer update.
Everything is now working. Huzzah!

sbt-proguard issue with Java 1.8

I'm trying to get smaller scalar executable jar file with sbt-proguard.
I added project/plugin.sbt these two lines of code:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-proguard" % "0.2.2")
The first one is to get uberjar file, and I could get uberjar with sbt assembly that works fine.
Then, I executed sbt proguard:proguard to get this error message.
[error] Error: Can't read [/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar] (Can't process class [apple/applescript/AppleScriptEngine.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
java.lang.RuntimeException: Proguard failed with exit code [1]
at scala.sys.package$.error(package.scala:27)
...
at java.lang.Thread.run(Thread.java:745)
[error] (proguard:proguard) Proguard failed with exit code [1]
From the hint from this post: ProGuard says Unsupported class version number [52.0] (maximum 51.0, Java 1.7) with sbt-proguard,
I switched to both Java 1.7 and Java 1.6 with export JAVA_HOME=/usr/libexec/java_home -v '1.6*' command to run proguard to get the slim-lined jar file, but this doesn't run.
Invalid or corrupt jarfile target/scala-2.11/proguard/myproject_2.11-1.0.jar
What might be wrong? These are the lines that are added to build.sbt.
proguardSettings
ProguardKeys.options in Proguard ++= Seq("-dontnote", "-dontwarn", "-ignorewarnings")
ProguardKeys.options in Proguard += ProguardOptions.keepMain("core.HelloWorld")
I believe this is documented in the pro guard docs.
Running your application with java -classpath <jarpath> --class classname <program-arguments> should work.
This happens because pro guard by default removes all MANIFEST files from the jar hence the java runtime cannot find the jar class entries. Another way to do this would be to keep the MANIFEST.md file and run it using the java -jar option but I have never tried that.
Define a recent Proguard version that supports Java 1.8
ProguardKeys.proguardVersion in Proguard := "5.3.3"
Also a couple of useful ones if you run out of mem are
javaOptions in (Proguard, ProguardKeys.proguard) := Seq("-Xmx2G")
javaOptions in (Proguard, ProguardKeys.proguard) += "-Xss1G"

getting an error with play.Project.playJavaSettings

I have a Java project using play framework v2.3. I have the following line in the build.sbt file:
play.Project.playJavaSettings
However, now that I start activator, I get the following error:
[info] Loading project definition from /home/username/typesafe/testProj/project
/home/username/typesafe/testProj/build.sbt:60: error: object Project is not a member of package play
play.Project.playJavaSettings
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I have tried the following but I was not able to resolve the build file loading issue
playJavaSettings
Removing the line works. I am still looking into if this line really is required for a Java project or not.
playJavaSettings is not available anymore in Play 2.3, since Play is now added via the auto plug mechanism. Check the migration guide for 2.3 which states that:
Play itself is now added using the auto plugin mechanism. The
mechanism used in Play 2.2 where playJavaSettings and
playScalaSettings were used has been removed. You now use one of the
following instead
lazy val root = (project in file(".")).enablePlugins(PlayJava)

Resources