An error occurred after hosting of jsp web application - eclipse

I have created a jsp web application. The real task is i have to host my project in the university server using WINSCP. But when i test the project using the university domain i am getting this error
type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [15] in the generated java file: [C:\tomcat\work\Catalina\localhost\ROOT\org\apache\jsp\student\gtalluri\workspace\java\MSUVotingSystem\WebContent\index_jsp.java]
Only a type can be imported. edu.msu.isa.jdbc.SQLServer resolves to a package
An error occurred at line: [20] in the generated java file: [C:\tomcat\work\Catalina\localhost\ROOT\org\apache\jsp\student\gtalluri\workspace\java\MSUVotingSystem\WebContent\index_jsp.java]
Only a type can be imported. edu.msu.isa.jdbc.DateStore resolves to a package
An error occurred at line: 108 in the jsp file: /student/gtalluri/workspace/java/MSUVotingSystem/WebContent/index.jsp
SQLServer cannot be resolved
I am unable to understand what the actual problem is , i tried to change the tomcat settings but this did not solve my problem.
To find the exact error please go to the following link ad guide me what is the exact problem

There is a compilation issue .According to the log printed I come to know that there is an issue with the Import statement within JSP.
<%# page import="" %>
SQLServer.class file is not residing in the package provided in the above import statement.

Related

The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory is not working from eclipse

I am trying to deploy a gradle web project using tomcat in eclipse and when I am trying to access the application it throws me an exception as follows:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [36] in the generated java file: [......plugins\org.eclipse.wst.server.core\tmp0\work\Catalina...\org\apache\jsp\error_jsp.java]
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
The same application I am able to deploy manually in the tomcat server with out using eclipse then it is working perfectly.
Please provide me a solution.
While deploying the application into server using eclipse it is adding some dependencies which are conflicted to dependencies added using gradle, after removing the conflicted jars the solved the issue.
the generated war only have the jars which are configured in the gradle so that is working when we deploy it manually on the server.

NoClassDefFoundError when using instrumentation on Bluemix

I am trying to add a javaagent to my bluemix app, this agent uses Instrumentation. The thing is that when I run the application I get the following error:
premain() - Instrumentation is already running
...
CWWKF0004E: An unknown exception occurred while installing or removing features. Exception: java.lang.NoClassDefFoundError: agent.ClassInstrumentorTransform
ERR at com.ibm.ws.kernel.feature.internal.subsystem.SubsystemFeatureDefinitionImpl.setHeader(SubsystemFeatureDefinitionImpl.java)
ERR at [internal classes]
I have tried creating another agent with the same Premain-Class and Agent-Class structure but with my own classes and it works, I have tried uploading my own copy of Instrumentation classes and point the javaagent to it using Class-Path but the error still appears.
Any sugestion what can be the problem?
I suspect maybe the Bluemix enviorment uses the Instrumentation, any ideas how this might be checked and how I can solve the inter dependency?
Based on the error message, it looks like you have a class in a feature bundle that is trying to access a class from the javaagent, but you have not added the javaagent package to org.osgi.framework.bootdelegation as described in the Specifying Liberty profile bootstrap properties" topic in the knowledge center topic.

Starting Groovy/Grails Tool Suite fails with internal error: `Requesting Java AST from selection`

Hello when I launch my Eclipse(Groovy/Grails Tool Suiteā„¢ (GGTS) - Spring) i get this error:
An internal error occurred during: "Requesting Java AST from
selection". Unresolved compilation problems: The import
grails.util cannot be resolved CollectionUtils cannot be resolved
org.springframework cannot be resolved to a type
org.springframework cannot be resolved to a type
org.springframework cannot be resolved to a type
And when I try to update my plugins dependencies I just get and error and nothing is updated. Can anyone please help.
I have GGTS and this message is poping up each time I click on eclipse.

HTTP Status 500 - Failed to load application class error in Eclipse

I am creating Vaadin 6 application using eclipse Kepler. Tomcat Server is main page running (localhost:8080). But when I run an application, I get HTTP Status 500 - Failed to load application class error.
type Exception report
message Failed to load application class: com.example.secondone.SecondoneApplication
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Failed to load application class: com.example.secondone.SecondoneApplication
com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
java.lang.Thread.run(Thread.java:761)
I'm using Vaadin 6.8.13 and have installed the plugins and added the jar to WEB-INF --> lib folder.
I'm not able to figure out the exact cause of this error. Please help me out.
These types of errors are usually caused by issues in the project configuration. Make sure you haven't made any typos in your web.xml and systematically check your project structure for any mistakes. Could it be, for example, that your application class is actually named SecondOneApplication instead of SecondoneApplication?
Its application is trying to run this class is:
com.example.secondone.SecondoneApplication
But she is not lying. Somewhere in your configuration files you must is by setting this package. Try other variations like:
secondone.SecondoneApplication
Or just :
SecondoneApplication
If you were using Hobernate, it would be in the archives:
hibernate.cfg.xml
and its mapping:
secondoneapplication.hbm.xml

Error in building Liferay 6.2 portlet in Eclipse Juno?

I am getting below error when trying to create a portlet in Eclipse Juno using liferay 6.2 EE. Can you please let me know what i am missing in this? I am new to Liferay 6.2
BUILD FAILED
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\portlets\build.xml:5: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-plugins.xml:5: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common.xml:47: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-ivy.xml:34: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-ivy.xml:50: impossible to resolve dependencies:
resolve failed - see output for details
Total time: 1 minute 1 second
Are you getting the following message, mentioned in the forum?
[ivy:resolve] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If so this means ivy is attempting to access an SSL protected URL (https) that is using an invalid certificate.
You must provide more detail (full stacktrace and applicable ivy code) in order to diagnose further.