From d2f94bac0310bdacfe14fb01590d0917e4894954 Mon Sep 17 00:00:00 2001 From: TopWork0ut Date: Tue, 7 Jun 2022 23:41:37 +0300 Subject: [PATCH 1/4] modified README.md for third lab --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17fca1e..2705e3b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # Python-Labs -IOT - python labs + +Third Lab + +Print all lines from the file that contain errors (starting with the phrase WFLYCTL and containing the words ERROR) From 32ede41088a49cf754a0038463d8eb668b4d70b8 Mon Sep 17 00:00:00 2001 From: TopWork0ut Date: Tue, 7 Jun 2022 23:42:20 +0300 Subject: [PATCH 2/4] create main file with regex func --- main.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index 4cc517d..765070c 100644 --- a/main.py +++ b/main.py @@ -1,15 +1,11 @@ -from classes.publications import PrintedBook, AudioBook, Magazine +import re def main(): - printed_book = PrintedBook("PrintedBookCaption", False, "Fantasy", 200, "Coated Paper") - print(printed_book) - - audio_book = AudioBook("AudioBookCaption", False, "Fantasy", 3, 2.5) - print(audio_book) - - magazine = Magazine("MagazineCaption", "Documental", "Ukraine History") - print(magazine) + with open("server.log.2018-04-04", "r") as file: + for line in file: + if re.compile(r"WFLYCTL\d{4}").search(line) is not None: + print(line) if __name__ == '__main__': From f0db4fdc0a15dd3086fbf9f055efaa95b2dfd987 Mon Sep 17 00:00:00 2001 From: TopWork0ut Date: Tue, 7 Jun 2022 23:42:46 +0300 Subject: [PATCH 3/4] added log file --- server.log.2018-04-04 | 195 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 server.log.2018-04-04 diff --git a/server.log.2018-04-04 b/server.log.2018-04-04 new file mode 100644 index 0000000..8850627 --- /dev/null +++ b/server.log.2018-04-04 @@ -0,0 +1,195 @@ +2018-04-04 23:02:04,408 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0236: Suspending server with no timeout. +2018-04-04 23:02:04,622 INFO [org.jboss.as.ejb3] (Thread-2) WFLYEJB0493: EJB subsystem suspension complete +2018-04-04 23:02:04,664 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal +2018-04-04 23:02:04,961 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 71) WFLYUT0022: Unregistered web context: '/jaxrs_iotintro' from server 'default-server' +2018-04-04 23:02:05,060 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0019: Host default-host stopping +2018-04-04 23:02:05,128 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 72) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'jaxrs_iotintro.war#customerPersistenceUnit' +2018-04-04 23:02:05,163 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 72) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'jaxrs_iotintro.war#customerPersistenceUnit' +2018-04-04 23:02:05,172 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0010: Unbound data source [java:jboss/datasources/ExampleDS] +2018-04-04 23:02:05,198 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0019: Stopped Driver service with driver-name = h2 +2018-04-04 23:02:05,216 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0008: Undertow HTTP listener default suspending +2018-04-04 23:02:05,218 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0008: Undertow HTTPS listener https suspending +2018-04-04 23:02:05,219 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0007: Undertow HTTP listener default stopped, was bound to 127.0.0.1:8080 +2018-04-04 23:02:05,220 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0007: Undertow HTTPS listener https stopped, was bound to 127.0.0.1:8443 +2018-04-04 23:02:05,225 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0004: Undertow 2.0.0.Final stopping +2018-04-04 23:02:05,247 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 75) WFLYCLINF0003: Stopped client-mappings cache from ejb container +2018-04-04 23:02:05,250 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment jaxrs_iotintro.war (runtime-name: jaxrs_iotintro.war) in 534ms +2018-04-04 23:02:05,274 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0050: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) stopped in 550ms +2018-04-04 23:54:49,164 INFO [org.jboss.modules] (main) JBoss Modules version 1.7.0.Final +2018-04-04 23:54:50,510 INFO [org.jboss.msc] (main) JBoss MSC version 1.3.2.Final +2018-04-04 23:54:50,520 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.1.Final +2018-04-04 23:54:50,651 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) starting +2018-04-04 23:54:50,653 DEBUG [org.jboss.as.config] (MSC service thread 1-2) Configured system properties: + [Standalone] = + awt.toolkit = sun.lwawt.macosx.LWCToolkit + file.encoding = UTF-8 + file.encoding.pkg = sun.io + file.separator = / + ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16 + gopherProxySet = false + http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16 + java.awt.graphicsenv = sun.awt.CGraphicsEnvironment + java.awt.headless = true + java.awt.printerjob = sun.lwawt.macosx.CPrinterJob + java.class.path = /Users/zveres/wildfly-12.0.0.Final/jboss-modules.jar + java.class.version = 52.0 + java.endorsed.dirs = /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/endorsed + java.ext.dirs = /Users/zveres/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java + java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre + java.io.tmpdir = /var/folders/ms/26zs83hx4t53230y4f38ylsml48vz5/T/ + java.library.path = /Users/zveres/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. + java.net.preferIPv4Stack = true + java.runtime.name = Java(TM) SE Runtime Environment + java.runtime.version = 1.8.0_112-b16 + java.specification.name = Java Platform API Specification + java.specification.vendor = Oracle Corporation + java.specification.version = 1.8 + java.util.logging.manager = org.jboss.logmanager.LogManager + java.vendor = Oracle Corporation + java.vendor.url = http://java.oracle.com/ + java.vendor.url.bug = http://bugreport.sun.com/bugreport/ + java.version = 1.8.0_112 + java.vm.info = mixed mode + java.vm.name = Java HotSpot(TM) 64-Bit Server VM + java.vm.specification.name = Java Virtual Machine Specification + java.vm.specification.vendor = Oracle Corporation + java.vm.specification.version = 1.8 + java.vm.vendor = Oracle Corporation + java.vm.version = 25.112-b16 + javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder + javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory + javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory + javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory + javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory + javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory + javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory + javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory + javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory + javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory + jboss.home.dir = /Users/zveres/wildfly-12.0.0.Final + jboss.host.name = macbook246 + jboss.modules.dir = /Users/zveres/wildfly-12.0.0.Final/modules + jboss.modules.system.pkgs = org.jboss.byteman + jboss.node.name = macbook246 + jboss.qualified.host.name = macbook246 + jboss.server.base.dir = /Users/zveres/wildfly-12.0.0.Final/standalone + jboss.server.config.dir = /Users/zveres/wildfly-12.0.0.Final/standalone/configuration + jboss.server.data.dir = /Users/zveres/wildfly-12.0.0.Final/standalone/data + jboss.server.deploy.dir = /Users/zveres/wildfly-12.0.0.Final/standalone/data/content + jboss.server.log.dir = /Users/zveres/wildfly-12.0.0.Final/standalone/log + jboss.server.name = macbook246 + jboss.server.persist.config = true + jboss.server.temp.dir = /Users/zveres/wildfly-12.0.0.Final/standalone/tmp + line.separator = + + logging.configuration = file:/Users/zveres/wildfly-12.0.0.Final/standalone/configuration/logging.properties + module.path = /Users/zveres/wildfly-12.0.0.Final/modules + org.jboss.boot.log.file = /Users/zveres/wildfly-12.0.0.Final/standalone/log/server.log + org.jboss.resolver.warning = true + org.xml.sax.driver = __redirected.__XMLReaderFactory + os.arch = x86_64 + os.name = Mac OS X + os.version = 10.12.6 + path.separator = : + socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16 + sun.arch.data.model = 64 + sun.boot.class.path = /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/classes + sun.boot.library.path = /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib + sun.cpu.endian = little + sun.cpu.isalist = + sun.io.unicode.encoding = UnicodeBig + sun.java.command = /Users/zveres/wildfly-12.0.0.Final/jboss-modules.jar -mp /Users/zveres/wildfly-12.0.0.Final/modules org.jboss.as.standalone -Djboss.home.dir=/Users/zveres/wildfly-12.0.0.Final -Djboss.server.base.dir=/Users/zveres/wildfly-12.0.0.Final/standalone + sun.java.launcher = SUN_STANDARD + sun.jnu.encoding = UTF-8 + sun.management.compiler = HotSpot 64-Bit Tiered Compilers + sun.os.patch.level = unknown + user.country = US + user.country.format = UA + user.dir = /Users/zveres/wildfly-12.0.0.Final/bin + user.home = /Users/zveres + user.language = en + user.name = zveres + user.timezone = Europe/Kiev +2018-04-04 23:54:50,654 DEBUG [org.jboss.as.config] (MSC service thread 1-2) VM Arguments: -D[Standalone] -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/Users/zveres/wildfly-12.0.0.Final/standalone/log/server.log -Dlogging.configuration=file:/Users/zveres/wildfly-12.0.0.Final/standalone/configuration/logging.properties +2018-04-04 23:54:52,690 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. +2018-04-04 23:54:52,706 INFO [org.wildfly.security] (ServerService Thread Pool -- 3) ELY00001: WildFly Elytron version 1.2.2.Final +2018-04-04 23:54:52,718 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 14) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. +2018-04-04 23:54:52,788 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http) +2018-04-04 23:54:52,801 INFO [org.xnio] (MSC service thread 1-5) XNIO version 3.6.2.Final +2018-04-04 23:54:52,809 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.6.2.Final +2018-04-04 23:54:52,836 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 43) WFLYRS0016: RESTEasy version 3.5.0.Final +2018-04-04 23:54:52,846 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 41) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors +2018-04-04 23:54:52,846 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 58) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique. +2018-04-04 23:54:52,861 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 42) WFLYCLINF0001: Activating Infinispan subsystem. +2018-04-04 23:54:52,870 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 50) WFLYNAM0001: Activating Naming Subsystem +2018-04-04 23:54:52,875 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 60) WFLYWS0002: Activating WebServices Extension +2018-04-04 23:54:52,877 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 48) WFLYJSF0007: Activated the following JSF Implementations: [main] +2018-04-04 23:54:52,882 INFO [org.jboss.as.security] (ServerService Thread Pool -- 57) WFLYSEC0002: Activating Security Subsystem +2018-04-04 23:54:52,896 INFO [org.jboss.as.security] (MSC service thread 1-7) WFLYSEC0001: Current PicketBox version=5.0.2.Final +2018-04-04 23:54:52,908 INFO [org.jboss.as.connector] (MSC service thread 1-8) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.7.Final) +2018-04-04 23:54:52,964 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 36) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4) +2018-04-04 23:54:52,986 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0018: Started Driver service with driver-name = h2 +2018-04-04 23:54:52,992 INFO [org.jboss.as.naming] (MSC service thread 1-6) WFLYNAM0003: Starting Naming Service +2018-04-04 23:54:52,999 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default] +2018-04-04 23:54:53,008 INFO [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 5.0.5.Final +2018-04-04 23:54:53,022 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0003: Undertow 2.0.0.Final starting +2018-04-04 23:54:53,212 INFO [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host. +2018-04-04 23:54:53,212 INFO [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing. +2018-04-04 23:54:53,310 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 59) WFLYUT0014: Creating file handler for path '/Users/zveres/wildfly-12.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]'] +2018-04-04 23:54:53,335 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0012: Started server default-server. +2018-04-04 23:54:53,339 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting +2018-04-04 23:54:53,380 INFO [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0493: EJB subsystem suspension complete +2018-04-04 23:54:53,403 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080 +2018-04-04 23:54:53,471 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS] +2018-04-04 23:54:54,132 INFO [org.jboss.as.patching] (MSC service thread 1-4) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none +2018-04-04 23:54:54,144 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-3) WFLYDM0111: Keystore /Users/zveres/wildfly-12.0.0.Final/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost +2018-04-04 23:54:54,147 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory /Users/zveres/wildfly-12.0.0.Final/standalone/deployments +2018-04-04 23:54:54,157 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "jaxrs_iotintro.war" (runtime-name: "jaxrs_iotintro.war") +2018-04-04 23:54:54,325 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443 +2018-04-04 23:54:54,661 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.2.0.Final (Apache CXF 3.2.2) +2018-04-04 23:54:55,111 INFO [org.jboss.as.jpa] (MSC service thread 1-3) WFLYJPA0002: Read persistence.xml for customerPersistenceUnit +2018-04-04 23:54:55,368 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 62) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'jaxrs_iotintro.war#customerPersistenceUnit' +2018-04-04 23:54:55,390 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 62) HHH000204: Processing PersistenceUnitInfo [ + name: customerPersistenceUnit + ...] +2018-04-04 23:54:55,399 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0003: Processing weld deployment jaxrs_iotintro.war +2018-04-04 23:54:55,460 INFO [org.hibernate.Version] (ServerService Thread Pool -- 62) HHH000412: Hibernate Core {5.1.10.Final} +2018-04-04 23:54:55,462 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 62) HHH000206: hibernate.properties not found +2018-04-04 23:54:55,464 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 62) HHH000021: Bytecode provider name : javassist +2018-04-04 23:54:55,494 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 62) HCANN000001: Hibernate Commons Annotations {5.0.2.Final} +2018-04-04 23:54:55,571 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-5) HV000001: Hibernate Validator 5.3.6.Final +2018-04-04 23:54:55,779 INFO [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 3.0.3 (Final) +2018-04-04 23:54:55,995 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-8) ISPN000128: Infinispan version: Infinispan 'Bastille' 9.1.6.Final +2018-04-04 23:54:56,002 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 62) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'jaxrs_iotintro.war#customerPersistenceUnit' +2018-04-04 23:54:56,154 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 63) WFLYCLINF0002: Started client-mappings cache from ejb container +2018-04-04 23:54:56,206 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 62) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect +2018-04-04 23:54:56,259 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 62) Envers integration enabled? : true +2018-04-04 23:54:56,623 INFO [stdout] (ServerService Thread Pool -- 62) Hibernate: +2018-04-04 23:54:56,623 INFO [stdout] (ServerService Thread Pool -- 62) +2018-04-04 23:54:56,623 INFO [stdout] (ServerService Thread Pool -- 62) drop table if exists Student +2018-04-04 23:54:56,628 INFO [stdout] (ServerService Thread Pool -- 62) Hibernate: +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) create table Student ( +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) student_id integer not null auto_increment, +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) first_name varchar(255), +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) last_name varchar(255), +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) primary key (student_id) +2018-04-04 23:54:56,629 INFO [stdout] (ServerService Thread Pool -- 62) ) +2018-04-04 23:54:56,639 INFO [org.hibernate.tool.schema.internal.SchemaCreatorImpl] (ServerService Thread Pool -- 62) HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@4da9482f' +2018-04-04 23:54:56,752 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorMandatory is deprecated from CDI 1.1! +2018-04-04 23:54:56,759 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorNever is deprecated from CDI 1.1! +2018-04-04 23:54:56,761 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorNotSupported is deprecated from CDI 1.1! +2018-04-04 23:54:56,762 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired is deprecated from CDI 1.1! +2018-04-04 23:54:56,763 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequiresNew is deprecated from CDI 1.1! +2018-04-04 23:54:56,764 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorSupports is deprecated from CDI 1.1! +2018-04-04 23:54:56,767 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class org.jberet.creation.BatchBeanProducer is deprecated from CDI 1.1! +2018-04-04 23:54:56,778 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor is deprecated from CDI 1.1! +2018-04-04 23:54:56,782 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-2) WELD-000146: BeforeBeanDiscovery.addAnnotatedType(AnnotatedType) used for class com.sun.faces.flow.FlowDiscoveryCDIHelper is deprecated from CDI 1.1! +2018-04-04 23:54:57,526 INFO [stdout] (ServerService Thread Pool -- 66) Here +2018-04-04 23:54:57,526 INFO [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 66) RESTEASY002225: Deploying javax.ws.rs.core.Application: class ua.lviv.iot.rest.config.JaxRsConfig +2018-04-04 23:54:57,562 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: '/jaxrs_iotintro' for server 'default-server' +2018-04-04 23:54:57,578 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "jaxrs_iotintro.war" (runtime-name : "jaxrs_iotintro.war") +2018-04-04 23:54:57,629 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server +2018-04-04 23:54:57,631 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management +2018-04-04 23:54:57,631 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 +2018-04-04 23:54:57,631 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) started in 9664ms - Started 419 of 609 services (314 services are lazy, passive or on-demand) From 170e76a7918834cb5d6e7a0d12d281fe10424e97 Mon Sep 17 00:00:00 2001 From: TopWork0ut Date: Tue, 7 Jun 2022 23:44:01 +0300 Subject: [PATCH 4/4] unnessasary commits to delete some classes from main, but it wont be merged cause this lab is not appropriate to first lab --- classes/__init__.py | 0 classes/publications.py | 108 ------------------------------- classes/publications_abstract.py | 64 ------------------ 3 files changed, 172 deletions(-) delete mode 100644 classes/__init__.py delete mode 100644 classes/publications.py delete mode 100644 classes/publications_abstract.py diff --git a/classes/__init__.py b/classes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/classes/publications.py b/classes/publications.py deleted file mode 100644 index 14cdf7a..0000000 --- a/classes/publications.py +++ /dev/null @@ -1,108 +0,0 @@ -from classes.publications_abstract import Book, Publications - - -class PrintedBook(Book): - __material = "Paper" - - def __init__(self, caption: str, is_electric: bool, genre_type: str, number_of_pages: int, material: str): - super().__init__(caption, is_electric, genre_type, number_of_pages) - self.__material = material - - @property - def material(self): - return self._material - - @material.setter - def material(self, material: str): - self.__material = material - - def __str__(self): - return f'The {self._caption} is printed book, is electric {self._is_electric} ' \ - f'and has {self.number_of_pages} pages and consist of {self.__material} material' - - -class AudioBook(Book): - __time_to_listen_in_hours = 2 - - def __init__(self, caption: str, is_electric: bool, genre_type: str, number_of_pages: int, - time_to_listen_in_hours: float): - super().__init__(caption, is_electric, genre_type, number_of_pages) - if time_to_listen_in_hours < 0.1: - raise ValueError("Sorry, but time to listen in hours can not be less than 10 minutes") - self.__time_to_listen_in_hours = time_to_listen_in_hours - - @property - def time_to_listen_in_hours(self): - return self.__time_to_listen_in_hours - - @time_to_listen_in_hours.setter - def time_to_listen_in_hours(self, time_to_listen_in_hours: float): - if time_to_listen_in_hours < 0.1: - raise ValueError("Sorry, but time to listen in hours can not be less than 10 minutes") - self.__time_to_listen_in_hours = time_to_listen_in_hours - - def __str__(self): - return f'The {self._caption} is audio book, is electric {self._is_electric} ' \ - f'and has {self.number_of_pages} pages and you need {self.__time_to_listen_in_hours} hours to listen it' - - -class ElectricBook(Book): - __insert_memory_in_gb = 8 - - def __init__(self, caption: str, is_electric: bool, genre_type: str, number_of_pages: int, - insert_memory_in_gb: int): - super().__init__(caption, is_electric, genre_type, number_of_pages) - if insert_memory_in_gb < 1: - raise ValueError("Sorry, but the memory in gb cannot be less than 1") - self.__insert_memory_in_gb = insert_memory_in_gb - - @property - def insert_memory_in_gb(self): - return self.__insert_memory_in_gb - - @insert_memory_in_gb.setter - def insert_memory_in_gb(self, insert_memory_in_gb: int): - if insert_memory_in_gb < 1: - raise ValueError("Sorry, but the memory in gb cannot be less than 1") - self.__insert_memory_in_gb = insert_memory_in_gb - - def __str__(self): - return f'The {self._caption} is electric book and it has {self.__insert_memory_in_gb} GB memory ' - - -class Magazine(Publications): - __producer_edition = "Ukraine24" - - def __init__(self, caption: str, genre_type: str, producer_edition: str) -> None: - super().__init__(caption, genre_type) - self.__producer_edition = producer_edition - - @property - def producer_edition(self): - return self.__producer_edition - - @producer_edition.setter - def producer_edition(self, producer_edition: str): - self.__producer_edition = producer_edition - - def __str__(self): - return f'The {self._caption} is magazine and its produces is {self.__producer_edition}' - - -class Monograph(Publications): - __main_theme = "Default" - - def __init__(self, caption: str, genre_type: str, main_theme: str) -> None: - super().__init__(caption, genre_type) - self.__main_theme = main_theme - - @property - def main_theme(self): - return self.__main_theme - - @main_theme.setter - def main_theme(self, main_theme: str): - self.__main_theme = main_theme - - def __str__(self): - return f'The {self._caption} is magazine and its main theme is {self.__main_theme}' diff --git a/classes/publications_abstract.py b/classes/publications_abstract.py deleted file mode 100644 index 2c7139e..0000000 --- a/classes/publications_abstract.py +++ /dev/null @@ -1,64 +0,0 @@ -from abc import ABC - - -class Publications(ABC): - _caption = "Default" - _genre_type = "Fantasy" - - def __init__(self, caption: str, genre_type: str) -> None: - self._caption = caption - self._genre_type = genre_type - - @property - def caption(self): - return self._caption - - @caption.setter - def caption(self, caption: str): - self._caption = caption - - @property - def genre_type(self): - return self._genre_type - - @genre_type.setter - def genre_type(self, genre_type: str): - self._genre_type = genre_type - - def __str__(self): - return f'The {self._caption} is {self._caption} publication' - - -class Book(Publications): - _is_electric = False - _number_of_pages = 100 - - def __init__(self, caption: str, is_electric: bool, genre_type: str, number_of_pages: int): - super().__init__(caption, genre_type) - self._is_electric = is_electric - if number_of_pages < 1: - raise ValueError("Sorry, but the book can not have less than 1 page") - self._number_of_pages = number_of_pages - - @property - def is_electric(self): - return self._is_electric - - @is_electric.setter - def is_electric(self, is_electric: bool): - self._is_electric = is_electric - - @property - def number_of_pages(self): - return self._number_of_pages - - @number_of_pages.setter - def number_of_pages(self, number_of_pages: int): - if number_of_pages < 1: - raise ValueError("Sorry, but the book can not have less than 1 page") - self._number_of_pages = number_of_pages - - def __str__(self): - return f'The {self._caption} is {self._caption} book, is electric {self._is_electric} ' \ - f'and has {self.number_of_pages} pages' -