Tim Holloway wrote:
peter tong wrote:
Himai Minh wrote:First of all, have you tried @Autowired instead of @Inject?
Secondly, do you have @ComponentScan (basePackages = "....") //where basePackage is the name of the base package such as "com.example" ?
Oh, yes, after change to @Autowired, apple1 can be injected
But why @Inject cannot?
My classpath has javaee-web-api-8.0-sources.jar.
Because @Inject is a CDI annotation, not a Spring annotation.
@Autowired tells Spring to consult its BeanFactory, construct the bean to be injected (if it's not already existing) and set the property value to reference that bean. @Inject references the CDI container, not Spring.
Himai Minh wrote:First of all, have you tried @Autowired instead of @Inject?
Secondly, do you have @ComponentScan (basePackages = "....") //where basePackage is the name of the base package such as "com.example" ?
[12/5/16 16:41:01:381 CST] 00000017 wtp W org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl cleanupAfterTempSave Rename failure during final save; transfer failure failure during final save;this may result in a failure to save updates to the archive, or in a corruption of the original archive.
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: IWAE0017E Unable to replace original archive: C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\AppSrv03\wstemp\wstemp\app_158ce240c1f\mrg\cwss_apps.war
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.cleanupAfterTempSave(ArchiveImpl.java:496)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.extractNoReopen(ArchiveImpl.java:1165)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl.extractNoReopen(ArchiveImpl.java:1024)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.AppUpdate.createDirsInPath(AppUpdate.java:206)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.AppUpdate.mergeFiles(AppUpdate.java:128)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.task.FileMergeTask.updatePartialEar(FileMergeTask.java:376)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.task.FileMergeTask.update(FileMergeTask.java:301)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.task.FileMergeTask.performTask(FileMergeTask.java:148)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:294)
[12/5/16 16:41:01:611 CST] 00000017 SystemErr R at java.lang.Thread.run(Thread.java:767)
input string = ""
input.split("\|", 0).length = 1
str[0]=
end
input string = "06265680,8800.00|00496455,5076.72|"
input.split("|", -1).length = 36
str[0]=
str[1]=0
str[2]=6
str[3]=2
str[4]=6
str[5]=5
str[6]=6
str[7]=8
str[8]=0
str[9]=,
str[10]=8
str[11]=8
str[12]=0
str[13]=0
str[14]=.
str[15]=0
str[16]=0
str[17]=|
str[18]=0
str[19]=0
str[20]=4
str[21]=9
str[22]=6
str[23]=4
str[24]=5
str[25]=5
str[26]=,
str[27]=5
str[28]=0
str[29]=7
str[30]=6
str[31]=.
str[32]=7
str[33]=2
str[34]=|
str[35]=
end