2.8.12

Error: Two classes have the same XML type name

The schemagen command does not differentiate the XML namespace between multiple XMLType annotations that have the same @XMLType name defined within different Java packages. When this scenario occurs, the following error is produced:

Error: Two classes have the same XML type name ....
Use @XmlType.name and @XmlType.namespace to assign different names to them...
 
This error indicates you have class names or @XMLType.name values that have the same name, but exist within different Java packages. To prevent this error, add the @XML.Type.namespace class to the existing @XMLType annotation to differentiate between the XML types.

17.7.12

Hibernate used to convert camel case object property names to underscored database field names.But this is not working anymore. So you should say your naming strategy to hibernate specifically with setting "hibernate.ejb.naming_strategy" property.

For auto-conversion from camel case to  underscores (like patientId to PATIENT_ID as a database column name) you can set it to "org.hibernate.cfg.ImprovedNamingStrategy" for choosing ImprovedNamingStrategy.

13.7.12

Maven dependencies not visible from Tomcat for a Web Project

If you are running the project as dynamic web project on a server within eclipse,

Open the project properties (right click > properties) and select "Deployment Assembly".

There click "add", select "build path entries", and choose "maven dependencies".

This will instruct WTP to send the maven dependencies to the server dir

 For other solutions: http://stackoverflow.com/questions/6083501/maven-dependencies-not-visible-in-web-inf-lib

18.5.12

WSE3 Proxy Generation Problem

WSE3 doesn't work properly in VS2005 if you have an 64 Bit operating system (in my case it is Windows 7). Proxy classes (classes with WSE extension) are not generated by WSE. "The reason why the WSE enabled proxies In x64 machines aren’t generated with the right classes is that the WSE installer is not updating the devenv.exe.config file to register the WseExtensionImporter. To solve the mentioned problem you should manually add the following to C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\devenv.exe.config This issue is added as a bug to Visual Studio Bug Database.

7.4.12

Spring + JPA, org.hibernate.SessionException: Session is closed

This exception is mostly caused because of you are out of transactional context. To solve this simply add @Transactional annotation to your method. Look example below;

16.7.11

Building a data warehouse for data mining

If you read lots of document on building data warehouses but still things are fuzzy, the presentation below will be helpful for you;

http://www.slideshare.net/idnats/data-warehousing-and-data-mining-presentation-725476

4.6.11

Glassfish - Error in linking security policy

Yep another day and another nonsense damn Glassfish error. I really miss Spring Framework.

I got the message in $Subject and resolve it via remove all folders&files in "[glassfishhome]/glassfish/domains/domain1/generated" then a fresh restart, it works.

1.6.11

Moving Glassfish

When you decide to move your Glassfish installation from one folder to another folder/computer probably you will get errors from osgi like;

WARNING: Failed to install
file:/export/home/luca/java/as/glassfish-v3.1/glassfish/modules/XXXX.jar
org.osgi.framework.BundleException: Bundle symbolic name and version are
not unique: org.glassfish.XXXXXX

All this errors are about osgi cache system. After you delete;

"glassfish-v3/glassfish/domains/domain1/osgi-cache/felix/"

everything should be fine.

3.5.11

Egit and Github on Windows

Finally I got. Over lots of issues (like "no adress associated with name" or "auth failed" from eclipse) finally I can use Github with eclipse on windows. We apply first steps from eclipse forums guidelines and then combine it with classical console commands.

1. Set up the ssh key stuff
a. Download and install mysys git according to the github instructions at http://help.github.com/win-git-installation/
b. In C:/Users/you/ssh hide any existing keys (id_rsa and id_rsa.pub) in a subdirectory. If the ssh directory does not exist, create it. Of course, "you" is your username as the OS knows you.
c. From the start menu, run Git-Bash command shell (a regular DOS command shell will not work).
d. In the Git-Bash shell generate an rsa key based on your email (the one you registered at github):


$ ssh-keygen -t rsa -C "you"


and enter your pass phrase and confirm when asked.
e. The previous step should have created C:/User/you/ssh/id_rsa.pub which you can now open in a text editor and copy. At github, go to account settings, SSH Keys, add a key and paste this in the key box.
f. In Git-Bash again (notice the back-ticks in the next line):


$ eval `ssh-agent`
$ ssh-add C:/User/you/ssh/id_rsa
$ ssh git

2. From Eclipse share your project with Egit and then open Git-bash and go to your directory of your apps in your workspace. And now two more steps;

$ git remote add origin git@github.com:{your_user_name}/{your_project_name}.git
$ git push -u origin master
 
After you open Eclipse again and refresh you can see your remote repo under the git-repo view.