Posts Tagged ‘Java’
weblogic.jms.common.MessageFormatException: JMSClientExceptions: Invalid property name, “my-personnal-id”
Error:
weblogic.jms.common.MessageFormatException: JMSClientExceptions: Invalid property name, "my-personnal-id"
Fix:
Rename the property as myPersonalId for instance. Indeed, owing to JMS specification, properties on JMS messages must be written in alphanumeric characters. Therefore, hyphen '-' and periods '.' are forbidden.
java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled
Error:
java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Fix: add cgilib-nodep.jar to your classpath.
LDIFReader: modify record not ends with ‘-‘ in the record starting on line
Error:
Error: LDAPLocalException: com.novell.ldap.ldif_dsml.LDIFReader: modify record not ends with '-' in the record starting on line 38 of the file. (82) Local Error
Fix:
- go to the line hinted in the error (here:
38) - get the block of the entry which is modified, for instance:
dn: cn=foo,ou=OUfoos,ou=Groups, dc=DCfoos
changetype: modify
add: uniqueMember
uniqueMember: cn=myFoo, ou=OUfoos, ou=Groups, dc=DCfoos
- then add a character
'-'at the end of this block, you get:
dn: cn=foo,ou=OUfoos,ou=Groups, dc=DCfoos
changetype: modify
add: uniqueMember
uniqueMember: cn=myFoo, ou=OUfoos, ou=Groups, dc=DCfoos
-
com.novell.ldap.ldif_dsml.LDIFReader: Version line must be the first meaningful line
Error:
LDAPLocalException: com.novell.ldap.ldif_dsml.LDIFReader: Version line must be the first meaningful line(on line 1 of the file) (82) Local Error
Fix: add this line at the bottom of your Ldif file:
version: 1
net/sf/ezmorph/Morpher
Error:
nested exception is java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:899) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
Fix: add ezmorph.jar to your classpath.
net.sf.cglib.transform.impl.InterceptFieldEnabled
Error:
java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Fix: add ehcache.jar in your classpath.
Java 7 diamonds
Tiger (Java 5) introduced new syntax, among which generics are the most used. Mustang (Java 6) did not offer anything new. Dolphin (Java 7) will introduce a new scheme, the “diamond syntax”. We deal of diamond because of the look of theses characters: “<>”
To sum up quickly, in Java 5 we have to write:
[java]
List<Integer> myList = new ArrayList<Integer>()
Map<String, List<Double>> myMap = new Hashmap<String, List<Double>>();[/java]
On last Dolphin development releases, we can simply write:
[java]
Lis<Integer> myList = new ArrayList<>()
Map<String, List<Double>> myMap = new Hashmap<>();[/java]
There’s nothing revolutionary, but developpers will save a little more time ;-).
Copy recursively a folder in MS-DOS
Abstract: we need copy all Java files in a folder and its subdirectories.
Solution:
xcopy C:\<source folder>\*.java C:\<destination folder>\
weblogic.management.ManagementException: Unable to obtain lock
Exception:
weblogic.management.ManagementException: Unable to obtain lock on /$HOME/.../myDomain/tmp/myServer.lok. Server may already be running at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:159) at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:58) at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:75) at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:374) at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:125) at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:630) at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:402) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361) at weblogic.Server.main(Server.java:67)
Fix:
- If possible, ensure you have admin rights
- else:
- delete
/$HOME/.../myDomain/cache - delete
/$HOME/.../myDomain/data/ldap/ldapfiles/*.lok - delete
/$HOME/.../myDomain/data/stores/diagnostics/* - delete
/$HOME/.../myDomain/data/stores/default/* - delete
/$HOME/.../myDomain/tmp/*.lok
- delete