Wednesday, March 02, 2011

PHP 5.3 DirectoryIterator::getPathname bug on root

Using DirectoryIterator on root results in a different behavior of getPathname.

before 5.3 the output would be something like:
/var
/etc
...

after 5.3 it is:
//var
//etc
...
what the heck is it with the doubleslashes? It's only happening if you are using Root as the Directory to start with
new DirectoryIterator('/');
Although it seems to me like a bug, i found nothing on google. Reporting it was not possible as i am using a debian distributed version and i already know their answer. "Use the original one first"

Thursday, October 14, 2010

Maven troubles on Helios

I created a new working environment on my laptop and checked out my source via clone. After setting up everything i still had troubles deploying my application on glassfish:

|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=23;_ThreadName=http-thread-pool-4848-(1);|java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

Searching in the net i found out that maven on helios has a bug deploying dependencies on helios.
Here the Link:
http://www.eclipse.org/forums/index.php?t=msg&goto=544809&

I installed and checked everything, in the end i had to change this file:
${PROJECT_HOME}/.settings/org.eclipse.wst.common.component
consumes

Saturday, October 09, 2010

Moving from MySQL to Derby

Developing locally i wanted to move my Database from MySQL to Derby on my laptop. Since i use JPA Entities i thought it's an easy task just clicking some menus.

Unfortunately triing to create the Tables from Entities were not as easy as i hoped.

Constraints 'SQL101008073950601' and 'SQL101008073950600' have the same set of columns, which is not allowed.

This was the first Problem i had to fix. Since google (or any other search engine) is the developers best friend i found this bug information:
https://issues.apache.org/jira/browse/DERBY-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

This Link is also very informative:
https://forum.hibernate.org/viewtopic.php?f=1&t=998193

In the end it was this little Attribute in Column (unique = true)
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "hi_id", unique = true, nullable = false)
derby column, or type mapping 'VARCHAR(65535)' is not valid
I found this link:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501
@Column(name = "hi_text", length = 65535)
I had to cut the length to 32000.