Not able to start application on windows 7 64bits with java 8

23 views
Skip to first unread message

Marc

unread,
Jan 13, 2017, 6:24:31 PM1/13/17
to SerialPundit
hi

when i start my application with spring boot, i do


   
@PostConstruct
   
public void initIt() {
       
try {

            handle
= scmDoorLocker.openComPort(doorLockScanPort, true, true, true);
            scmDoorLocker
.configureComPortData(handle, DATABITS.DB_8, STOPBITS.SB_1, PARITY.P_NONE, BAUDRATE.B9600, 0);
            scmDoorLocker
.configureComPortControl(handle, FLOWCONTROL.NONE, 'x', 'x', false, false);

            scmDoorLocker
.setDTR(handle, false);
            scmDoorLocker
.setRTS(handle, false);
       
} catch (SerialComException ex) {
           
Logger.getLogger(DoorLockApplicationEvent.class.getName()).log(Level.SEVERE, null, ex);
       
}
   
}


I get this error

Error creating bean with name 'scanApplicationEvent': Unsatisfied dependency expressed through field 'scm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getSerialComManager' defined in com.fit.ScanApplication: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.serialpundit.serial.SerialComManager]: Factory method 'getSerialComManager' threw exception; nested exception is com.serialpundit.core.SerialComException: C:\Users\Franck\AppData\Local\Temp\sp_tuartx1\spcomwinx64.dll: Can't find dependent libraries

With the same program, under linux and windows 10, i don't get any error.

sp-core.jar and sp-tty.jar is include with the project and i can see it in jar spring boot build.

Rishi Gupta

unread,
Jan 14, 2017, 2:44:12 AM1/14/17
to SerialPundit
I have sent you an app. Please run this on your system and see if it works with configuration windows 7 64bits with java 8.

Marc

unread,
Jan 14, 2017, 3:27:30 PM1/14/17
to SerialPundit
Result is 

Jan 14, 2017 3:11:25 PM org.springframework.context.annotation.AnnotationConfigA
pplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicat
ionContext@1405ef7: startup date [Sat Jan 14 15:11:25 EST 2017]; root of context
 hierarchy
com.serialpundit.core.SerialComException: C:\Users\Francois\AppData\Local\Temp\s
p_tuartx1\spcomwinx86.dll: Can't find dependent libraries
        at com.serialpundit.serial.internal.SerialComPortJNIBridge.loadNativeLib
rary(SerialComPortJNIBridge.java:395)
        at com.serialpundit.serial.SerialComManager.<init>(SerialComManager.java
:382)
        at springIntegration.MessagePrinter.<init>(MessagePrinter.java:32)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:1
42)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy
.instantiate(SimpleInstantiationStrategy.java:122)
        at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:271)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1154)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1056)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:759)
        at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:866)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:542)
        at org.springframework.context.annotation.AnnotationConfigApplicationCon
text.<init>(AnnotationConfigApplicationContext.java:84)
        at springIntegration.Application.main(Application.java:41)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Francois\AppData\Local\Temp\
sp_tuartx1\spcomwinx86.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at com.serialpundit.serial.internal.SerialComPortJNIBridge$2.run(SerialC
omPortJNIBridge.java:378)
        at com.serialpundit.serial.internal.SerialComPortJNIBridge$2.run(SerialC
omPortJNIBridge.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.serialpundit.serial.internal.SerialComPortJNIBridge.loadNativeLib
rary(SerialComPortJNIBridge.java:376)
        ... 22 more
Hello World!
Exception in thread "main" java.lang.NullPointerException
        at springIntegration.MessagePrinter.printMessage(MessagePrinter.java:43)

        at springIntegration.Application.main(Application.java:43)

Marc

unread,
Jan 14, 2017, 6:05:57 PM1/14/17
to SerialPundit
in 64 bits mode

Application started !
Jan 14, 2017 5:08:13 PM org.springframework.context.annotation.AnnotationConfigA
pplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicat
ionContext@4d405ef7: startup date [Sat Jan 14 17:08:13 EST 2017]; root of contex
t hierarchy
Hello World!
COM3
COM4
COM5

Rishi Gupta

unread,
Jan 15, 2017, 12:53:50 PM1/15/17
to SerialPundit
Can you check if MSVCR120.DLL, SETUPAPI.DLL, ADVAPI32.DLL, KERNEL32.DLL are installed in your 32 bit system.
Message has been deleted

Rishi Gupta

unread,
Jan 16, 2017, 12:52:05 AM1/16/17
to SerialPundit
I have attached both 32 and 64 bit native dll (spcom-native.zip) with this message. 
spcom-native.zip

Marc

unread,
Jan 18, 2017, 9:02:38 AM1/18/17
to SerialPundit
SPCOMWINX64 seem to have many dependancies.

Need this block
kernel32
advapi32
msvcr120
setupapi

and this block (don't have one)
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL

all needed?

because some are available on win >=8

Rishi Gupta

unread,
Jan 18, 2017, 12:14:38 PM1/18/17
to SerialPundit
- These are the minimum standard release dependencies. Your system will already have them. Please check system32 folder in your system.

- does 32 bit version is working now in your system.
Message has been deleted

Marc

unread,
Jan 20, 2017, 5:44:39 PM1/20/17
to SerialPundit
ok no problem to start
Reply all
Reply to author
Forward
0 new messages