我正在使用带有 EJB 传输的 Filenet CEAPI 开发 Spring Boot 应用程序(Filenet Web Service (CEWS) 连接不是一个选项),但是当我尝试运行我的 spring boot 应用程序时,我一遍又一遍地收到以下错误每一秒:
NMSV0307E: 使用了 java: URL 名称,但未将命名配置为处理 java: URL 名称。可能的原因是用户在尝试在非 J2EE 客户端或服务器环境中指定 java: URL 名称时出错。抛出配置异常。
我的配置是:
spring.version = 4.2.2.RELEASE
spring.boot.version = 1.2.7.RELEASE
(I’ve tried 1.4.0.RELEASE, but I got the same results)
Websphere = 8.5 - this runs the Filenet Content Engine
Filenet & CEAPI = 5.2.1 - using EJB connection
我用过教程:http ://www.notonlyanecmplace.com/how-to-connect-via-ejb-to-p8-5-2-and-websphere-v8-5/
我已经使用这个 Stackoverflow 条目启用了 Tomcat JNDI 命名:
如何使用嵌入式 Tomcat 容器在 Spring Boot 中创建 JNDI 上下文
虽然在该行添加断点tomcat.enableNaming();
并没有停止......
我正在使用此解决方案的这一部分:
@Bean
public TomcatEmbeddedServletContainerFactory tomcatFactory() {
return new TomcatEmbeddedServletContainerFactory() {
@Override
protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer(
Tomcat tomcat) {
tomcat.enableNaming();
return super.getTomcatEmbeddedServletContainer(tomcat);
}
};
}
我不使用其余的,因为我不想通过 JNDI 查找任何内容,因为 Filenet API 会这样做。
总结一下:有人可以告诉我如何使用 Spring Boot 1.2.7 和嵌入式 Tomcat 通过 EJB 传输协议上的 Filenet Java API 连接到在 Websphere 8.5 应用服务器上运行的 Filenet?
编辑:
Filenet API 使用从 Websphere 服务器中选择的以下文件:
com.ibm.ws.orb_8.5.0.jar
com.ibm.ws.ejb.thinclient_8.5.0
key.p12
sas.client.props
ssl.client.props
trust.p12
编辑#2:
完善日志记录后,我有一组新的日志消息:
2016-09-02 10:45:37.581 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [servletConfigInitParams]
2016-09-02 10:45:37.597 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [servletContextInitParams]
2016-09-02 10:45:37.597 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [jndiProperties]
2016-09-02 10:45:37.597 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [java:comp/env/context.listener.classes]
2016-09-02 10:45:37.598 ERROR 8820 --- [P=678944:O=0:CT] c.i.w.naming.java.javaURLContextFactory : javaAccessorNotSet
2016-09-02 10:45:37.598 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiLocatorDelegate : Converted JNDI name [java:comp/env/context.listener.classes] not found - trying original name [context.listener.classes]. javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
2016-09-02 10:45:37.599 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [context.listener.classes]
2016-09-02 10:45:38.623 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiPropertySource : JNDI lookup for name [context.listener.classes] threw NamingException with message: Could not obtain an initial context due to a communication failure. Since no provider URL was specified, the default provider URL of "corbaloc:iiop:1.0@<MY_COMPUTERS_ADDRESS>:2809/NameService" was used. Make sure that any bootstrap address information in the URL is correct and that the target name server is running. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.. Returning null.
2016-09-02 10:45:38.623 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [systemProperties]
2016-09-02 10:45:38.623 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [systemEnvironment]
2016-09-02 10:45:38.624 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [random]
2016-09-02 10:45:38.624 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Searching for key 'context.listener.classes' in [applicationConfigurationProperties]
2016-09-02 10:45:38.624 DEBUG 8820 --- [P=678944:O=0:CT] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'context.listener.classes' in any property source. Returning [null]
2016-09-02 10:45:38.625 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [java:comp/env/spring.mandatoryFileEncoding]
2016-09-02 10:45:38.627 ERROR 8820 --- [P=678944:O=0:CT] c.i.w.naming.java.javaURLContextFactory : javaAccessorNotSet
2016-09-02 10:45:38.627 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiLocatorDelegate : Converted JNDI name [java:comp/env/spring.mandatoryFileEncoding] not found - trying original name [spring.mandatoryFileEncoding]. javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
2016-09-02 10:45:38.627 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [spring.mandatoryFileEncoding]
2016-09-02 10:45:39.634 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiPropertySource : JNDI lookup for name [spring.mandatoryFileEncoding] threw NamingException with message: Could not obtain an initial context due to a communication failure. Since no provider URL was specified, the default provider URL of "corbaloc:iiop:1.0@<MY_COMPUTERS_ADDRESS>:2809/NameService" was used. Make sure that any bootstrap address information in the URL is correct and that the target name server is running. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.. Returning null.
2016-09-02 10:45:39.635 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [java:comp/env/spring.mandatory_file_encoding]
2016-09-02 10:45:39.636 ERROR 8820 --- [P=678944:O=0:CT] c.i.w.naming.java.javaURLContextFactory : javaAccessorNotSet
2016-09-02 10:45:39.636 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiLocatorDelegate : Converted JNDI name [java:comp/env/spring.mandatory_file_encoding] not found - trying original name [spring.mandatory_file_encoding]. javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
2016-09-02 10:45:39.637 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [spring.mandatory_file_encoding]
2016-09-02 10:45:40.645 DEBUG 8820 --- [P=678944:O=0:CT] o.s.jndi.JndiPropertySource : JNDI lookup for name [spring.mandatory_file_encoding] threw NamingException with message: Could not obtain an initial context due to a communication failure. Since no provider URL was specified, the default provider URL of "corbaloc:iiop:1.0@<MY_COMPUTERS_ADDRESS>:2809/NameService" was used. Make sure that any bootstrap address information in the URL is correct and that the target name server is running. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration.. Returning null.
2016-09-02 10:45:40.646 DEBUG 8820 --- [P=678944:O=0:CT] org.springframework.jndi.JndiTemplate : Looking up JNDI object with name [java:comp/env/spring.mandatory-file-encoding]
2016-09-02 10:45:40.646 ERROR 8820 --- [P=678944:O=0:CT] c.i.w.naming.java.javaURLContextFactory : javaAccessorNotSet