Quantcast
Channel: SCN : Popular Discussions - SAP HANA Cloud Platform Developer Center
Viewing all 1318 articles
Browse latest View live

NoClassDefFoundError with handlebars.js and Spring MVC

$
0
0

Hi,

 

EDIT: This happens also when trying to use another template engine such as thymeleaf. I have added more details (exceptions, manifest and spring xml files) at https://gist.github.com/4624136

 

----

 

I have created a simple spring application using Spring MVC and I want to use handlebars.java (https://github.com/jknack/handlebars.java) as my template engine. When creating a Spring bean for the Handlebars class, I get the following error:

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlebars' defined in ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.github.jknack.handlebars.Handlebars

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1011)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:957)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)

org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)

org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)

org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)

org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)

org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)

javax.servlet.GenericServlet.init(GenericServlet.java:244)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

com.sap.security.auth.service.webcontainer.internal.Authenticator.invoke(Authenticator.java:147)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

com.sap.core.tenant.valve.TenantValidationValve.invokeNextValve(TenantValidationValve.java:169)

com.sap.core.tenant.valve.TenantValidationValve.invoke(TenantValidationValve.java:84)

com.sap.core.js.monitoring.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:27)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

java.lang.Thread.run(Thread.java:680)

 

root cause

java.lang.NoClassDefFoundError: Could not initialize class com.github.jknack.handlebars.Handlebars sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1004) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:957) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) javax.servlet.GenericServlet.init(GenericServlet.java:244) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) com.sap.security.auth.service.webcontainer.internal.Authenticator.invoke(Authenticator.java:147) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) com.sap.core.tenant.valve.TenantValidationValve.invokeNextValve(TenantValidationValve.java:169) com.sap.core.tenant.valve.TenantValidationValve.invoke(TenantValidationValve.java:84) com.sap.core.js.monitoring.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:27) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:680)

 

 

 

I have checked and the jar of Handlebars is inside the war deployed to the cloud (I'm using maven). I have tried to deploy the same configuration to a local Glassfish server and it works fine. I suspect that this is an OSGI issue, probably OSGI for some reason is unable to find the jar dependency (I don't know why as the jar is included inside the project). Is there anyone who have experimented the same issue ?

 

Please help !

 

Cheers,

Alan

 

 

      spring-mvc.xml file

<beanid="handlebars"class="com.github.jknack.handlebars.Handlebars">

 

</bean>

 


Authentication failed

$
0
0

Hi,

 

Just got my access to test SAP HANA Cloud Platform and I am not able to publish my app. Locally it works perfectly, but not when I try the cloud. I followed the instructions given by SAP (https://help.hana.ondemand.com/help/frameset.htm?60ab35d9edde43a1b38cf48174a3dca2.html) but I always got the error message "Authentication failed". I assume I am developer and set the parameters "hanatrial" and use the prefixe "trial". Has anyone already encountered the same problem? Thank you very much

Executing RFCs in an ABAP backend system from a NetWeaver Cloud Application

$
0
0

Hi,

I wrote a little tutorial explaining how to execute remote-enabled function modules (RFMs) from within a Java application running on the NetWeaver Cloud:

 

Executing RFC Calls from a  NetWeaver Cloud Application

 

Currently the SAP Cloud Connector does not yet support the RFC protocol, but with the workaround described in the above document, it should be possible to call any ABAP function module in an on-premise R/3 system in a secure and effortless way. The workaround leverages an internally installed SAP Business Connector, which can be set up in half an hour, if not yet installed.

The above mechanism is not limited to calling RFMs: the Business Connector provides much more functionality, and the referenced jar file allows executing any SAP BC Service very easily, so you could for example access an on-premise database using the Business Connector's WmDB package, put/get files onto/from an internal FTP server, etc.

 

In this thread please report your experiences with the above procedure or any problems you encounter.

 

Ulrich

oData Services - Unsupported property name

$
0
0

Don't know if this is the correct way to post this question but here goes.

 

I'm trying to develop an oData service on the HANA xsEngine.

The service should expose the SAP table KNA1 which holds customer information

KNA1 is replicated through SLT.

 

I set up a simple odataservice in a wash.xsodata filte

service namespace "wash.service" {  "SLT_EP0"."KNA1" as "CUSTOMER";  }

when trying to commit and activate i get this error.

 

oData Services - Unsupported property name "/VSO/R_DPOINT" in database artifact "KNA1"

 

The service returns errors for all columns containing "/"

 

How do i get around this problem.

1. Is there any way i can change the property name?

2. Can I define which columns i want to include, and then leave them out?

 

Any help is appreciated.

 

- Rasmus

JPA Tutorial, works locally, error on cloud server

$
0
0

I ran through the JPA tutorial and after a little fiddling it worked locally. A couple of small problems I encountered.

 

When trying to create the entity for JPA in the Content diagram I got an exception. To get beyond this I needed to include the eclipselink and peristance jar files in the project. I think perhaps I only needed the persistence jar as the exception was related to this.

 

The second problem I encountered was when deploying the app locally, I got an exception in the app complaining that the schema DEMO did not exist. To get beyond this it seemed necessary to set the DDL generation type to Create Tables and Output Mode to Database in persistence.xml. At least this seemed to work for me, maybe there is a better way.

 

Now the app deploys and runs on the local server. However when I deploy it to the cloud I get a different problem. The app deplos and starts successfully, but when I try to add an Person I get the following exception:

 

javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [274]: inserted value too large for column: John

Error Code: 274

Call: INSERT INTO T_PERSON (ID, FIRSTNAME, LASTNAME) VALUES (?, ?, ?)

bind => [3 parameters bound]

Query: InsertObjectQuery(org.persistence.Person@71f9632f)

org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)

org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)

 

Anyone else encountered something similar?

 

Cheers

JohnA

Connection from ABAP to SAP NW Cloud with SAML2 authentication

$
0
0

Hi colleagues,

 

I am currently working on a solution to establish a secure connection from an SAP System (Gateway System) to the SAP NW Cloud.

At the SAP NW Cloud I have developed a small service which is protected by a SAML2 authentication which I am trying to connect from ABAP

 

Does anybody here has some experience to setup an SAP system to establish a trusted SAML2 connection to the SAP NW Cloud. (Maybe with an RFC Type G) ?

 

Any help is welcome.

 

If you have any questions please do not hesitate to contact me directly.

 

Thanks for your support

 

Best

Christopher

Uncaught TypeError: Cannot read property 'Table' of undefined

$
0
0

Hello,

 

I tried to follow the end to end guide (http://scn.sap.com/docs/DOC-33513). Unfortunately when I add the table as described in section 2.3 I get the following error, when I try to display the page in the javascript log: Uncaught TypeError: Cannot read property 'Table' of undefined. Nothing, besides the background, gets displayed. I attached my source code (Note that you have to rename the file to *.zip).

 

Best Regards,

Jan

HANA Cloud Trial downtime announcements

$
0
0

In this discussion we are going to announce NetWeaver Cloud Trial landscape infrastructure downtimes.

 

Regards,

NetWeaver Cloud operations team


SAP ftp/idoc integration

$
0
0

We have an application that consumes a generates idocs to/from SAP Retail. SAP generates and cosumes idocs to/from the file system, and our application takes them by ftp.

 

How can we do this with SAP HANA Cloud?

SAPUI5: Looking for sample source...

$
0
0

Dear All,

i browsed a set of SAPUI5 related documents and found some code snippets but i havnt found any sample which does more then just printing "Hello".

Does anybody know where i can find the code of the SAPs own UI5 shell for example, which is use by https://account.prod.jpaas.sapbydesign.com/ or any other advanced UI5 application?

 

I've seen the control snippets of http://veui5infra.dhcp.wdf.sap.corp:8080/demokit which are pretty cool but the complex do not work without knowing the context. So I'm still dreaming of github projects raedy to build&start, including REST based services, session handling, cookies, etc.

 

Many thanks

Roland

HANA cloud integration

$
0
0

Hello folks,

 

I am an SAP Process Integration [ PI ] Developer .

 

I have a requirement to integrate Successfactor with SAP ECC using HANA Cloud Integrtion.

 

So as I am not aware about the feature and tools in SAP HANA Cloud Integration.

 

Kindly guide me - How to proceed further ? How to install test instance of SAP HANA Cloud Integration Tool , if there any ?

 

Regards

PS

Connection from ABAP to SAP NW Cloud with SAML2 authentication

$
0
0

Hi colleagues,

 

I am currently working on a solution to establish a secure connection from an SAP System (Gateway System) to the SAP NW Cloud.

At the SAP NW Cloud I have developed a small service which is protected by a SAML2 authentication which I am trying to connect from ABAP

 

Does anybody here has some experience to setup an SAP system to establish a trusted SAML2 connection to the SAP NW Cloud. (Maybe with an RFC Type G) ?

 

Any help is welcome.

 

If you have any questions please do not hesitate to contact me directly.

 

Thanks for your support

 

Best

Christopher

Unable to recover broken app on hana cloud

$
0
0

Hi,

 

it seems that one of our team members has broken our app deployed on the hana cloud and we're unable to recover to a clean state. Let me give some background first. We have a nightly build job which automatically deploys our app using the hana command line tools (always the latest version so currently 1.25.4.3). The job first stops the app, then deploys the new app and finally starts the app again. Now our team member also deployed a development version of our app from his computer to the same app in the cloud. I don't know whether he missed some step from our deployment job or what deployment properties he used but somehow our deployed app is broken now. It always shows up running with 2 processes when started despite being deployed with an elasticity data of [1..1]. One of the processes is always in the starting state but never reaches start and also can not be stopped. When calling stop on the cloud cockpit we get the stopping message but only one process stops and the other one is staying in the starting state. When using the command line tools to stop the app the command finishes without any errors but in the cloud cockpit there is still one process shown in the starting state. In the hana cloud documentation (https://help.hana.ondemand.com/help/frameset.htm?7612f03c711e1014839a8273b0e91070.html) the notes about starting and stopping say

When you stop an application, all application processes are stopped, irrespective of the tool used

but this doesn't seem to be the case for us. Even an undeploy (which is only possible via command line tools since in the cloud cockpit the delete button is never shown because of the starting process) didn't help - the second process persists. Just for fun I also tried to deploy with elasticity data of [3..3] but in this case the app didn't start because 1 process was already in use. In the vague hope that this will resolve our problem I deployed with a vm argument of -Dosgi.clean but that also did not help. I assume the undeploy doesn't remove all state - maybe the command line tools can get a parameter to force the removal of all state? For now it seems like we have to either live with the 2nd process or switch over to another cloud app. I would appreciate any help.

 

Best regards,

Tobias

jdbc driver for SAP HANA?

$
0
0

Hi,

 

I was deployed excel file reader application using tomcat 7. For the back end purpose i used oracle 11g(oracle.jdbc.driver.OracleDriver ). How could I deploy the same application using SAP Netweaver Cloud and which driver i have to use for SAP HANA DB.

 

Thanks and Regards,

Manoj

Authentication Failed

$
0
0

Hi,

 

Before explaining my problem I have already followed all the instruction from those posts (I do not have Spring Roo I just use Eclipse) : Re: Spring Roo: Authentication failed when deploying  and Exposing a REST API from #SAPNWCloud

 

The only difference is I have already deployed an application and updated it 2 or 3 times and since 2 weeks I do not have the possibility to update or create a new application.

 

I tried to stop the deployed application and deploy again with no result. I deleted the application and deployed again with no success.

 

What I suspect, is my SAPUI5 version is 1.8.6 and the runtime is 1.8.8 but I tried to upgrade the plugging and it didn't succeed.

 

Here is the log :

com.sap.core.tools.eclipse.server.cloud.util.InternalOperationException: Authentication failed. Check if you have a valid user authorized to perform the current operation in the provided account and make sure the account name is spelled correctly          at com.sap.core.tools.eclipse.server.cloud.ui.wizard.CloudServerWizardFragment.collectInfoAndThrowCustomException(CloudServerWizardFragment.java:306)          at com.sap.core.tools.eclipse.server.cloud.ui.wizard.CloudServerWizardFragment.createJPaaSComponent(CloudServerWizardFragment.java:228)          at com.sap.core.tools.eclipse.server.cloud.ui.wizard.CloudServerWizardFragment.performFinish(CloudServerWizardFragment.java:129)          at org.eclipse.wst.server.ui.internal.wizard.TaskWizard.executeTask(TaskWizard.java:272)          at org.eclipse.wst.server.ui.internal.wizard.TaskWizard$2.run(TaskWizard.java:219)          at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)          at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)          at org.eclipse.wst.server.ui.internal.wizard.page.WorkspaceRunnableAdapter.run(WorkspaceRunnableAdapter.java:35)          at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

 

Session Data:

eclipse.buildId=M20120914-1800

java.version=1.7.0_15

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR

Framework arguments:  -product org.eclipse.epp.package.jee.product

Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

 

Versions :

eclipse_version.png

Any idea ?


Document Storage using Mongo DB ?

$
0
0

I've read that Mongo DB is used for the document storage service when running a NWCloud app on your local machine, but what about the real document service on NWCloud - is that also Mongo DB?

Error when installing Hana Cloud Tools for Java in Eclipse Juno

$
0
0

Hi Gurus,

 

I was trying to install Hana Cloud Tools for Java in Eclipse Juno, however I couldn't successfully install it because Eclipse throws this error message when I was installing it:

 

 

Cannot complete the install because one or more required items could not be found.

  Software being installed: SAP HANA Cloud Tools for Java 1.12.0 (com.sap.core.tools.eclipse.server.feature.feature.group 1.12.0)

  Missing requirement: SAP HANA Cloud configuration client 1.0.1 (com.sap.core.configuration.client 1.0.1) requires 'package org.apache.http [4.1.0,5.0.0)' but it could not be found

  Cannot satisfy dependency:

    From: SAP HANA Cloud connectivity editor 1.1.9 (com.sap.core.tools.eclipse.connectivity.editor.feature.feature.group 1.1.9)

    To: com.sap.core.configuration.client [1.0.1]

  Cannot satisfy dependency:

    From: SAP HANA Cloud Tools for Java 1.12.0 (com.sap.core.tools.eclipse.server.feature.feature.group 1.12.0)

    To: com.sap.core.tools.eclipse.connectivity.editor.feature.feature.group [1.1.9]

 

 

How can I solve this issue?

Any tip?

 

 

Thanks in advanced.

KMT

How to start with Java agent to use InstrumentationLoadTimeWeaver (Spring + JPA)

$
0
0

I tried a testing project using springframework.

When I launch the project via Tomcat 7.0 Server, it show the errors as below:

____________________________________________________________________________________________________________________________

[RAM] 2013-01-10 10:50:39,488 ERROR [org.springframework.web.context.ContextLoader]:Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/C:/Users/i073799/workspace/Servers/Local Test Server for SAP NetWeaver Cloud-config/webapps/ReportAnalytics-App-Web/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.reflect.UndeclaredThrowableException

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)

........................................................................

........................................................................

........................................................................

... 86 more

Caused by: 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 org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager$Jpa2PersistenceUnitInfoDecorator.invoke(DefaultPersistenceUnitManager.java:617)

... 94 more

Caused by: java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.

at org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver.addTransformer(InstrumentationLoadTimeWeaver.java:87)

at org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.addTransformer(SpringPersistenceUnitInfo.java:111)

... 99 more

___________________________________________________________________________________________________________________________I

 

Then I set the VN argument "-javaagent:c:\temp\spring-instrument-3.2.0.RELEASE.jar"
The setting is as below:

 

20130110110319.jpg

after that, the project can be launched well on tomcat 7 now.

 

But when I use NW cloud server to launch the project, it will still occor same errors as above, no matter whether set VM arguments as below or not:

 

20130110111350.jpg

How does one get to programmatically register a user and assign them a role in SCN using an API? Any ideas??

$
0
0

I am to create an application that will handle the registration and login of an SCN user in a seamless process. I would appreciate your inputs in whatever form.

Problem with JNDI lookups in Hana Cloud

$
0
0

Hi, in the app I am trying to run on NW Cloud (or HANA Cloud) I need a custom URLContextFactory (UCF). As per classic JNDI, the UCF is declared in a jndi.properties file that is looked up via the classpath.

 

This works fine in Tomcat. It does even work fine in Eclipse's virgo-tomcat-server-3.6.1. I believe it worked ok on HANA Cloud just last week. Now it says:

 

javax.naming.NoInitialContextException: Error occurred during a privileged operation [Root exception is java.lang.ClassCastException: class java.io.BufferedInputStream:null incompatible with class java.io.File:null]
 at org.eclipse.gemini.naming.SecurityAwareContextManagerImpl.invokePrivilegedAction(SecurityAwareContextManagerImpl.java:81)
 at org.eclipse.gemini.naming.SecurityAwareContextManagerImpl.newInitialContext(SecurityAwareContextManagerImpl.java:53)
 at org.eclipse.gemini.naming.TraditionalInitialContextFactoryBuilder$TraditionalInitialContextFactory.getInitialContext(TraditionalInitialContextFactoryBuilder.java:97)
 at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
 at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
 at javax.naming.InitialContext.init(InitialContext.java:223)
 at javax.naming.InitialContext.(InitialContext.java:175)
 at javax.naming.InitialContext.doLookup(InitialContext.java:265)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:104)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at com.sap.security.auth.service.webcontainer.internal.Authenticator.invoke(Authenticator.java:160)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
 at com.sap.core.tenant.valve.TenantValidationValve.invokeNextValve(TenantValidationValve.java:171)
 at com.sap.core.tenant.valve.TenantValidationValve.invoke(TenantValidationValve.java:86)
 at com.sap.js.statistics.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:25)
 at com.sap.core.js.monitoring.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:27)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassCastException: class java.io.BufferedInputStream:null incompatible with class java.io.File:null
 at org.eclipse.gemini.naming.OSGiInitialContextFactoryBuilder.getFileDefinedJndiProperties(OSGiInitialContextFactoryBuilder.java:670)
 at org.eclipse.gemini.naming.OSGiInitialContextFactoryBuilder.getCombinedEnvironment(OSGiInitialContextFactoryBuilder.java:544)
 at org.eclipse.gemini.naming.OSGiInitialContextFactoryBuilder.createInitialContextFactory(OSGiInitialContextFactoryBuilder.java:132)
 at org.eclipse.gemini.naming.ContextManagerImpl.createNewInitialContext(ContextManagerImpl.java:129)
 at org.eclipse.gemini.naming.ContextManagerImpl.newInitialContext(ContextManagerImpl.java:65)
 at org.eclipse.gemini.naming.SecurityAwareContextManagerImpl$NewInitialContextWithEnvironmentAction.run(SecurityAwareContextManagerImpl.java:122)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.eclipse.gemini.naming.SecurityUtils.invokePrivilegedAction(SecurityUtils.java:45)
 at org.eclipse.gemini.naming.SecurityAwareContextManagerImpl.invokePrivilegedAction(SecurityAwareContextManagerImpl.java:73)
 ... 35 more

 

 

Do we have an expert on the forum who would know about this?

 

Thanks! Henning

Viewing all 1318 articles
Browse latest View live




Latest Images