• Post Reply Bookmark Topic Watch Topic
  • New Topic

Factory method throws exception  RSS feed

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following code throws exception. I dont understand why is that.

Below is output of running above code
main entered
UserInfo set
try block entered
getUser() entered
CSClient set
Properties created
Properties set
Properties 2 set
C:\rbc\report111\cssdk.cfg
Exception occured while retrieving CSClient object!
com.interwoven.cssdk.factory.CSFactoryInitializationException: (No factory implementation specified)
at com.interwoven.cssdk.factory.CSFactory.getFactory(CSFactory.java:118)
at com.rbc.teamsite.client.UserInformation.getUser(UserInformation.java:104)
at com.rbc.teamsite.client.UserInformation.main(UserInformation.java:167)

com.interwoven.cssdk.factory.CSFactoryInitializationException: (No factory implementation specified)
What does this mean É How can I specify factory implementation ?

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37513
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is in the file C:\\rbc\\report11\\cssdk.cfg?
 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made an import as
import com.interwoven.cssdk.factory.CSJavaFactory;

now I am getting following error
main entered
UserInfo set
try block entered
getUser() entered
CSClient set
Properties created
Properties set
Properties 2 set
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: D:\iw-home\TeamSite\local\logs\Enforce\ts_log.txt (The device is not ready)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:192)
at java.io.FileOutputStream.<init>(FileOutputStream.java:116)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
at org.apache.log4j.Logger.getLogger(Logger.java:105)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at com.interwoven.cssdk.factory.CSJavaFactory.<clinit>(CSJavaFactory.java:52)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.interwoven.cssdk.factory.CSFactory.getFactory(CSFactory.java:124)
at com.rbc.teamsite.client.UserInformation.getUser(UserInformation.java:106)
at com.rbc.teamsite.client.UserInformation.main(UserInformation.java:170)
Exception occured while retrieving CSClient object!
com.interwoven.cssdk.factory.CSFactoryInitializationException: (Factory initialization failed)
at com.interwoven.cssdk.factory.CSFactory.getFactory(CSFactory.java:129)
at com.rbc.teamsite.client.UserInformation.getUser(UserInformation.java:106)
at com.rbc.teamsite.client.UserInformation.main(UserInformation.java:170)
Root cause:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.interwoven.cssdk.factory.CSFactory.getFactory(CSFactory.java:127)
at com.rbc.teamsite.client.UserInformation.getUser(UserInformation.java:106)
at com.rbc.teamsite.client.UserInformation.main(UserInformation.java:170)
Caused by: java.lang.NullPointerException
at com.interwoven.cssdk.sci.data.CSSessionCache.getConfigProperty(CSSessionCache.java:984)
at com.interwoven.cssdk.sci.search.SearchServiceSciImpl.init(SearchServiceSciImpl.java:90)
at com.interwoven.cssdk.sci.search.SearchServiceSciImpl.<init>(SearchServiceSciImpl.java:75)
at com.interwoven.cssdk.search.java.SearchServiceAdapterImpl.<init>(SearchServiceAdapterImpl.java:15)
at com.interwoven.cssdk.search.java.SearchServiceAdapterImpl.instance(SearchServiceAdapterImpl.java:24)
at com.interwoven.cssdk.factory.CSJavaFactory.<init>(CSJavaFactory.java:77)
at com.interwoven.cssdk.factory.CSJavaFactory.getFactory(CSJavaFactory.java:259)
... 7 more
I have not used Log4j in this code, then why am I getting this error. Where do I need modification ?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!