Git Product home page Git Product logo

adeptj-runtime's Introduction

AdeptJ Runtime

High performance, dynamic, modular runtime for RESTful APIs, MicroServices and WebApps.

Built upon

  1. Battle tested Tomcat/Jetty/Undertow Servlet containers.
  2. OSGi Framework R8(Apache Felix as implementation).

Modules:

  1. Dependency Injection (OSGi Declarative Services) Felix SCR v2.2.10.
  2. JAX-RS 3.1(RESTEasy v6.2.8) with JWT support.
  3. JWT module for creating and verifying the JWTs issued by AdeptJ Runtime and verification of JWT issued by third party systems.
  4. Persistence(SQL/NO-SQL) layer - JPA 3.1(EclipseLink v4.0.2) or MyBatis v3.5.15 or MongoDB sync driver v4.11.1.
  5. Hikari(v5.1.0) JDBC Connection Pool Provider(Only if JPA or MyBatis is opted).
  6. Caffeine(v3.1.8) - a high performance in memory cache.
  7. SLF4J(v2.0.12) & Logback(v1.5.3) based logging - add or remove loggers in running server which will survive the server restart.
  8. Crypto module based on Spring security crypto(v6.2.3) for hashing(BCrypt) and encryption/decryption with (AES/GCM/NoPadding).
  9. Java Bean Validation(Hibernate Validator v8.0.1).
  10. RestClient for server side API calls, there are few adapters based on Apache HttpClient(v4.x) and Jetty HttpClient(v12.0.x).
  11. Email(Jakarta Mail/Eclipse Angus Mail v2.x) module for sending plain text and html based emails.

Toolchain:

AdeptJ Maven Plugin for bundle deployment to boost developer productivity.

Most of the services are highly configurable using OSGi Configuration Admin.

The runtime embeds OSGi Framework and (Undertow or Tomcat or Jetty) as per server adapter selected along with modules described above.

Steps to build and run:

Please check AdeptJ Runtime Launcher for full instructions.

Roadmap:

  1. Extensive code coverage for AdeptJ Runtime and Modules.
  2. Modules for popular NoSQL databases.
  3. OAuth2(client and server) modules.

Want to contribute:

Please feel free to fork the repos or drop a note to me @ irakeshkAToutlookDOTcom so that I could add you to the AdeptJ organization.

Sponsors:

The AdeptJ Team uses the IntelliJ Idea Ultimate when working on the AdeptJ Runtime project.

Many thanks to JetBrains for generously sponsoring our Open Source projects with an all products license!

JetBrains Logo

LICENSE

Copyright 2016-2022, AdeptJ (https://www.adeptj.com)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

adeptj-runtime's People

Contributors

dependabot-support avatar gitter-badger avatar prince89arora avatar prwebitup avatar rakesh-algolia avatar rakeshk15 avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adeptj-runtime's Issues

Running AdeptJ fails with NoClassDefFoundError

→ java -server -jar adeptj-runtime.jar
2018-03-05T11:22:51.865 [AdeptJ Launcher] INFO  com.adeptj.runtime.logging.LogbackInitializer - Logback initialized in [194] ms!!
2018-03-05T11:22:51.867 [AdeptJ Launcher] INFO  com.adeptj.runtime.core.Launcher - JRE: [Java(TM) SE Runtime Environment], Version: [1.8.0_74-b02]
2018-03-05T11:22:51.876 [AdeptJ Launcher] WARN  com.adeptj.runtime.server.Server - No port specified via system property: [adeptj.rt.port], using default port: [9007]
2018-03-05T11:22:51.876 [AdeptJ Launcher] INFO  com.adeptj.runtime.server.Server - Starting AdeptJ Runtime @port: [9007]
2018-03-05T11:22:51.897 [AdeptJ Launcher] INFO  com.adeptj.runtime.server.Server -

   ___     __         __     __  ___            __  _
  / _ |___/ /__ ___  / /___ / / / _ \__ _____  / /_(_)_ _  ___
 / __ / _  / -_) _ \/ __/ // / /   _/ // / _ \/ __/ /    \/ -_)
/_/ |_\___/\__/ ___/\__/\___/ /_/|_|\___/_//_/\__/_/_/_/_/\__/
             /_/


###############################################################################
#                                                                             #
#    Copyright 2016, AdeptJ (http://www.adeptj.com)                           #
#                                                                             #
#    Licensed under the Apache License, Version 2.0 (the "License");          #
#    you may not use this file except in compliance with the License.         #
#    You may obtain a copy of the License at                                  #
#                                                                             #
#        http://www.apache.org/licenses/LICENSE-2.0                           #
#                                                                             #
#    Unless required by applicable law or agreed to in writing, software      #
#    distributed under the License is distributed on an "AS IS" BASIS,        #
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
#    See the License for the specific language governing permissions and      #
#    limitations under the License.                                           #
#                                                                             #
###############################################################################


2018-03-05T11:22:51.909 [AdeptJ Launcher] ERROR com.adeptj.runtime.core.Launcher - Exception while initializing AdeptJ Runtime!!
java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.adeptj.runtime.server.Server.sciInfo(Server.java:411)
	at com.adeptj.runtime.server.Server.deploymentInfo(Server.java:482)
	at com.adeptj.runtime.server.Server.start(Server.java:229)
	at com.adeptj.runtime.core.Launcher.main(Launcher.java:68)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContainerInitializer
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 16 common frames omitted

NPE resetting logger when no categories were added from OSGi configuration and the config is deleted.

java.lang.NullPointerException: Cannot invoke "java.util.Map.remove(Object)" because "this.configByPid" is null at com.adeptj.runtime.logging.LogbackManager.resetLoggers(LogbackManager.java:174) at com.adeptj.runtime.osgi.LoggerConfigFactoryListener.serviceChanged(LoggerConfigFactoryListener.java:61) at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863) at org.apache.felix.framework.Felix.access$000(Felix.java:111) at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:440) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:952) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:915) at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:140) at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:994) at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:844) at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:825) at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:589) at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationDeleted(ConfigurableComponentHolder.java:335) at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:310) at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:115) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1723) at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1664) at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) at java.base/java.lang.Thread.run(Thread.java:833)

maven build failure

Rakesh,

When I try to do a mvn clean package, I'm getting a build failure while looking for dependencies

  • com/adeptj/adeptj-modules-commons-webconsole-branding/1.0.0.RELEASE/adeptj-modules-commons-webconsole-branding-1.0.0.RELEASE
  • com/adeptj/adeptj-modules-commons-webconsole-security/1.0.0.RELEASE/adeptj-modules-commons-webconsole-security-1.0.0.RELEASE

mvn clean package -U  ✓  3138  07:59:48
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AdeptJ Runtime 1.0.6-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/com/adeptj/adeptj-modules-commons-webconsole-branding/1.0.0.RELEASE/adeptj-modules-commons-webconsole-branding-1.0.0.RELEASE.pom
[WARNING] The POM for com.adeptj:adeptj-modules-commons-webconsole-branding:jar:1.0.0.RELEASE is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/com/adeptj/adeptj-modules-commons-webconsole-security/1.0.0.RELEASE/adeptj-modules-commons-webconsole-security-1.0.0.RELEASE.pom
[WARNING] The POM for com.adeptj:adeptj-modules-commons-webconsole-security:jar:1.0.0.RELEASE is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/com/adeptj/adeptj-modules-commons-webconsole-branding/1.0.0.RELEASE/adeptj-modules-commons-webconsole-branding-1.0.0.RELEASE.jar
Downloading: https://repo.maven.apache.org/maven2/com/adeptj/adeptj-modules-commons-webconsole-security/1.0.0.RELEASE/adeptj-modules-commons-webconsole-security-1.0.0.RELEASE.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.552 s
[INFO] Finished at: 2017-02-28T08:00:30+05:30
[INFO] Final Memory: 13M/301M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project adeptj-runtime: Could not resolve dependencies for project com.adeptj:adeptj-runtime:jar:1.0.6-SNAPSHOT: The following artifacts could not be resolved: com.adeptj:adeptj-modules-commons-webconsole-branding:jar:1.0.0.RELEASE, com.adeptj:adeptj-modules-commons-webconsole-security:jar:1.0.0.RELEASE: Could not find artifact com.adeptj:adeptj-modules-commons-webconsole-branding:jar:1.0.0.RELEASE in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

500 error page was not rendered due to missing resource bundle property.

Caused by: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key 500.page.error.extra.details.msg at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:564) at com.adeptj.runtime.htmlrender.I18nSupport.execute(I18nSupport.java:66) at io.pebbletemplates.pebble.node.expression.FunctionOrMacroInvocationExpression.applyFunction(FunctionOrMacroInvocationExpression.java:46) at io.pebbletemplates.pebble.node.expression.FunctionOrMacroInvocationExpression.evaluate(FunctionOrMacroInvocationExpression.java:38) at io.pebbletemplates.pebble.node.expression.FilterExpression.evaluate(FilterExpression.java:66) at io.pebbletemplates.pebble.node.PrintNode.render(PrintNode.java:37) at io.pebbletemplates.pebble.node.BodyNode.render(BodyNode.java:44) at io.pebbletemplates.pebble.node.IfNode.render(IfNode.java:82) at io.pebbletemplates.pebble.node.BodyNode.render(BodyNode.java:44) at io.pebbletemplates.pebble.node.RootNode.render(RootNode.java:31) at io.pebbletemplates.pebble.template.PebbleTemplateImpl.evaluate(PebbleTemplateImpl.java:157) at io.pebbletemplates.pebble.template.PebbleTemplateImpl.evaluate(PebbleTemplateImpl.java:96) at com.adeptj.runtime.htmlrender.TemplateEngine.render(TemplateEngine.java:85)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.