Skip to main content

Posts

Showing posts from June, 2012

Online HTML & CSS editor, MOZILLA THIMBLE

Very nice HTML & css editor for learners. https://thimble.webmaker.org/en-US/

Hibernate primaryKey (ID) auto generate using Database sequence

    @Id     @GeneratedValue(strategy = GenerationType.AUTO, generator ="CUSTOMER_SEQ_G")     @SequenceGenerator( name = "CUSTOMER_SEQ_G", sequenceName = "CUSTOMER_SEQ")     @Column(name = "CUSTOMER_ID")     private Long customerId; generator in @GeneratedValue should same as name in @SequenceGenerator sequenceName is Database Sequence object.

Deploy ear in exploded in Jboss using maven plugin

There is a option to deploy EAR/WAR as exploded folder in JBoss using jboss-maven-plugin. setting unpack "true" will do everything.... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-maven-plugin</artifactId> <version>1.5.0</version> <configuration> <jbossHome>C:/jboss-6.1.0.Final</jbossHome> <serverName>all</serverName> <fileName>target/MyEar.ear</fileName> <unpack>true</unpack> </configuration> <executions> <execution> <id>harddelpoy</id> <phase>install</phase> <goals> <goal>harddeploy</goal> </goals> </execution> </executions> </plugin>

WARN [org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker] Unexpected error in pingDatabase: java.lang.IllegalArgumentException: object is not an instance of declaring class {SOLVED}

When we use Oracle driver in application which is deployed JBossAS, We have to place the Oracle driver jar in server/lib directory. If we keep the jar in our Ear or War file also will get this warning message. 15:56:40,098 WARN  [org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker] Unexpected error in pingDatabase: java.lang.IllegalArgumentException: object is not an instance of declaring class To solve this, just remove the Oracle lib from your Ear or War.

start JBoss 6 server in different port

<<Jboss-HOME>>/bin run.bat -c <<servername> -Djboss.service.binding.set=ports-01   <<servername>>  - could be server directory name (all or minimal). default value is "default"  -Djboss.service.binding.set=ports-01 - this option will increase all port numbers by 100. Example: HA-JNDI port default is 1099 and after using option 1199 There are 4 options available in Jboss6, to view those login into AdminConsole ( http://localhost:8080/admin-console/ ) Service Binding Manager Service Binding Sets ports-01 ports-02 ports-03 ports-default ports-default - 8080 and others ports-01 - +100 ports-02 -  +200 ports-03 -  +300