when I run my jsp pgogram I got this exception error type Exception report - jsp-tags

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: 44 in the jsp file:
/jsp/ShoppingCart/AddBook.jsp The method getValue(String) is undefined
for the
type HttpServletRequest
int int_BookID,int_CategoryID,int_Price,int_Quantity;
String str_Title, str_Author, str_Publisher,str_Edition,str_Description;
int_BookID=(int)(10000*Math.random()+1);
int_CategoryID=Integer.parseInt(request.getValue("cat"));
str_Title=request.getParameter("title");
str_Author=request.getParameter("author");
str_Publisher=request.getParameter("pub");

request.getValue("cat") is the problem here.
I suppose the 'cat' is a parameter.
Instead , use request.getParameter("cat")
PS- I recommend you to read the basics of JSP first try the HeadFirst series.

Related

WASSession E SessionContextMBeanAdapter findAttCausingNotSerializableException

We are getting below mentioned exception in our sysout.log file.
Please provide your help on how we can solve this.
Is there any setting which we can make into the Websphere Application Server?
000000a3 WASSession E SessionContextMBeanAdapter
findAttCausingNotSerializableException Miscellaneous data: Attribute
"EXCELEXPORTERREGISTERID" is declared to be serializable but is found
to generate exception "java.io.NotSerializableException" with message
"com.ubs.fsl.idama.action.codification.CodificationsHandler$1". Fix
the application so that the attribute "EXCELEXPORTERREGISTERID" is
correctly serializable at runtime.
We have implemented serialization where ever required in our java code.
After that it is giving the below exception.
00000078 WASSession E SessionContextMBeanAdapter
findAttCausingNotSerializableException Miscellaneous data: Attribute
"com.ubs.fsl.ca.ia.CAReceptionRoomIA" is declared to be serializable
but is found to generate exception "java.io.NotSerializableException"
with message "com.ibm.ws.webcontainer.srt.SRTServletRequest". Fix the
application so that the attribute
"com.ubs.fsl.ca.ia.CAReceptionRoomIA" is correctly serializable at
runtime.
Note : The above exceptions started when we migrated from WAS 7.0.0.31 to WAS 9.0.0.5.

adf internal error occured on executing a vo in taskflow

can any body tell me the actual reason causing the below error:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:7349)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1257)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1449)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1355)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1340)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7236)
at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingWithParams(DCJboDataControl.java:2987)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1541)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
...
...
..
.
Caused by: java.lang.NullPointerException
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15884)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName(Unknown Source)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22684)
From the stacktrace, it seems some bind variable that is required by your view object query is not being set correctly.
If it works intermittently, it could be that the bind variable is lost at some point. To debug/test, try it with a hard-coded value for your bind variable and see if that works first (if you have a ViewCriteria, try removing that first) - then run the task flow and see if it works consistently.
I would suggest running the application in JDeveloper with -Djbo.debugoutput=console argument. It gives you a lot if information of what your business components are doing and you could catch the error cause in console logs.

Validation with DynamicJAXBContext

How could I turn on validation during unmarshalling? [moxy 2.6.0]
First intresting thing is that I need to put schema which should be already in DynamicContext. But even with setting schema to unmarshaller again it gives me an error.
I've tried to use this one:
final JAXBUnmarshaller unmarshaller = dynamicJAXBContext.createUnmarshaller();
//unmarshaller.setSchema();
final Schema schema = schemas.get(type);
unmarshaller.setSchema(schema);
unmarshaller.setValidating(true);
And it gives an exception. Looks like part which broke this are some elements which are put there from DynamicContext
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException
Exception [EclipseLink-25012] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred resolving the XML Schema.
Internal Exception: java.lang.NullPointerException
at org.eclipse.persistence.exceptions.XMLMarshalException.errorResolvingXMLSchema(XMLMarshalException.java:186)
at org.eclipse.persistence.oxm.schema.XMLSchemaClassPathReference.getURL(XMLSchemaClassPathReference.java:48)
at org.eclipse.persistence.oxm.XMLUnmarshaller.initializeSchemas(XMLUnmarshaller.java:211)
at org.eclipse.persistence.oxm.XMLUnmarshaller.setValidationMode(XMLUnmarshaller.java:155)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.setValidating(JAXBUnmarshaller.java:756)
The problem here is that the schema was not found. You set null instead of Schema instance.
Btw. method
javax.xml.bind.Unmarshaller#setValidating
is deprecated since JAXB 2.0. Using method
javax.xml.bind.Unmarshaller#setSchema
will do the job.

com.facebook.presto.server.PrestoServer Guice creation errors

I got the following error when trying to start presto server, how can I diagnose what property is malformed or something else? Thanks.
config file:
coordinator=true
datasources=jmx
http-server.http.port=8080
presto-metastore.db.type=h2
presto-metastore.db.filename=var/db/MetaStore
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8080
exception is
2013-11-11T11:11:39.582-0800 ERROR main com.facebook.presto.server.PrestoServer Guice creation errors:
1) Error: Constraint violation with property prefix '': environment is malformed (for class io.airlift.node.NodeConfig)
at io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error
com.google.inject.CreationException: Guice creation errors:
1) Error: Constraint violation with property prefix '': environment is malformed (for class io.airlift.node.NodeConfig)
at io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435) ~[guice-3.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154) ~[guice-3.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) ~[guice-3.0.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:95) ~[guice-3.0.jar:na]
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:277) ~[bootstrap-0.84.jar:0.84]
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:137) ~[presto-server-0.52.jar:0.52]
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:50) ~[presto-server-0.52.jar:0.52]
Apologies for the very unfriendly and unhelpful error message. This is on our list of things to fix.
The error "environment is malformed" means that the node.environment property (in the node.properties file) is set but fails to match the following regular expression: [a-z0-9][_a-z0-9]*. In other words, it must be lowercase, start with an alphanumeric character, and have only alphanumeric or underscores in subsequent characters.
Try a simpler name like test or production.
Not that it's of consolation, but I am getting something similar on Centos:
1) Error: Constraint violation with property prefix '': environment
may not be null (for class io.airlift.node.NodeConfig) at
io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error com.google.inject.CreationException: Guice creation errors:

groovy.lang$run.call(Unknown Source)

What is the meaning of groovy.lang$run.call(Unknown Source) and on what circumstances it will throw, this is the error what i'm getting in my groovy program
at groovy.lang$run.call(Unknown Source)
at groovy.lang.run(groovy.lang.Two_Script:6)
...................................................
...................................................
at groovy.lang.run(groovy.lang.Two_Script:6)
at groovy.lang$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at one_script.run(level_one_script.groovy:5)
why it has not thrown at the compile time only # runtime it has thrown any Idea ?
attached the sample groovy these are very simple recursive calls;
level_one_script.groovy
new Two_Script(binding).run()
Two_Script.groovy
new Three_Script().run()
Three_Script.groovy
println "Anish"
the exception was thrown while evaluating Three_Script.groovy , it give me recurive call on Two_Script.groovy
Exception occurred while executing the script [level_one_script.groovy] - [java.lang.StackOverflowError].
try
{
compiledScript.eval(bindings)
//compiledScript is the type of CompiledScript
}
Surprising part is if i remove the call new Three_Script().run() from "Two_Script.groovy"
it shows me correct result
Surprising
If the Groovy scripts are all defined in a package, the error is not thrown.
If the scripts are moved to the default package (no package), the error is thrown.
What is the actual exception thrown (first few lines)
Looks like there's problem in your file level_one_script.groovy at line 5

Resources