Archive for the ‘General’ Category
Cannot run this command because Java services are not enabled. A user with System Administrator (SA) role must reconfigure the system to enable Java.
Context
An object is marshallized and sent on TibcoRV 8.1. An instance of Mule ESB 2.2.1 listens to TibcoRV, reads the message, unmarshalls the object and builds an SQL insert query.
The query is very simple:
[sql]insert into myTable(dateColumn, stringColumn) values(…)[/sql]
It is executed in a Jdbc connector declared on Mule configuration file:
[xml] <jdbc:connector name="jdbcConnector" dataSource-ref="mySybaseDB" pollingFrequency="1000">
<jdbc:query key="writeTest"
value="INSERT INTO myTable(dateColumn, stringColumn)
VALUES(#[map-payload:myJavaDate],#[map-payload:myJavaString])"/>
</jdbc:connector>[/xml]
The DB is Sybase. The first column is of type datetime, the second one is varchar. The values are retrieved from a java.util.Date and a java.lang.String.
Case
When the query is run, I get the error:
[java]java.sql.SQLException: Cannot run this command because Java services are not enabled. A user with System Administrator (SA) role must reconfigure the system to enable Java.[/java]
(you may get a com.sybase.jdbc2.jdbc.SybSQLException instead of java.sql.SQLException)
Explanation – Fix
The error is related only to Sybase, and not to TibcoRV and Mule: by default, Sybase cannot manage Java Dates (java.util.Date). You have to start explicitly the Java services. To perform that:
- login with an username owing the rights “
sa_role“ - run the SQL query: [sql]sp_configure ‘enable java’, 1[/sql]
- the restart the Sybase server
Now it should work. A similar error may occur with JBoss.
Display the Unix server name of a Sybase DB
- Let’s consider a Sybase server on which you are logged.
- You need know the Unix server name.
- Launch the SQL query:
select @@servername
SVN repository location change
Case
Your project repository was hosted by a server oldServer. A morning, you come at office, nothing works, impossible to update your project.
After hours searching for an explanation, you happen to know that your dear colleagues off-shore moved the repository onto another location, let’s say newServer.
Now you have to relocate your project on your local desktop.
Fix
Use the following command on your project head folder:
svn switch --relocate svn://oldRepository svn://newRepository
This operation may be performed with TortoiseSVN (right click on the directory > TortoiseSVN > Relocate)
svn: OPTIONS request failed on
Case
IntelliJ IDEA 7.x, version control with Subversion.
When I try to update the project, I get the following error:
Error:svn: unknown host myHost svn: OPTIONS request failed on /myProject/trunk/
On another hand, I can update the project thanks to TortoiseSVN. Then, I conclude the server exists and allows updates.
Fix
Firstly I thought of an issue of proxy, hence check your settings if you face the problem. Else:
- Shutdown IDEA
- Delete
~/.IntelliJIdea70/system/caches - Restart IDEA
[EJB:011055]Error deploying the EJB
Case
On redeploying the application myFooApplication, this error appears:
[EJB:011055]Error deploying the EJB 'myFooSession(Application: foo-ejbfoo-ear, EJBComponent: foo-foo-services-ejb-0-DEV.jar)', the JNDI name 'ejb.foo.foo-session-bean' is already in use. You must set a different JNDI name in the weblogic-ejb-jar.xml deployment descriptor for this EJB before it can be deployed.
Fix
- Stop the server
- Delete all files and folders in
${WL_HOME}\servers\myFooApplication. - Restart the server
You may encounter an error [Deployer:149163]. In this case, I suggest you to consult the related article: The domain edit lock is owned by another session in exclusive mode – hence this deployment operation cannot proceed
Remote debug on Mule 2.2.1
Case
You have to run a standalone Mule 2.2.1 in debug mode. Since Mule is launched in standalone, you have to debug a remote application.
Fix
Nice case
- Edit the
%MULE_HOME%/conf/wrapper.conf - Uncomment the line:
wrapper.java.additional.<n>=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
- Don’t forget to set the parameter <n>
Boring case
In my case (Windows XP SP2, Java 1.5), the Mule refused to start and freezed:
------------------------------------------------------------------------ The JVM is being launched with a debugger enabled and could possibly be suspended. To avoid unwanted shutdowns, timeouts will be disabled, removing the ability to detect and restart frozen JVMs. ------------------------------------------------------------------------ Launching a JVM... Listening for transport dt_socket at address: 5005 ------------------------------------------------------------------------ Startup: Timed out waiting for a signal from the JVM. The JVM was launched with debug options so this may be because the JVM is currently suspended by a debugger. Any future timeouts during this JVM invocation will be silently ignored. ------------------------------------------------------------------------
The fix this:
- Download the jar spring-agent here.
- Move it into
%MULE_HOME%/lib/user/ - Edit the
%MULE_HOME%/conf/wrapper.conf - add the following block:
wrapper.java.additional.3=-javaagent:%MULE_HOME%\lib\user\spring-agent-2.5.3.jar wrapper.java.additional.4=-Xdebug wrapper.java.additional.5=-Xnoagent wrapper.java.additional.6=-Djava.compiler=NONE wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
localhost:5005
TibrvException[error=4,message=Tibrv not initialized]
Case
In a JUnit test, I send a message on a TibcoRV, but I get the following error:
TibrvException[error=4,message=Tibrv not initialized]
Fix
In order, proceed as this:
- check an RVD daemon is running 😉
- check
tibrvj.jaris in your classpath 😉 - check the instanciation of transport layer
new TibrvRvdTransport(service, network, daemon);is done within yourpublic void testXXX(), and not in thesetUp().
Windows Mobile 6.1: which browser?
Here is a short comparative of webbrowsers available on Windows Mobile 6.1. I used them on a Acer X960 on French VirginMobile network.
| Browser | Pros | Cons | WebSite |
|---|---|---|---|
| Internet Explorer 5 |
|
|
|
| Mozilla Fennec 1.0a1 |
|
|
http://www.mozilla.org/projects/fennec/1.0a1/releasenotes/ |
| Opera Mobile 10 |
|
|
http://www.opera.com/ |
| SkyFire 1.5 |
|
|
http://get.skyfire.com |
As a conclusion, what do I do?
- In most cases, I use Opera, for its speedness and tabs.
- When I need watch a video
- my Acer X960 displays YouTube videos in a specific player
- on other websites, I use SkyFire.
- For Google applications (GMail, Reader, Docs, etc.), I use SkyFire, too.
org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Ignored XML validation warning org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = … must have even number of URI’s
Context
Mule 2.2.1 ESB config file with a TibcoRV connector, under Windows XP SP2 and Java 5.
The error happened in this context, yet I assume it would occur in any occurence related to XSD / XML schemas.
Error
org.springframework.beans.factory.xml.XmlBeanDefinitionReader: Ignored XML validation warning
org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = 'http://www.mulesource.org/schema/mule/management/2.2 http://www.mulesource.org/schema/mule/management/2.2/mule-management.xsd http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/tibcorv/2.2 http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd' must have even number of URI's.
Headers of XML config file:
[xml]<mule xmlns=&quot;http://www.mulesource.org/schema/mule/core/2.2&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:management="http://www.mulesource.org/schema/mule/management/2.2"
xmlns:tibcorv="http://www.mulesource.org/schema/mule/tibcorv/2.2
xsi:schemaLocation="http://www.mulesource.org/schema/mule/management/2.2
http://www.mulesource.org/schema/mule/management/2.2/mule-management.xsd
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/vm/2.2
http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/tibcorv/2.2
http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd">[/xml]
Explanation – Fix
Each time, the attribute xsi:schemaLocation must have an even number of lines: a “public” XSD address and a “non-public” one. For non English-fluent speakers, I remind that a number is even if, and only if, it is a multiple of 2 ; otherwise it is odd.
In our case, one line is redundant. To fix this issue, you have to remove the redundant line, and ensure each line belongs to a consistent pair of lines: for instance:
http://www.mulesource.org/schema/mule/tibcorv/2.2
and
http://www.mulesource.org/schema/mule/tibcorv/2.2/mule-tibcorv.xsd
TibrvException[error=901,message=Library not found: tibrvjsd]
Stacktrace
TibrvException[error=901,message=Library not found: tibrvjsd]
and below:
java.lang.UnsatisfiedLinkError: no tibrvjsd in java.library.path
The error appears also with tibrv instead of tibrvjsd.
Context
Mule ESB 2.2.1 using TibcoRV 8.1.2, under Windows XP, with Java 1.5
Explanation – Fix
- Explanation:
- the Mule tries to load a DLL, here tibrvjsd.dll. Its path should be available in the property java.library.path.
- Unlike what may be found on the net, the right DLL cannot be found under
%TIBRV_HOME%/lib, where only jars are available, not DLLs.
- Backup the file
%MULE_HOME%/conf/wrapper.conf - Edit it
- After the lines
[java]# Java Native Library Path (location of .DLL or .so files)
wrapper.java.library.path.1=%LD_LIBRARY_PATH%
wrapper.java.library.path.2=%MULE_HOME%/lib/boot[/java]
add the line:
[java]wrapper.java.library.path.3=%TIBRV_HOME%/bin[/java]