2016-09-01 12 views
1

Я разрабатываю приложение Spring Boot с использованием Filenet CEAPI с EJB-транспортом (соединение Filenet Web Service (CEWS) не является параметром), но когда Я пытаюсь запустить мое пружинное загрузочное приложение, я получаю следующую ошибку снова и снова в каждом втором:Подключение к Filenet на Websphere 8.5 через EJB-транспорт с использованием Spring Boot с встроенным Tomcat

NMSV0307E: использовало имя URL, но НЕЙМИНГ не было настроено на ручки Java:: Java, имена URL , Вероятной причиной является ошибка пользователя при попытке указать имя java: URL-адреса в клиенте или сервере, отличном от J2EE, . Выброс ConfigurationException.

Моя конфигурация является:

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/

Я включил Tomcat JNDI именования, используя эту запись StackOverflow:

How to create JNDI context in Spring Boot with Embedded Tomcat Container

Хотя добавление точки останова на линии tomcat.enableNaming(); не стоп ...

Я использую эту часть этого решения:

@Bean 
public TomcatEmbeddedServletContainerFactory tomcatFactory() { 
    return new TomcatEmbeddedServletContainerFactory() { 

     @Override 
     protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer(
       Tomcat tomcat) { 
      tomcat.enableNaming(); 
      return super.getTomcatEmbeddedServletContainer(tomcat); 
     } 
    }; 
} 

Я не использую остальное, так как я не хочу для поиска ничего через JNDI, так как Filenet API делает это ,

Итак, чтобы обобщить его: мог ли кто-нибудь рассказать мне, как подключиться к Filenet, работающему на сервере приложений Websphere 8.5, через API-интерфейс Filenet Java через транспортный протокол EJB, используя Spring Boot 1.2.7 и Embedded Tomcat?

EDIT:

Filenet API использует следующие файлы optained с сервера 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 

EDIT # 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:[email protected]<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:[email protected]<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:[email protected]<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 
+0

FileNet имеет множество образцов: http://www-01.ibm.com/support/docview.wss?rs=86&uid=swg27042122#code –

+0

Спасибо, но проблема в Spring Boot - я могу писать автономное, не Spring Boot Java-приложение. – Kumite

ответ

0

Как ошибка NMSV0307E WebSphere говорит, вы не можете использовать пространство имен java: вне управляемой среды (сервера приложений или клиента приложения). Вам нужно найти фактическое имя привязки EJB, например, просмотрев соответствующие сообщения CNTR0167I в SystemOut.log сервера приложений WebSphere, который содержит EJB, а затем используйте это имя для поиска.