Skip to content

Instantly share code, notes, and snippets.

View kyberorg's full-sized avatar

Aleksandr Muravja kyberorg

View GitHub Profile
@kyberorg
kyberorg / gist:6922039
Created October 10, 2013 17:12
JBoss execption
16:33:39,165 ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:8080-1) JBAS014134: EJB Invocation failed on component ARBean for method public abstract java.util.List net.virtalab.stub.ar.logic.ARLocal.getAllDepartmentsByLocation(java.lang.String): javax.ejb.EJBException: org.javalite.activejdbc.DBException: Failed to retrieve metadata from DB, connection: 'default' is not available
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:250) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:315) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.pro
BWEB000309: type JBWEB000066: Exception report
JBWEB000068: message org.javalite.activejdbc.DBException: Failed to retrieve metadata from DB, connection: 'default' is not available
JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.
JBWEB000070: exception
javax.ejb.EJBException: org.javalite.activejdbc.DBException: Failed to retrieve metadata from DB, connection: 'default' is not available
org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165)
@kyberorg
kyberorg / gist:7080188
Created October 21, 2013 08:01
Failed JBoss deploy
11:49:16,237 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) Deployment scan of [/opt/web/jboss/standalone/deployments] found update action [{
"operation" => "composite",
"address" => undefined,
"steps" => [
{
"operation" => "add",
@kyberorg
kyberorg / Result.java
Last active December 28, 2015 15:39
Generics and interfaces
package net.virtalab.jsonio.api;
/**
* Result container
*/
public class Result<T> {
private T result;
public T getResult(){
return result;
@kyberorg
kyberorg / AutowiredTest.java
Last active December 30, 2015 06:08
Autowired issue
package net.virtalab.jsonio.test;
import net.virtalab.jsonio.configuration.actions.ActionBeans;
import net.virtalab.jsonio.test.temp.TestClazz;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
upstream in the github example is just the name they've chosen to refer to that repository. You may choose any that you like when using git remote add. Depending on what you select for this name, your git pull usage will change. For example, if you use:
git remote add upstream git://github.com/somename/original-project.git
then you would use this to pull changes:
git pull upstream master
But, if you choose origin for the name of the remote repo, your commands would be:
#!/usr/local/bin/bash
### Colors ###
END="\e[0m";
RED='\e[0;31m';
BLUE='\e[0;35m';
BROWN='\e[0;33m';
WHITE='\e[0;37m';
### Commands ###
@kyberorg
kyberorg / pom.xml
Last active January 4, 2016 01:19
POM with exec JAR
<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>net.virtalab</groupId>
<artifactId>simpleapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>simpleapp</name>
@kyberorg
kyberorg / gist:8680880
Created January 29, 2014 02:47
GitHub training
http://training.github.com/
#!/bin/bash
if [ "x$2" != "x" ];then
MESSAGE=$2
else
echo "Usage git-add -m \"My commit message\" "
echo "Please enter commit message (just press enter for default message): "
read MESSAGE
if [ "x$MESSAGE" == "x" ]; then
#Fallback to default message