Error: unsupported encoding Cp037 for result set column SQLState: 22021 ErrorCode: -99999 January 24, 2012
Posted by ninadgawad in Uncategorized.Tags: DB2, JDBC Driver Type 4, JDK, JRE, SQLState
add a comment
Problem:
Error: unsupported encoding Cp037 for result set column SQLState: 22021 ErrorCode: -99999
Cause:
Issue with JVM version installed on your machine. Mostly occurs because of multiple versions of java in the OS or when international version of jdk/jre is not installed. It is related to carsets.jar
Solution:
Delete the java.exe from C:\Windows\system32 (make a copy first)
Make sure that JAVA_HOME is set correctly and JAVA_HOME/bin is added to PATH & CLASSPATH.
Note: Uninstall/Delete old version’s on JDK/JRE from you machine and make a fresh installation.
Cannot read project model from interpolating filter of serialized version. January 23, 2012
Posted by ninadgawad in Uncategorized.Tags: Java, J2EE, Maven, Build
add a comment
Problem:
Error building POM (may not be this project’s POM).
Project ID: com.dev.project
POM Location: C:\dev&test\
Reason: Cannot read project model from interpolating filter of serialized version. for project com.
main at C:\dev&test\
[INFO] ————————————————————————
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot read project model from interpolating filter of serialized vers
ion. for project com.dev.project at
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:292)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Cannot read project model from interpolating filter of
serialized version. for project com.dev.project at
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:882)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.ja
va:506)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:198)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:583)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:461)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:534)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
… 11 more
Caused by: org.apache.maven.project.interpolation.ModelInterpolationException: Cannot read project model from interpolat
ing filter of serialized version.
at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.interpolate(RegexBasedModelInterpolator.ja
va:114)
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1016)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:878)
… 17 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: entity reference name can not contain character \’
(position: START_TAG seen …C:\dev&test\… @314:33)
at org.codehaus.plexus.util.xml.pull.MXParser.parseEntityRef(MXParser.java:2222)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1275)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1093)
at hidden.org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:187)
at hidden.org.codehaus.plexus.util.xml.Xpp3DomBuilder.build(Xpp3DomBuilder.java:94)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parsePluginExecution(MavenXpp3Reader.java:3144)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parsePlugin(MavenXpp3Reader.java:2901)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Reader.java:753)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2224)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4422)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4433)
at org.apache.maven.project.interpolation.RegexBasedModelInterpolator.interpolate(RegexBasedModelInterpolator.ja
va:105)
… 19 more
Cause:
This is a standard error while making build in maven on Windows.
It occurs when your path contain’s special characters like ‘&’, ” etc.
Remove ampersand from the path and this should solve the problem. This is because mvn.bat cannot handle these characters in windows.
Solution: Remove ampersand “&” or special characters from path or username
Example:
Path: D:\workspace\dev&test\project1\mvn clean install (Error)
Rename the folder dev&test to devtest
Hope this Helps !
Setting up SSL for Web Application February 20, 2011
Posted by ninadgawad in Java, Programming, SSL, Technology, Web Apps.Tags: J2EE, SSL, Web Application, Web Apps
add a comment
Secure Socket Layer (SSL) protocol has been a standard across the internet for securing Web Applications. This trusted technology is quite simple to embed in your existing/new Web Applications. Here I will explain steps to implement SSL with “Apache” as Web Server and “JBoss/Tomcat” as Application Server.
A Web Application generally has three servers; Web, Application and Database. Your first request hits the Web Server which will handle the SSL authentication and forward request to the App Server which will process the request and send the response back through the same route.
… to be added
DB2 – Insert or Update Single Quote April 9, 2010
Posted by ninadgawad in DB2, General, MySQL, Uncategorized.Tags: DB2, INSERT, SINGLE QUOTE, UPDATE
add a comment
DB2 Inserting Single Quote
When you try to insert or update a Single Quote in DB2 (‘) in DB2 you will get an error message :
An unexpected token was found following “”. Expected tokens may include: “, WITH WHERE QUERYNO”. SQLSTATE=42601
Solution:
This happens beacuse here ESCAPE sequence ( \) does not work with single quote ( ‘ ).
You can achieve this by prefixing the single quote which you intent to insert by an additional single quote (‘).
i.e: Add two single quotes (”) where ever you have to insert/update one single quote (‘)
Example:
Query with Error:
INSERT INTO TABLENAME VALUES (1, ‘ D’Souza ‘, ‘Active ‘, CURRENT TIMESTAMP);
Use below Query :
INSERT INTO TABLENAME VALUES (1, ‘ D”Souza ‘, ‘Active ‘, CURRENT TIMESTAMP);
The same holds true with update statements.
Do comment if you have nquestions.
How to get System Properties in JSP July 17, 2009
Posted by ninadgawad in Uncategorized.add a comment
If you want to print the details of System Properties in JSP use the below code.
Here we get the System Properties and loop over the Enumeration object to print it on the screen.
Download File:



