This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi64-1.8 in java.library.path, no jansi-1.8 in java.library.path, no jansi in java.library.path, Native Library C:\Users\karkil\AppData\Local\Temp\jansi-64-1.8.dll already loaded in another classloader] | |
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:184) | |
at org.fusesource.hawtjni.runtime.Library.load(Library.java:142) | |
at org.fusesource.jansi.internal.Kernel32.<clinit>(Kernel32.java:37) | |
at org.fusesource.jansi.WindowsAnsiOutputStream.<clinit>(WindowsAnsiOutputStream.java:52) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) | |
at org.apache.logging.log4j.core.appender.ConsoleAppender.getOutputStream(ConsoleAppender.java:128) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\GitHub\ref>cd core | |
C:\GitHub\ref\core>cd impl | |
C:\GitHub\ref\core\impl>mvn dependency:tree | |
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for | |
com.kildeen.ref:ref-core-impl:jar:1.0.0-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.parse(Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;" the class loader (instance of org/apache/openejb/core/TempClassLoader) of the current class, org/apache/logging/log4j/core/config/XMLConfiguration, and the class loader (instance of <bootloader>) for resolved class, javax/xml/parsers/DocumentBuilder, have different Class objects for the type ;)Lorg/w3c/dom/Document; used in the signature | |
at org.apache.logging.log4j.core.config.XMLConfiguration.<init>(XMLConfiguration.java:146) | |
at org.apache.logging.log4j.core.config.XMLConfigurationFactory.getConfiguration(XMLConfigurationFactory.java:40) | |
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:446) | |
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:420) | |
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" | |
version="3.1"> | |
<enterprise-beans> | |
<session> | |
<ejb-name>*</ejb-name> | |
<ejb-class>*</ejb-class> | |
<session-type>Singleton</session-type> | |
<concurrency-management-type>Bean</concurrency-management-type> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.deltaspike.data.api.mapping.SimpleQueryInOutMapperBase; | |
import org.os890.cdi.domain.Person; | |
import javax.inject.Inject; | |
import javax.persistence.EntityManager; | |
public class PersonMapper extends SimpleQueryInOutMapperBase<Person, PersonDTO> { | |
@Override | |
protected PersonDTO toDto(final Person person) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.os890.cdi; | |
import org.apache.deltaspike.data.api.mapping.SimpleQueryInOutMapperBase; | |
import org.os890.cdi.domain.Person; | |
import javax.inject.Inject; | |
import javax.persistence.EntityManager; | |
public class PersonMapper extends SimpleQueryInOutMapperBase<Person, PersonDTO> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\glassfish3\jdk7\bin\java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.0\plugins\junit\lib\junit-rt.jar;C:\glassfish3\jdk7\jre\lib\charsets.jar;C:\glassfish3\jdk7\jre\lib\deploy.jar;C:\glassfish3\jdk7\jre\lib\javaws.jar;C:\glassfish3\jdk7\jre\lib\jce.jar;C:\glassfish3\jdk7\jre\lib\jsse.jar;C:\glassfish3\jdk7\jre\lib\management-agent.jar;C:\glassfish3\jdk7\jre\lib\plugin.jar;C:\glassfish3\jdk7\jre\lib\resources.jar;C:\glassfish3\jdk7\jre\lib\rt.jar;C:\glassfish3\jdk7\jre\lib\ext\dnsns.jar;C:\glassfish3\jdk7\jre\lib\ext\localedata.jar;C:\glassfish3\jdk7\jre\lib\ext\sunec.jar;C:\glassfish3\jdk7\jre\lib\ext\sunjce_provider.jar;C:\glassfish3\jdk7\jre\lib\ext\sunmscapi.jar;C:\glassfish3\jdk7\jre\lib\ext\zipfs.jar;C:\vc\ref\core\impl\target\test-classes;C:\vc\ref\core\impl\target\classes;C:\vc\ref\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean isNew(Object entity) | |
{ | |
try | |
{ | |
return entityManager.getEntityManagerFactory().getPersistenceUnitUtil().getIdentifier(entity) == null; | |
} | |
catch (IllegalArgumentException e) | |
{ | |
// Not an entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package application.login; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.inject.Inject; | |
import org.apache.deltaspike.core.api.provider.BeanProvider; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(CdiTestRunner.class) //Or EJBContainerRunner does not matter | |
public class MyEETestWithDeltaSpike { | |
@PersistenceContext(unitName = "test") | |
private EntityManager em; | |
@Test | |
public void theTest() { | |
// do test | |
} | |