Skip to content

Commit

Permalink
library fixes - there was a JPA 1.x lib in the classpath, causing the…
Browse files Browse the repository at this point in the history
… build to fail
  • Loading branch information
j-dimension committed Dec 1, 2023
1 parent 8d90dcc commit 516b871
Show file tree
Hide file tree
Showing 58 changed files with 146 additions and 881 deletions.
2 changes: 2 additions & 0 deletions build-fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function check_error {
fi
}

# export JAVA_HOME=/home/jens/bin/jdk-17.0.9-full/
export JAVA_HOME=/home/jens/bin/jdk1.8.0_131

# there is an OpenJDK bug on Ubuntu, causing Surefire tests to fail - skip tests for now
Expand All @@ -24,6 +25,7 @@ ant -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server-entities/build.xm
check_error $?
ant -buildfile j-lawyer-server-api/build.xml jar
check_error $?
# ant -Dplatforms.default_platform.home=/home/jens/bin/jdk-17.0.9-full/ -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server/build.xml dist
ant -Dplatforms.default_platform.home=/home/jens/bin/jdk-11.0.9.1-full/ -Dj2ee.server.home=/home/travis -buildfile j-lawyer-server/build.xml dist
check_error $?
ant -buildfile j-lawyer-io-common/build.xml jar
Expand Down
Binary file modified j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 0 additions & 34 deletions j-lawyer-client/lib/nblibraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ libs.hamcrest.classpath=\
${base}/hamcrest/hamcrest-core-1.3.jar
libs.hamcrest.displayName=Hamcrest 1.3
libs.hamcrest.prop-maven-dependencies=org.hamcrest:hamcrest-core:1.3:jar
libs.javaee-api-6.0.classpath=\
${base}/javaee-api-6.0/javaee-api-6.0.jar
libs.javaee-api-6.0.displayName=Java EE 6 API Library
libs.javaee-api-6.0.javadoc=\
${base}/javaee-api-6.0/javaee6-doc-api.zip
libs.junit.classpath=\
${base}/junit/junit-3.8.2.jar
libs.junit.displayName=JUnit 3.8.2
Expand All @@ -30,35 +25,6 @@ libs.junit_4.javadoc=\
libs.junit_4.prop-maven-dependencies=junit:junit:4.10:jar
libs.junit_4.src=\
${base}/junit_4/junit-4.10-sources.jar
libs.restapi.classpath=\
${base}/restapi/javax.ws.rs-api-2.0.jar
libs.restapi.displayName=JAX-RS 2.0
libs.restapi.prop-maven-dependencies=javax.ws.rs:javax.ws.rs-api:jar
libs.restlib.classpath=\
${base}/restlib/asm-all-repackaged-2.2.0-b21.jar:\
${base}/restlib/cglib-2.2.0-b21.jar:\
${base}/restlib/guava-14.0.1.jar:\
${base}/restlib/hk2-api-2.2.0-b21.jar:\
${base}/restlib/hk2-locator-2.2.0-b21.jar:\
${base}/restlib/hk2-utils-2.2.0-b21.jar:\
${base}/restlib/javax.annotation-api-1.2.jar:\
${base}/restlib/javax.inject-2.2.0-b21.jar:\
${base}/restlib/javax.servlet-api-3.0.1.jar:\
${base}/restlib/jaxb-api-2.2.7.jar:\
${base}/restlib/jersey-entity-filtering-2.5.1.jar:\
${base}/restlib/jersey-media-moxy-2.5.1.jar:\
${base}/restlib/org.osgi.core-4.2.0.jar:\
${base}/restlib/osgi-resource-locator-1.0.1.jar:\
${base}/restlib/persistence-api-1.0.jar:\
${base}/restlib/validation-api-1.1.0.Final.jar:\
${base}/restlib/jersey-client.jar:\
${base}/restlib/jersey-common.jar:\
${base}/restlib/jersey-container-servlet.jar:\
${base}/restlib/jersey-container-servlet-core.jar:\
${base}/restlib/jersey-server.jar:\
${base}/restlib/eclipselink.jar
libs.restlib.displayName=Jersey 2.5.1 (JAX-RS RI)
libs.restlib.prop-maven-dependencies=\n org.glassfish.jersey.containers:jersey-container-servlet:2.5.1:jar\n org.glassfish.jersey.core:jersey-client:2.5.1:jar\n org.glassfish.jersey.media:jersey-media-moxy:2.5.1:jar\n
libs.swing-layout.classpath=\
${base}/swing-layout/swing-layout-1.0.4.jar
libs.swing-layout.displayName=Swing Layout Extensions
Expand Down
Binary file removed j-lawyer-client/lib/persistence-api-1.0.2.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restapi/javax.ws.rs-api-2.0.jar
Binary file not shown.
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/cglib-2.2.0-b21.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/eclipselink.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/guava-14.0.1.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/hk2-api-2.2.0-b21.jar
Binary file not shown.
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/hk2-utils-2.2.0-b21.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/jaxb-api-2.2.7.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/jersey-client.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/jersey-common.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/jersey-server.jar
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/org.osgi.core-4.2.0.jar
Binary file not shown.
Binary file not shown.
Binary file removed j-lawyer-client/lib/restlib/persistence-api-1.0.jar
Binary file not shown.
Binary file not shown.
8 changes: 3 additions & 5 deletions j-lawyer-client/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ file.reference.jakarta.activation-1.2.2.jar=lib/bea/jakarta.activation-1.2.2.jar
file.reference.jakarta.activation-api-1.2.2.jar=lib/bea/jakarta.activation-api-1.2.2.jar
file.reference.jakarta.annotation-api-1.3.5.jar=lib/bea/jakarta.annotation-api-1.3.5.jar
file.reference.jakarta.jws-api-2.1.0.jar=lib/bea/jakarta.jws-api-2.1.0.jar
file.reference.jakarta.persistence-api-2.2.3.jar=lib/jakarta.persistence-api-2.2.3.jar
file.reference.jakarta.xml.bind-api-2.3.3.jar=lib/bea/jakarta.xml.bind-api-2.3.3.jar
file.reference.jakarta.xml.soap-api-1.4.2.jar=lib/bea/jakarta.xml.soap-api-1.4.2.jar
file.reference.jakarta.xml.ws-api-2.3.3.jar=lib/bea/jakarta.xml.ws-api-2.3.3.jar
Expand Down Expand Up @@ -157,7 +158,6 @@ file.reference.sam.jar=lib/sam.jar
test.src.dir=test
file.reference.jtidy-8.0.jar=lib/jtidy-8.0.jar
file.reference.httpcore-4.4.11.jar=lib/httpcore-4.4.11.jar
file.reference.persistence-api-1.0.2.jar=lib/persistence-api-1.0.2.jar
file.reference.actgorithm_identifier-1.0.0.10.jar=lib/bea/algorithm_identifier-1.0.0.10.jar
jar.index=${jnlp.enabled}
build.sysclasspath=ignore
Expand Down Expand Up @@ -310,13 +310,10 @@ javac.classpath=\
${file.reference.hamcrest-core-1.3.jar}:\
${file.reference.commons-beanutils-1.8.0.jar}:\
${file.reference.json-simple-2.3.0.jar}:\
${libs.restapi.classpath}:\
${libs.restlib.classpath}:\
${file.reference.SHEF.jar}:\
${file.reference.j-lawyer-server-api.jar}:\
${file.reference.config_schulung.jar-1}:\
${file.reference.jbig2-imageio-3.0.0.jar}:\
${file.reference.persistence-api-1.0.2.jar}:\
${file.reference.j-lawyer-cloud.jar}:\
${file.reference.javax.mail-1.6.2.jar}:\
${file.reference.openpdf-1.3.22.jar}:\
Expand Down Expand Up @@ -455,7 +452,8 @@ javac.classpath=\
${file.reference.poi-5.2.3.jar}:\
${file.reference.rtf-to-html-1.0.1.jar}:\
${file.reference.poi-scratchpad-5.2.3.jar}:\
${file.reference.ehcache-3.10.8.jar}
${file.reference.ehcache-3.10.8.jar}:\
${file.reference.jakarta.persistence-api-2.2.3.jar}
file.reference.j-lawyer-server-entities.jar=../j-lawyer-server-entities/dist/j-lawyer-server-entities.jar
file.reference.novaworx-syntax-0.0.7.jar=lib/novaworx-syntax-0.0.7.jar
file.reference.ical4j-0.9.18.jar=lib/bizcal/ical4j-0.9.18.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,36 +663,26 @@
*/
package com.jdimension.jlawyer.client.editors.research.urteilegesetze;

import java.util.ArrayList;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.WebTarget;
import org.jboss.logging.Logger;
import org.json.simple.JsonArray;
import org.json.simple.JsonKey;
import org.json.simple.JsonObject;
import org.json.simple.Jsoner;

/**
*
* @author jens
*/
public class UgAccess {

public static final int SEARCHTYPE_ALL=10;
public static final int SEARCHTYPE_GESETZE=20;
public static final int SEARCHTYPE_URTEILE=30;

private static final Logger log=Logger.getLogger(UgAccess.class.getName());

public static final int SEARCHTYPE_ALL = 10;
public static final int SEARCHTYPE_GESETZE = 20;
public static final int SEARCHTYPE_URTEILE = 30;

// private static final Logger log=Logger.getLogger(UgAccess.class.getName());
//
private static UgAccess instance = null;
private Client client = null;
private WebTarget webTarget = null;
// private Client client = null;
// private WebTarget webTarget = null;

private UgAccess() {
String BASE_URI = "https://urteile-gesetze.de/extapi/v1/";
client = javax.ws.rs.client.ClientBuilder.newClient();
//WebTarget webTarget = client.target(BASE_URI).path("restws");
webTarget = client.target(BASE_URI);
// String BASE_URI = "https://urteile-gesetze.de/extapi/v1/";
// client = javax.ws.rs.client.ClientBuilder.newClient();
// webTarget = client.target(BASE_URI);
}

public static synchronized UgAccess getInstance() {
Expand All @@ -703,79 +693,80 @@ public static synchronized UgAccess getInstance() {
}

public UgSearchResult search(String query, int searchType) throws Exception {

query=query.replaceAll("\"", "");

try {
UgSearchResult searchResult=new UgSearchResult();
String jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"rechtsprechung\", \"gesetze\"]}}";
if(searchType==SEARCHTYPE_GESETZE) {
jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"gesetze\"]}}";
} else if(searchType==SEARCHTYPE_URTEILE) {
jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"rechtsprechung\"]}}";
}
String returnValue = webTarget.request(javax.ws.rs.core.MediaType.APPLICATION_JSON).post(javax.ws.rs.client.Entity.entity(jsonQuery, javax.ws.rs.core.MediaType.APPLICATION_JSON), String.class);
ArrayList<UgHit> returnList=new ArrayList<>();
Object jsonOutput = Jsoner.deserialize(returnValue);
if (jsonOutput instanceof JsonObject) {
JsonObject result = (JsonObject) jsonOutput;
JsonKey hitCountKey = Jsoner.mintJsonKey("anzahlDerTreffer", null);
Integer hitCount = result.getInteger(hitCountKey);
searchResult.setNumberOfHits(hitCount);
JsonKey hitListLinkKey = Jsoner.mintJsonKey("linkZurTrefferliste", null);
String hitListUrl = result.getString(hitListLinkKey);
searchResult.setUrl(hitListUrl);
JsonKey hitListArrayKey = Jsoner.mintJsonKey("treffer", null);
Object hitList = result.getCollection(hitListArrayKey);
if (hitList instanceof JsonArray) {
JsonArray hitListArray = (JsonArray) hitList;
for (Object hitObject : hitListArray) {
if (hitObject instanceof JsonObject) {
JsonObject hit = (JsonObject) hitObject;
UgHit ugHit=new UgHit();
//System.out.println("hit: " + hit);
if(hit.get("abkuerzung")!=null)
ugHit.setAbkuerzung(hit.get("abkuerzung").toString());
if(hit.get("beschlussdatum")!=null)
ugHit.setBeschlussDatum(hit.get("beschlussdatum").toString());
if(hit.get("titel")!=null)
ugHit.setTitel(hit.get("titel").toString());
if(hit.get("url")!=null)
ugHit.setUrl(hit.get("url").toString());
if(hit.get("kurzbeschreibung") != null)
ugHit.setKurzbeschreibung(hit.get("kurzbeschreibung").toString());
if ("rechtsprechung".equalsIgnoreCase(hit.get("type").toString())) {
// titel gericht abkuerzung type url aktenzeichen beschlussdatum
ugHit.setType(UgHit.TYPE_RECHTSPRECHUNG);
if(hit.get("aktenzeichen")!=null)
ugHit.setAktenzeichen(hit.get("aktenzeichen").toString());
if(hit.get("gericht")!=null)
ugHit.setGericht(hit.get("gericht").toString());
} else if ("gesetz".equalsIgnoreCase(hit.get("type").toString())) {
// titel abkuerzung type url beschlussdatum
ugHit.setType(UgHit.TYPE_GESETZ);

} else {
log.error("unknown hit type: " + hit.get("type").toString());
throw new Exception("Unbekannter Ergebnistyp: " + hit.get("type").toString());
}
if(ugHit.getTitel()==null) {
ugHit.setTitel("(leer)");
}
returnList.add(ugHit);
}
}
}
searchResult.setHits(returnList);
return searchResult;
} else {
throw new Exception("Ergebnis ist kein JSON-Dokument!");
}

} catch (Throwable t) {
log.error(t);
throw new Exception(t);
}
// query=query.replaceAll("\"", "");
//
// try {
// UgSearchResult searchResult=new UgSearchResult();
// String jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"rechtsprechung\", \"gesetze\"]}}";
// if(searchType==SEARCHTYPE_GESETZE) {
// jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"gesetze\"]}}";
// } else if(searchType==SEARCHTYPE_URTEILE) {
// jsonQuery="{\"query\":\"" + query + "\", \"referer\":\"j-lawyer\", \"filter\": {\"categories\":[\"rechtsprechung\"]}}";
// }
// String returnValue = webTarget.request(javax.ws.rs.core.MediaType.APPLICATION_JSON).post(javax.ws.rs.client.Entity.entity(jsonQuery, javax.ws.rs.core.MediaType.APPLICATION_JSON), String.class);
// ArrayList<UgHit> returnList=new ArrayList<>();
// Object jsonOutput = Jsoner.deserialize(returnValue);
// if (jsonOutput instanceof JsonObject) {
// JsonObject result = (JsonObject) jsonOutput;
// JsonKey hitCountKey = Jsoner.mintJsonKey("anzahlDerTreffer", null);
// Integer hitCount = result.getInteger(hitCountKey);
// searchResult.setNumberOfHits(hitCount);
// JsonKey hitListLinkKey = Jsoner.mintJsonKey("linkZurTrefferliste", null);
// String hitListUrl = result.getString(hitListLinkKey);
// searchResult.setUrl(hitListUrl);
// JsonKey hitListArrayKey = Jsoner.mintJsonKey("treffer", null);
// Object hitList = result.getCollection(hitListArrayKey);
// if (hitList instanceof JsonArray) {
// JsonArray hitListArray = (JsonArray) hitList;
// for (Object hitObject : hitListArray) {
// if (hitObject instanceof JsonObject) {
// JsonObject hit = (JsonObject) hitObject;
// UgHit ugHit=new UgHit();
// //System.out.println("hit: " + hit);
// if(hit.get("abkuerzung")!=null)
// ugHit.setAbkuerzung(hit.get("abkuerzung").toString());
// if(hit.get("beschlussdatum")!=null)
// ugHit.setBeschlussDatum(hit.get("beschlussdatum").toString());
// if(hit.get("titel")!=null)
// ugHit.setTitel(hit.get("titel").toString());
// if(hit.get("url")!=null)
// ugHit.setUrl(hit.get("url").toString());
// if(hit.get("kurzbeschreibung") != null)
// ugHit.setKurzbeschreibung(hit.get("kurzbeschreibung").toString());
// if ("rechtsprechung".equalsIgnoreCase(hit.get("type").toString())) {
// // titel gericht abkuerzung type url aktenzeichen beschlussdatum
// ugHit.setType(UgHit.TYPE_RECHTSPRECHUNG);
// if(hit.get("aktenzeichen")!=null)
// ugHit.setAktenzeichen(hit.get("aktenzeichen").toString());
// if(hit.get("gericht")!=null)
// ugHit.setGericht(hit.get("gericht").toString());
// } else if ("gesetz".equalsIgnoreCase(hit.get("type").toString())) {
// // titel abkuerzung type url beschlussdatum
// ugHit.setType(UgHit.TYPE_GESETZ);
//
// } else {
// log.error("unknown hit type: " + hit.get("type").toString());
// throw new Exception("Unbekannter Ergebnistyp: " + hit.get("type").toString());
// }
// if(ugHit.getTitel()==null) {
// ugHit.setTitel("(leer)");
// }
// returnList.add(ugHit);
// }
// }
// }
// searchResult.setHits(returnList);
// return searchResult;
// } else {
// throw new Exception("Ergebnis ist kein JSON-Dokument!");
// }
//
// } catch (Throwable t) {
// log.error(t);
// throw new Exception(t);
// }
return null;

}

Expand Down
2 changes: 0 additions & 2 deletions j-lawyer-fax/lib/nblibraries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ libs.restlib.classpath=\
${base}/restlib/jersey-media-moxy-2.5.1.jar:\
${base}/restlib/org.osgi.core-4.2.0.jar:\
${base}/restlib/osgi-resource-locator-1.0.1.jar:\
${base}/restlib/persistence-api-1.0.jar:\
${base}/restlib/validation-api-1.1.0.Final.jar:\
${base}/restlib/jersey-client.jar:\
${base}/restlib/jersey-common.jar:\
${base}/restlib/jersey-container-servlet.jar:\
Expand Down
Binary file removed j-lawyer-fax/lib/restlib/persistence-api-1.0.jar
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion j-lawyer-server-entities/nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -805,19 +805,23 @@ exists or setup the property manually. For example like this:
<target if="is.jars.in.ejbjar" name="-library-inclusion-in-archive-by-user">
<copyfiles files="${file.reference.j-lawyer-server-common.jar}" todir="${build.classes.dir}"/>
<copyfiles files="${file.reference.flyway-core-5.2.1.jar}" todir="${build.classes.dir}"/>
<copyfiles files="${file.reference.hibernate-core-5.3.28.Final.jar}" todir="${build.classes.dir}"/>
</target>
<target if="is.server.weblogic" name="-library-inclusion-in-archive-weblogic">
<basename file="${file.reference.j-lawyer-server-common.jar}" property="manifest.file.reference.j-lawyer-server-common.jar"/>
<basename file="${file.reference.flyway-core-5.2.1.jar}" property="manifest.file.reference.flyway-core-5.2.1.jar"/>
<basename file="${file.reference.hibernate-core-5.3.28.Final.jar}" property="manifest.file.reference.hibernate-core-5.3.28.Final.jar"/>
<manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Extension-List" value="jar-1 jar-2 "/>
<attribute name="Extension-List" value="jar-1 jar-2 jar-3 "/>
<attribute name="jar-1-Extension-Name" value="${manifest.file.reference.j-lawyer-server-common.jar}"/>
<attribute name="jar-2-Extension-Name" value="${manifest.file.reference.flyway-core-5.2.1.jar}"/>
<attribute name="jar-3-Extension-Name" value="${manifest.file.reference.hibernate-core-5.3.28.Final.jar}"/>
</manifest>
</target>
<target depends="compile" name="library-inclusion-in-manifest">
<copyfiles files="${file.reference.j-lawyer-server-common.jar}" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.flyway-core-5.2.1.jar}" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.hibernate-core-5.3.28.Final.jar}" todir="${dist.ear.dir}/lib"/>
<manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
</target>
<target name="-copy-meta-inf">
Expand Down
6 changes: 3 additions & 3 deletions j-lawyer-server-entities/nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=58f34b47
build.xml.data.CRC32=376de38e
build.xml.script.CRC32=fb901110
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=58f34b47
nbproject/build-impl.xml.script.CRC32=f514aa00
nbproject/build-impl.xml.data.CRC32=376de38e
nbproject/build-impl.xml.script.CRC32=5d40db6b
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
Loading

0 comments on commit 516b871

Please sign in to comment.