0
votes

While trying SORM I kept getting this error

ERROR] missing or invalid dependency detected while loading class file 'Logging.class'. Could not access type ScalaObject in package scala, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. A full rebuild may help if 'Logging.class' was compiled against an incompatible version of scala.

This is my pom file ( derived by the one used by sorm itself)

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>sorm-test</groupId>
<artifactId>sorm</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-reflect</artifactId>
        <version>[2.10,2.12)</version>
    </dependency>
    <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>[2.10,2.12)</version>
    </dependency>

    <dependency>
        <groupId>org.sorm-framework</groupId>
        <artifactId>sorm</artifactId>
        <version>0.3.8</version>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.168</version>
    </dependency>

</dependencies>

<build>
    <sourceDirectory>src/main/scala</sourceDirectory>
<plugins>
<plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>scala-maven-plugin</artifactId>
    <version>3.2.0</version>
    <configuration>
        <recompileMode>incremental</recompileMode>
        <useZincServer>true</useZincServer>
    </configuration>
    <executions>
        <execution>
            <id>compile</id>
            <goals>
                <goal>compile</goal>
                <goal>testCompile</goal>
            </goals>
        </execution>
    </executions>
</plugin>
</plugins>
</build>

I tried multiple scala library version ( instead of the interval [2.10,2.12) ) but with the same result.

Thanks

1
I tried your very same pom.xml (and also a version using sbt) and it just works. Plus sorm 0.3.8 is a very old version. Do you really need that? OT: I would like to remind you that Scala 2.12 requires Java 8. - mfirry
Also this might be related: github.com/sorm/sorm/issues/34 - mfirry
Thanks: the tutorial on the storm website has this version... and the fact that the latest version is 0.3.(1)8 did not help. I opened a PR to fix it github.com/sorm/sorm.github.com/pull/2 - Sammyrulez
my PR has been accepted. Please @mfirry answer the question with the mention on the outdated version so that I can flag this question as answered. I don't like answer my own questions :-) - Sammyrulez

1 Answers

1
votes

I tried your very same pom.xml (and also a version using sbt) and it just works.

Plus sorm 0.3.8 is a very old version.

Do you really need that?