June 25, 2012

Websphere Process Server on Linux - Admin Console Error

NullPointerException after logging in to admin console.

This happens if the number of open files allowed is low.

Update the limit in /etc/security/limits.conf and restart. I used 16384, works fine now.

June 19, 2012

org.hibernate.hql.ast.QuerySyntaxException

Description: org.hibernate.hql.ast.QuerySyntaxException: Tablename is not mapped [SELECT id
FROM Tablename] when trying to run NamedQuery in JPA. 



Reason/Solution: Put simply, you are using the table name instead of the Entity class name mapped in persistence.xml. 


So if table USERS is mapped to entity class User, your query will need User and not USERS. 



June 18, 2012

WTP metadata

Description: This project needs to migrate WTP Metadata.
Solution: At times, just a QuickFix from the Problems view might work. If not, try renaming the project temporarily , and then naming it back followed by a full build or clean. HTH.

Errors occurred during wsimport.

Description: Errors occurred during wsimport.
  [failed to localize] wsimport.ParsingWSDL()
[failed to localize] wsimport.ErrorMessage(A class/interface with the same name "mypackage.MyClass" is already in use. Use a class customization to resolve this conflict.)
[failed to localize]

Reason:This is an error generated by the XJC that comes with JDK 1.6.

Solution: While there are parameters you can pass to the tool from command line etc, the simplest explanation is that there are multiple types of the same name in your WSDL/XSD. Resolve the duplicate names and you will be good to go.

The MyClass is the XSD type you are looking for! HTH!