21 November 2011

Elegir: Elige vs Elije

Es uno de los verbos más usado en el comercio a diferentes niveles, tal como, ferias libres, malls, marketing televisivo, Internet, papel (periódicos, carteles y otros).

Elije: incorrecto

A la vez uno de los verbos mas erradamente escritos, sucede muy frecuente que usen J (jota) en vez de G para decir, elegido, elegir... no sé cual es el motivo de confusión, donde la regla es sólo si usan a/o entonces hay que usar J

En la RAE sale la conjugación correcta:


En Transgrediendo a Cervantes hay varias fotos al respecto.

PD: Proteger es otro verbo que también se usa mal a menudo.

08 November 2011

WL_LLR_ADMINSERVER

WebLogic Server 10.x has non-XA datasource that emulates Global Transactions; when using non-XA with Global Transactions and Logging Last Resource enable the following error may happen at admin console:

* An error occurred during activation of changes, please see the log for details.

* weblogic.application.ModuleException:

* JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'base_domain//AdminServer' expected 'domain_sample//AdminServer'*** ONLY the original domain and server that creates an LLR table may access it ***

or

in the WLS stdout:

<08-11-2011 10:50:57 AM CLST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'DS1'.>
weblogic.application.ModuleException:
        at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:349)
        at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:66)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
        at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
        at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
        at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
        at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
        at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:403)
        at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
        at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.commit(DeploymentReceiverCallbackDeliverer.java:63)
        at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.callDeploymentReceivers(AwaitingCommit.java:235)
        at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.handleCommit(AwaitingCommit.java:131)
        at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingCommit.receivedCommit(AwaitingCommit.java:44)
        at weblogic.deploy.service.internal.transport.CommonMessageReceiver.receiveRequestCommitMsg(CommonMessageReceiver.java:470)
        at weblogic.deploy.service.internal.transport.CommonMessageReceiver$3.run(CommonMessageReceiver.java:742)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'base_domain//AdminServer' expected 'domain_sample//AdminServer'*** ONLY the original domain and server that creates an LLR table may access it ***
        at weblogic.jdbc.wrapper.JTSLoggableResourceTable.newVerifyException(JTSLoggableResourceTable.java:221)
        at weblogic.jdbc.wrapper.JTSLoggableResourceTable.findOrCreateTable(JTSLoggableResourceTable.java:303)
        at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.findOrCreateBackingTable(JTSLoggableResourceImpl.java:528)
        at weblogic.jdbc.wrapper.JTSLoggableResourceImpl.recoverXARecords(JTSLoggableResourceImpl.java:241)
        at weblogic.transaction.internal.ServerTransactionManagerImpl.registerLoggingResourceTransactions(ServerTransactionManagerImpl.java:751)
        at weblogic.jdbc.common.internal.RmiDataSource.recoverLoggingResourceTransactions(RmiDataSource.java:277)
        at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:148)
        at weblogic.jdbc.common.internal.DataSourceManager.createAndStartDataSource(DataSourceManager.java:97)
        at weblogic.jdbc.module.JDBCModule.activate(JDBCModule.java:346)
        ... 29 more

This is for the verbatim message:

Caused by: java.sql.SQLException: JDBC LLR, table verify failed for table 'WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'base_domain//AdminServer' expected 'domain_sample//AdminServer'*** ONLY the original domain and server that creates an LLR table may access it ***

Therefore one way to solve this is to update the WL_LLR_ADMINSERVER table pointing to to the correct target domain name and server that has this LLR DataSource.
where the String 'domain_sample//AdminServer' is the tuple to be modifed.

Excute the following SQL script for updating:

update SCHEMA_SAMPLE.WL_LLR_ADMINSERVER set RECORDSTR = 'domain_sample//AdminServer' where  XIDSTR  = 'JDBC LLR Domain//Server'; 

02 November 2011

Eclipse Plug-ins (update)

After several years, many plug-ins have been made and are more stable than ever.

From my last post about it, the following list is the one I am currently using:
(most of these URIs are the repository location for installing new software at Eclipse)
More plug-ins can be found at:  http://marketplace.eclipse.org/

28 October 2011

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken

In Oracle Weblogic Server - Version: 9.2 to 10.3.6 when shutting down managed server(s) the following error may occurs:

CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken

or when trying to run an application using HQL with antlr as parser, the following stacktrace may appear:

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [ from org.example.hibernate.Customer]
at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
at antlr.CharScanner.(CharScanner.java:51)
at antlr.CharScanner.(CharScanner.java:60)
at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56)
at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53)
at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50)
at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26)
at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:242)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:112)
at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:57)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1627)
at org.example.hibernate.HQLSample.selectCustomer(HQLSample.java:41)
at Test.doGet(Test.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

Cause
Classloading issues with antlr library bundled with WebLogic Server that is not compatible with Hibernate 3.

Solution
It is necessary to use antlr 2.7.6 (this version works, however more details of which version should be check with Hibernate as being a third party tool).

There are 4 possible workarounds for this classloading issue:

1. Package antlr.jar into WEB-INF/lib and add the following tag to weblogic.xml
    (this works for war alone or packaged into an ear).
<container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

2. If it is an ear file then put antlr.jar at APP-INF/lib (or at web application level: WEB-INF/lib) and modify weblogic-application.xml adding the following tag:
<prefer-application-packages>
    <package-name>antlr.*</package-name>
</prefer-application-packages>

3. Change property hibernate.query.factory_class from hibernate configuration file (hibernate.cfg.xml).
    (if hibernate.query.factory_class doesn't exist then this value is assigned by default):
<property name="hibernate.query.factory_class"
 value="org.hibernate.hql.ast.ASTQueryTranslatorFactory">
</property>

to a different parser (classic):

<property name="hibernate.query.factory_class" 
value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory">
</property>

4. Set at server classpath level antlr library before WLS classpath.
    (warning: this is the less recommended option because it impacts the whole WLS and may affect another modules).

    In setDomainEnv.cmd (or any of the start-up scripts) set the next value at the end of the file, referring to antlr library's location:

set CLASSPATH=C:\jars\antlr-2.7.6.jar;%CLASSPATH%

References
http://download.oracle.com/docs/cd/E21764_01/web.1111/e13706/classloading.htm
http://community.jboss.org/wiki/HibernateCoreMigrationGuide30#weblogic

25 October 2011

Matemática, un viaje entretenido

Para los usuarios del Metro de Santiago de Chile hay un concurso de matemáticas que esta abierto hasta el 31 de octubre.

Son preguntas interesantes y alguna conocidas... si se entusiasman vayan al sitio: http://www.unviajeentretenido.cl

Se agradece esta iniciativa hecha por el Metro y la PUC.

Facebook Programming Challenge

For anybody that like to solve puzzles and programming, Facebook has a new challenge:
http://facebook.interviewstreet.com/recruit/challenges

In this case also it is a test for recruiting.

Be careful that is timed programming question therefore be sure to have some free time and without noise :P

UPDATE1: they moved to https://www.hackerrank.com

28 September 2011

Foo

Es conocido las palabras foo y bar para dar ejemplos de programación, lo que no sabia era las otras también utilizadas: baz, qux, quux

Generando el siguiente conjunto de términos:

{ foo, bar, foobar, baz, qux, quux }

07 September 2011

The Bank of San Serriffe

Just checking Knuth's page, I've found out that I appeared twice in The Bank of San Serriffe's balance:
German González-Morris    0x$1.20
German Gonzales-Morris    0x$1.20

It is incredible how many times my last name (being one of the most popular worldwide) is misspelled :D

01 September 2011

Eclipse versions bundled in WebLogic Server

This is a summary of embedded Eclipse versions found in WebLogic Server installations:

WebLogic Server Eclipse OEPE
10.3 only WorkShop --
10.3.1 3.4.2 (Ganymede) 11.1.1.1.1
10.3.2 3.5.0 (Galileo) 11.1.1.3.0
10.3.3 3.5.2 11.1.1.5.0
10.3.4 3.6.1 (Helios) 11.1.1.6.1
10.3.5 3.6.2 11.1.1.7.2
10.3.6 3.7.1 (Indigo) 11.1.1.8.0
12.1.1 3.7.1 12.1.1.0.0
12.1.1 March 2012 3.7.2 12.1.1.0.1
12.1.2 4.3.0 (Kepler) 12.1.2.1
12.1.3 4.3.2 12.1.3
latest standalone 4.4.1 (Luna) 12.1.3.3


WebLogic Server installations can be downloaded from: http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html

Oracle OEPE can be obtained standalone as well, usually there is newer version too: http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html

Updated: 24-December-2014
 

Blog Archive

Disclaimer

Qux